Commit Graph
5546 Commits
Author SHA1 Message Date
Sameer KankuteandGitHub deb9142117 Merge pull request #19400 from BerriAI/main
merge main iin 19/1 staging
2026-01-20 16:45:01 +05:30
Sameer KankuteandGitHub 2ae308028d Merge pull request #18787 from aproorg/fix/bedrock-thinking-tool-call-2
fix(bedrock): handle thinking with tool calls for Claude 4 models
2026-01-20 09:43:07 +05:30
YutaSaitoandGitHub 00814d4d90 Merge pull request #19379 from BerriAI/litellm_feat_mcp_version_up
[feat] mcp version up
2026-01-20 13:09:29 +09:00
Yuta Saito ab11ceff32 tests: patch MCP client mocks via module alias to avoid real network calls 2026-01-20 12:31:27 +09:00
Ishaan JaffandGitHub 818913ee23 [Fix] Fix Pass through routes to work with server root path (#19383)
* test_build_full_path_with_root_default

* fix pt feat
2026-01-19 18:28:55 -08:00
Yuta Saito ec7bf0ff1a Merge remote-tracking branch 'upstream/main' into litellm_feat_mcp_version_up 2026-01-20 09:52:38 +09:00
Yuta Saito 51cf782292 chore: switch experimental client to streamable_http_client API 2026-01-20 07:37:50 +09:00
Yuta Saito 05d9fb6fd6 feat: SEP-986 2026-01-20 07:24:39 +09:00
Ishaan JaffandGitHub a82467d679 [Feat] - Add self hosted Claude Code Plugin Marketplace (#19378)
* init schema

* init endpoints

* fix: claude_code_marketplace_router

* refactor

* fix: claude_code_marketplace_router

* claude_code_marketplace_router
2026-01-19 14:05:47 -08:00
1cce718551 fix(bedrock): deduplicate tool calls in assistant history (#15178) (#19324)
* fix: Avoid attaching tool calls when a call_id already exists

* fix: Prevent MCP responses from reviving past tool calls via previous_response_id

* test: Parametrize MCP streaming test to cover OpenAI and Anthropic models

* test: Fail MCP streaming test when LiteLLM logs errors during follow-up calls

* test: Let MCP tool-execution mock accept new kwargs for streaming tests

* chore: fix lint error

* docs: Add Google Workload Identity Federation (WIF) documentation to Vertex AI (#19320)

- Added new section documenting WIF support for Vertex AI authentication
- Included SDK and Proxy configuration examples
- Added sample WIF credentials file format for AWS federation
- Mentioned LLM Credentials UI as an alternative for credential management
- Added link to Google Cloud WIF documentation

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

* fix(bedrock): deduplicate tool calls in assistant history (#15178)

* fix(types): add missing Set import to factory.py

---------

Co-authored-by: Yuta Saito <uc4w6c@bma.biglobe.ne.jp>
Co-authored-by: Krish Dholakia <krrishdholakia@gmail.com>
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: YutaSaito <36355491+uc4w6c@users.noreply.github.com>
2026-01-19 10:56:49 -08:00
Cesar GarciaandGitHub d30c25af21 feat(gemini): use responseJsonSchema for Gemini 2.0+ models (#19314)
* feat(gemini): add opt-in support for responseJsonSchema

Add support for Gemini's native responseJsonSchema parameter which uses
standard JSON Schema format instead of OpenAPI-style responseSchema.

Benefits of responseJsonSchema (Gemini 2.0+ only):
- Standard JSON Schema format (lowercase types)
- Supports additionalProperties for stricter validation
- Better compatibility with Pydantic's model_json_schema()
- No propertyOrdering required

Usage:
```python
response_format={
    "type": "json_schema",
    "json_schema": {"schema": {...}},
    "use_json_schema": True  # opt-in
}
```

This is backwards compatible - existing code continues to use
responseSchema by default.

Closes #16340

* docs: add documentation for use_json_schema parameter

Document the new use_json_schema option for Gemini 2.0+ models
in the JSON Mode documentation.

* refactor(gemini): use responseJsonSchema by default for Gemini 2.0+

Remove opt-in flag `use_json_schema` and automatically detect model version:
- Gemini 2.0+: uses responseJsonSchema (standard JSON Schema, supports additionalProperties)
- Gemini 1.5: uses responseSchema (OpenAPI format, legacy)

This follows LiteLLM's philosophy of abstracting provider differences -
users write the same code regardless of model version.

* test(vertex): update json_schema tests to accept both responseSchema formats

Gemini 2.x+ uses responseJsonSchema while Gemini 1.x uses responseSchema.
Update tests to accept both formats since litellm now auto-selects based
on model version.
2026-01-19 10:45:37 -08:00
Cesar GarciaandGitHub 57b1d99b44 feat(azure): add support for Azure OpenAI v1 API (#19313)
* feat(azure): add support for Azure OpenAI v1 API

When api_version is 'v1', 'latest', or 'preview', use the standard
OpenAI client instead of AzureOpenAI client with base_url pointing
to /openai/v1/ endpoint.

This follows Microsoft's documentation for the new v1 API format:
https://learn.microsoft.com/en-us/azure/ai-services/openai/reference#api-specs

Changes:
- Add OpenAI/AsyncOpenAI imports to common_utils.py and azure.py
- Modify get_azure_openai_client() to detect v1 API versions and
  create appropriate client type
- Update isinstance checks and type hints to accept both client types
- Add unit tests for v1 API client creation

* fix(azure): fix MyPy type errors for v1 API support

- Add type: ignore for AsyncOpenAI constructor
- Update type hints in files/handler.py and batches/handler.py
- Add OpenAI/AsyncOpenAI to Union types for client parameters
- Update isinstance checks to include OpenAI/AsyncOpenAI

* fix(azure): update type hints in files and batches handlers for v1 API

Update async method signatures to accept Union[AsyncAzureOpenAI, AsyncOpenAI]
to fix mypy errors when using v1 API client.
2026-01-19 10:44:38 -08:00
4ad5de10cb fix(realtime): disable SSL for ws:// WebSocket connections (#19345)
When using http:// api_base (converted to ws://), the websockets library
throws "ssl argument is incompatible with a ws:// URI". Only pass SSL
context for secure wss:// connections.

Co-authored-by: Krish Dholakia <krrishdholakia@gmail.com>
2026-01-19 10:37:41 -08:00
Ishaan JaffandGitHub e817aa713e [Fix] Claude Code x Bedrock Invoke fails with advanced-tool-use-2025-11-20 (#19373)
* _filter_unsupported_beta_headers_for_bedrock

* test_bedrock_sonnet_4_5_with_advanced_tool_use_beta_header
2026-01-19 10:16:18 -08:00
Benedikt ÓskarssonandGitHub 406cdbe321 Merge branch 'litellm_staging_01_19_2026' into fix/bedrock-thinking-tool-call-2 2026-01-19 15:18:47 +00:00
Sameer KankuteandGitHub ff7bb59824 Merge branch 'main' into litellm_fix_streaming_test 2026-01-19 19:43:16 +05:30
Sameer Kankute c9de4776bc Fix test_process_chunk_exception_calls_handle_failure_once 2026-01-19 19:39:12 +05:30
Sameer KankuteandGitHub d6baa9a4ba Merge pull request #19234 from BerriAI/litellm_staging_01_16_2026
Litellm staging 01 16 2026
2026-01-19 19:34:53 +05:30
Harshit JainandGitHub 1dc2d2ddac fix(utils.py): correctly extract messages from google genai contents (#19156)
* fix(utils.py): correctly extract messages from google genai contents

* refactor use shared utilities
2026-01-19 06:00:23 -08:00
Harshit JainandGitHub 98e87c3e67 feat: Add Redis-based migration lock with bug fixes (#19261) 2026-01-19 05:57:24 -08:00
Harshit JainandGitHub fe92f4af9c fix(langfuse_otel): ignore service logs and fix callback shadowing (#19298)
* fix(langfuse_otel): ignore service logs and fix callback shadowing

* add test cases for service logger
2026-01-19 05:53:47 -08:00
b49f0a91e4 fix(responses): resolve deepcopy error with tool_choice ValidatorIterator (#17192) (#17205)
Replace copy.deepcopy with model_dump + model_validate in streaming
iterator logging to handle Pydantic ValidatorIterator objects that
cannot be pickled when tool_choice uses allowed_tools mode.

Co-authored-by: Krish Dholakia <krrishdholakia@gmail.com>
2026-01-19 05:44:20 -08:00
Sameer KankuteandGitHub daf70f7221 Merge pull request #19329 from BerriAI/litellm_vector_store_sync
Fix: vector store sync issues
2026-01-19 19:11:48 +05:30
Manuel SchweigertandGitHub 29adf34313 Add ChatGPT subscription support and responses bridge (#19030)
* Add ChatGPT subscription support and responses bridge

* Fix typing import for responses bridge

* Guard device code timestamp parsing

* add /v1/messages endpoint to chatgpt model
2026-01-19 05:37:45 -08:00
Sameer KankuteandGitHub 574391c118 Revert "Fix audio cost per second override (#19158)"
This reverts commit 2a0f87bde0.
2026-01-19 18:51:08 +05:30
5db0e3289a fix(agentcore): simplify agentcore streaming (#17141)
* fix(agentcore): simplify agentcore streaming

* fix(agentcore): move CustomStreamWrapper import to module level

The deferred imports inside streaming methods caused initialization delays
during health check requests, leading to timeouts in ECS deployments.

- Move CustomStreamWrapper import to module-level (line 19)
- Remove deferred imports from get_sync_custom_stream_wrapper (line 588)
- Remove deferred import from get_async_custom_stream_wrapper (line 747)
- Remove from TYPE_CHECKING block to use actual import

This ensures the import happens at module load time rather than during
first request processing, preventing health check endpoint blocking.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* test(agentcore): ensure sync response

* chore: upgrade boto3 to 1.40.76 in pyproject.toml

* chore: added taplo.toml

* fix(types): correct annotation type hint for MyPy compatibility

Update _convert_annotations_to_chat_format return type from
Dict[str, Any] to ChatCompletionAnnotation TypedDict to match
the Message class's expected type signature.

Co-Authored-By: Claude <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Benedikt Óskarsson <bensi94@hotmail.com>
2026-01-19 05:20:24 -08:00
Harshit JainandGitHub 6cd4b3603f fix(router): prevent retrying 4xx client errors (#19275) 2026-01-19 05:18:35 -08:00
Benedikt Óskarsson f09cae2107 Merge branch 'main' into fix/bedrock-thinking-tool-call-2 2026-01-19 13:08:17 +00:00
Sameer KankuteandGitHub 480fa13b1d Merge pull request #19343 from BerriAI/litellm_anthropic_header_fix_19_jan
Fix: anthropic-beta is getting overriden and set to anthropic-beta
2026-01-19 18:24:46 +05:30
Sameer KankuteandGitHub a9475be06d Merge pull request #19338 from BerriAI/litellm_fix_managed_load_balancing_batches
Add managed files support when load_balancing is True
2026-01-19 18:24:21 +05:30
Sameer KankuteandGitHub a8883a45bf Merge pull request #19327 from BerriAI/litellm_vertex_ai_file_upload
Fix: upload pdfs for file endpoint
2026-01-19 18:23:41 +05:30
Sameer KankuteandGitHub 68294228c2 Merge pull request #19326 from BerriAI/litellm_handle_failer_2_times
Fix: _handle_failure method getting called 2 times
2026-01-19 18:22:44 +05:30
Sameer Kankute 896d1a7dad Fix Error: Found packages that need verification: 2026-01-19 18:18:24 +05:30
Sameer KankuteandGitHub c5a8d4e34e Merge branch 'main' into litellm_staging_01_16_2026 2026-01-19 18:11:21 +05:30
Sameer Kankute d7b103158a Fix: anthropic-beta is getting overriden and set to anthropic-beta': 'structured-outputs-2025-11-13', 2026-01-19 16:43:27 +05:30
Sameer Kankute eea24978b9 Add managed files support when load_balancing is True 2026-01-19 15:54:04 +05:30
Sameer Kankute 514ebb0d96 Fix: vector store sync issues 2026-01-19 13:17:08 +05:30
Sameer Kankute 480cb9c0d8 Fix: upload pdfs for file endpoint 2026-01-19 11:58:32 +05:30
YutaSaitoandGitHub bb7aad9de1 Merge pull request #19319 from BerriAI/litellm_test_mcp_integration
[test] mcp integration test
2026-01-19 14:38:02 +09:00
Yuta Saito 44a166a792 fix: ci mcp version up 2026-01-19 14:27:00 +09:00
Yuta Saito a141aa6026 test: temporary skip 2026-01-19 13:57:40 +09:00
Sameer Kankute fbf2d83375 Fix: _handle_failure method getting called 2 times 2026-01-19 10:19:31 +05:30
Yuta Saito 1fbbe0a983 test: restore global MCP server manager after access-group test 2026-01-19 12:29:37 +09:00
Yuta Saito 30c4a38179 test: const 2026-01-19 12:03:26 +09:00
YutaSaitoandGitHub 14679cff3f Merge pull request #19317 from BerriAI/litellm_fix-responses-api-non-openai-models
[fix] responses api non OpenAI models
2026-01-19 11:21:39 +09:00
Yuta Saito 20b6468222 test: refactor 2026-01-19 11:17:44 +09:00
Yuta Saito c2b5e9c669 test: MCP E2E streamable_http 2026-01-19 11:12:36 +09:00
Yuta Saito 737fec600f test: add mcp e2e test 2026-01-19 10:49:39 +09:00
Yuta Saito d31c609600 test: Let MCP tool-execution mock accept new kwargs for streaming tests 2026-01-19 07:00:14 +09:00
Yuta Saito 4ad78236ab test: Fail MCP streaming test when LiteLLM logs errors during follow-up calls 2026-01-19 06:46:39 +09:00