Commit graph

31415 commits

Author SHA1 Message Date
YutaSaito
f541bc0261
Merge pull request #19129 from BerriAI/litellm_fix_mcp_chat_completions
[fix] mcp chat completions
2026-01-15 18:21:37 +09:00
Yuta Saito
9d173ba4fe fix: prevent MCP type objects from being captured in locals() 2026-01-15 17:14:58 +09:00
Yuta Saito
0db6229b63 fix: lint 2026-01-15 16:04:01 +09:00
Sameer Kankute
e5121b3654
Merge pull request #19127 from BerriAI/litellm_enterprise_version_bump
bump litellm version to 0.1.28
2026-01-15 12:25:14 +05:30
Yuta Saito
1c2942d808 test: add mcp completions test 2026-01-15 15:47:45 +09:00
Yuta Saito
ba43f742ab fix: event loop nesting issue in MCP chat completions with streaming
Problem: When using MCP tools with  and , the following error occurred:

RuntimeError: Timeout context manager should be used inside a task
2026-01-15 15:36:56 +09:00
yuneng-jiang
c86f310ac5 Allow prevent team admins from deleting users from teams 2026-01-14 22:15:48 -08:00
Sameer Kankute
7fa8ef620b bump litellm version to 0.1.28 2026-01-15 11:35:49 +05:30
Sameer Kankute
dca42047b9
Merge pull request #19068 from BerriAI/litellm_responses_caching_support
[Fix] Add support for caching for responses API
2026-01-15 08:38:31 +05:30
Sameer Kankute
c7be5065f8 fix mypy error in caching.py 2026-01-15 08:35:08 +05:30
Ishaan Jaffer
62b4fe79b2 fix 2026-01-14 18:12:01 -08:00
yuneng-jiang
27bc5c1fca
Merge pull request #19120 from BerriAI/litellm_yj_triage_branch
[Fix] Azure Storage Circular Reference Error
2026-01-14 18:08:38 -08:00
Ishaan Jaff
458f773861
[Feat] Claude Code - Add support for Prompt Caching with Bedrock Converse (#19123)
* init BaseAnthropicMessagesPromptCachingTest

* fix UsageDelta

* fix: _create_initial_usage_delta

* TestBedrockInvokePromptCaching

* translate_anthropic_messages_to_openai wiht cache control

* fix translate_anthropic_messages_to_openai
2026-01-14 18:05:10 -08:00
yuneng-jiang
0de871b03e Fixing unused import 2026-01-14 17:45:21 -08:00
Ishaan Jaff
e67e9e7054
[Fix] Containers API - Allow routing to regional endpoints (#19118)
* fix get_complete_url

* fix url resolution containers API

* TestContainerRegionalApiBase
2026-01-14 17:28:18 -08:00
YutaSaito
e3e6fc2806
Merge pull request #19122 from BerriAI/litellm_docs_mcp_troubleshooting
[doc] add MCP troubleshooting guide
2026-01-15 09:34:35 +09:00
yuneng-jiang
93f3dd8008
Merge pull request #19119 from BerriAI/litellm_ui_key_edit_team_dropdown
[Feature] UI - Edit Key: Add search to key edit team dropdown
2026-01-14 16:17:14 -08:00
yuneng-jiang
97c39dbb7a Fixing circular reference for azure storage 2026-01-14 16:11:55 -08:00
yuneng-jiang
a149ff448d Fixing build 2026-01-14 15:49:31 -08:00
yuneng-jiang
a4fecc74fb Add search to key edit team dropdown 2026-01-14 15:47:50 -08:00
Alexsander Hamir
f442b57848
docs: Add structured issue reporting guides for CPU and memory issues (#19117) 2026-01-14 15:28:20 -08:00
Ishaan Jaff
62187103b4
[Fix] Containers API - Container API routes return 401 for non-admin users - routes missing from openai_routes (#19115)
* test_containers_routes_are_llm_api_routes

* allow /containers/* API
2026-01-14 15:14:03 -08:00
yuneng-jiang
30859d763e Fix user escalation 2026-01-14 15:13:25 -08:00
Yuta Saito
0b04145c11 doc: add MCP troubleshooting guide 2026-01-15 08:01:59 +09:00
Ishaan Jaff
06ded8750e
[Fix] Claude Code (/messages) - Litellm fix claude code Bedrock Invoke usage, request signing (#19111)
* test_should_not_fail_with_forwarded_headers_bedrock_invoke_messages

* use common get_request_headers for BaseAWS

* fix get_request_headers

* test_should_not_fail_with_forwarded_headers_bedrock_invoke_messages
2026-01-14 14:51:50 -08:00
yuneng-jiang
b7c40a049d Community engagement buttons 2026-01-14 14:33:25 -08:00
yuneng-jiang
dcac090de0
Merge pull request #19053 from BerriAI/litellm_intern_user_usage
[Fix] /team/daily/activity Show Internal Users Their Spend Only
2026-01-14 13:47:34 -08:00
yuneng-jiang
23e954f2b4
Merge pull request #19058 from BerriAI/litellm_ui_add_model_ant
[Feature] UI - Model: Anthropic Models QOL
2026-01-14 13:43:57 -08:00
Alexsander Hamir
b352d0d4fd
[Perf] Remove premature model.dump call on the hot path (#19109) 2026-01-14 12:40:27 -08:00
Ishaan Jaff
747829dadb
[Fix] Claude Code + Bedrock Converse Usage - ensure budget tokens are passed to converse api correctly (#19107)
* test_bedrock_converse_budget_tokens_preserved

* test_openai_model_with_thinking_converts_to_reasoning_effort

* fix translate_anthropic_thinking_to_reasoning_effort

* test_bedrock_converse_budget_tokens_preserved

* test_anthropic_messages_bedrock_converse_with_thinking
2026-01-14 12:02:27 -08:00
yuneng-jiang
f0e34a46a7
Merge pull request #19045 from dominicfeliton/main
fix: model hub client side exception
2026-01-14 11:58:42 -08:00
Peter Dave Hello
62eee47618
Add support for OpenAI's gpt-5.2-codex (#19101)
Reference:
- https://openai.com/index/introducing-gpt-5-2-codex/
- https://platform.openai.com/docs/models/gpt-5.2-codex
2026-01-14 11:49:40 -08:00
Rayan Pal
f880ea537f
fix(vertex): add type object to tool schemas missing type field (#19103)
Tools with no parameters (like EnterPlanMode from Anthropic Agents SDK)
send schemas with only $schema and no type field. Gemini rejects these
with "functionDeclaration parameters schema should be of type OBJECT".

Adds type: object when schema has no type and no anyOf/oneOf/allOf.
2026-01-15 00:43:35 +05:30
Emerson Gomes
9f6fa4fb49
Fix Azure Grok prices (#19102) 2026-01-15 00:30:47 +05:30
Alexsander Hamir
45968c01bd
update troubleshoot (#19099) 2026-01-14 10:01:47 -08:00
Alexsander Hamir
0959467699
docs: Update troubleshooting guide with version tracking and error logs/metrics (#19097) 2026-01-14 09:32:28 -08:00
Rayan Pal
d92a0168cc
fix: keep type field in Gemini schema when properties is empty (#18979) 2026-01-14 22:58:05 +05:30
Peter Golm
c215b3a79f
fix: preserve llm_provider-* headers in error responses (#19020)
Extract and preserve provider-specific headers (llm_provider-*) when
handling error responses from LLM providers. This ensures that useful
debugging information from providers is available even when requests
fail with BadRequestError or similar exceptions.
2026-01-14 22:49:39 +05:30
Alexsander Hamir
05ebb0a739
docs: Add troubleshooting guide (#19096) 2026-01-14 09:17:43 -08:00
Debnil Sur
84dad952a2
fix(gemini): dereference $defs/$ref in tool response content (#19062)
Gemini API rejects JSON schemas with $defs/$ref references anywhere in
the conversation, including in function_response content. This causes
errors when tools return JSON containing schemas (e.g., toolbelt_inspect_tool
returning tool definitions).

The fix:
1. Apply unpack_defs() to all JSON tool responses before sending to Gemini
2. Recursively remove $defs sections after inlining references
3. Replace any remaining $ref (circular refs, external URLs) with placeholders

Edge cases handled:
- Circular $ref (self-referential types like TreeNode.left -> TreeNode)
- External $ref (URL-based like https://...)
- Deeply nested $ref in anyOf/oneOf/allOf

This ensures function_response content is clean before being sent to the
Gemini API.

Related issues:
- https://github.com/google-gemini/gemini-cli/issues/13326
- FastMCP #1372, #1426
2026-01-14 22:28:28 +05:30
Kris Xia
1391e41916
fix(vertex_ai): improve passthrough endpoint url parsing and construction (#17402) (#17526)
* fix(vertex_ai): improve passthrough endpoint url parsing and construction (#17402)

* test(proxy): add test for vertex passthrough load balancing

Add a test that verifies _base_vertex_proxy_route uses
get_available_deployment for proper load balancing instead of
get_model_list. This ensures the correct deployment is selected
from the router and vertex credentials are properly fetched.

Also refactor the implementation to:
- Use get_available_deployment instead of get_model_list
- Add error handling for deployment retrieval
- Improve code structure with try-except block

* feat(proxy): add pass-through deployment filtering methods

Add dedicated methods to filter and select deployments for pass-through endpoints:
- Implement get_available_deployment_for_pass_through() to ensure only deployments with use_in_pass_through=True are considered
- Implement async_get_available_deployment_for_pass_through() for async operations
- Add _filter_pass_through_deployments() helper method to filter by use_in_pass_through flag
- Update vertex pass-through route to use the new dedicated method

This ensures pass-through endpoints respect the use_in_pass_through configuration and apply proper load balancing strategy only to configured deployments.

Add comprehensive tests to verify filtering and load balancing behavior.
2026-01-14 22:17:43 +05:30
Harshit Jain
e8c4cad885
feat(proxy): cleanup spend logs cron verification, fix, and docs (#19085) 2026-01-14 22:14:48 +05:30
Harshit Jain
e7cc53f217
fix(dynamic_rate_limiter_v3): fix TPM 25% limiting by ensuring priority logic only runs when configured (#19092) 2026-01-14 22:12:04 +05:30
Sameer Kankute
cd2d381dd4
Merge pull request #19042 from BerriAI/litellm_staging_01_13_2026
Staging 01/13/2026
2026-01-14 21:29:09 +05:30
Cesar Garcia
e0da7ca918
fix(models): correct max_input_tokens for GPT-5 models (#19056)
OpenAI's 400k context window is split between input and output:
- GPT-5/5.1/5.2 models: 272k input + 128k output = 400k context
- GPT-5-pro models: 128k input + 272k output = 400k context

Reference: https://openai.com/index/introducing-gpt-5-for-developers/
"In the API, all GPT-5 models can accept a maximum of 272,000 input
tokens and emit a maximum of 128,000 reasoning & output tokens"

Fixes incorrect 400k max_input_tokens values across 32 models.
2026-01-14 19:01:23 +05:30
Sameer Kankute
08ac26e5b4 Fix all 130126 tests 3 2026-01-14 18:01:22 +05:30
Sameer Kankute
4aadc0d41f
Merge pull request #19074 from BerriAI/litellm_19046-bug-retry-policies-are-not-applied-on-responses-calls
Add retry policy support to responses API
2026-01-14 17:56:11 +05:30
Sameer Kankute
26d8ef734c
Merge pull request #19070 from BerriAI/litellm_19066-bug-gemini-image-generation-returns-incorrect-prompt_tokens_details
Fix: [Bug]: Gemini Image Generation Returns Incorrect prompt_tokens_d…
2026-01-14 17:55:09 +05:30
Sameer Kankute
49d873e894
Merge pull request #19067 from BerriAI/litellm_caching_fix
Fix: anthropic token counter with thinking
2026-01-14 17:52:56 +05:30
Sameer Kankute
b677ea1113
Merge pull request #19064 from BerriAI/litellm_openai_content_none_fix
Fix: Responses content can't be none
2026-01-14 17:52:31 +05:30