Commit Graph
32168 Commits
Author SHA1 Message Date
Emerson GomesandSameer Kankute 8a650f0170 fix(cache): prevent DualCache async batch check-then-act race (#20986)
* fix(cache): prevent dual cache batch redis race under concurrency

* chore(cache): remove unused dual cache batch key helper

* chore(cache): align dual cache type hints and throttle comment
2026-02-13 18:32:41 +05:30
Emerson GomesandSameer Kankute cba3bcf1a9 fix(logging): avoid shared callback list references (#20984) 2026-02-13 18:32:41 +05:30
Sameer Kankute 8a2bc265af feat(bedrock): add support for 4 new beta models (#20974)
* feat(bedrock): add DeepSeek V3.2 pricing and region support

* feat(bedrock): add minimax.minimax-m2.1  pricing and region support

* feat(bedrock): add moonshotai.kimi-k2.5  pricing and region support

* feat(bedrock): add qwen.qwen3-coder-next
  pricing and region support

* add some sanity unit tests for the bedrock beta models added

* --amend

* resolve greptileai comments and suggestions
2026-02-13 18:32:12 +05:30
75d0d2bd7a fix(openrouter): preserve token counts from streaming usage chunks (#21011)
* docs: add reference to example_openai_endpoint repo for self-hosting fake OpenAI proxy (#21006)

- Updated benchmarks.md with a section on setting up fake OpenAI endpoints
- Updated load_test.md to mention the self-hosted option
- Updated load_test_advanced.md with a tip box about the example repo

Reference: https://github.com/BerriAI/example_openai_endpoint

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

* MCP fixes

* fix(oldteams.tsx): show policies when creating

* fix(proxy/_types.py): ensure mcp rest endpoints can be called by virtual key

ensures UI works with virtual key testing mcp endpoints

* refactor: migrate get object permissions table logic to happen in user api key auth - allows functions to trust user api key object they receive has what they need

* fix(rest_endpoints.py): filter for allowed tools based on what key has access to

* fix(mcp_server_manager.py): ensure only allowed MCP's are returned to the user, via rest endpoints

* Guardrails - add toxic/abusive content filter guardrails

* fix(streaming): preserve usage data from post-finish_reason chunks in OpenAI-compatible streaming

Fixes #16112

OpenRouter and other OpenAI-compatible providers send a usage chunk after
the finish_reason='stop' chunk when stream_options.include_usage is True.
The OpenAIChatCompletionStreamingHandler.chunk_parser() was not passing
the usage field to ModelResponseStream, causing real token counts from the
provider to be lost and falling back to inaccurate estimates.

* fix: resolve merge conflict in test file

- Fix typo in test method name (extra space)
- Move test_prompt_cache_key_in_optional_params to its own class

---------

Co-authored-by: Krish Dholakia <krrishdholakia@gmail.com>
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
2026-02-13 18:27:22 +05:30
Lei NieandSameer Kankute e9c99f41bd fix(vertex_ai): forward extra_body to completion transformation handler (#20950)
* fix(vertex_ai): forward extra_body to completion transformation handler

The responses() function accepted extra_body as a named parameter but
did not pass it to response_api_handler when responses_api_provider_config
was None (completion transformation path), silently dropping it.

Also adds deep-merge support for extra_body in Vertex AI Gemini
transformation, so dict values like generationConfig are merged rather
than replaced.

* refactor(vertex_ai): extract _merge_extra_body to fix PLR0915 lint

Move the extra_body merge loop into a helper function to keep
_transform_request_body under the 50-statement limit.
2026-02-13 18:25:32 +05:30
Sameer KankuteandGitHub e85da33240 Merge pull request #21044 from BerriAI/litellm_oss_staging_02_07_20262
Litellm oss staging 02 07 20262
2026-02-13 17:53:32 +05:30
Sameer KankuteandGitHub d8f114e363 Merge branch 'main' into litellm_oss_staging_02_07_20262 2026-02-13 17:53:03 +05:30
yuneng-jiangandGitHub 9a2410be71 Merge pull request #20922 from atapia27/feat/fallback-display
fallback-display: updated fallback display table to use arrows and card structure for better visibility.
2026-02-12 22:05:32 -08:00
Rahul DhanawadeandGitHub a58f18872b Fix #20562: Correct Bedrock Claude Opus 4.6 model IDs (#20564) 2026-02-12 20:48:25 -08:00
Cesar GarciaandGitHub 69f78ae64f cleanup(model_prices): remove 39 deprecated OpenRouter models (#20786)
These models return 404 ("No endpoints found") from OpenRouter's API
and are no longer listed in /api/v1/models.

Fixes #20521
2026-02-12 20:32:00 -08:00
Cesar GarciaandGitHub 50ce7c08d6 fix: normalize endpoint display_name values to consistent convention (#20791)
Apply `{Provider} {Endpoint} API` naming convention to all endpoint
display names in provider_endpoints_support.json.

Ref: https://github.com/fastrepl/contextlengthof/issues/11
2026-02-12 20:31:35 -08:00
Cesar GarciaandGitHub 0829000fca feat: add 30 missing models to pricing JSON (#20797)
* feat: add 28 missing models to pricing JSON

Add models active in OpenAI and Gemini APIs but missing from the JSON.
All verified via litellm library and direct API calls.

OpenAI (15):
- TTS: tts-1-1106, tts-1-hd-1106, gpt-4o-mini-tts-2025-{03-20,12-15}
- Transcription: gpt-4o-mini-transcribe-2025-{03-20,12-15}
- Search: gpt-5-search-api, gpt-5-search-api-2025-10-14
- Realtime: gpt-realtime-mini-2025-{10-06,12-15}
- Video: sora-2, sora-2-pro
- Image: chatgpt-image-latest

Gemini (13):
- Image: gemini-2.0-flash-exp-image-generation (direct + gemini/ prefix)
- Chat: gemini/gemini-2.0-flash-lite-001
- Native Audio: gemini-2.5-flash-native-audio-{latest,preview-09-2025,preview-12-2025}
- TTS: gemini-2.5-flash-preview-tts
- Aliases: gemini-flash-latest, gemini-flash-lite-latest, gemini-pro-latest, gemini-exp-1206

* fix: correct pricing for realtime-mini models and add sora-2-pro-high-res

- Add missing cache_read_input_token_cost ($0.06/1M) to gpt-realtime-mini dated versions
- Add missing input_cost_per_image ($0.80/1M) to gpt-realtime-mini dated versions
- Add sora-2-pro-high-res ($0.50/sec) for 1024x1792/1792x1024 resolutions
- Add openai/sora-2-pro-high-res variant
2026-02-12 20:30:14 -08:00
Cesar GarciaandGitHub 64d8f1a601 docs: add native thinking param examples for Claude Opus 4.6 (#20799)
* docs: add native thinking param examples for Claude Opus 4.6

Add documentation for using the native `thinking` parameter directly
with adaptive thinking and explicit budgets for Claude Opus 4.6.

* docs: add note about reasoning_effort mapping to adaptive for Opus 4.6
2026-02-12 20:29:28 -08:00
jquinterandGitHub 0a2f74b93e fix: remove unused MCP_NPM_CACHE_DIR import from module level (#21084)
The constant is already imported locally at line 899 where it's actually used.
The top-level import was redundant and triggered ruff F401.
2026-02-12 20:19:46 -08:00
pbandGitHub 75e69e8d3b feat(bedrock): extend model support (#21035)
* add nvidia.nemotron-nano-3-30b

* add zai.glm-4.7

* entend video input support for kimik2.5
2026-02-12 20:11:00 -08:00
Shivam RawatandGitHub 60390df4e2 Merge pull request #21083 from BerriAI/litellm_docs_clarity_on_dashscope
docs: add API base URLs for Dashscope (International and China/Beijing)
2026-02-12 18:47:38 -08:00
shivam 3c12f6f896 minor change 2026-02-12 18:44:16 -08:00
shivam d4aa41daf6 docs: add API base URLs for Dashscope (International and China/Beijing) 2026-02-12 18:40:45 -08:00
yuneng-jiangandGitHub d701cc6588 Merge pull request #21081 from BerriAI/litellm_yj_release_changes_feb12
[Infra] CI/CD Fixes - Nightly Release Feb 12
2026-02-12 18:07:34 -08:00
Ishaan JaffGitHubgreptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
9202e67e33 feat: MCP server discovery UI (#21079)
* feat: add curated MCP server registry for discovery UI

Curated list of 31 well-known MCP servers with names, icons,
categories, transport config, and registry URLs. Includes HTTP
endpoints for GitHub, Atlassian, Sentry, Snowflake, and Cloudflare.

* feat: add GET /v1/mcp/discover endpoint for MCP discovery

Admin-only endpoint that serves the curated MCP registry with
optional query and category filters. Used by the UI discovery modal.

* feat: add DiscoverableMCPServer types for MCP discovery

* feat: add fetchDiscoverableMCPServers network function

* feat: add MCP discovery modal component

Compact list-row layout with category filters, search, and
grouped server list. Follows dev-tool aesthetic.

* feat: wire MCP discovery modal into server management page

Add MCP Server button now opens discovery modal. Card click
pre-fills the create form. Custom Server opens blank form.

* feat: add prefill from discovery and back-to-registry link

Create form accepts prefillData from discovery selection and
shows a Browse MCP Registry link to return to discovery modal.

* test: add unit tests for MCP discovery endpoint and registry

Tests for registry JSON structure validation and endpoint
query/category filtering logic. 15 tests total.

* fix: sync registry with official MCP API and fix stdio prefill

- Updated transport types and URLs from registry.modelcontextprotocol.io API
- GitHub: streamable-http at api.githubcopilot.com/mcp/
- GitLab: streamable-http at gitlab.com/api/v4/mcp (remote only)
- Atlassian: SSE at mcp.atlassian.com/v1/sse (remote only)
- Linear: SSE at mcp.linear.app/sse (remote only)
- Notion: SSE at mcp.notion.com/sse (remote only)
- Stripe: streamable-http at mcp.stripe.com (remote only)
- Exa: streamable-http at mcp.exa.ai/mcp (remote only)
- Cloudflare: SSE at bindings.mcp.cloudflare.com/sse (remote only)
- Sentry: stdio via @sentry/mcp-server (npm, correct package)
- Snowflake: stdio via snowflake-labs-mcp (pypi/uvx, not npm)
- Brave Search: stdio via @brave/brave-search-mcp-server (correct package)
- Fixed stdio prefill to generate stdio_config JSON instead of separate fields
- Discovery modal matches create modal width and header style
- Back arrow positioned on left of create modal header

* Update ui/litellm-dashboard/src/components/mcp_tools/mcp_discovery.tsx

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

* Update litellm/proxy/management_endpoints/mcp_management_endpoints.py

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

* fix: address Greptile review feedback

- Move `import json` and `import os` to module top level
- Move mcp_registry.json into litellm/proxy/ for pip distribution
- Fix `Text` component: destructure from antd Typography instead of deprecated Tremor
- Update test fixture path to match new registry location

---------

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
2026-02-12 17:59:21 -08:00
yuneng-jiang 3f8a1cf2dc bump: version 1.81.10 → 1.81.11 2026-02-12 17:55:01 -08:00
yuneng-jiang 111593397a fixing core proxy tests 2026-02-12 17:54:32 -08:00
yuneng-jiang 8d10311b4b content filter test fix 2026-02-12 17:54:16 -08:00
yuneng-jiang e49d094606 fix openai tests 2026-02-12 17:53:47 -08:00
yuneng-jiang c37e3be933 fixing mcp tests 2026-02-12 17:53:40 -08:00
yuneng-jiang c41459c8e3 fixing mistral model deprecation, cloud zero transform bug 2026-02-12 17:53:04 -08:00
yuneng-jiang 514645777b adding key envs to docs 2026-02-12 17:52:35 -08:00
yuneng-jiang 0efe3ea825 bumping pillow and cryptography for security fixes 2026-02-12 17:52:20 -08:00
yuneng-jiang 2a4066646a fix mypy linting 2026-02-12 17:52:12 -08:00
yuneng-jiang 2c8225b465 fix ruff check 2026-02-12 17:52:00 -08:00
yuneng-jiangandGitHub 918376ddaf Merge pull request #20124 from naaa760/fix/management-key-access
fix: allow Management keys to access user/daily/activity and team
2026-02-12 17:11:18 -08:00
milan-berriandGitHub a2e9e73b64 fix(proxy): change model mismatch logs from WARNING to DEBUG (#20994)
Fixes #20990

PR #19943 added logging when the proxy overrides model names to prevent
internal provider prefixes from leaking to clients. The behavior works
correctly but logs a WARNING on every request with model mismatch.

For high-traffic customers using model aliases or provider prefixes,
this creates millions of warnings per day, flooding logs and causing
disk space issues.

Changed log level from WARNING to DEBUG since:
- The model mismatch is expected behavior when using aliases
- The override happens correctly regardless of log level
- Operators can still enable with LITELLM_LOG=DEBUG for debugging

Changes:
- common_request_processing.py: 2 warnings -> debug (non-streaming)
- proxy_server.py: 1 warning -> debug (streaming)
2026-02-12 16:40:58 -08:00
yuneng-jiangandGitHub ce3bb97d40 Merge pull request #21076 from BerriAI/litellm_ui_model_table_cred
[Feature] UI - Model Page: Improve Credentials Messaging
2026-02-12 16:28:45 -08:00
d9606773ea feat(vertex_ai): add zai-org/glm-5-maas model pricing (#21053)
Add Vertex AI ZAI GLM-5 model map entry with reasoning + prompt caching metadata and cache-read pricing.\n\nRefs #21052

Co-authored-by: Codex <codex@example.com>
2026-02-12 16:11:59 -08:00
yuneng-jiang 168a8731ce improve credentials messaging 2026-02-12 16:02:54 -08:00
yuneng-jiangandGitHub 3cbb12b9c8 Merge pull request #21074 from milan-berri/fix/mcp-server-name-validation-spaces
fix(ui): Block spaces and hyphens in MCP server names and aliases
2026-02-12 15:35:18 -08:00
yuneng-jiangandGitHub 2864ce73da Merge pull request #21022 from BerriAI/litellm_unified_ag
[Feature] Access Groups
2026-02-12 15:34:38 -08:00
Milan de42f733df fix: Update alias tooltip - remove outdated space replacement text
Since spaces are now blocked in server names, the tooltip text about
'spaces replaced by underscores' is no longer accurate.
2026-02-13 01:20:57 +02:00
Milan b769fa08d2 chore: Remove accidentally committed image file 2026-02-13 01:18:19 +02:00
Milan bab5173500 fix: Make validation message generic and restore alias tooltip text
- Change error message to be generic (works for both server_name and alias)
- Restore 'Defaults to server name with spaces replaced' text in alias tooltip
2026-02-13 01:17:01 +02:00
Milan 1d67476ed0 refactor: Simplify validateMCPServerName to match original ternary style 2026-02-13 01:14:37 +02:00
Ishaan JaffGitHubgreptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
5f40f93846 fix: MCP - inject NPM_CONFIG_CACHE into STDIO MCP subprocess env (#21069)
* fix: inject NPM_CONFIG_CACHE into STDIO MCP subprocess env for Docker

npm/npx needs a writable cache directory. In containers the default
(~/.npm) may not exist or be read-only, causing STDIO MCP servers
launched via npx to fail with ENOENT. Inject NPM_CONFIG_CACHE=/tmp/.npm_mcp_cache
into the subprocess env when not already set.

* test: add unit test for NPM_CONFIG_CACHE injection in STDIO MCP

Verifies that NPM_CONFIG_CACHE is auto-injected when not set, and
preserved when explicitly provided. Also moves the import to module
level per code style rules.

* Update litellm/constants.py

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

* Apply suggestion from @greptile-apps[bot]

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

---------

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
2026-02-12 15:11:37 -08:00
Milan 8fa2734830 fix(ui): Block spaces and hyphens in MCP server names and aliases
- Update validateMCPServerName to reject both spaces and hyphens
- Apply shared validation to alias field in create form (was inline)
- Update tooltips to mention space restriction
- Ensures consistency across create/edit forms for server_name and alias fields
2026-02-13 01:11:06 +02:00
yuneng-jiang a37623945d migration and build 2026-02-12 14:34:10 -08:00
yuneng-jiang ed59c7c84d bump: version 0.4.35 → 0.4.36 2026-02-12 14:33:38 -08:00
yuneng-jiang a45028f623 Merge remote-tracking branch 'origin' into litellm_unified_ag 2026-02-12 14:32:52 -08:00
yuneng-jiang ea8c89ea3f rename file and add tests 2026-02-12 14:05:51 -08:00
yuneng-jiang c34cdb29cd remove double auth and add alias 2026-02-12 13:40:58 -08:00
Ishaan JaffandGitHub 736daf0a7d [Feat] Adds Shell tool support for the OpenAI Responses API (#21063)
* test_responses_api_context_management_server_side_compaction

* Server-side compaction

* docs fix

* test_responses_api_shell_tool

* add SHELL tool

* test_responses_api_shell_tool

* add SHELL_CALL_IN_PROGRESS

* add SHELL_CALL_IN_PROGRESS events

* TestOpenAIResponsesAPITest

* transform_streaming_response

* test_responses_api_shell_tool_streaming_sees_shell_output

* test_responses_api_shell_tool_streaming_sees_shell_output

* test_responses_api_shell_tool

* docs fix
2026-02-12 13:04:29 -08:00
yuneng-jiang e6df587bfb adding tests and fixing prisma lookup table 2026-02-12 12:48:05 -08:00