* fix(proxy/_types.py): allow internal user to call api playground
* fix(new_usage.tsx): cleanup tag based usage - only show for proxy admin
not clear what tags internal user should be allowed to see
* fix(team_endpoints.py): allow internal user view spend for teams they belong to
* fix(team_endpoints.py): return team alias on `/team/daily/activity` API
allows displaying team alias on ui
* fix: fix linting error
* fix(entity_usage.tsx): allow viewing top keys by team
* fix(entity_usage.tsx): show alias, if available in breakdown
allows entity alias to be easily displayed
* Show usage by key (on all up, team, and tag usage dashboards) (#10152)
* fix(entity_usage.tsx): allow user to select team in team usage tab
* fix(new_usage.tsx): load all tags for filtering
* fix(tag_management_endpoints.py): return dynamic tags from db on `/tag/list`
* fix(litellm_pre_call_utils.py): support x-litellm-tags even if tag based routing not enabled
* fix(new_usage.tsx): show breakdown of usage by api key on dashboard
helpful when looking at spend by team
* fix(networking.tsx): exclude litellm-dashboard team id's from calls
adds noisy ui tokens to key activity
* fix(new_usage.tsx): allow user to see activity by key on main tab
* feat(internal_user_endpoints.py): refactor to use common_daily_activity function
reuses same logic across teams/keys/tags
Allows returning team_alias in api_keys consistently
* fix(leftnav.tsx): swap old usage with new usage tab
* fix(entity_usage.tsx): show breakdown of teams in daily spend chart
* style(new_usage.tsx): show global usage tab if user is admin / has admin view
* fix(new_usage.tsx): add disclaimer for new usage dashboard
* fix(new_usage.tsx): fix linting error
* Allow filtering usage dashboard by team + tag (#10150)
* fix(entity_usage.tsx): allow user to select team in team usage tab
* fix(new_usage.tsx): load all tags for filtering
* fix(tag_management_endpoints.py): return dynamic tags from db on `/tag/list`
* fix(litellm_pre_call_utils.py): support x-litellm-tags even if tag based routing not enabled
* fix: fix linting error
* feat: initial commit adding daily tag spend table to db
* feat(db_spend_update_writer.py): correctly log tag spend transactions
* build(schema.prisma): add new tag table to root
* build: add new migration file
* feat(common_daily_activity.py): add `/tag/daily/activity` API endpoint
allows viewing daily spend by tag
* feat(tag_management_endpoints.py): support comma separated list of tags + tag breakdown metric
allows querying multiple tags + knowing what tags are driving spend
* feat(entity_usage.tsx): initial commit adding tag based usage to litellm dashboard
brings back tag based usage tracking to UI at 1m+ spend logs
* feat(entity_usage.tsx): add top api key view to ui
* feat(entity_usage.tsx): add tag table to ui
* feat(entity_usage.tsx): allow filtering by tag
* refactor(entity_usage.tsx): reorder components
* build(ui/): fix linting error
* fix: fix ruff checks
* fix(schema.prisma): drop uniqueness requirement on tag
allows dailytagspend to have multiple rows with the same tag
* build(schema.prisma): drop uniqueness requirement on tag in dailytagspend
allows tag agg. view to work on multiple rows with same tag
* build(schema.prisma): drop tag uniqueness requirement
* feat(internal_user_endpoints.py): allow non-admin to view their own usage via `/user/daily/activity` route
* fix(leftnav.tsx): allow users to view their own usage via new_usage.tsx
allows internal users to see their usage via new api
Handles 1m+ spend logs scenario
* fix(leftnav.tsx): allow all users to see new usage tab
* fix(new_usage.tsx): enable smooth scrolling - remove double scroll bars
enables easier viewing of overflowing content
* fix(new_usage.tsx): fix ordering of daily spend
ensure always from earliest to latest date
* feat(internal_user_endpoints.py): return key alias on `/user/daily/activity`
Enables easier consumption on UI
* fix(new_usage.tsx): show key alias on usage tab
* feat(activity_metric.tsx): new activity panel - showing spend per model per day
allows debugging if models are not being tracked
* fix(top_key_view.tsx): use consistent param for selecting key
* feat(internal_user_endpoints.py): return 'total_tokens' in `/user/daily/analytics`
* test(test_internal_user_endpoints.py): add unit test to assert spend metrics and dailyspend metadata always report the same fields
* build(schema.prisma): record success + failure calls to daily user table
allows understanding why model requests might exceed provider requests (e.g. user hit rate limit error)
* fix(internal_user_endpoints.py): report success / failure requests in API
* fix(proxy/utils.py): default to success
status can be missing or none at times for successful requests
* feat(new_usage.tsx): show success/failure calls on UI
* style(new_usage.tsx): ui cleanup
* fix: fix linting error
* fix: fix linting error
* feat(litellm-proxy-extras/): add new migration files
* fix(internal_user_endpoints.py): cleanup unused variables on beta endpoint
no team/org split on daily user endpoint
* build(model_prices_and_context_window.json): gemini-2.0-flash supports audio input
* feat(gemini/transformation.py): support passing audio input to gemini
* test: fix test
* fix(gemini/transformation.py): support audio input as a url
enables passing google cloud bucket urls
* fix(gemini/transformation.py): support explicitly passing format of file
* fix(gemini/transformation.py): expand support for inferred file types from url
* fix(sagemaker/completion/transformation.py): fix special token error when counting sagemaker tokens
* test: fix import
* build(pyproject.toml): add new dev dependencies - for type checking
* build: reformat files to fit black
* ci: reformat to fit black
* ci(test-litellm.yml): make tests run clear
* build(pyproject.toml): add ruff
* fix: fix ruff checks
* build(mypy/): fix mypy linting errors
* fix(hashicorp_secret_manager.py): fix passing cert for tls auth
* build(mypy/): resolve all mypy errors
* test: update test
* fix: fix black formatting
* build(pre-commit-config.yaml): use poetry run black
* fix(proxy_server.py): fix linting error
* fix: fix ruff safe representation error
* feat(spend_management_endpoints.py): expose new endpoint for querying user's usage at 1m+ spend logs
Allows user to view their spend at 1m+ spend logs
* build(schema.prisma): add api_requests to dailyuserspend table
* build(migration.sql): add migration file for new column to daily user spend table
* build(prisma_client.py): add logic for copying over migration folder, if deploy/migrations present in expected location
enables easier testing of prisma migration flow
* build(ui/): initial commit successfully using the dailyuserspend table on the UI
* refactor(internal_user_endpoints.py): refactor `/user/daily/activity` to give breakdowns by provider/model/key
* feat: feature parity (cost page) with existing 'usage' page
* build(ui/): add activity tab to new_usage.tsx
gets to feature parity on 'All Up' page of 'usage.tsx'
* fix(proxy/utils.py): count number of api requests in daily user spend table
allows us to see activity by model on new usage tab
* style(new_usage.tsx): fix y-axis to be in ascending order of date
* fix: fix linting errors
* fix: fix ruff check errors
* fix(create_user_button.tsx): allow admin to set models user has access to, on invite
Enables controlling model access on invite
* feat(auth_checks.py): enforce 'no-model-access' special model name on backend
prevent user from calling models if default key has no model access
* fix(chat_ui.tsx): allow user to input custom model
* fix(chat_ui.tsx): pull available models based on models key has access to
* style(create_user_button.tsx): move default model inside 'personal key creation' accordion
* fix(chat_ui.tsx): fix linting error
* test(test_auth_checks.py): add unit-test for special model name
* docs(internal_user_endpoints.py): update docstring
* fix test_moderations_bad_model
* Litellm dev 02 27 2025 p6 (#8891)
* fix(http_parsing_utils.py): orjson can throw errors on some emoji's in text, default to json.loads
* fix(sagemaker/handler.py): support passing model id on async streaming
* fix(litellm_pre_call_utils.py): Fixes https://github.com/BerriAI/litellm/issues/7237
* Fix calling claude via invoke route + response_format support for claude on invoke route (#8908)
* fix(anthropic_claude3_transformation.py): fix amazon anthropic claude 3 tool calling transformation on invoke route
move to using anthropic config as base
* fix(utils.py): expose anthropic config via providerconfigmanager
* fix(llm_http_handler.py): support json mode on async completion calls
* fix(invoke_handler/make_call): support json mode for anthropic called via bedrock invoke
* fix(anthropic/): handle 'response_format: {"type": "text"}` + migrate amazon claude 3 invoke config to inherit from anthropic config
Prevents error when passing in 'response_format: {"type": "text"}
* test: fix test
* fix(utils.py): fix base invoke provider check
* fix(anthropic_claude3_transformation.py): don't pass 'stream' param
* fix: fix linting errors
* fix(converse_transformation.py): handle response_format type=text for converse
* converse_transformation: pass 'description' if set in response_format (#8907)
* test(test_bedrock_completion.py): e2e test ensuring tool description is passed in
* fix(converse_transformation.py): pass description, if set
* fix(transformation.py): Fixes https://github.com/BerriAI/litellm/issues/8767#issuecomment-2689887663
* Fix bedrock passing `response_format: {"type": "text"}` (#8900)
* fix(converse_transformation.py): ignore type: text, value in response_format
no-op for bedrock
* fix(converse_transformation.py): handle adding response format value to tools
* fix(base_invoke_transformation.py): fix 'get_bedrock_invoke_provider' to handle cross-region-inferencing models
* test(test_bedrock_completion.py): add unit testing for bedrock invoke provider logic
* test: update test
* fix(exception_mapping_utils.py): add context window exceeded error handling for databricks provider route
* fix(fireworks_ai/): support passing tools + response_format together
* fix: cleanup
* fix(base_invoke_transformation.py): fix imports
* (Feat) - Show Error Logs on LiteLLM UI (#8904)
* fix test_moderations_bad_model
* use async_post_call_failure_hook
* basic logging errors in DB
* show status on ui
* show status on ui
* ui show request / response side by side
* stash fixes
* working, track raw request
* track error info in metadata
* fix showing error / request / response logs
* show traceback on error viewer
* ui with traceback of error
* fix async_post_call_failure_hook
* fix(http_parsing_utils.py): orjson can throw errors on some emoji's in text, default to json.loads
* test_get_error_information
* fix code quality
* rename proxy track cost callback test
* _should_store_errors_in_spend_logs
* feature flag error logs
* Revert "_should_store_errors_in_spend_logs"
This reverts commit 7f345df477.
* Revert "feature flag error logs"
This reverts commit 0e90c022bb.
* test_spend_logs_payload
* fix OTEL log_db_metrics
* fix import json
* fix ui linting error
* test_async_post_call_failure_hook
* test_chat_completion_bad_model_with_spend_logs
---------
Co-authored-by: Krrish Dholakia <krrishdholakia@gmail.com>
* ui new build
* test_chat_completion_bad_model_with_spend_logs
* docs(release_cycle.md): document release cycle
* bump: version 1.62.0 → 1.62.1
---------
Co-authored-by: Ishaan Jaff <ishaanjaffer0324@gmail.com>
* refactor(internal_user_endpoints.py): refactor `/user/list` to accept 'user_ids' and use prisma for db calls
enables bulk search from UI
* fix(internal_user_endpoints.py): fix linting errors
* fix(all_keys_table.tsx): show user email on create key table
make it easier for admin to know which key is associated to which user
* docs(internal_user_endpoints.py): improve docstring
* fix: sync schema with main
* fix(columns.tsx): display SSO ID on Internal User Table
make it easy to identify what the SSO ID for a user is
* fix(columns.tsx): add tooltip to header
help user understand what SSO ID means
* style: add more tooltips in the management flows
make it easier to understand what you're seeing
* style(all_keys_table.tsx): replace 'Not Set' with '-'
reduces words on table
* fix(internal_user_endpoints.py): fix user ids check
* test: fix test
* fix(internal_user_endpoints.py): maintain returning key count in `/user/list`
* allow bulk adding internal users
* allow sorting users by created at
* cleanup
* clean up user table
* show total num users
* show per user error when bulk adding users
* fix - don't allow creating duplicate internal users in DB
* ui flow fix for bulk adding users
* allow adding user in multiple teams with models
* correctly extract info
* working invitation link
* fix fill in table after bulk add
* fix the results from creating new users in bulkd
* bulk invite users
* fix view user flow
* fix ui type errors
* fix type errors
* fix type errors
* fix(proxy/_types.py): fixes issue where internal user able to escalate their role with ui key
Fixes https://github.com/BerriAI/litellm/issues/8029
* style: cleanup
* test: handle bedrock instability
* use class ResetBudgetJob
* refactor reset budget job
* update reset_budget job
* refactor reset budget job
* fix LiteLLM_UserTable
* refactor reset budget job
* add telemetry for reset budget job
* dd - log service success/failure on DD
* add detailed reset budget reset info on DD
* initialize_scheduled_background_jobs
* refactor reset budget job
* trigger service failure hook when fails to reset a budget for team, key, user
* fix resetBudgetJob
* unit testing for ResetBudgetJob
* test_duration_in_seconds_basic
* testing for triggering service logging
* fix logs on test teams fail
* remove unused imports
* fix import duration in s
* duration_in_seconds
* refactor(admin.tsx): cleanup add new admin flow
removes buggy flow. Ensures just 1 simple way to add users / update roles.
* fix(user_search_modal.tsx): ensure 'add member' button is always visible
* fix(edit_membership.tsx): ensure 'save changes' button always visible
* fix(internal_user_endpoints.py): ensure user in org can be deleted
Fixes issue where user couldn't be deleted if they were a member of an org
* fix: fix linting error
* fix(key_management_endpoints.py): fix vulnerability where a user could update another user's keys
Resolves https://github.com/BerriAI/litellm/issues/8031
* test(key_management_endpoints.py): return consistent 403 forbidden error when modifying key that doesn't belong to user
* fix(internal_user_endpoints.py): return model max budget in internal user create response
Fixes https://github.com/BerriAI/litellm/issues/7047
* test: fix test
* test: update test to handle gemini token counter change
* fix(factory.py): fix bedrock http:// handling
* docs: fix typo in lm_studio.md (#8222)
* test: fix testing
* test: fix test
---------
Co-authored-by: foreign-sub <51928805+foreign-sub@users.noreply.github.com>
* fix(ui_sso.py): use common `get_user_object` logic across jwt + ui sso auth
Allows finding users by their email, and attaching the sso user id to the user if found
* Improve Team Management flow on UI (#8204)
* build(teams.tsx): refactor teams page to make it easier to add members to a team
make a row in table clickable -> allows user to add users to team they intended
* build(teams.tsx): make it clear user should click on team id to view team details
simplifies team management by putting team details on separate page
* build(team_info.tsx): separately show user id and user email
make it easy for user to understand the information they're seeing
* build(team_info.tsx): add back in 'add member' button
* build(team_info.tsx): working team member update on team_info.tsx
* build(team_info.tsx): enable team member delete on ui
allow user to delete accidental adds
* build(internal_user_endpoints.py): expose new endpoint for ui to allow filtering on user table
allows proxy admin to quickly find user they're looking for
* feat(team_endpoints.py): expose new team filter endpoint for ui
allows proxy admin to easily find team they're looking for
* feat(user_search_modal.tsx): allow admin to filter on users when adding new user to teams
* test: mark flaky test
* test: mark flaky test
* fix(exception_mapping_utils.py): fix anthropic text route error
* fix(ui_sso.py): handle situation when user not in db
* test: add more unit testing for team member add
* fix(team_endpoints.py): add validation check to prevent same user from being added to team again
prevents duplicates
* fix(team_endpoints.py): raise error if `/team/member_delete` called on member that's not in team
prevent being able to call delete on same member multiple times
* test: update initial tests
* test: fix test
* test: update test to handle no member duplication
* feat(team_endpoints.py): new `/teams/available` endpoint - allows proxy admin to expose available teams for users to join on UI
* build(ui/): available_teams.tsx
allow user to join available teams on UI
makes it easier to onboard new users to teams
* fix(navbar.tsx): cleanup title
* fix(team_endpoints.py): fix linting error
* test: update groq model in test
* build(model_prices_and_context_window.json): update groq 3.3 model with 'supports function calling'
* feat(router.py): support request prioritization for text completion calls
* fix(internal_user_endpoints.py): fix sql query to return all keys, including null team id keys on `/user/info`
Fixes https://github.com/BerriAI/litellm/issues/7485
* fix: fix linting errors
* fix: fix linting error
* test(test_router_helper_utils.py): add direct test for '_schedule_factory'
Fixes code qa test
* fix(internal_user_endpoints.py): fix team list sort - handle team_alias being set + None
* fix(key_management_endpoints.py): allow team admin to create key for member via admin ui
Fixes https://github.com/BerriAI/litellm/issues/7482
* fix(proxy_server.py): allow querying info on specific model group via `/model_group/info`
allows client-side user to get model info from proxy
* fix(proxy_server.py): add docstring on `/model_group/info` showing how to filter by model name
* test(test_proxy_utils.py): add unit test for returning model group info filtered
* fix(proxy_server.py): fix query param
* fix(test_Get_model_info.py): handle no whitelisted bedrock modells
* fix(factory.py): ensure tool call converts image url
Fixes https://github.com/BerriAI/litellm/issues/6953
* fix(transformation.py): support mp4 + pdf url's for vertex ai
Fixes https://github.com/BerriAI/litellm/issues/6936
* fix(http_handler.py): mask gemini api key in error logs
Fixes https://github.com/BerriAI/litellm/issues/6963
* docs(prometheus.md): update prometheus FAQs
* feat(auth_checks.py): ensure specific model access > wildcard model access
if wildcard model is in access group, but specific model is not - deny access
* fix(auth_checks.py): handle auth checks for team based model access groups
handles scenario where model access group used for wildcard models
* fix(internal_user_endpoints.py): support adding guardrails on `/user/update`
Fixes https://github.com/BerriAI/litellm/issues/6942
* fix(key_management_endpoints.py): fix prepare_metadata_fields helper
* fix: fix tests
* build(requirements.txt): bump openai dep version
fixes proxies argument
* test: fix tests
* fix(http_handler.py): fix error message masking
* fix(bedrock_guardrails.py): pass in prepped data
* test: fix test
* test: fix nvidia nim test
* fix(http_handler.py): return original response headers
* fix: revert maskedhttpstatuserror
* test: update tests
* test: cleanup test
* fix(key_management_endpoints.py): fix metadata field update logic
* fix(key_management_endpoints.py): maintain initial order of guardrails in key update
* fix(key_management_endpoints.py): handle prepare metadata
* fix: fix linting errors
* fix: fix linting errors
* fix: fix linting errors
* fix: fix key management errors
* fix(key_management_endpoints.py): update metadata
* test: update test
* refactor: add more debug statements
* test: skip flaky test
* test: fix test
* fix: fix test
* fix: fix update metadata logic
* fix: fix test
* ci(config.yml): change db url for e2e ui testing
* feat(customer_endpoints.py): support passing budget duration via `/customer/new` endpoint
Closes https://github.com/BerriAI/litellm/issues/5651
* docs: add missing params to swagger + api documentation test
* docs: add documentation for all key endpoints
documents all params on swagger
* docs(internal_user_endpoints.py): document all /user/new params
Ensures all params are documented
* docs(team_endpoints.py): add missing documentation for team endpoints
Ensures 100% param documentation on swagger
* docs(organization_endpoints.py): document all org params
Adds documentation for all params in org endpoint
* docs(customer_endpoints.py): add coverage for all params on /customer endpoints
ensures all /customer/* params are documented
* ci(config.yml): add endpoint doc testing to ci/cd
* fix: fix internal_user_endpoints.py
* fix(internal_user_endpoints.py): support 'duration' param
* fix(partner_models/main.py): fix anthropic re-raise exception on vertex
* fix: fix pydantic obj
* feat(custom_logger.py): expose new `async_dataset_hook` for modifying/rejecting argilla items before logging
Allows user more control on what gets logged to argilla for annotations
* feat(google_ai_studio_endpoints.py): add new `/azure/*` pass through route
enables pass-through for azure provider
* feat(utils.py): support checking ollama `/api/show` endpoint for retrieving ollama model info
Fixes https://github.com/BerriAI/litellm/issues/6322
* fix(user_api_key_auth.py): add `/key/delete` to an allowed_ui_routes
Fixes https://github.com/BerriAI/litellm/issues/6236
* fix(user_api_key_auth.py): remove type ignore
* fix(user_api_key_auth.py): route ui vs. api token checks differently
Fixes https://github.com/BerriAI/litellm/issues/6238
* feat(internal_user_endpoints.py): support setting models as a default internal user param
Closes https://github.com/BerriAI/litellm/issues/6239
* fix(user_api_key_auth.py): fix exception string
* fix(user_api_key_auth.py): fix error string
* fix: fix test
* track LiteLLM_OrganizationMembership
* add add_internal_user_to_organization
* add org membership to schema
* read organization membership when reading user info in auth checks
* add check for valid organization_id
* add test for test_create_new_user_in_organization
* test test_create_new_user_in_organization
* add new ADMIN role
* add test for org admins creating teams
* add test for test_org_admin_create_user_permissions
* test_org_admin_create_user_team_wrong_org_permissions
* test_org_admin_create_user_team_wrong_org_permissions
* fix organization_role_based_access_check
* fix getting user members
* fix TeamBase
* fix types used for use role
* fix type checks
* sync prisma schema
* docs - organization admins
* fix use organization_endpoints for /organization management
* add types for org member endpoints
* fix role name for org admin
* add type for member add response
* add organization/member_add
* add error handling for adding members to an org
* add nice doc string for oranization/member_add
* fix test_create_new_user_in_organization
* linting fix
* use simple route changes
* fix types
* add organization member roles
* add org admin auth checks
* add auth checks for orgs
* test for creating teams as org admin
* simplify org id usage
* fix typo
* test test_org_admin_create_user_team_wrong_org_permissions
* fix type check issue
* code quality fix
* fix schema.prisma