Commit graph

30529 commits

Author SHA1 Message Date
Loïc Rakotoson
1645be3a2f
feat: implement SafeAttributeModel for safe attribute access in models (#18321) 2026-01-19 19:24:03 -08:00
0x1f99d
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
Lucky-Lodhi2004
16b8ed6786
fixed litellm params (#19315) 2026-01-19 10:52:58 -08:00
Cesar Garcia
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 Garcia
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
Cesar Garcia
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
Harshit Jain
1678f621db
feat: add retry_delay, exponential_backoff, and jitter to completion() (#19371) 2026-01-19 10:27:01 -08:00
Harshit Jain
fc9988b686
fix/bedrock-inconsistent-postcall-hook (#19151)
* fix/bedrock-inconsistent-postcall-hook

* Add condition check to avoid multiple validation
2026-01-19 06:18:02 -08:00
Harshit Jain
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 Jain
98e87c3e67
feat: Add Redis-based migration lock with bug fixes (#19261) 2026-01-19 05:57:24 -08:00
Harshit Jain
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
Harshit Jain
07fbd77c91
fix(logging): prevent duplicate StandardLoggingPayload logs (#19325) 2026-01-19 05:53:23 -08:00
Manuel Schweigert
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
Harshit Jain
32562708ee
fix(proxy): add /a2a/{agent_id}/.well-known/agent-card.json to agent_routes allowlist (#19277) 2026-01-19 05:36:54 -08:00
Jón Levy
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 Jain
6cd4b3603f
fix(router): prevent retrying 4xx client errors (#19275) 2026-01-19 05:18:35 -08:00
YutaSaito
4dc9726db4
Merge pull request #19292 from BerriAI/litellm_docs_cursor-mcp
[docs] add cursor with mcp
2026-01-18 14:59:08 +09:00
Krish Dholakia
4fa1470fef
Add in-product nudge for claude code feedback survey + new learning centre (#19303)
* fix(proxy_setting_endpoints.py): add new GET /in_product_nudges route

allows for context-based nudges

* feat: initial commit, adding in-product nudge for claude code usage

helps us talk to more litellm x claude code users

* fix: link out to google form for claude code in-product nudge

* feat(index.json): add new guide

* feat(index.json): add new claude code guides

* fix: link out

* fix: remove baselines
2026-01-17 20:05:20 -08:00
Ishaan Jaffer
2fda7a2534 docs fix 2026-01-17 18:33:19 -08:00
yuneng-jiang
2095ed7161
Merge pull request #19302 from BerriAI/litellm_ui_build_script_en
[Infra] UI - Build Release UI Script
2026-01-17 18:22:25 -08:00
yuneng-jiang
5c113e6cb3 build release ui script 2026-01-17 18:16:14 -08:00
Ishaan Jaffer
2e840b1216 fix Deleted Keys Audit Table on UI 2026-01-17 18:12:18 -08:00
Alexsander Hamir
419423cf43
docs: add performance improvement section (#19300) 2026-01-17 18:06:14 -08:00
Ishaan Jaffer
4f2bdd33f4 docs claude code 2026-01-17 18:05:16 -08:00
Ishaan Jaffer
fcb5cfe9d9 add img to doc 2026-01-17 18:05:16 -08:00
yuneng-jiang
62b082b8b1
Merge pull request #19299 from BerriAI/1810_docs_yj
[Docs] Deleted Key and Team Table
2026-01-17 17:51:03 -08:00
yuneng-jiang
8629ca819d deleted keys docs 2026-01-17 17:49:12 -08:00
Ishaan Jaffer
46de47d542 doc fix 2026-01-17 17:35:52 -08:00
Ishaan Jaffer
7eecf81cdc docs fix 2026-01-17 17:29:49 -08:00
Ishaan Jaffer
534fa9f4c0 docs fix 2026-01-17 17:26:58 -08:00
Ishaan Jaffer
26497b415b docs fix 2026-01-17 17:21:31 -08:00
Ishaan Jaffer
c6998823c0 docs fix 2026-01-17 17:17:34 -08:00
Ishaan Jaffer
c158f83cff docs fix 2026-01-17 17:17:13 -08:00
Ishaan Jaffer
4610d1d43c docs fix 2026-01-17 17:16:22 -08:00
Ishaan Jaffer
7d24bbed42 qa fixes 2026-01-17 17:14:51 -08:00
Ishaan Jaffer
e15526a60e fix 2026-01-17 17:13:22 -08:00
Ishaan Jaffer
60dd04ac95 test_aiohttp_openai 2026-01-17 17:05:00 -08:00
Ishaan Jaffer
c30b17aa9b docs fix 2026-01-17 17:03:48 -08:00
Ishaan Jaffer
0a84120be5 v1.81.0 2026-01-17 16:43:00 -08:00
Ishaan Jaffer
db7de13818 test_deepseek_mock_completion 2026-01-17 16:36:42 -08:00
Ishaan Jaffer
5812654bdd test_router_fallbacks_with_custom_model_costs 2026-01-17 16:34:46 -08:00
Ishaan Jaff
1417b002a3
[Feat] Claude Code x LiteLLM WebSearch - QA Fixes to work with Claude Code (#19294)
* fix websearch_interception_converted_stream

* test_websearch_interception_no_tool_call_streaming

* FakeAnthropicMessagesStreamIterator

* LITELLM_WEB_SEARCH_TOOL_NAME

* fixes tools def for litellm web search

* fixes FakeAnthropicMessagesStreamIterator

* test_litellm_standard_websearch_tool

* use new hook for modfying before any transfroms from litellm

* init WebSearchInterceptionLogger + ARCHITECTURE

* fix config.yaml

* init doc for claude code web search

* docs fix

* doc fix

* fix mypy linting
2026-01-17 16:30:31 -08:00
yuneng-jiang
42c0136bf4
Merge pull request #19293 from BerriAI/litellm_ui_build_fix_22
[Infra] Fix UI Build
2026-01-17 15:58:24 -08:00
yuneng-jiang
91eb047761 testing adding entire out 2026-01-17 15:49:20 -08:00
yuneng-jiang
c1f194cde9 fix build attempt 2026-01-17 15:36:53 -08:00
YutaSaito
d28bf983eb
Merge pull request #19272 from Harshit28j/feature/panw-custom-violation-msg
feat(panw_prisma_airs): add custom violation message support
2026-01-18 06:55:39 +09:00
Yuta Saito
18839a3600 docs: add cursor with mcp 2026-01-18 06:51:09 +09:00
yuneng-jiang
953e2736d4
Merge pull request #19291 from BerriAI/deleted_keys_docs_2
[Docs] Deleted Keys and Teams Docs
2026-01-17 13:20:48 -08:00
yuneng-jiang
19a69a89f0 deleted keys and teams docs 2026-01-17 13:19:48 -08:00
Ishaan Jaffer
e238cb2ca0 docs clean up 2026-01-17 12:30:26 -08:00