Commit Graph
35077 Commits
Author SHA1 Message Date
github-actions[bot]GitHubgithub-actions[bot] <github-actions[bot]@users.noreply.github.com>
85f66ea9c7 chore: regenerate poetry.lock to match pyproject.toml (#23405)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-03-12 01:09:56 +00:00
yuneng-jiangandGitHub 2731337ba3 Merge pull request #23404 from BerriAI/litellm_proxy_extras_mar11_2
chore: bump proxy extras
2026-03-11 18:08:57 -07:00
yuneng-jiang 299ee16780 adding build 2026-03-11 18:08:20 -07:00
yuneng-jiang e1674bd34f bump: version 0.4.53 → 0.4.54 2026-03-11 18:07:58 -07:00
yuneng-jiangandGitHub d39355d36f Merge pull request #23402 from BerriAI/litellm_proxy_extras_mar11
Revert "fix: add missing indexes for top CPU-consuming queries (#23147)"
2026-03-11 18:00:47 -07:00
yuneng-jiang 64ed29db57 Revert "fix: add missing indexes for top CPU-consuming queries (#23147)"
This reverts commit 323b473835.
2026-03-11 17:40:59 -07:00
yuneng-jiangandGitHub 56557bfae1 Merge pull request #23400 from BerriAI/litellm_/elated-hoover
[Fix] Replace deprecated models in tests
2026-03-11 17:25:37 -07:00
yuneng-jiangandClaude Opus 4.6 82de82f1b6 Fix test_completion_cost_prompt_caching gemini parametrization
gemini/gemini-2.5-flash lacks cache_creation_input_token_cost in the
model cost map, causing a TypeError when the test multiplies
cache_creation_input_tokens by None. Use claude-haiku-4-5 instead,
which has the required prompt caching cost fields.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 17:12:15 -07:00
yuneng-jiangandClaude Opus 4.6 c9f7075690 Replace additional deprecated models across test files
- tests/local_testing/test_completion_cost.py:
  - claude-3-5-sonnet-20240620 -> claude-sonnet-4-6
  - gemini/gemini-1.5-flash-001 -> gemini/gemini-2.5-flash

- tests/test_litellm/test_utils.py:
  - claude-3-5-sonnet-20240620 -> claude-sonnet-4-6 (VertexAI config test, proxy tests)
  - gemini-1.5-pro -> gemini-2.5-pro (pre_process_non_default_params)
  - gemini/gemini-1.5-pro -> gemini/gemini-2.5-pro (proxy tests)

- tests/litellm_utils_tests/test_utils.py:
  - claude-3-opus-20240229 -> claude-sonnet-4-6 (trimming, vision tests)
  - gemini-pro -> gemini-2.5-pro (function calling test)
  - gemini-pro-vision -> gemini-2.5-flash (vision test)
  - gemini-1.5-pro -> gemini-2.5-pro (response schema test)
  - gemini/gemini-1.5-flash -> gemini/gemini-2.5-flash (function calling test)
  - gemini-1.5-pro -> gemini-2.5-pro (vision gemini test)
  - gpt-4-vision-preview -> gpt-4o (vision test)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 17:03:54 -07:00
ryan-crabbeandGitHub fdfb65c204 Merge pull request #23395 from BerriAI/litellm_fix-default-user-perms-respected-through-SCIM
fix: fix default user perms respected through SCIM
2026-03-11 16:57:29 -07:00
yuneng-jiangandClaude Opus 4.6 9379cb1038 [Fix] Replace deprecated models in function calling tests
Replace deprecated model references in test_proxy_function_calling_support_consistency:
- claude-3-5-sonnet-20240620 -> claude-sonnet-4-6
- gemini-pro -> gemini-2.5-pro
- gemini/gemini-1.5-pro -> gemini/gemini-2.5-pro
- gemini/gemini-1.5-flash -> gemini/gemini-2.5-flash

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 16:46:56 -07:00
yuneng-jiangandGitHub c239d33925 Merge pull request #23393 from BerriAI/litellm_ui_component_tests
[Test] Add Unit Tests for 5 UI Components
2026-03-11 16:44:15 -07:00
ryan-crabbeandGitHub e4e5436bc2 Merge pull request #23399 from BerriAI/revert-23174-feat_adding_timezone_to_usage_page
Revert "feat: adding a timezone picker to the usage page"
2026-03-11 16:34:14 -07:00
yuneng-jiangandGitHub 8617ca6e12 Merge pull request #23390 from BerriAI/litellm_/reverent-kalam
[Fix] Update test_bad_database_url CI check for new error message
2026-03-11 16:33:45 -07:00
ryan-crabbeandGitHub c2c102c6e2 Revert "feat: adding a timezone picker to the usage page" 2026-03-11 16:33:03 -07:00
yuneng-jiangandClaude Opus 4.6 28989a11e7 [Fix] Update test_bad_database_url to match new startup error message
PR #23257 changed proxy startup to exit early with "Database setup
failed after multiple retries" instead of letting uvicorn emit
"Application startup failed. Exiting." Update the CI grep check
to accept either error message for robustness.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 16:25:35 -07:00
Ishaan JaffandGitHub f5e5d17e4a fix(mcp): fix OpenAPI OAuth flow — transport mapping, error messages, and discovery bypass (#23315)
* fix(mcp): fix OpenAPI OAuth flow — transport mapping, error messages, and discovery bypass

Three bugs fixed to make the end-to-end OAuth flow work for OpenAPI MCP servers:

1. **Transport mapping in getTemporaryPayload**: `TRANSPORT.OPENAPI` is a UI-only concept;
   the backend only accepts `"http"`, `"sse"`, or `"stdio"`. The pre-OAuth temp-session
   call was sending `transport: "openapi"` and getting a 422. Fixed by mapping to `"http"`.

2. **deriveErrorMessage handles FastAPI 422 arrays**: FastAPI validation errors return
   `detail` as an array of `{loc, msg, type}` objects. The shared error extractor was
   returning the array directly, causing `Error: [object Object]`. Fixed to map each
   item to its `.msg` field.

3. **Skip OAuth discovery when authorization_url already provided**: `build_mcp_server_from_table`
   was unconditionally calling `_descovery_metadata(server_url)` for OAuth servers. For
   OpenAPI servers the url is the spec JSON file, not the API base — this caused a timeout
   fetching e.g. the GitHub spec (2 MB). Fixed by skipping discovery when `authorization_url`
   is already set.

Also: collapsible auth section in MCP server form, "Create OAuth App →" link next to
Client ID when a docs URL is available (e.g. GitHub OAuth App creation page), and
`extractErrorMessage` helper in `useMcpOAuthFlow` for cleaner error display.

* refactor(mcp): extract needs_discovery flag and reduceStaticHeaders helper

* feat(mcp): user OAuth connect flow — OAuthConnectModal, MCPCredentialsTab, useUserMcpOAuthFlow

Adds the user-facing MCP OAuth2 PKCE connect flow:

- OAuthConnectModal: modal that launches the PKCE flow for a user to connect to an MCP server
- MCPCredentialsTab: credentials management tab in the MCP apps panel
- useUserMcpOAuthFlow: hook that handles the full PKCE auth code exchange for user-level connections
- MCPAppsPanel: wires up the new credentials tab and connect modal
- ChatPage: further cleanup after responses-API revert
- db.py / mcp_management_endpoints.py / _types.py: backend support for storing user MCP credentials

* fix(mcp): make client_id optional in /authorize — use server's stored client_id when not provided

* address greptile review feedback

* fix(mcp): narrow bare except to RecordNotFoundError in BYOK credential delete

* refactor(mcp): move inline imports to module level in db.py

* docs(claude): add MCP OAuth, transport mapping, and browser storage patterns

* fix(security): remove accessToken from sessionStorage in OAuth flow state

The LiteLLM API key was being serialised into sessionStorage as part of
StoredFlowState. After the OAuth redirect the component re-mounts with the
same accessToken prop, so it never needed to be stored. Read it from props
in resumeOAuthFlow instead.

* fix(ui): remove duplicate extractErrorMessage, sessionStorage-only in admin OAuth hook, call delete API on disconnect

* fix(ui): guard resumeOAuthFlow against wrong hook instance consuming OAuth result

* fix(ui): separate OAuth result keys per flow, sessionStorage-only, surface revoke errors

* fix(ui): remove dead OAuthConnectModal, revert tsconfig jsx mode to preserve

* fix(mcp): guard BYOK overwrite in oauth credential store, raise clear error when client_id absent

* fix: forward OAuth error params in callback, fix BYOK guard exception handling in db.py
2026-03-11 16:16:08 -07:00
yuneng-jiangandGitHub 1f721fd133 Merge pull request #23394 from BerriAI/litellm_internal_dev_staging_branch
[Infra] Add Daily Internal Dev Staging Branch
2026-03-11 15:57:18 -07:00
yuneng-jiangandClaude Opus 4.6 202b5b29de Add daily internal dev branch creation job
Adds a new job to the existing daily staging branch workflow that creates
a `litellm_internal_dev_MM_DD_YYYY` branch from main twice a day. This
branch serves as a staging area before merging into main to improve
stability.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 15:53:42 -07:00
yuneng-jiangandClaude Opus 4.6 4405837aaa Add unit tests for 5 untested UI components
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 15:46:14 -07:00
Ryan Crabbe 18c0e8843c test: unit test for mkaing sure that user being created with correct value 2026-03-11 15:20:17 -07:00
yuneng-jiangandGitHub 56af724943 Merge pull request #23379 from BerriAI/litellm_ui_perf_fixes
[Fix] UI - Usage: Memoize Expensive Computations in UsagePageView
2026-03-11 14:55:23 -07:00
yuneng-jiangandGitHub 52f93aedc2 Merge pull request #23387 from BerriAI/litellm_fix_ruff_lint_errors
[Fix] Ruff Lint Errors: Unused Imports, Undefined Names, Statement Counts
2026-03-11 14:39:44 -07:00
ryan-crabbeandGitHub 79058ad596 Merge pull request #23174 from BerriAI/feat_adding_timezone_to_usage_page
feat: adding a timezone picker to the usage page
2026-03-11 14:38:19 -07:00
yuneng-jiangandGitHub 896e7b7623 Merge pull request #23367 from BerriAI/litellm_auto_redirect_sso_config
[Feature] Support auto_redirect_ui_login_to_sso in config.yaml
2026-03-11 14:37:24 -07:00
yuneng-jiangandGitHub 3968146f67 Merge pull request #23363 from BerriAI/litellm_fix_is_master_key_none_api_key
[Fix] TypeError in spend tracking when request has no API key
2026-03-11 14:34:44 -07:00
yuneng-jiangandClaude Opus 4.6 9c0cd6e02e Fix ruff lint errors: unused imports, undefined names, and statement counts
Remove unused imports (F401), add missing TYPE_CHECKING imports for
forward references (F821), and extract helpers to reduce statement
counts below the 50-statement limit (PLR0915).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 14:34:43 -07:00
yuneng-jiangandGitHub b5dfde892c Merge pull request #23377 from BerriAI/litellm_fix_flaky_mcp_and_agentcore_tests
[Fix] Flaky MCP Server and AgentCore Streaming Tests
2026-03-11 13:20:59 -07:00
yuneng-jiangandClaude Opus 4.6 13c0741262 Memoize expensive computations in UsagePageView to prevent unnecessary recalculations on every render
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 13:20:50 -07:00
Mr. ÅnandGitHubCursorgreptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
05fba27b0c Add Retool Assist tutorial with LiteLLM Proxy to docs (#21952)
* docs: add Retool Assist integration guide

- Add tutorials/retool_assist.md with setup instructions
- Add screenshots: Resources screen, Custom Provider config, resource query test
- Add retool_assist to AI Tools sidebar

Co-authored-by: Cursor <cursoragent@cursor.com>

* docs: refine Retool Assist guide layout

Co-authored-by: Cursor <cursoragent@cursor.com>

* docs: update Retool Assist guide with new screenshots

- Add Resources screen after step 1
- Update AI category and LiteLLM config modal images

Co-authored-by: Cursor <cursoragent@cursor.com>

* Apply suggestion from @greptile-apps[bot]

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>

* updated blank line

* Added video & gifs

Made-with: Cursor

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
2026-03-11 13:17:08 -07:00
yuneng-jiangandClaude Opus 4.6 64d3d7626f [Fix] Flaky MCP server and AgentCore streaming tests in CI
- MCP tests: set mock_mcp_server.oauth2_flow = None to prevent MagicMock
  leaking into Pydantic Literal validation for MCPServer
- AgentCore tests: pass api_key="test-jwt-token" to bypass SigV4 credential
  lookup that fails in CI without AWS credentials

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 13:08:48 -07:00
yuneng-jiangandGitHub 08bb3808bc Merge pull request #23374 from BerriAI/ui_build_fix_mar11
[infra] Fixing UI Build and Tests
2026-03-11 12:55:58 -07:00
yuneng-jiang d415ffc70b fixing ui build and tests 2026-03-11 12:55:16 -07:00
Ryan Crabbe 2773adba6d fix(ui): move timezone search icon to the left side in date picker 2026-03-11 12:20:34 -07:00
yuneng-jiangandClaude Opus 4.6 e5245adae6 Support auto_redirect_ui_login_to_sso in config.yaml general_settings
Previously this setting was only honored via the AUTO_REDIRECT_UI_LOGIN_TO_SSO
environment variable. Now it can also be set in config.yaml under general_settings,
matching the pattern used by other proxy settings.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 11:34:17 -07:00
Cesar GarciaandGitHub 59c24b7405 Merge pull request #17717 from Chesars/docs/responses-api-bridge-clarification
docs: clarify when to use openai/responses/ prefix for built-in tools
2026-03-11 15:18:32 -03:00
Cesar GarciaandGitHub 57e73c8f5e Merge pull request #20795 from Chesars/chore/remove-deprecated-models
chore: cleanup deprecated models from pricing JSON
2026-03-11 15:18:13 -03:00
Chesars 1a3fdc7ae3 fix: align Vertex AI Claude deprecations with Google's schedule
- Restore vertex_ai/claude-3-7-sonnet@20250219 (Vertex AI shutdown is
  May 11, 2026, still active — was incorrectly removed based on
  Anthropic API retirement date)
- Remove vertex_ai/claude-3-5-sonnet-v2 and
  vertex_ai/claude-3-5-sonnet-v2@20241022 (Vertex AI shutdown was
  Feb 19, 2026, already past)
- Remove deprecated claude-3-7-sonnet-20250219 from web search test,
  use only non-deprecated models

Source: https://docs.google.com/vertex-ai/generative-ai/docs/deprecations/partner-models
2026-03-11 15:11:07 -03:00
yuneng-jiangandClaude Opus 4.6 1a08ac6619 Fix TypeError in _is_master_key when api_key is None
When a request arrives without an API key, auth fails and the failure
hook triggers spend tracking. _is_master_key was called with api_key=None,
causing secrets.compare_digest to raise TypeError. Add a None guard for
api_key matching the existing guard for _master_key.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 11:01:29 -07:00
yuneng-jiangandGitHub 1d1baa2cd5 Merge pull request #23362 from BerriAI/litellm_ui_model_mcp
[Fix] Null safe checks for MCP Hub Tab
2026-03-11 10:50:54 -07:00
Chesars d81d751af0 fix(tests): update tests to use models still present in pricing JSON
Replace removed deprecated models (claude-3-5-sonnet-20241022,
claude-3-5-haiku-20241022, claude-3-5-haiku-latest) with current
models in web_search and cost calculation tests.
2026-03-11 14:50:47 -03:00
yuneng-jiang 8af34ffebc null-safe array checks 2026-03-11 10:35:51 -07:00
Chesars 45ca8b5b2b chore: resolve merge conflicts with upstream/main
Accept upstream's new models and re-apply removal of 133 deprecated models.
2026-03-11 14:24:53 -03:00
Chesars f9a538b583 fix(docs): close unclosed code block before Examples heading 2026-03-11 14:15:54 -03:00
Cesar GarciaGitHubgreptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
274bf42493 Update docs/my-website/docs/providers/openai.md
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
2026-03-11 14:13:56 -03:00
Chesars 9e7a6a73ed docs: remove duplicate gpt-5.4 tip block 2026-03-11 13:48:47 -03:00
Chesars 01a6c707a3 docs: restore gpt-5.4 reasoning_effort tip lost during rebase 2026-03-11 13:48:07 -03:00
Chesars d0d09e037e docs: clarify when to use openai/responses/ prefix for built-in tools
The existing documentation for the Responses API bridge only showed
examples with models that have `mode: responses` (like o3-deep-research),
which work automatically. This update clarifies that models with
`mode: chat` (like gpt-4o, gpt-5) require the `openai/responses/` prefix
to use built-in tools like web_search_preview.

Changes:
- Explain the `mode` property from model_prices_and_context_window.json
- List models with mode: responses vs mode: chat
- Add example showing the common error and how to fix it
- Add SDK example using the prefix with gpt-4o
- Update proxy example with both automatic and prefix-based configs
- Fix invalid trailing comma in original JSON example
2026-03-11 13:47:57 -03:00
michelligabrieleandGitHub 24ad510617 feat(mcp): add AWS SigV4 auth support in UI and fix credential merge on edit (#23282) 2026-03-11 09:43:28 -07:00
Chesars eb30aa34cf chore: restore gpt-4-0613 (still functional despite deprecation date)
Verified via curl that gpt-4-0613 still responds successfully.
gpt-4-0314 confirmed dead (model_not_found), stays removed.
2026-03-11 12:31:41 -03:00