Commit graph

28507 commits

Author SHA1 Message Date
yuneng-jiang
68419cfe4e Merge remote-tracking branch 'origin' into litellm_tag_spend_dedupe 2025-12-09 11:59:47 -08:00
yuneng-jiang
9253a9c365
Merge pull request #17689 from BerriAI/litellm_ui_settings_backend
[Feature] Get and Update Backend Routes for UI Settings
2025-12-09 11:55:28 -08:00
Shivam Rawat
43a7bbeeaf
added note for using Azure Active Directory Tokens with all the other endpoints (#17733) 2025-12-09 11:51:28 -08:00
yuneng-jiang
aa450e7ebe
Merge pull request #17738 from BerriAI/litellm_doc_update_1805
[Docs] Adding known issues to 1.80.5-stable docs
2025-12-09 11:46:08 -08:00
yuneng-jiang
431884f591 Adding known issues to 1.80.5-stable docs 2025-12-09 11:45:16 -08:00
yuneng-jiang
1b86269584 Bump version to include new schema 2025-12-09 11:25:24 -08:00
yuneng-jiang
7957244367 bump: version 0.4.11 → 0.4.12 2025-12-09 11:24:18 -08:00
yuneng-jiang
36183c3a9b Adding migration 2025-12-09 11:23:26 -08:00
yuneng-jiang
e4442c2946 Change UI Settings to a dedicated table 2025-12-09 11:19:53 -08:00
Derek Duenas
3322523e07
Passthrough in response (#17102)
* attempt to implement the passthrough feature

* Formatting and small change

* Fix formatting

* feat: grayswan guardrail overwrite ModelResponse in passthrough mode

* fix missing exception error catching on certain
endpoints

* fix wrong call site

* fix: patch anthropic endpoint internal error on streaming obj

* fix grayswan testcase

* feat: update the violation response to more natural

* Formatting

* move passthrough exception definition to custom_guardrail.

* Enhancement: show whether the blocked at input or output

* update exception name

* fix a typo in testing unit.

---------

Co-authored-by: Xiaohan Fu <xiaohan@grayswan.ai>
2025-12-09 10:45:45 -08:00
yuneng-jiang
305a7c6bd5 Merge remote-tracking branch 'origin' into litellm_ui_settings_backend 2025-12-09 10:21:52 -08:00
yuneng-jiang
486bcbe4e8 Revert "UI Settings Frontend"
This reverts commit 51275e7014.
2025-12-09 10:21:30 -08:00
Sameer Kankute
237f6b991f
Merge pull request #17708 from BerriAI/litellm_videos_bug_fixes
Fix error about encoding video id for azure
2025-12-09 23:11:17 +05:30
Krish Dholakia
81f0bbad73
Add Azure AI Search to supported vector stores (#17726)
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
2025-12-09 09:04:04 -08:00
Sameer Kankute
a7e5be8e03 Fix error about encoding video id for azure 2025-12-09 16:36:11 +05:30
yuneng-jiang
8039c5052f
Merge pull request #17681 from BerriAI/litellm_ui_fallback_login_alert
[Fix] Change deprecation banner to only show on /sso/key/generate
2025-12-08 21:18:38 -08:00
yuneng-jiang
51275e7014 UI Settings Frontend 2025-12-08 21:12:06 -08:00
YutaSaito
5b926ae2c6
fix: resolve UI session MCP permissions across real teams (#17620)
* fix: resolve UI session MCP permissions across real teams

* fix: remove user from logs
2025-12-08 19:03:01 -08:00
chenzhaofei01
458032b083
fix dashscope default api_base error (#17584) 2025-12-08 19:02:55 -08:00
Earl St Sauver
ad9c69860e
Fix Cerebras context window errors not recognized (#17587)
Add detection for Cerebras's context window exceeded error format:
"Current length is X while limit is Y"

This ensures LiteLLM raises ContextWindowExceededError instead of
generic BadRequestError when Cerebras API calls exceed the model's
context limit, enabling downstream libraries like DSPy to properly
catch and handle these errors for automatic context management.
2025-12-08 19:02:06 -08:00
Cesar Garcia
a7ad8a36a4
chore: cleanup unused scripts and fix misplaced test file (#17611)
Remove scripts/ directory containing unused development/debug scripts:
- mock_ibm_guardrails_server.py
- test_groq_streaming_issue.py (debug for #12660)
- test_mock_ibm_guardrails.py
- update_readme_providers_table.py

Move misplaced test file to correct location:
- test_litellm/ -> tests/test_litellm/ (from PR #17221)
2025-12-08 19:00:55 -08:00
Ishaan Jaff
b673177b22
Add 227 new Fireworks AI models (#17692) 2025-12-08 18:57:43 -08:00
Sergei Silnov
f5dc8b7c38
fix: Use python instead of wget for healthcheck in docker-compose.yml (#17646)
Fixes #17645
2025-12-08 18:54:54 -08:00
Chetan Choudhary
38eda3409a
docs: Add SumoLogic integration documentation (#17647)
* docs: Add SumoLogic integration documentation

* minor update
2025-12-08 18:54:07 -08:00
Cesar Garcia
0295f912be
fix(openai): include 'user' param for responses API models (#17648)
The 'user' parameter was being ignored when using responses API models
(e.g., model="openai/responses/gpt-4.1") because the model name check
in get_supported_openai_params() didn't account for the "responses/" prefix.

Fix: Normalize the model name by stripping "responses/" prefix before
checking if the model is in the list of supported OpenAI models.

This is a minimal, non-breaking change that:
- Adds 2 lines of code in gpt_transformation.py
- Only affects the parameter support check, not the model variable itself
- Includes unit and integration tests
2025-12-08 18:52:47 -08:00
Cesar Garcia
fd9ff90307
fix(responses): prevent streaming tool_calls from being dropped when text + tool_calls (#17652)
When OpenAI Responses API returns both text AND tool_calls, the bridge
transformation was emitting is_finished=True after the text message completed,
causing subsequent tool_call chunks to be dropped.

The fix:
- response.output_item.done for messages no longer emits is_finished=True
- Added handler for response.completed to properly signal stream end
2025-12-08 18:51:59 -08:00
Emil Svensson
61e737e361
fix Azure AI Anthropic api-key header and passthrough cost calculation (#17656)
* refactor: remove api-key conversion logic for Azure Anthropic

Co-authored-by: Erdem Halil <erdemhalil@users.noreply.github.com>

* fix(passthrough): pass custom_llm_provider to completion_cost for Azure AI Anthropic

The passthrough logging for Anthropic was failing when using Azure AI Anthropic
because the completion_cost function was not receiving the custom_llm_provider
parameter, causing it to fail with "LLM Provider NOT provided" error.

This fix:
- Retrieves custom_llm_provider from logging_obj.model_call_details
- Prepends provider prefix to model name for cost calculation
- Passes both formatted model and custom_llm_provider to completion_cost
- Centralizes provider prefix logic in _create_anthropic_response_logging_payload

This ensures cost calculation works correctly for Azure AI Anthropic requests
with models like azure_ai/claude-sonnet-4-5_gb_20250929.

Co-authored-by: Erdem Halil <erdemhalil@users.noreply.github.com>

* test: add unit tests for Azure AI Anthropic fixes

- Add tests for custom_llm_provider cost calculation in passthrough logging
- Add tests for ProviderConfigManager returning AzureAnthropicMessagesConfig
- Update existing tests to reflect removal of api-key to x-api-key conversion

Co-authored-by: Erdem Halil <erdemhalil@users.noreply.github.com>

---------

Co-authored-by: Erdem Halil <erdemhalil@users.noreply.github.com>
2025-12-08 18:50:26 -08:00
Brian Caswell
c9f88bf2c7
mitigate PydanticDeprecatedSince20 warnings (#17657)
When using litellm with a recent pydantic, the following deprecation warnings are shown

```
litellm/types/llms/anthropic.py:531: PydanticDeprecatedSince20: Support for class-based `config` is deprecated, use ConfigDict instead. Deprecated in Pydantic V2.0 to be removed in V3.0. See Pydantic V2 Migration Guide at https://errors.pydantic.dev/2.12/migration/
  class AnthropicResponseContentBlockToolUse(BaseModel):
litellm/types/rag.py:181: PydanticDeprecatedSince20: Support for class-based `config` is deprecated, use ConfigDict instead. Deprecated in Pydantic V2.0 to be removed in V3.0. See Pydantic V2 Migration Guide at https://errors.pydantic.dev/2.12/migration/
  class RAGIngestRequest(BaseModel):
```

This aligns with multiple existing places within the litellm codebase that uses ConfigDict to configure pydantic model behavior.
2025-12-08 18:48:42 -08:00
Yi Ding
e0a8f7435d
docs(json): make it clearer how to get Pydantic model output (#17671) 2025-12-08 18:38:57 -08:00
Cesar Garcia
7c2e2111c0
fix(router): handle tools=None in filter_web_search_deployments (#17684)
Fixes #17672

Changed `request_kwargs.get("tools", [])` to `request_kwargs.get("tools") or []`
to handle the case where tools is explicitly set to None.
2025-12-08 18:36:46 -08:00
yuneng-jiang
3683614a6b Get and Update route for UI Settings 2025-12-08 18:07:00 -08:00
Ishaan Jaff
a904067d38
[Feat] New model - add bedrock writer models (#17685)
* add new bedrock models

* test bedrock writer models

* docs bedrock writer palmyra

* add palymra models

* add bedrock writer models

* docs fix
2025-12-08 17:49:06 -08:00
Cesar Garcia
e39ff3d022
feat: add Cerebras zai-glm-4.6 model support (#17683)
Add the new Z.ai GLM 4.6 reasoning model from Cerebras to the model
registry with pricing and capabilities configuration.
2025-12-08 17:43:11 -08:00
Ishaan Jaff
074445edb1
[Fix] AI Gateway Auth - allow using wildcard patterns for public routes (#17686)
* edit auth utils to allow wildcard patterns

* docs fix private / public routes

* test_route_in_additional_public_routes_wildcard_match
2025-12-08 17:39:53 -08:00
yuneng-jiang
a57608a4e8
Merge pull request #17682 from BerriAI/litellm_ui_ai_hub_link_input
[Fix] Swap URL Input and Display Name inputs
2025-12-08 17:27:11 -08:00
Ishaan Jaff
2f335ac5a6
[Feat] Dynamic Rate Limiter - allow specifying ttl for in memory cache (#17679)
* fix _get_saturation_value_from_cache

* fix _get_saturation_check_cache_ttl

* fix test_saturation_check_cache_ttl_configuration

* docs saturation_check_cache_ttl
2025-12-08 17:20:52 -08:00
yuneng-jiang
dd5c4f62c3 Swap url input and display name in useful links 2025-12-08 17:00:49 -08:00
yuneng-jiang
8338bd9c53 Change deprecation banner to only show on /sso/key/generate 2025-12-08 16:30:37 -08:00
Krish Dholakia
fbe18a21c9
Docs: Add integration documentation instructions (#17644)
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
2025-12-08 16:29:15 -08:00
Ishaan Jaff
601da4a3d1
[Feat] New model - add nvidia nim llama-3.2-nv-rerankqa-1b-v2 (#17670)
* fix get_nvidia_nim_rerank_config

* add NvidiaNimRankingConfig

* add get_nvidia_nim_rerank_config

* add test_nvidia_nim_rerank_ranking_endpoint

* add /ranking model provider support

* feat: add nvidia/llama-3.2-nv-rerankqa-1b-v2
2025-12-08 15:25:23 -08:00
Cesar Garcia
dcf5217d17
docs: improve Getting Started page and SDK documentation structure (#17614)
* docs: update Getting Started page with accurate endpoints and fix exception handling

- Update endpoints list to include /responses, /audio, /batches
- Change "Consistent output" to be endpoint-agnostic
- Clarify Response Format title as "OpenAI Chat Completions Format"
- Fix exception handling example: use litellm exceptions instead of deprecated openai.error
- Add model prefix (anthropic/) to example

* docs: reorganize sidebar and improve SDK documentation structure

Sidebar changes:
- Reorder: Python SDK first, then AI Gateway (Proxy)
- Rename "LiteLLM - Getting Started" to "Getting Started"
- Restructure SDK section with Core Functions, Configuration subsections
- Move budget_manager to Guides
- Move sdk_custom_pricing and migration to Extras
- Remove duplicate embedding/async_embedding and embedding/moderation

Content changes:
- Add Response Format section to response_api.md
- Add async aembedding() section to supported_embedding.md

* docs: add deprecation notice for OpenAI Assistants API

OpenAI has deprecated the Assistants API, shutting down on August 26, 2026.
Added warning banner directing users to the Responses API.

* docs: expand Core Functions in SDK sidebar

Add more SDK functions to Core Functions category:
- text_completion()
- image_generation()
- transcription()
- speech()
- Link to "All Supported Endpoints" for complete list

* Rename Sidebar Item

* docs: revert Getting Started label to original

* Rename sidebar label from 'LiteLLM - Getting Started' to 'Getting Started'
2025-12-08 13:05:50 -08:00
Ishaan Jaff
7b47c0f583
docs: Explain default behavior of drop_params (#17658)
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: ishaan <ishaan@berri.ai>
2025-12-08 12:58:21 -08:00
Jason Nance
0c78cd7125
Move query params to create_pass_through_route call (#17660)
Fix error calling Langfuse passthrough endpoint.
2025-12-08 12:57:49 -08:00
Ishaan Jaff
3a43042fad
docs - add sap gen ai provider on LiteLLM (#17667) 2025-12-08 12:43:42 -08:00
_juliettech
ee0812a297
Add Helicone as a provider and update observability documentation (#17663)
* Add Helicone as a provider to liteLLM

* Add Helicone provider integration
2025-12-08 12:34:11 -08:00
vasilisazayka
c87874c29e
[New provider] Sap gen ai hub (#16053)
* add sap gen ai hub

* add async tests

* add async and streaming support

* add embedding model support

* add embedding support

* remove unused import

* fix structured output

* clean-up

* remove timeout and add tool support

* remove unused code

* fix(sap): improve streaming robustness; restore embed URL builder compatibility
- sap/embed/transformation: add api_key and litellm_params to get_complete_url to align with core flow and prevent failures
- sap/chat/handler: wrap async/sync streaming iterators to safely handle Stop(Async)Iteration and errors
- sap/chat/transformation: remove unused imports and dead code

* fix(sap): linter fix

* fix(sap): made gen_ai_hub optional: import check + OptionalDependencyError with install hint if missing.

* test(sap): add chat/stream/async tests and OptionalDependencyError check

* Fix tool call handling in SAP GenAI Hub transformation
Add sap models to model_prices_and_context_window.json and model_prices_and_context_window_backup.json

* fix(sap): delete unnecessary code, linter fix

* fix(sap): - refactor chat transformation
- add support of list and dict content

* fix(sap): - fix tests

* fix(sap): - fix lint

* Update transformation.py

* fix(sap): fix model description and fix after rebase

* change(sap): - http calls in chat handler, response transformation and auth handling without sap sdk.

* change(sap): switching to v2 (chat handler, chat transformation), code clean up

* add deployment discovery and improved crendentials handling

* add deployment discovery and improved crendentials handling

* change(sap): - fix sync stream

* change(sap): - fix sync stream

* fix(sap): - fix response format

* fix(sap): - switch embedding to v2 and http request
- reimplement stream creator
- improve request transformation

* fix async streaming

* fix(sap): linters, transformation models, remove sap dependency test

* fix(sap): code clean up

* add unit test for sap chat completion

* linters fix

* move token, rg and base_url to properties

* (sap): add embedding unit test

Signed-off-by: Vasilisa Parshikova <vasilisa.parshikova@sap.com>

* fix(sap): bypass response format for some models

Signed-off-by: Vasilisa Parshikova <vasilisa.parshikova@sap.com>

* fix(sap): fix chat transformation and list of supported params

Signed-off-by: Vasilisa Parshikova <vasilisa.parshikova@sap.com>

* fix(sap): fix lint

* add sap service key module parameter

* fix(sap): remove unused code

* fix(sap): remove prices

* add service key support

* fix(sap): - add message content validations
- change get_supported_openai_params in chat transformation

* typo in mock

* fix(sap): - fix in supported params map

* fix(sap): - fix in message content validation

* fix(sap): - fix in message content validation

* fix(sap): - use litellm client for credentials

* fix(sap): - linter fix

* fix(sap): - use build in custom_http_client
- move credentials handling to transformation

* fix(sap): - handle stream_options

* fix(sap): - fix tests

* fix(sap): - code clean up, linter fix

* skip other authentication options when creds are provided

* fix local variable

---------

Signed-off-by: Vasilisa Parshikova <vasilisa.parshikova@sap.com>
Co-authored-by: Mathis Boerner <mathis.boerner@sap.com>
Co-authored-by: karimmohraz <37623804+karimmohraz@users.noreply.github.com>
Co-authored-by: Karim <karim.mohraz@sap.com>
2025-12-08 12:31:06 -08:00
Alexsander Hamir
958c190134
Fix flanky tests (#17665)
* Fix test_delete_polling_removes_from_cache mock setup

- Mock async_delete_cache to properly execute the real implementation path
- Ensures init_async_client() is called and delete() is invoked on the returned client
- Fixes AssertionError: Expected 'delete' to be called once. Called 0 times.

* fix: resolve timeout in add_model_tab test by mocking useProviderFields hook

- Mock useProviderFields hook to prevent network calls and React Query delays
- Use waitFor to properly handle async operations
- Test now passes reliably without 10s timeout

* fix: add test timeout to prevent CI timeout failure

- Add 15 second timeout to 'should display Test Connect and Add Model buttons' test
- Test takes ~6 seconds locally, but CI was timing out at default 5 second limit
- Ensures test has sufficient time to complete in CI environment

* test: quarantine flaky test_oidc_circleci_with_azure

Quarantine test that fails with 401 Unauthorized from Azure OAuth.
The test is flaky and blocks CI builds. Marked with @pytest.mark.skip
until Azure authentication can be fixed or migrated to our own account.
2025-12-08 12:21:26 -08:00
Eric84626
2d5a50804b
fix: Return 403 exception when calling GET responses api (#17629) 2025-12-08 11:27:52 -08:00
Sameer Kankute
05f800fe7d
Merge pull request #17653 from BerriAI/litellm_fireworks_rerank_model
(Feat) Add fireworks rerank support
2025-12-08 21:33:08 +05:30
Sameer Kankute
7aaab32313
Merge pull request #17651 from BerriAI/litellm_audio_caching_fix
Use audio content for caching
2025-12-08 20:57:09 +05:30