Commit Graph
35063 Commits
Author SHA1 Message Date
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-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
Chesars 16de1e300c chore: restore gemini-live-2.5-flash-preview-native-audio-09-2025 (shutdown Mar 19 2026, not yet)
The shutdown date is March 19, 2026 — we're not there yet.
Restoring both vertex_ai and gemini/ variants.
2026-03-11 12:24:07 -03:00
Chesars d43683e875 chore: restore text-embedding-ada-002-v2 (not deprecated)
text-embedding-ada-002 is not listed as deprecated in OpenAI's
official deprecations page. Re-adding the v2 alias entry.
2026-03-11 12:22:38 -03:00
Joe ReynaandGitHub cbbd51a5ce fix(codeql): switch to security-extended to fix OOM failures (#23226)
* fix(codeql): switch to security-extended query suite

The security-and-quality suite produces result sets > 2 GiB on this
codebase, causing fatal OOM failures and blocking CI. Switching to
security-extended reduces query scope to security-only checks, which
still complete successfully. Quality/maintainability checks are
already covered by the existing lint pipeline.

* fix(codeql): exclude OOM queries from security-extended
2026-03-11 07:38:01 -07:00
Joe ReynaandGitHub 7d2cc4a3bf fix(ui): import MCPEvent type into local scope in chat/types.ts (#23330) 2026-03-11 07:37:24 -07:00
Harshit JainandGitHub 7db34e3179 Merge pull request #23257 from Harshit28j/litellm_fix-client-close-evict
fix: fail proxy startup if prisma migrate fails
2026-03-11 19:45:13 +05:30
Sameer KankuteandGitHub d99ddc67d4 Merge pull request #23338 from BerriAI/litellm_fix_multipart_passthrough
fix(proxy): preserve multipart/form-data boundary in passthrough endpoints
2026-03-11 19:30:54 +05:30
Sameer KankuteandGitHub 8e32919074 Merge branch 'main' into litellm_fix_multipart_passthrough 2026-03-11 19:30:45 +05:30
Sameer KankuteandGitHub 20980f6c26 Merge pull request #23322 from BerriAI/litellm_gemini_embedding_2_support
[Feat]: Add support for gemini embedding 2 preview
2026-03-11 19:30:09 +05:30
Chesars fd46d74424 chore: remove 137 confirmed deprecated/shutdown models from pricing JSON
Remove models verified as deprecated/shutdown against provider APIs:

- Anthropic (8): Claude 3.5 Sonnet/Haiku (shutdown Feb 2026), Claude 3.7 Sonnet,
  Claude 3 Opus (deprecated)
- OpenAI/Azure (23): GPT-3.5-turbo snapshots, GPT-4 dated snapshots, GPT-4-32k,
  GPT-4.5-preview (shutdown Jul 2025), o1-mini/preview (deprecated Apr 2025),
  old audio/realtime previews, azure/gpt-35-turbo-0301 and -0613 (retired Feb 2025)
- Google PaLM legacy (32): All chat-bison, code-bison, codechat-bison, text-bison,
  textembedding-gecko variants (retired)
- Gemini 1.0/1.5 (28): All variants including gemini/ prefix (shutdown Sep 2025)
- Gemini 2.0 experimental (13): flash-exp, thinking-exp, pro-exp, live-preview,
  image-generation preview (all expired)
- Gemini 2.5 dated previews (14): preview-03-25 through 06-05, flash-image-preview
  (shutdown Jan 2026), live-audio preview (shutdown Mar 2026)
- Veo 3.0 previews (4): shutdown Nov 2025, replaced by GA/3.1
- Perplexity legacy (5): llama-3.1-sonar-* (replaced by sonar-pro/sonar)

Verified sources:
- https://developers.openai.com/api/docs/deprecations/
- https://platform.claude.com/docs/en/about-claude/model-deprecations
- https://ai.google.dev/gemini-api/docs/deprecations
- https://learn.microsoft.com/en-us/azure/foundry/openai/concepts/model-retirements

Models intentionally kept:
- All GPT-5 family, azure/gpt-35-turbo-1106 (not confirmed retired)
- gemini-2.5-flash/pro GA, active previews (tts, computer-use, flash-lite, flash-image)
- imagen-3.0-generate-002, all Gemini 3.x, all Claude 4.x
- cerebras/zai-glm-4.6 (active)
- All Mistral, Nebius, Dashscope, Fireworks, Together AI models
2026-03-11 10:59:35 -03:00
michelligabrieleandGitHub db4cd87979 docs(web_fetch): add newer Claude models to supported models list (#23251)
Add Claude Opus 4.6, Sonnet 4.6, Opus 4.5, Sonnet 4.5, and Haiku 4.5
to the web fetch supported models documentation. These models were
missing from the list despite supporting the web_fetch tool.
2026-03-11 19:09:28 +05:30
Sameer KankuteandGitHub ff2fe96717 Merge pull request #23276 from BerriAI/litellm_oss_staging_03_10_2026
Litellm oss staging 03 10 2026
2026-03-11 18:54:38 +05:30
Sameer KankuteandGitHub f243e5615f Merge branch 'main' into litellm_oss_staging_03_10_2026 2026-03-11 18:50:03 +05:30
Sameer KankuteandGitHub 2343149f2d Merge pull request #23163 from BerriAI/litellm_oss_staging_03_04_2026
Litellm oss staging 03 04 2026
2026-03-11 18:46:51 +05:30
Sameer KankuteandGitHub 43217c8a4b Merge branch 'main' into litellm_oss_staging_03_10_2026 2026-03-11 18:32:17 +05:30