Repository navigation
feat(vertex-ai)!: support gemini 3.1 flash tts - #31915
Conversation
20b1348 to
a577d84
Compare
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
6f363f0 to
fc12ebf
Compare
[Medium impact] The latest change appears safe to merge and preserves structured voices through model aliases SummaryAdds Gemini TTS voice settings across speech, chat audio, and Vertex batch files. Vertex requests for MP3, Opus, ALAW, and MULAW use Cloud Text-to-Speech with estimated usage
Reviews (42) · Last reviewed commit: "fix(gemini): keep a structured speech vo..." · Reviewed by Greptile |
fc12ebf to
2e87f45
Compare
Merging this PR will not alter performance
|
|
Updated and rebased this pull request; @greptile-apps, please review the latest changes and flag any remaining concerns. |
There was a problem hiding this comment.
Pull request overview
This PR adds Vertex AI support for the Gemini 3.1 Flash TTS preview model, including Cloud Text-to-Speech routing for explicit response_format requests, plus metadata and transformation updates across proxy and provider layers
Changes:
- Adds new model registry entries and schema support for
health_check_voicefor Gemini 3.1 Flash TTS preview - Routes explicit TTS
response_formatrequests through Cloud TTS, normalizes multi-speaker speech config payloads, and preventsresponse_formatleakage into completion calls - Expands proxy handling for audio response media types and improves error propagation for
/audio/speech, with focused regression tests
Reviewed changes
Copilot reviewed 21 out of 21 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/test_litellm/test_utils.py | Extends model cost JSON validation to allow health_check_voice |
| tests/test_litellm/test_gemini_3_1_flash_tts_metadata.py | Adds regression tests for new Gemini 3.1 Flash TTS model metadata and detection |
| tests/test_litellm/proxy/proxy_server/test_routes_audio.py | Adds tests for /audio/speech media type selection and error propagation behavior |
| tests/test_litellm/llms/gemini/test_gemini_tts.py | Adds multi-speaker mapping tests and expands Gemini TTS coverage for 3.1 preview |
| tests/test_litellm/google_genai/test_google_genai_transformation.py | Adds tests for speech config mapping in Google GenAI optional params for Gemini and Vertex |
| tests/litellm/llms/vertex_ai/text_to_speech/test_transformation.py | Adds Cloud TTS request mapping tests for Gemini TTS multi-speaker voices and formats |
| model_prices_and_context_window.schema.json | Updates schema to include health_check_voice in model pricing metadata |
| model_prices_and_context_window.json | Adds model registry entries for Gemini 3.1 Flash TTS preview across provider aliases |
| litellm/model_prices_and_context_window_backup.json | Mirrors new model registry entries in the bundled backup registry |
| ci_cd/generate_model_prices_schema.py | Updates schema generator to include health_check_voice |
| litellm/utils.py | Introduces is_gemini_tts_model helper for consistent model detection via registry metadata |
| litellm/types/utils.py | Adds audio_speech to the allowed mode values in model info typing |
| litellm/types/llms/vertex_ai.py | Extends Vertex Gemini speech config typing for multi-speaker configuration |
| litellm/types/llms/vertex_ai_text_to_speech.py | Extends Cloud TTS request typing for multi-speaker voice config and additional fields |
| litellm/main.py | Routes Gemini TTS calls through the speech bridge only when response_format is omitted |
| litellm/llms/vertex_ai/text_to_speech/transformation.py | Adds Gemini-specific format mappings and multi-speaker voice mapping into Cloud TTS requests |
| litellm/llms/vertex_ai/google_genai/transformation.py | Aligns Vertex Google GenAI optional param mapping with the shared Gemini implementation |
| litellm/llms/vertex_ai/gemini/vertex_and_google_ai_studio_gemini.py | Adds normalization for speech config key shapes and avoids default temperature injection for TTS |
| litellm/llms/gemini/google_genai/transformation.py | Normalizes speech_config into provider-expected camelCase speech config structure |
| litellm/endpoints/speech/speech_to_completion_bridge/transformation.py | Prevents response_format leakage and supports dict voice payloads via speech config normalization |
| litellm/proxy/proxy_server.py | Sets audio response media type based on response_format and preserves provider error status and messages |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
PR overviewAll previously flagged issues have been addressed. No open security concerns remain on this pull request. Security reviewNo open security issues remain on this pull request. Fixed/addressed: 3 · PR risk: 0/10 |
c7291ae to
15fae08
Compare
|
Rebased this branch onto litellm_internal_staging and addressed the Veria modelName override plus the Copilot typing and status code notes |
|
@greptileai Please re-review the latest changes, especially the unexpected audio speech exception sanitization and its regression coverage |
f90715c to
9b72c54
Compare
|
Rebased this branch onto latest litellm_internal_staging and resolved the merge conflicts in the overlapping files |
|
Formatted proxy_server.py so ruff format matches staging after the rebase conflict resolution |
|
Mapped Gemini Cloud TTS encodings in dispatch because staging skips provider config for gemini models |
… wrapper on Cloud TTS
|
@litereview code-review |
1 similar comment
|
@litereview code-review |
… WAV path sends to Gemini
|
@litereview code-review |
| create_file_data=create_file_data, | ||
| content_type=content_type, | ||
| ): | ||
| deployment_drop_params: Final[object] = litellm_params.get("drop_params") |
There was a problem hiding this comment.
Medium · Vertex batch upload with model= returns 400 for unknown voice keys even when the deployment sets drop_params
- A proxy deployment
vbatch-dropusesvertex_ai/gemini-3.1-flash-tts-previewand setsdrop_params: truein itslitellm_params. - A caller uploads a batch JSONL with
-F model=vbatch-drop. One row'saudio.speech_configholds{"voice_name": "Kore", "style": "calm"}. route_create_filegets the deployment's settings fromget_deployment_credentials_with_provider. That helper rebuilds them throughCredentialLiteLLMParams, which has nodrop_paramsfield, solitellm_paramsarrives without it.- This PR's
partial(self._map_openai_to_vertex_params, deployment_drop_params=litellm_params.get("drop_params"))receivesNone.reject_unknown_gemini_tts_voice_keysthen raises, and the upload fails with 400 "does not support the voice keys style". - On the base commit the same upload returned 200 and dropped the voice. The breaking-change notice tells callers that unknown voice keys get a 400 "unless
drop_paramsis set", but setting it on the deployment does not help on this route. Only a per-rowdrop_paramsor the global flag works.
The smallest fix is to carry the deployment's drop_params through the model= credential path, either by adding it to CredentialLiteLLMParams or by reading it from the resolved deployment. If you keep the current behavior, the notice needs to say that this route ignores deployment drop_params.
Evidence
Local reproducer (/tmp/repro.py, head checkout): Router(model_list=[{model_name: 'vbatch-drop', litellm_params: {model: 'vertex_ai/gemini-3.1-flash-tts-preview', ..., drop_params: True}}]).get_deployment_credentials_with_provider('vbatch-drop') returns keys ['custom_llm_provider', 'gcs_bucket_name', 'model', 'vertex_location', 'vertex_project'], so drop_params is missing.
When that dict's drop_params (None) is passed to VertexAIFilesConfig()._map_openai_to_vertex_params(row, deployment_drop_params=None), the call raises UnsupportedParamsError: gemini-3.1-flash-tts-preview does not support the voice keys style. With deployment_drop_params=True it returns speechConfig: {voiceConfig: {prebuiltVoiceConfig: {voiceName: 'Kore'}}}.
The PR's real-proxy capture after_outputs_49fcc86bbe.md, case "Vertex batch file, voice key style, deployment drop_params, upload with model", shows HTTP 400 with the same message for config-batch.yaml's vbatch-drop deployment (drop_params: true). The PR table lists it as 200, voice dropped → 400, names the keys.
litellm/proxy/openai_files_endpoints/files_endpoints.py:447-465: the model is not None branch merges only get_authorized_credentials_for_model output into the request. litellm/types/router.py:372 CredentialLiteLLMParams declares no drop_params.
The unit test test_drop_params_on_the_row_or_deployment_drops_unknown_voice_keys[deployment] calls transform_create_file_request with litellm_params={'drop_params': True} directly, so it skips the proxy credential path where the flag is lost.
The load-balanced route (enable_loadbalancing_on_batch_endpoints) does keep deployment drop_params. The PR capture shows HTTP 200 there.
Latest summary by code-review · View this review · Reviewed 49fcc86bbe1c
There was a problem hiding this comment.
Fixed in 396b2fb. A model= upload now carries the deployment's drop_params, and the live vbatch-drop case returns 200 with Kore kept
There was a problem hiding this comment.
Finding withdrawn
The fix is in. The finding said a model= batch upload lost the deployment's drop_params because CredentialLiteLLMParams has no such field. The head commit now reads drop_params from the resolved deployment and merges it into the request. The value then reaches the Vertex batch transform, where it decides whether unknown voice keys get a 400. A caller's own drop_params still takes precedence. The new route tests check that the deployment value reaches acreate_file. I traced the remaining step to transform_create_file_request in the code. I did not rerun the author's live Vertex capture, which reports HTTP 200 for vbatch-drop.
Evidence
litellm/proxy/openai_files_endpoints/files_endpoints.py:459-462: credentials={**credentials, **deployment_drop_params(llm_router, model, _create_file_request)}
litellm/proxy/openai_files_endpoints/common_utils.py:480-489: deployment_drop_params resolves llm_router.get_credential_deployment(model_id=...) and returns {"drop_params": deployment.litellm_params.drop_params}. It skips this when the request already has drop_params.
litellm/files/main.py:177: litellm_params_dict = dict(**kwargs) is passed to base_llm_http_handler.create_file, then to transform_create_file_request(litellm_params=...).
litellm/llms/vertex_ai/files/transformation.py:1163-1168: deployment_drop_params = litellm_params.get("drop_params") is bound into _map_openai_to_vertex_params.
tests/unit/proxy/openai_files_endpoint/test_files_endpoint.py:952-979: test_batch_upload_for_a_provider_model_carries_the_deployment_drop_params[vertex-batch-drop-True / vertex-batch-keep-False], plus the no-deployment-value and caller-precedence cases. Local run: 4 passed.
GitHub does not allow this App to resolve this thread. A repository maintainer must do it manually.
Reviewed 396b2fbebd2b · View follow-up
… so Vertex batch rows drop unknown voice keys
|
@litereview code-review |
|
bugbot run |
…_alias_map alias for a Gemini TTS model
|
@litereview code-review |
|
bugbot run |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 373c592. Configure here.
mateo-berri
left a comment
There was a problem hiding this comment.
LGTM. Thanks for the contribution!
…erriAI#45715) Backport of BerriAI#45715 to lts/1.108.x. Cherry-picked from a7030a5 (main). Adapted to the line: the Gemini row mapper keeps the line's signature, since deployment_drop_params on it comes from BerriAI#31915, which is not on the line, and the Claude row reads drop_params with the line's normalize_drop_params, since drops_unsupported_params is not in core_helpers here.
…109.1) (#2608)
This PR contains the following updates:
| Package | Update | Change |
|---|---|---|
| [ghcr.io/berriai/litellm](https://images.chainguard.dev/directory/image/wolfi-base/overview) ([source](https://github.com/BerriAI/litellm)) | minor | `v1.108.2` → `v1.109.1` |
---
> ⚠️ **Warning**
>
> Some dependencies could not be looked up. Check the [Dependency Dashboard](issues/6) for more information.
---
### Release Notes
<details>
<summary>BerriAI/litellm (ghcr.io/berriai/litellm)</summary>
### [`v1.109.1`](https://github.com/BerriAI/litellm/releases/tag/v1.109.1)
[Compare Source](https://github.com/BerriAI/litellm/compare/v1.109.0...v1.109.1)
#### Verify Docker Image Signature
All LiteLLM Docker images are signed with [cosign](https://docs.sigstore.dev/cosign/overview/). This release is signed with the key introduced in [commit `e82a3c6`](https://github.com/BerriAI/litellm/commit/e82a3c646908ba0a6ee0beddc4310d7a6cac4065).
**Verify using the pinned commit hash (recommended):**
A commit hash is cryptographically immutable, so this is the strongest way to ensure you are using the published signing key:
```bash
cosign verify \
--key https://raw.githubusercontent.com/BerriAI/litellm/e82a3c646908ba0a6ee0beddc4310d7a6cac4065/cosign.pub \
ghcr.io/berriai/litellm:v1.109.1
```
**Verify using the release tag (convenience):**
Tags are protected in this repository and resolve to the same key. This option is easier to read but relies on tag protection rules:
```bash
cosign verify \
--key https://raw.githubusercontent.com/BerriAI/litellm/v1.109.1/cosign.pub \
ghcr.io/berriai/litellm:v1.109.1
```
Expected output:
```
The following checks were performed on each of these signatures:
- The cosign claims were validated
- The signatures were verified against the specified public key
```
***
#### What's Changed
- security(proxy): backport [#​51254](https://github.com/BerriAI/litellm/issues/51254) to stable/1.109.x by [@​shrey-berri](https://github.com/shrey-berri) in [#​51264](https://github.com/BerriAI/litellm/pull/51264)
- chore: bump litellm 1.109.0 -> 1.109.1 by [@​yuneng-berri](https://github.com/yuneng-berri) in [#​51298](https://github.com/BerriAI/litellm/pull/51298)
**Full Changelog**: <https://github.com/BerriAI/litellm/compare/v1.109.0...v1.109.1>
### [`v1.109.0`](https://github.com/BerriAI/litellm/releases/tag/v1.109.0)
[Compare Source](https://github.com/BerriAI/litellm/compare/v1.108.9...v1.109.0)
#### Verify this release
```bash
cosign verify \
--key https://raw.githubusercontent.com/BerriAI/litellm/e82a3c646908ba0a6ee0beddc4310d7a6cac4065/cosign.pub \
ghcr.io/berriai/litellm:v1.109.0
```
Same command for `litellm-database`, `litellm-non_root` and the `docker.io/litellm/*` images
#### What's new in 1.109.0
982 PRs. 144 added, 424 fixed, 60 changed, 17 improved, 9 removed. 5 need action
##### Action required
- **Routing and fallbacks:** Change string fallback targets to lists of model names ([#​48943](https://github.com/BerriAI/litellm/issues/48943))
- **Caching:** Switch `cache_params.type` from `disk` to `local` or `redis`, since the `disk` cache backend (diskcache) has been removed ([#​48114](https://github.com/BerriAI/litellm/issues/48114))
- **Routing and fallbacks:** Add `optional_pre_call_checks: ["enforce_model_rate_limits"]` to keep a hard `rpm` cap on deployments ([#​48873](https://github.com/BerriAI/litellm/issues/48873))
- **Vertex AI and Gemini:** Set `drop_params: true` or stop sending `temperature`, `top_p` and `top_k` to Gemini 3.6 Flash, 3.5 Flash-Lite and newer ([#​47645](https://github.com/BerriAI/litellm/issues/47645))
- **Deployment:** Deploy Lens from its own chart and set `lens.*` in your values ([#​49169](https://github.com/BerriAI/litellm/issues/49169))
##### Highlights
- **Admin UI:** Added a Chat UI with a model hub, image generation and usage metrics ([#​48108](https://github.com/BerriAI/litellm/issues/48108))
- **Routing and fallbacks:** Added mid-stream fallback continuation so a streaming chat cut off mid-answer continues on the configured fallback ([#​41127](https://github.com/BerriAI/litellm/issues/41127))
- **Deployment:** Added `LITELLM_OFFLINE_MODE` to turn off every fetch LiteLLM makes on its own with one switch ([#​48096](https://github.com/BerriAI/litellm/issues/48096))
- **Cost tracking and pricing:** Added `model_info.pricing_provider` to price a deployment from another provider's catalog rates instead of $0 ([#​47620](https://github.com/BerriAI/litellm/issues/47620))
- **Vertex AI and Gemini:** Added Gemini 3.1 Flash TTS support, including multi-speaker voices and `mp3`, `opus`, `alaw` and `mulaw` output ([#​31915](https://github.com/BerriAI/litellm/issues/31915))
- **SDK:** Fixed tool calls on `completion()` and `responses()` failing with `No module named 'mcp'` on base SDK installs ([#​45961](https://github.com/BerriAI/litellm/issues/45961)) <sup>Also in [1.108.4](https://github.com/BerriAI/litellm/releases/tag/v1.108.4)</sup>
##### All changes
<details><summary><b>OpenAI</b> (19)</summary>
- Added per-deployment workload identity on non-chat routes, realtime and the moderation guardrail ([#​39966](https://github.com/BerriAI/litellm/issues/39966))
- Added the 12-hour cache write rate for `gpt-5.6-cyber` ([#​48246](https://github.com/BerriAI/litellm/issues/48246))
- Added OpenAI `gpt-6.1-terra` with pricing ([#​48429](https://github.com/BerriAI/litellm/issues/48429))
- Added Batch and Ultrafast 12-hour cache write rates for OpenAI models ([#​48433](https://github.com/BerriAI/litellm/issues/48433))
- Added `gpt-6-rosalind` to the model cost map with its published prices ([#​49268](https://github.com/BerriAI/litellm/issues/49268))
- Added `gpt-6-astra-law` with pricing from the OpenAI pricing page ([#​49444](https://github.com/BerriAI/litellm/issues/49444))
- Fixed 400 errors and $0 spend logs on `gpt-transcribe` calls without `response_format` ([#​44021](https://github.com/BerriAI/litellm/issues/44021))
- Fixed nonstreaming `aiohttp_openai` responses dropping `service_tier` ([#​47263](https://github.com/BerriAI/litellm/issues/47263))
- Fixed `prompt_cache_retention` such as `24h` being silently dropped instead of sent upstream ([#​47480](https://github.com/BerriAI/litellm/issues/47480))
- Fixed `/health` marking OpenAI and Azure audio chat models unhealthy ([#​47730](https://github.com/BerriAI/litellm/issues/47730))
- Fixed OpenAI `context_length_exceeded` errors raising `BadRequestError` instead of `ContextWindowExceededError` ([#​47954](https://github.com/BerriAI/litellm/issues/47954))
- Fixed 12-hour prompt cache writes on `openai/gpt-5.6` and newer billing at the 30-minute rate ([#​48088](https://github.com/BerriAI/litellm/issues/48088))
- Fixed uncatalogued ChatGPT models hitting an unsupported Chat Completions endpoint ([#​48244](https://github.com/BerriAI/litellm/issues/48244))
- Fixed the whole `reasoning_effort` dict not being sent when chat is bridged to Responses ([#​48807](https://github.com/BerriAI/litellm/issues/48807))
- Fixed 400 `invalid_beta` on Agents API calls through the OpenAI passthrough ([#​49009](https://github.com/BerriAI/litellm/issues/49009))
- Fixed empty `e.response.text` on OpenAI and Azure errors so the upstream error body is readable ([#​49079](https://github.com/BerriAI/litellm/issues/49079))
- Changed OpenAI 401 and 404 `invalid_request_error` to raise matching exceptions, not `BadRequestError` ([#​32537](https://github.com/BerriAI/litellm/issues/32537))
- Changed the ChatGPT session id to derive from `prompt_cache_key` for stable cache affinity ([#​42014](https://github.com/BerriAI/litellm/issues/42014))
- Changed `gpt-6-luna` Decisions cache rates to the standard cached and write rates ([#​48066](https://github.com/BerriAI/litellm/issues/48066))
</details>
<details><summary><b>Azure</b> (18)</summary>
- Added Entra ID auth, including keyless auth, for Azure Decisions on `/v1/decisions` and `/v1/systemone` ([#​46539](https://github.com/BerriAI/litellm/issues/46539), [#​48529](https://github.com/BerriAI/litellm/issues/48529))
- Added access to Foundry agents through the project Responses API for `azure_ai/agents/<name>` ([#​47717](https://github.com/BerriAI/litellm/issues/47717))
- Added `azure_ai/MAI-Code-1.1-Flash` ([#​47779](https://github.com/BerriAI/litellm/issues/47779))
- Added `max_input_tokens` of 32768 for `azure_ai/Microsoft-Decision-1` ([#​48434](https://github.com/BerriAI/litellm/issues/48434))
- Added `outputContentFormat=markdown` support on `/ocr` for Azure Document Intelligence ([#​48926](https://github.com/BerriAI/litellm/issues/48926))
- Fixed Foundry chat requests losing OpenAI prompt cache breakpoints ([#​45299](https://github.com/BerriAI/litellm/issues/45299))
- Fixed `/v1/responses` 404 on dated `api_version` deployments and `azure_ai` Grok reasoning token billing ([#​46377](https://github.com/BerriAI/litellm/issues/46377))
- Fixed under-billed Grok reasoning tokens on `azure_ai` when the deployment name lacks "grok" ([#​46969](https://github.com/BerriAI/litellm/issues/46969))
- Fixed Azure realtime over WebRTC failing with a 404 on `client_secrets` and an invalid token on the SDP exchange ([#​47316](https://github.com/BerriAI/litellm/issues/47316))
- Fixed 400 from Foundry when tool results contain `tool_reference` parts on chat ([#​48032](https://github.com/BerriAI/litellm/issues/48032))
- Fixed 400 on `azure_ai/claude-*` when using `thinking.block_binding` ([#​48033](https://github.com/BerriAI/litellm/issues/48033))
- Fixed Responses API calls that use an explicit v1 Azure base URL ([#​48118](https://github.com/BerriAI/litellm/issues/48118))
- Fixed 404 on Azure vector store retrieve, update and delete ([#​48224](https://github.com/BerriAI/litellm/issues/48224))
- Fixed null audio capability metadata on two Azure audio snapshot models ([#​48475](https://github.com/BerriAI/litellm/issues/48475))
- Fixed Azure `context_length_exceeded` raising `BadRequestError` so `context_window_fallbacks` never ran ([#​48616](https://github.com/BerriAI/litellm/issues/48616))
- Fixed batch calls on unversioned `azure/` o3, o4-mini, o3-mini, gpt-4o and gpt-4o-mini billing at the standard rate ([#​49182](https://github.com/BerriAI/litellm/issues/49182))
- Changed `max_input_tokens` to 128000 for `gpt-chat-latest` on Azure ([#​48252](https://github.com/BerriAI/litellm/issues/48252))
- Improved Entra auth by reusing credentials and tokens across requests and refreshing them off the event loop ([#​46421](https://github.com/BerriAI/litellm/issues/46421), [#​47348](https://github.com/BerriAI/litellm/issues/47348), [#​48769](https://github.com/BerriAI/litellm/issues/48769))
</details>
<details><summary><b>Anthropic</b> (16)</summary>
- Fixed a fake `[System: ...]` message being added to tool-call-only assistant turns sent to Anthropic ([#​34822](https://github.com/BerriAI/litellm/issues/34822))
- Fixed PDFs sent as chat `image_url` being rejected with 400 by sending them as document blocks ([#​46984](https://github.com/BerriAI/litellm/issues/46984))
- Fixed Claude `json_schema` answers losing keys listed only in `required` and escaping non-ASCII characters ([#​47478](https://github.com/BerriAI/litellm/issues/47478))
- Fixed replayed `redacted_thinking` blocks being dropped, and Bedrock Converse 400s when sent twice ([#​47489](https://github.com/BerriAI/litellm/issues/47489))
- Fixed `clear_tool_uses` `input_tokens` trigger ignoring the system prompt, which delayed clearing ([#​47857](https://github.com/BerriAI/litellm/issues/47857))
- Fixed native Anthropic responses omitting a null `stop_sequence` ([#​47987](https://github.com/BerriAI/litellm/issues/47987))
- Fixed streamed responses leaving native web search fees out of the reconstructed usage cost ([#​48528](https://github.com/BerriAI/litellm/issues/48528))
- Fixed `drop_params` not dropping `speed` on `claude-opus-4-7`, which Anthropic rejects with 400 ([#​48764](https://github.com/BerriAI/litellm/issues/48764))
- Fixed 400 from beta-gated body fields when `drop_params: true`, including Claude Code and Codex traffic ([#​48793](https://github.com/BerriAI/litellm/issues/48793))
- Fixed `model_context_window_exceeded` being reported as `stop` instead of `length` ([#​48874](https://github.com/BerriAI/litellm/issues/48874))
- Fixed 400 on `/v1/messages` with many strict tools under `drop_params` by retrying without `strict` ([#​49102](https://github.com/BerriAI/litellm/issues/49102))
- Fixed Claude `pause_turn` reported as finished and refusal explanations dropped on chat and Responses ([#​49192](https://github.com/BerriAI/litellm/issues/49192))
- Fixed 500 on a non-string role or tool call id, now a 400 that names the field ([#​49237](https://github.com/BerriAI/litellm/issues/49237))
- Fixed `metadata.user_id` being dropped on Anthropic `/v1/messages` pass-through routes ([#​49333](https://github.com/BerriAI/litellm/issues/49333))
- Changed the default `max_tokens` for unmapped Anthropic models from 4096 to 128000 ([#​48502](https://github.com/BerriAI/litellm/issues/48502))
- Changed the opening prompt usage estimate in the Chat Completions adapter to be off by default ([#​48633](https://github.com/BerriAI/litellm/issues/48633))
</details>
<details><summary><b>AWS Bedrock</b> (28)</summary>
- Added context and output token limits for the Nova Sonic models ([#​48247](https://github.com/BerriAI/litellm/issues/48247))
- Added pricing for native `guardrailConfig` trace usage to spend and `x-litellm-response-cost` ([#​48278](https://github.com/BerriAI/litellm/issues/48278))
- Added `global.openai.gpt-6.1-terra` and `us.openai.gpt-6.1-terra` Bedrock models with pricing ([#​48441](https://github.com/BerriAI/litellm/issues/48441))
- Added token counting for three Mantle-native Bedrock Claude models ([#​48682](https://github.com/BerriAI/litellm/issues/48682))
- Added published Priority, Batch and Flex prices to 46 Bedrock regional rows ([#​49113](https://github.com/BerriAI/litellm/issues/49113))
- Fixed Bedrock Voxtral transcription returning 400, logging $0 spend and ignoring `language` ([#​41565](https://github.com/BerriAI/litellm/issues/41565))
- Fixed `Unknown provider=None` 404 for Bedrock models missing from the cost map ([#​43290](https://github.com/BerriAI/litellm/issues/43290))
- Fixed 400 errors on Bedrock Kimi K3 Converse calls with `max_tokens` below 16 ([#​43875](https://github.com/BerriAI/litellm/issues/43875))
- Fixed 400 `invalid beta flag` on Claude Code auto mode requests that carry no `safeguards` ([#​44471](https://github.com/BerriAI/litellm/issues/44471))
- Fixed a malformed Bedrock batch JSONL line failing the upload with a 500 instead of a 400 ([#​45992](https://github.com/BerriAI/litellm/issues/45992))
- Fixed `post_call` guardrails not scanning Claude output on `invoke-with-response-stream` passthrough ([#​46524](https://github.com/BerriAI/litellm/issues/46524))
- Fixed Claude `json_schema` streams dropping reasoning and thinking blocks and ending on `tool_calls` with no tool calls ([#​46863](https://github.com/BerriAI/litellm/issues/46863))
- Fixed JSON schema requests failing on Fable 5 and Sonnet 4.6 and losing adaptive thinking on Haiku 5.5 ([#​46870](https://github.com/BerriAI/litellm/issues/46870))
- Fixed `bedrock_request_metadata_fields` being ignored on the `/bedrock` pass-through routes ([#​47040](https://github.com/BerriAI/litellm/issues/47040))
- Fixed Bedrock Opus 4.8 and Sonnet 5 dropping reasoning on `json_schema` requests by trying native output first ([#​47100](https://github.com/BerriAI/litellm/issues/47100))
- Fixed Bedrock batch jobs ignoring a configured control-plane endpoint ([#​47260](https://github.com/BerriAI/litellm/issues/47260))
- Fixed AWS region lookups through Vault blocking the event loop and stalling other requests on the worker ([#​47331](https://github.com/BerriAI/litellm/issues/47331))
- Fixed $0 spend and `ModelNotMappedError` for `bedrock/claude_platform/<id>` calls ([#​48150](https://github.com/BerriAI/litellm/issues/48150))
- Fixed `max_input_tokens` to 922000 on Bedrock GPT models and added Mantle token counting for `claude-opus-5-5` ([#​48479](https://github.com/BerriAI/litellm/issues/48479))
- Fixed Bedrock rejecting `strict` tool schemas by retrying without `strict` under `drop_params` ([#​48733](https://github.com/BerriAI/litellm/issues/48733))
- Fixed 400 on Bedrock when Codex repeats its tool list across turns ([#​49006](https://github.com/BerriAI/litellm/issues/49006))
- Fixed region-prefixed Bedrock embedding models not routing to their region or billing its price ([#​49072](https://github.com/BerriAI/litellm/issues/49072))
- Fixed `bedrock_mantle/openai.gpt-5.6-cyber` token limits and endpoints to match its model card ([#​49350](https://github.com/BerriAI/litellm/issues/49350))
- Fixed `max_output_tokens` for Bedrock GovCloud West Llama 3 models, now 8192 ([#​49543](https://github.com/BerriAI/litellm/issues/49543))
- Changed `converse-stream` pass-through to stream frames through post_call guardrails instead of buffering the reply ([#​46307](https://github.com/BerriAI/litellm/issues/46307))
- Changed `/bedrock` pass-through routes to apply a model's `guardrailConfig`, returning 400 if Bedrock cannot use it ([#​47429](https://github.com/BerriAI/litellm/issues/47429))
- Changed Bedrock pass-through to use request metadata as the session id, fixing 400s with `missing_session_id: reject` ([#​49193](https://github.com/BerriAI/litellm/issues/49193))
- Changed Bedrock Invoke and Mantle Claude to use the model's own default `max_tokens` ([#​49724](https://github.com/BerriAI/litellm/issues/49724))
</details>
<details><summary><b>Vertex AI and Gemini</b> (34)</summary>
- Added Gemini 3.1 Flash TTS support, including multi-speaker voices and `mp3`, `opus`, `alaw` and `mulaw` output ([#​31915](https://github.com/BerriAI/litellm/issues/31915))
- Added a setting to drop chosen `anthropic-beta` values on the Vertex AI pass-through routes ([#​47185](https://github.com/BerriAI/litellm/issues/47185))
- Added `LITELLM_GEMINI_DEFAULT_MAX_OUTPUT_TOKENS` to set the output limit for requests that set none ([#​47542](https://github.com/BerriAI/litellm/issues/47542))
- Added `thought_signature_in_tool_call_id` to keep Gemini tool call ids short for clients that cap them ([#​47692](https://github.com/BerriAI/litellm/issues/47692))
- Added a 2026-06-30 deprecation date to `vertex_ai/veo-2.0-generate-001` ([#​47847](https://github.com/BerriAI/litellm/issues/47847))
- Added Batch rates for two Llama 4 MaaS models so Vertex batch jobs no longer bill at on-demand rates ([#​48085](https://github.com/BerriAI/litellm/issues/48085))
- Added Vertex batch prices above 200k tokens and image output prices for Gemini models ([#​48945](https://github.com/BerriAI/litellm/issues/48945))
- Fixed the Gemini 3 sampling deprecation warning logging on every request, now once per model per worker ([#​40868](https://github.com/BerriAI/litellm/issues/40868))
- Fixed `vertex_ai/*` keys not listing partner, Veo and embedding models and dropping publisher prefixes ([#​41959](https://github.com/BerriAI/litellm/issues/41959))
- Fixed Gemini TTS `/v1/audio/speech` calling Google twice and logging 0 tokens in spend ([#​44551](https://github.com/BerriAI/litellm/issues/44551))
- Fixed 400 from compaction, thinking display and tool change betas on Claude via Vertex AI and Azure AI ([#​44747](https://github.com/BerriAI/litellm/issues/44747))
- Fixed context caching on Vertex AI failing when a custom `api_base` is set ([#​44783](https://github.com/BerriAI/litellm/issues/44783))
- Fixed streamed Vertex AI pass-through calls missing the regional 10% uplift and custom deployment prices ([#​44795](https://github.com/BerriAI/litellm/issues/44795))
- Fixed Gemini not receiving integer enum values in tool parameters ([#​44908](https://github.com/BerriAI/litellm/issues/44908))
- Fixed Vertex Claude batches returning 404 at create ([#​45715](https://github.com/BerriAI/litellm/issues/45715))
- Fixed cache-marked requests listing all `cachedContents` on every call and creating duplicate caches ([#​46857](https://github.com/BerriAI/litellm/issues/46857))
- Fixed Vertex AI rate limit errors returned as 403 when the error text contains 403 ([#​47134](https://github.com/BerriAI/litellm/issues/47134))
- Fixed Gemini audio input and cached audio billed at the Standard rate on flex, priority and batch tiers ([#​48086](https://github.com/BerriAI/litellm/issues/48086))
- Fixed `gemini-2.5-flash-native-audio` video input billed at the text rate instead of the audio/video rate ([#​48248](https://github.com/BerriAI/litellm/issues/48248))
- Fixed Gemini 2.5 rejecting tool results with images and the history replay that follows ([#​48428](https://github.com/BerriAI/litellm/issues/48428))
- Fixed Vertex AI shared credential cache growing without bound across credential and project pairs ([#​48442](https://github.com/BerriAI/litellm/issues/48442))
- Fixed Vertex AI image sizes outside the old lookup table silently producing square output ([#​48463](https://github.com/BerriAI/litellm/issues/48463))
- Fixed slow Google credential requests blocking the proxy worker on Claude `/v1/messages` ([#​48523](https://github.com/BerriAI/litellm/issues/48523))
- Fixed explicit Gemini and Vertex embedding timeouts silently becoming 300 seconds ([#​48690](https://github.com/BerriAI/litellm/issues/48690))
- Fixed Gemini grounding keeping only the first web source for a passage ([#​48745](https://github.com/BerriAI/litellm/issues/48745))
- Fixed `labels` on `vertex_ai/claude-*` returning 400 by sending them as `X-Vertex-AI-Labels` ([#​48753](https://github.com/BerriAI/litellm/issues/48753))
- Fixed 400 on `countTokens` and `generateContent` when repeated fields are a single object or null ([#​48771](https://github.com/BerriAI/litellm/issues/48771))
- Fixed Vertex Claude `/v1/messages` returning 400 when the SDK sends `anthropic-version` as a header ([#​48814](https://github.com/BerriAI/litellm/issues/48814))
- Fixed Claude web search billing per request on Vertex AI deployments priced in `model_info` ([#​49160](https://github.com/BerriAI/litellm/issues/49160))
- Fixed batch image output billed at the Standard rate on `gemini-nano-banana-2.1` and `gemini-3.1-flash-lite-image` ([#​49317](https://github.com/BerriAI/litellm/issues/49317), [#​49358](https://github.com/BerriAI/litellm/issues/49358))
- Changed Gemini 3.6 Flash, 3.5 Flash-Lite and newer to refuse `temperature`, `top_p` and `top_k` without `drop_params` ([#​47645](https://github.com/BerriAI/litellm/issues/47645))
- Improved rerank latency by reusing cached Google credentials on every request ([#​48430](https://github.com/BerriAI/litellm/issues/48430))
- Improved failure logs for Gemini and Vertex pass-through calls by adding the URL model and declared provider ([#​49075](https://github.com/BerriAI/litellm/issues/49075))
- Removed the floor `deprecation_date` from `gemini-3.1-flash-lite-image` ([#​48587](https://github.com/BerriAI/litellm/issues/48587))
</details>
<details><summary><b>Other providers</b> (3)</summary>
- Added 11 new providers: ai&, BigModel, CLF AI Gateway, Hostinger Router, Kyma API, Nace, OpenCode Go, OpenInfer, Refuseless, StreamLake and ZeroGPU ([#​38958](https://github.com/BerriAI/litellm/issues/38958), [#​39324](https://github.com/BerriAI/litellm/issues/39324), [#​41006](https://github.com/BerriAI/litellm/issues/41006), [#​41034](https://github.com/BerriAI/litellm/issues/41034), [#​43874](https://github.com/BerriAI/litellm/issues/43874), [#​44863](https://github.com/BerriAI/litellm/issues/44863), [#​46523](https://github.com/BerriAI/litellm/issues/46523), [#​48140](https://github.com/BerriAI/litellm/issues/48140), [#​48497](https://github.com/BerriAI/litellm/issues/48497), [#​48563](https://github.com/BerriAI/litellm/issues/48563), [#​48756](https://github.com/BerriAI/litellm/issues/48756))
- Added models, endpoints and options for smaller providers (31 PRs) ([#​41021](https://github.com/BerriAI/litellm/issues/41021), [#​41522](https://github.com/BerriAI/litellm/issues/41522), [#​46156](https://github.com/BerriAI/litellm/issues/46156), [#​46875](https://github.com/BerriAI/litellm/issues/46875), [#​47401](https://github.com/BerriAI/litellm/issues/47401), [#​47473](https://github.com/BerriAI/litellm/issues/47473), [#​47610](https://github.com/BerriAI/litellm/issues/47610), [#​47690](https://github.com/BerriAI/litellm/issues/47690), [#​47785](https://github.com/BerriAI/litellm/issues/47785), [#​47812](https://github.com/BerriAI/litellm/issues/47812), [#​48158](https://github.com/BerriAI/litellm/issues/48158), [#​48251](https://github.com/BerriAI/litellm/issues/48251), [#​48335](https://github.com/BerriAI/litellm/issues/48335), [#​48448](https://github.com/BerriAI/litellm/issues/48448), [#​48450](https://github.com/BerriAI/litellm/issues/48450), [#​48453](https://github.com/BerriAI/litellm/issues/48453), [#​48498](https://github.com/BerriAI/litellm/issues/48498), [#​48621](https://github.com/BerriAI/litellm/issues/48621), [#​48651](https://github.com/BerriAI/litellm/issues/48651), [#​48676](https://github.com/BerriAI/litellm/issues/48676), [#​48677](https://github.com/BerriAI/litellm/issues/48677), [#​48735](https://github.com/BerriAI/litellm/issues/48735), [#​48871](https://github.com/BerriAI/litellm/issues/48871), [#​48998](https://github.com/BerriAI/litellm/issues/48998), [#​49252](https://github.com/BerriAI/litellm/issues/49252), [#​49280](https://github.com/BerriAI/litellm/issues/49280), [#​49281](https://github.com/BerriAI/litellm/issues/49281), [#​49282](https://github.com/BerriAI/litellm/issues/49282), [#​49287](https://github.com/BerriAI/litellm/issues/49287), [#​49297](https://github.com/BerriAI/litellm/issues/49297), [#​49542](https://github.com/BerriAI/litellm/issues/49542))
- Fixed issues and updated behavior on smaller providers (41 PRs) ([#​38736](https://github.com/BerriAI/litellm/issues/38736), [#​40152](https://github.com/BerriAI/litellm/issues/40152), [#​43390](https://github.com/BerriAI/litellm/issues/43390), [#​44723](https://github.com/BerriAI/litellm/issues/44723), [#​45092](https://github.com/BerriAI/litellm/issues/45092), [#​45567](https://github.com/BerriAI/litellm/issues/45567), [#​46091](https://github.com/BerriAI/litellm/issues/46091), [#​46861](https://github.com/BerriAI/litellm/issues/46861), [#​46945](https://github.com/BerriAI/litellm/issues/46945), [#​46959](https://github.com/BerriAI/litellm/issues/46959), [#​47091](https://github.com/BerriAI/litellm/issues/47091), [#​47423](https://github.com/BerriAI/litellm/issues/47423), [#​47424](https://github.com/BerriAI/litellm/issues/47424), [#​47432](https://github.com/BerriAI/litellm/issues/47432), [#​47495](https://github.com/BerriAI/litellm/issues/47495), [#​47784](https://github.com/BerriAI/litellm/issues/47784), [#​47794](https://github.com/BerriAI/litellm/issues/47794), [#​48121](https://github.com/BerriAI/litellm/issues/48121), [#​48254](https://github.com/BerriAI/litellm/issues/48254), [#​48265](https://github.com/BerriAI/litellm/issues/48265), [#​48268](https://github.com/BerriAI/litellm/issues/48268), [#​48270](https://github.com/BerriAI/litellm/issues/48270), [#​48455](https://github.com/BerriAI/litellm/issues/48455), [#​48522](https://github.com/BerriAI/litellm/issues/48522), [#​48527](https://github.com/BerriAI/litellm/issues/48527), [#​48668](https://github.com/BerriAI/litellm/issues/48668), [#​48684](https://github.com/BerriAI/litellm/issues/48684), [#​48706](https://github.com/BerriAI/litellm/issues/48706), [#​48707](https://github.com/BerriAI/litellm/issues/48707), [#​48778](https://github.com/BerriAI/litellm/issues/48778), [#​48820](https://github.com/BerriAI/litellm/issues/48820), [#​48837](https://github.com/BerriAI/litellm/issues/48837), [#​49068](https://github.com/BerriAI/litellm/issues/49068), [#​49158](https://github.com/BerriAI/litellm/issues/49158), [#​49278](https://github.com/BerriAI/litellm/issues/49278), [#​49344](https://github.com/BerriAI/litellm/issues/49344), [#​49458](https://github.com/BerriAI/litellm/issues/49458), [#​49462](https://github.com/BerriAI/litellm/issues/49462), [#​49498](https://github.com/BerriAI/litellm/issues/49498), [#​49502](https://github.com/BerriAI/litellm/issues/49502), [#​49616](https://github.com/BerriAI/litellm/issues/49616))
</details>
<details><summary><b>Chat completions</b> (17)</summary>
- Fixed streams with `logprobs` ending in a 500 error frame before the finish chunk ([#​33549](https://github.com/BerriAI/litellm/issues/33549))
- Fixed 500 errors when a prompt template omits `initial_prompt_value` or `final_prompt_value` ([#​39762](https://github.com/BerriAI/litellm/issues/39762))
- Fixed rebuilt streamed text completions returning null `finish_reason` and zero `prompt_tokens` ([#​44349](https://github.com/BerriAI/litellm/issues/44349))
- Fixed Foundry deployments and Claude fallbacks getting the wrong cache options, which caused 400s ([#​45295](https://github.com/BerriAI/litellm/issues/45295))
- Fixed non-streaming chat dropping upstream response headers on `bedrock_mantle/` and other OpenAI-like providers ([#​46928](https://github.com/BerriAI/litellm/issues/46928))
- Fixed chat streams failing with a proxy error when progress chunks have no choice index ([#​46947](https://github.com/BerriAI/litellm/issues/46947))
- Fixed the overhead header under-reporting on chat requests when guardrails add `litellm_metadata` ([#​47790](https://github.com/BerriAI/litellm/issues/47790))
- Fixed streamed chunks containing `[DONE]` being read as end of stream and dropped ([#​47832](https://github.com/BerriAI/litellm/issues/47832))
- Fixed completions streams including `usage` when it was not requested ([#​48052](https://github.com/BerriAI/litellm/issues/48052))
- Fixed an upstream `abort` on streamed chat completions returning a clean HTTP 200 instead of a server error ([#​48328](https://github.com/BerriAI/litellm/issues/48328))
- Fixed unbalanced think tags in merged streams and SSE lines splitting on characters other than CR/LF ([#​48755](https://github.com/BerriAI/litellm/issues/48755))
- Fixed 400 on system-first models like Qwen3.5 when a later `developer` message appears ([#​48897](https://github.com/BerriAI/litellm/issues/48897))
- Fixed streamed chat completions with `n>1` rebuilding each choice ([#​49002](https://github.com/BerriAI/litellm/issues/49002))
- Fixed streaming clients missing tool execution when OpenAI-compatible providers end tool calls with `stop` ([#​49388](https://github.com/BerriAI/litellm/issues/49388))
- Changed the `include_usage` stream chunk to send an empty `choices` array like OpenAI ([#​47109](https://github.com/BerriAI/litellm/issues/47109))
- Changed stalled stream reads to raise a 408 `litellm.Timeout` on chat, messages and responses ([#​47198](https://github.com/BerriAI/litellm/issues/47198))
- Changed streams that end without a finish reason to fail as errors instead of reporting a normal completion ([#​47665](https://github.com/BerriAI/litellm/issues/47665))
</details>
<details><summary><b>Responses API</b> (34)</summary>
- Added `max_agentic_loops` support to raise the streamed MCP auto-execute round cap above 5 ([#​47688](https://github.com/BerriAI/litellm/issues/47688))
- Added resuming background response streams with `stream` and `starting_after` on retrieve ([#​48819](https://github.com/BerriAI/litellm/issues/48819))
- Added Codex client `tool_search` support on Anthropic and other bridged providers, cutting input tokens ([#​48972](https://github.com/BerriAI/litellm/issues/48972))
- Fixed Responses API logging tasks being dropped by garbage collection and cut off at shutdown ([#​31074](https://github.com/BerriAI/litellm/issues/31074))
- Fixed non-stream MCP auto-execute on `/v1/responses` logging and billing only one of its two model calls ([#​43667](https://github.com/BerriAI/litellm/issues/43667))
- Fixed 400 from malformed `prompt_cache_breakpoint` on `/v1/responses` with `drop_params: true` ([#​45330](https://github.com/BerriAI/litellm/issues/45330))
- Fixed later turns on an open Responses WebSocket skipping deployment checks and not counting toward budgets ([#​45727](https://github.com/BerriAI/litellm/issues/45727))
- Fixed streamed `/v1/responses` events showing the backend deployment name in nested `response.model` ([#​46662](https://github.com/BerriAI/litellm/issues/46662))
- Fixed `/v1/responses` on Claude dropping returned and replayed `compaction` items ([#​46754](https://github.com/BerriAI/litellm/issues/46754))
- Fixed Responses WebSocket running `pre_call` guardrails on turn one only and rebilling that cost every turn ([#​47013](https://github.com/BerriAI/litellm/issues/47013))
- Fixed OpenAI pass-through `GET /responses/{id}` being billed again on every call ([#​47171](https://github.com/BerriAI/litellm/issues/47171))
- Fixed background spend not counting toward the key's project or per-model budgets ([#​47504](https://github.com/BerriAI/litellm/issues/47504))
- Fixed the billed cost of background responses not reaching key and team loggers ([#​47506](https://github.com/BerriAI/litellm/issues/47506))
- Fixed failed Responses streams billing 0 tokens and bridged `/v1/messages` stream failures not being reported ([#​47537](https://github.com/BerriAI/litellm/issues/47537))
- Fixed `clear_tool_uses_20250919` being silently dropped for `openai/` models on the Responses API ([#​47861](https://github.com/BerriAI/litellm/issues/47861))
- Fixed per-call `input_cost_per_token` and `output_cost_per_token` being ignored by `responses()` ([#​48119](https://github.com/BerriAI/litellm/issues/48119))
- Fixed 500 when replaying `web_search_call` input items that have no `action` ([#​48417](https://github.com/BerriAI/litellm/issues/48417))
- Fixed audio, PDF and image tool results and history media being dropped in Responses and Gemini conversions ([#​48484](https://github.com/BerriAI/litellm/issues/48484))
- Fixed retries from `previous_response_id` returning 400 on Bedrock after a failed turn ([#​48647](https://github.com/BerriAI/litellm/issues/48647))
- Fixed Responses params the chat bridge cannot translate causing 400s like `max_tool_calls` on Bedrock Claude ([#​48655](https://github.com/BerriAI/litellm/issues/48655))
- Fixed typed streaming text access breaking on `/v1/responses` when `logprobs` is omitted ([#​48686](https://github.com/BerriAI/litellm/issues/48686))
- Fixed `moderation` on `/v1/responses` being dropped before the OpenAI call ([#​48708](https://github.com/BerriAI/litellm/issues/48708))
- Fixed later citation batches and pending citations being dropped when streaming Responses ([#​48747](https://github.com/BerriAI/litellm/issues/48747))
- Fixed replayed Responses output items being rejected by OpenAI because of a null `created_by` ([#​48783](https://github.com/BerriAI/litellm/issues/48783))
- Fixed an empty `function_call_output` reaching models as serialized JSON instead of an empty tool result ([#​48845](https://github.com/BerriAI/litellm/issues/48845))
- Fixed Responses compaction by dropping params it rejects and sending Azure compaction to the v1 route ([#​48876](https://github.com/BerriAI/litellm/issues/48876))
- Fixed Responses item order, phase and boundaries not being replayed on the next chat turn ([#​48912](https://github.com/BerriAI/litellm/issues/48912))
- Fixed bridged Responses requests losing the requested text verbosity when sent to chat completions ([#​49049](https://github.com/BerriAI/litellm/issues/49049))
- Fixed deployment `itpm` and `otpm` limits not being checked or counted on later Responses WebSocket turns ([#​49069](https://github.com/BerriAI/litellm/issues/49069))
- Fixed `litellm.responses()` through `litellm_proxy/` leaving `e.body`, `e.code` and `e.type` empty on errors ([#​49073](https://github.com/BerriAI/litellm/issues/49073))
- Fixed dict `reasoning_effort` losing `mode` and `context` on Azure, ChatGPT, Perplexity, xAI, Fireworks and Copilot ([#​49082](https://github.com/BerriAI/litellm/issues/49082))
- Fixed repeated Codex tools being merged for all callers, now only merged when `drop_params` is on ([#​49112](https://github.com/BerriAI/litellm/issues/49112))
- Fixed native `/v1/responses` WebSocket turns not counting toward key and tag `tpm_limit` ([#​49257](https://github.com/BerriAI/litellm/issues/49257))
- Changed a lone Responses built-in tool on Claude to return 400 before token counting ([#​48798](https://github.com/BerriAI/litellm/issues/48798))
</details>
<details><summary><b>Messages API</b> (14)</summary>
- Fixed web-search-only requests coming back without native search blocks on streamed replies ([#​40967](https://github.com/BerriAI/litellm/issues/40967))
- Fixed retried `/v1/messages` attempts mixing up usage and spend logs, and exhausted retries billing only the last ([#​45194](https://github.com/BerriAI/litellm/issues/45194))
- Fixed `safeguard_results` and `stop_details` missing from streamed `/v1/messages` `message_delta` events ([#​46096](https://github.com/BerriAI/litellm/issues/46096))
- Fixed the `clear_tool_uses` polyfill ignoring `clear_at_least`, `exclude_tools` and `clear_tool_inputs` ([#​47123](https://github.com/BerriAI/litellm/issues/47123))
- Fixed `/v1/messages` PDF documents being sent to Azure OpenAI models as images instead of file parts ([#​47166](https://github.com/BerriAI/litellm/issues/47166))
- Fixed 500 on `/v1/messages` and count_tokens for null or numeric `tool_result` text, now a 400 ([#​47347](https://github.com/BerriAI/litellm/issues/47347))
- Fixed 400 `Tool reference not found` for tool names over 64 chars when a guardrail rewrites `/v1/messages` ([#​47434](https://github.com/BerriAI/litellm/issues/47434))
- Fixed canceled `/v1/messages` streams not closing the upstream request ([#​48220](https://github.com/BerriAI/litellm/issues/48220))
- Fixed `stop_sequences` being ignored for OpenAI models on `/v1/messages` ([#​48534](https://github.com/BerriAI/litellm/issues/48534))
- Fixed the client's `anthropic-beta` replacing the deployment's on `/v1/messages` ([#​48594](https://github.com/BerriAI/litellm/issues/48594))
- Fixed `/v1/messages` streams reporting zero `input_tokens` in `message_start` when bridged to Chat Completions ([#​48618](https://github.com/BerriAI/litellm/issues/48618))
- Fixed Anthropic-format `tool_choice` crashing input token counting and causing false budget refusals ([#​48624](https://github.com/BerriAI/litellm/issues/48624))
- Fixed 400 on `/v1/messages` caused by a non-spec `custom` object in tool definitions ([#​48893](https://github.com/BerriAI/litellm/issues/48893))
- Fixed Mistral thinking text being lost on streaming `/v1/messages` ([#​49059](https://github.com/BerriAI/litellm/issues/49059))
</details>
<details><summary><b>Realtime</b> (4)</summary>
- Added Soniox realtime speech-to-text on `/v1/realtime` with `stt-rt-v5` ([#​44822](https://github.com/BerriAI/litellm/issues/44822))
- Fixed Gemini Live ignoring `session.update` instructions and tools, and answering text clients with audio ([#​39864](https://github.com/BerriAI/litellm/issues/39864))
- Fixed `/health` reporting OpenAI realtime deployments with a missing or invalid key as healthy ([#​41233](https://github.com/BerriAI/litellm/issues/41233))
- Fixed sessions going silent when a transcript guardrail sent `turn_detection` with no `type` to OpenAI ([#​44939](https://github.com/BerriAI/litellm/issues/44939))
</details>
<details><summary><b>Embeddings, images and audio</b> (8)</summary>
- Added a per-request input batch limit on `/v1/embeddings` to cap how many inputs one call can send ([#​44574](https://github.com/BerriAI/litellm/issues/44574))
- Fixed video status and content polling failing with per-model keys by keeping `model_id` in video ids ([#​44614](https://github.com/BerriAI/litellm/issues/44614))
- Fixed `aws_polly/standard`, `long-form` and `generative` being sent with the `neural` engine ([#​47963](https://github.com/BerriAI/litellm/issues/47963))
- Fixed image generation ignoring `max_retries` and Router retries multiplying upstream attempts ([#​48705](https://github.com/BerriAI/litellm/issues/48705))
- Fixed async image edits with no image returning HTTP 500 instead of 400 ([#​48872](https://github.com/BerriAI/litellm/issues/48872))
- Fixed key and team `router_settings` being ignored on `/v1/images/generations` ([#​49286](https://github.com/BerriAI/litellm/issues/49286))
- Changed unsupported transcription providers to return 400 naming the provider and model instead of 500 ([#​47971](https://github.com/BerriAI/litellm/issues/47971))
- Removed `dall-e-2` and `dall-e-3` support, and image generation without a model now returns 400 ([#​48703](https://github.com/BerriAI/litellm/issues/48703))
</details>
<details><summary><b>Batches and files</b> (8)</summary>
- Added routing of `POST /v1/batches` to batch deployments and `supported_endpoints` on `/model_group/info` ([#​47376](https://github.com/BerriAI/litellm/issues/47376))
- Fixed 400 on `GET /files/{id}/content` with raw `gs://` file ids from the unmanaged Vertex batch flow ([#​40621](https://github.com/BerriAI/litellm/issues/40621))
- Fixed fine-tuning jobs failing with 400 for files uploaded with `target_model_names` ([#​46552](https://github.com/BerriAI/litellm/issues/46552))
- Fixed completed batches skipping success callbacks and losing usage under redaction ([#​47192](https://github.com/BerriAI/litellm/issues/47192))
- Fixed file lists showing every file on the shared key and ignoring `limit` and `after` with `require_managed_files` ([#​47682](https://github.com/BerriAI/litellm/issues/47682))
- Fixed batch retrieve showing zero prompt and completion tokens ([#​47740](https://github.com/BerriAI/litellm/issues/47740))
- Fixed unbillable batches blocking file deletes and new-batch polling ([#​48752](https://github.com/BerriAI/litellm/issues/48752))
- Fixed unmanaged `gs://` Vertex batches being costed through the wrong deployment and reading zero spend ([#​49301](https://github.com/BerriAI/litellm/issues/49301))
</details>
<details><summary><b>Vector stores</b> (5)</summary>
- Added OpenSearch k-NN search as a vector store provider ([#​47759](https://github.com/BerriAI/litellm/issues/47759))
- Fixed `/rag/ingest` and `/rag/query` ignoring team provider credentials and denying viewers and team JWTs ([#​45497](https://github.com/BerriAI/litellm/issues/45497))
- Fixed team key vector store search failing when the team's first model is from a different provider ([#​46894](https://github.com/BerriAI/litellm/issues/46894))
- Fixed team and key Allowed Vector Stores being ignored on `/v1/responses` `file_search` without a registry ([#​48915](https://github.com/BerriAI/litellm/issues/48915))
- Improved Vertex AI Search vector store searches by reusing HTTP/2 connections and OAuth tokens ([#​40631](https://github.com/BerriAI/litellm/issues/40631))
</details>
<details><summary><b>Token counting</b> (10)</summary>
- Added one log line per token count call with its id, model and count ([#​47657](https://github.com/BerriAI/litellm/issues/47657))
- Fixed `/v1/messages/count_tokens` and `/utils/token_counter` failing on histories with a compaction block ([#​44784](https://github.com/BerriAI/litellm/issues/44784))
- Fixed DeepSeek V4 token counts missing Azure's billed tokens by using DeepSeek's own tokenizer ([#​47173](https://github.com/BerriAI/litellm/issues/47173), [#​47353](https://github.com/BerriAI/litellm/issues/47353))
- Fixed `count_tokens` overcounting PDFs about 12x for OpenAI and Azure models ([#​47554](https://github.com/BerriAI/litellm/issues/47554))
- Fixed token counts retrying a failed HuggingFace tokenizer download and adding about 23s per request ([#​47586](https://github.com/BerriAI/litellm/issues/47586))
- Fixed HTTP 500 when counting tokens for Anthropic search results and unsupported blocks ([#​48699](https://github.com/BerriAI/litellm/issues/48699))
- Fixed token counts for OpenAI models newer than the tiktoken table by using `o200k_base` ([#​48728](https://github.com/BerriAI/litellm/issues/48728))
- Fixed a loaded Hugging Face tokenizer being hidden when a later download fails ([#​48916](https://github.com/BerriAI/litellm/issues/48916))
- Changed Responses input token counts to match inference, fixing Claude counts with tools and `text.format` ([#​47363](https://github.com/BerriAI/litellm/issues/47363))
- Improved `token_counter` for inline `auto` images, including images under 768 pixels, with no HTTP requests ([#​48526](https://github.com/BerriAI/litellm/issues/48526))
</details>
<details><summary><b>MCP</b> (27)</summary>
- Added upstream status and response body to the log when an MCP health check fails ([#​44125](https://github.com/BerriAI/litellm/issues/44125))
- Added support for redeeming an ID-JAG as an RFC 7523 `jwt-bearer` grant on the gateway token endpoint ([#​46748](https://github.com/BerriAI/litellm/issues/46748))
- Added Authorization URL, Token URL and Scopes fields to OAuth Delegate and True Passthrough server forms ([#​46941](https://github.com/BerriAI/litellm/issues/46941))
- Added tool search and multi-select to the MCP toolset editor in the Admin UI ([#​48601](https://github.com/BerriAI/litellm/issues/48601))
- Added failure logging for MCP SDK request rejections, shown as `MCP: request_rejected` ([#​49184](https://github.com/BerriAI/litellm/issues/49184))
- Fixed `LITELLM_MCP_TOOL_LISTING_TIMEOUT` not applying to paginated `tools/list` on `/mcp` ([#​46513](https://github.com/BerriAI/litellm/issues/46513))
- Fixed `tools/list` returning an empty list when servers answer 429, now retried with an error if all fail ([#​46649](https://github.com/BerriAI/litellm/issues/46649))
- Fixed 412 on MCP calls with `id_jag_subject_source: refresh_token` after an Okta OIDC login ([#​46745](https://github.com/BerriAI/litellm/issues/46745), [#​46747](https://github.com/BerriAI/litellm/issues/46747), [#​47004](https://github.com/BerriAI/litellm/issues/47004))
- Fixed the caller's LiteLLM key being forwarded to upstream MCP servers when `Authorization` is in `extra_headers` ([#​46932](https://github.com/BerriAI/litellm/issues/46932))
- Fixed VS Code sign-in to DCR bridge MCP servers when the upstream rejects loopback redirect URIs ([#​46940](https://github.com/BerriAI/litellm/issues/46940))
- Fixed 403 when `proxy_admin_viewer` stores its own MCP credentials ([#​46994](https://github.com/BerriAI/litellm/issues/46994))
- Fixed large MCP SSE tool results failing, and invalid size limits breaking MCP discovery and tool calls ([#​47034](https://github.com/BerriAI/litellm/issues/47034))
- Fixed streamed MCP auto-execute billing only the first of its two model calls ([#​47422](https://github.com/BerriAI/litellm/issues/47422), [#​47445](https://github.com/BerriAI/litellm/issues/47445), [#​48899](https://github.com/BerriAI/litellm/issues/48899))
- Fixed an upstream MCP 429 on session handshake being reported as an internal error ([#​47569](https://github.com/BerriAI/litellm/issues/47569))
- Fixed MCP OAuth sign-in callback returning 403 behind AWS WAF by sealing the `litellm_cp_return_to` cookie ([#​47595](https://github.com/BerriAI/litellm/issues/47595))
- Fixed per-user auth MCP servers missing from `/mcp-rest/tools/list` and `/mcp` `tools/list` ([#​47677](https://github.com/BerriAI/litellm/issues/47677))
- Fixed streaming MCP follow-ups on `/v1/responses` dropping all but the latest tool round ([#​47698](https://github.com/BerriAI/litellm/issues/47698))
- Fixed slow MCP tool calls delaying response headers until the SSE ping ([#​47897](https://github.com/BerriAI/litellm/issues/47897))
- Fixed MCP management routes to follow the gateway's existing access rules ([#​48080](https://github.com/BerriAI/litellm/issues/48080))
- Fixed a readonly MCP toolset URL returning every tool instead of only the toolset's tools ([#​48095](https://github.com/BerriAI/litellm/issues/48095))
- Fixed oversized SSE tool catalogs returning a generic 500, now 502 with the size limit and pagination advice ([#​48424](https://github.com/BerriAI/litellm/issues/48424))
- Fixed MCP toolset OAuth login advertising a resource URL that clients reject ([#​48474](https://github.com/BerriAI/litellm/issues/48474))
- Fixed revoked or expired browser sessions still being accepted during gateway authorization ([#​48494](https://github.com/BerriAI/litellm/issues/48494))
- Fixed MCP OpenAPI loading to accept valid YAML specs ([#​48622](https://github.com/BerriAI/litellm/issues/48622))
- Fixed MCP tools in both `allowed_tools` and `disallowed_tools` still being callable ([#​48625](https://github.com/BerriAI/litellm/issues/48625))
- Fixed MCP tools hidden by discovery guardrails still being callable by name ([#​48669](https://github.com/BerriAI/litellm/issues/48669))
- Changed admin-owned team keys to reach only their team's MCP servers and toolsets ([#​49161](https://github.com/BerriAI/litellm/issues/49161))
</details>
<details><summary><b>Agents</b> (10)</summary>
- Added the pi harness to `litellm.agent()` and fixed harness turn `cost` ignoring prompt cache prices ([#​45467](https://github.com/BerriAI/litellm/issues/45467))
- Added request log entries for rejected A2A calls to forbidden or unknown agents ([#​49492](https://github.com/BerriAI/litellm/issues/49492))
- Fixed OpenCode via `litellm.agent()` using the script's folder instead of the sandbox, and hanging on resume ([#​47530](https://github.com/BerriAI/litellm/issues/47530))
- Fixed Gemini Managed Agents create returning 400 for `name` and interactions dropping inline `agent_config` ([#​48750](https://github.com/BerriAI/litellm/issues/48750))
- Fixed `/a2a` calls to completion-bridge agents logging $0 on send and no spend row on stream ([#​49150](https://github.com/BerriAI/litellm/issues/49150))
- Fixed 404 on `/a2a/{agent_id}/message/stream` and `/v1/a2a/{agent_id}/message/stream` ([#​49471](https://github.com/BerriAI/litellm/issues/49471))
- Fixed agent `litellm_params.api_key` not being sent as bearer auth on A2A calls ([#​49474](https://github.com/BerriAI/litellm/issues/49474))
- Fixed agent list and detail responses showing non-admins the backend URL instead of the proxy URL ([#​49483](https://github.com/BerriAI/litellm/issues/49483))
- Fixed a blank search embedding model returning 503 instead of the `*_not_configured` 400 on agent and skill search ([#​49485](https://github.com/BerriAI/litellm/issues/49485))
- Changed proxy refusals on `/a2a` POST routes to return JSON-RPC errors ([#​49476](https://github.com/BerriAI/litellm/issues/49476))
</details>
<details><summary><b>Guardrails</b> (21)</summary>
- Added opt-in `response_masked_data` on PANW Prisma AIRS `post_call` blocks ([#​46219](https://github.com/BerriAI/litellm/issues/46219))
- Added `num_retries` to `generic_guardrail_api` for checks lost after connecting ([#​46965](https://github.com/BerriAI/litellm/issues/46965))
- Added a native Reco guardrail that blocks requests on Reco errors unless `fail_on_error: false` ([#​48243](https://github.com/BerriAI/litellm/issues/48243))
- Added Ovalix guardrail scanning of files, tool calls and tool results ([#​49309](https://github.com/BerriAI/litellm/issues/49309))
- Added `litellm.guardrails.apply` SDK helper to invoke configured guardrails and get native findings ([#​49460](https://github.com/BerriAI/litellm/issues/49460), [#​49469](https://github.com/BerriAI/litellm/issues/49469), [#​49470](https://github.com/BerriAI/litellm/issues/49470))
- Fixed guardrail masks on messages and tools not reaching Bedrock Converse requests ([#​45874](https://github.com/BerriAI/litellm/issues/45874))
- Fixed `generic_guardrail_api` rejecting Gemini native tools that have no `type` key ([#​46338](https://github.com/BerriAI/litellm/issues/46338))
- Fixed corrupted numbered PII tokens in Presidio when one value matches several entities with `output_parse_pii` ([#​47024](https://github.com/BerriAI/litellm/issues/47024))
- Fixed `hide-secrets` missing secrets in tool results, tool inputs, `tool_calls` arguments, and system prompts ([#​47122](https://github.com/BerriAI/litellm/issues/47122))
- Fixed generic guardrails with `mode: pre_mcp_call` being rejected at startup so MCP calls went unchecked ([#​48060](https://github.com/BerriAI/litellm/issues/48060))
- Fixed pass-through guardrails scanning `litellm_metadata` fields added by LiteLLM, which caused false matches ([#​48276](https://github.com/BerriAI/litellm/issues/48276))
- Fixed `hide-secrets` ignoring `skip_tool_message_in_guardrail` ([#​48689](https://github.com/BerriAI/litellm/issues/48689))
- Fixed guardrails chosen in a Responses WebSocket frame not running, and a 500 with other guardrail settings ([#​48725](https://github.com/BerriAI/litellm/issues/48725))
- Fixed Responses tool results not reaching `texts` guardrails ([#​48827](https://github.com/BerriAI/litellm/issues/48827))
- Fixed `google_text_moderation` scanning embeddings input ([#​48934](https://github.com/BerriAI/litellm/issues/48934))
- Fixed guardrail blocks on streamed `/v1/messages` not returning Anthropic events ([#​49010](https://github.com/BerriAI/litellm/issues/49010))
- Fixed streamed `/v1/completions` skipping `post_call` guardrails for masking and blocking ([#​49035](https://github.com/BerriAI/litellm/issues/49035))
- Fixed mid-stream upstream errors on `/v1/messages` being turned into a guardrail 400 ([#​49088](https://github.com/BerriAI/litellm/issues/49088))
- Changed guardrail blocks mid-stream to end chat completions streams with an error event, not a cut connection ([#​46953](https://github.com/BerriAI/litellm/issues/46953))
- Changed `lakera_v2` `on_flagged: block` to reject PII-only detections and added `on_flagged: mask` ([#​48944](https://github.com/BerriAI/litellm/issues/48944))
- Improved streaming by running sampled guardrail scans in the background so chunks no longer pause ([#​48952](https://github.com/BerriAI/litellm/issues/48952))
</details>
<details><summary><b>Caching</b> (4)</summary>
- Fixed streamed cache hits dropping reasoning, citations and audio and reordering tool calls ([#​32096](https://github.com/BerriAI/litellm/issues/32096))
- Fixed `cache_control` being stripped from caller messages and tools, which broke caching on Claude fallbacks ([#​35602](https://github.com/BerriAI/litellm/issues/35602))
- Fixed the cache key's model group being read from caller metadata instead of the router's metadata ([#​48917](https://github.com/BerriAI/litellm/issues/48917))
- Removed the disk cache backend, so `cache_params.type: disk` now stops proxy startup ([#​48114](https://github.com/BerriAI/litellm/issues/48114))
</details>
<details><summary><b>Routing and fallbacks</b> (44)</summary>
- Added mid-stream fallback continuation so a streaming chat cut off mid-answer continues on the configured fallback ([#​41127](https://github.com/BerriAI/litellm/issues/41127))
- Added Kubernetes pod discovery to spread load across pods behind a headless service `api_base` ([#​44342](https://github.com/BerriAI/litellm/issues/44342), [#​44393](https://github.com/BerriAI/litellm/issues/44393), [#​44666](https://github.com/BerriAI/litellm/issues/44666))
- Added opt-in filtering that keeps chat requests off deployments flagged as non-chat ([#​46257](https://github.com/BerriAI/litellm/issues/46257))
- Added the `x-litellm-priority` header to set request priority ([#​47618](https://github.com/BerriAI/litellm/issues/47618))
- Added opt-in session repinning to the replacement deployment after a successful failover ([#​48206](https://github.com/BerriAI/litellm/issues/48206))
- Added a `clamp` mode for complexity routing that keeps the caller's smaller output token limit ([#​48632](https://github.com/BerriAI/litellm/issues/48632))
- Added deployment `rpd` and `tpd` daily limits to `enforce_model_rate_limits` ([#​48875](https://github.com/BerriAI/litellm/issues/48875), [#​48957](https://github.com/BerriAI/litellm/issues/48957))
- Added inferring custom classifier tiers from model mappings, and fixed a crash on plan-mode requests ([#​48987](https://github.com/BerriAI/litellm/issues/48987))
- Fixed weighted failover skipping healthy same-group deployments under affinity ([#​32309](https://github.com/BerriAI/litellm/issues/32309))
- Fixed `content_policy_fallbacks` not applying after `POST /fallback` or `/config/update` changes ([#​45428](https://github.com/BerriAI/litellm/issues/45428))
- Fixed an explicit `allowed_fails: 3` not counting failures and fallbacks cooling down healthy deployments ([#​46183](https://github.com/BerriAI/litellm/issues/46183))
- Fixed a `bedrock_mantle` deployment's `mode` switching sibling deployments between Chat Completions and Responses ([#​46263](https://github.com/BerriAI/litellm/issues/46263))
- Fixed prompt caching affinity ignoring tools and the `/v1/messages` system prompt when choosing a deployment ([#​46411](https://github.com/BerriAI/litellm/issues/46411))
- Fixed all-cooled router 429 rows in SpendLogs not recording which deployments were cooling ([#​47120](https://github.com/BerriAI/litellm/issues/47120))
- Fixed `stream_timeout` cutting off slow answers when Bedrock serves a `stream=True` call without streaming ([#​47162](https://github.com/BerriAI/litellm/issues/47162))
- Fixed key and team `router_settings` reaching the provider and dropping retries, fallbacks and timeout ([#​47257](https://github.com/BerriAI/litellm/issues/47257))
- Fixed 500s from `router_settings.default_priority` or an integer `priority`, and now reject a malformed `priority` ([#​47498](https://github.com/BerriAI/litellm/issues/47498))
- Fixed fallback retries logging a negative completion time and dropping latency-routed groups ([#​47541](https://github.com/BerriAI/litellm/issues/47541))
- Fixed prompt caching affinity raising on non-dict `tools` entries instead of returning the provider's 400 ([#​47565](https://github.com/BerriAI/litellm/issues/47565))
- Fixed cut Responses streams returning `server_error` instead of continuing on a fallback without prefill ([#​47672](https://github.com/BerriAI/litellm/issues/47672))
- Fixed `IndexError` and wrong deployment lookups when deployments are deleted or added concurrently ([#​47680](https://github.com/BerriAI/litellm/issues/47680))
- Fixed native Responses latency using different units than bridged responses in latency-based routing ([#​47727](https://github.com/BerriAI/litellm/issues/47727))
- Fixed the router sending image requests to `supports_vision: false` deployments in mixed model groups ([#​48149](https://github.com/BerriAI/litellm/issues/48149), [#​48152](https://github.com/BerriAI/litellm/issues/48152), [#​48241](https://github.com/BerriAI/litellm/issues/48241))
- Fixed Decisions calls routing to deployments whose provider does not support them ([#​48175](https://github.com/BerriAI/litellm/issues/48175))
- Fixed 500s on every request to a model group after one negative or NaN latency sample under latency routing ([#​48216](https://github.com/BerriAI/litellm/issues/48216))
- Fixed tag fail-open groups rejecting unmatched tags after affinity or cooldown filtering ([#​48470](https://github.com/BerriAI/litellm/issues/48470))
- Fixed one caller's exhausted forwarded Claude subscription putting the shared model into cooldown for others ([#​48485](https://github.com/BerriAI/litellm/issues/48485))
- Fixed proxy-wide wildcard deployments shadowing a team's own wildcard deployment for that team's keys ([#​48490](https://github.com/BerriAI/litellm/issues/48490))
- Fixed complexity router replacing the held `user_turn` route on Codex compaction requests ([#​48627](https://github.com/BerriAI/litellm/issues/48627))
- Fixed session tier pins diverging between proxy workers when using Redis ([#​48645](https://github.com/BerriAI/litellm/issues/48645))
- Fixed nested environment references in router classifier connections being sent literally ([#​48717](https://github.com/BerriAI/litellm/issues/48717))
- Fixed lifecycle events not passing through on background OpenAI Responses streams that cannot fall back ([#​48817](https://github.com/BerriAI/litellm/issues/48817))
- Fixed new fallback rules erasing older ones when Redis refuses `DEL` ([#​48999](https://github.com/BerriAI/litellm/issues/48999))
- Fixed a deployment's own `model_id` being overridden by the request body's ([#​49045](https://github.com/BerriAI/litellm/issues/49045))
- Fixed 429s on requests without `max_tokens` and token counters not dropping to real usage after calls ([#​49054](https://github.com/BerriAI/litellm/issues/49054))
- Fixed streamed context window errors skipping fallbacks when they occur before any output ([#​49293](https://github.com/BerriAI/litellm/issues/49293))
- Fixed large requests silently falling back to heuristic routing when they exceed the classifier's input limit ([#​49306](https://github.com/BerriAI/litellm/issues/49306))
- Fixed queued requests waiting until a 408 when a dead replica left expired scheduler queue entries ([#​49387](https://github.com/BerriAI/litellm/issues/49387))
- Changed per-deployment `reasoning_effort_levels` to apply on every provider and route, including `azure_ai` ([#​46601](https://github.com/BerriAI/litellm/issues/46601))
- Changed tag routing to use only prefixed caller tags once `tag_routing_prefix` is set ([#​47428](https://github.com/BerriAI/litellm/issues/47428))
- Changed router `allowed_fails` to keep a lone deployment with no fallback in rotation instead of returning 429 ([#​48644](https://github.com/BerriAI/litellm/issues/48644))
- Changed `user_turn` routing so child agent requests keep their own tier pin ([#​48701](https://github.com/BerriAI/litellm/issues/48701))
- Changed Router init to reject string fallback targets that never routed ([#​48943](https://github.com/BerriAI/litellm/issues/48943))
- Removed the deployment `rpm` filter from `enable_pre_call_checks` ([#​48873](https://github.com/BerriAI/litellm/issues/48873))
</details>
<details><summary><b>Cost tracking and pricing</b> (36)</summary>
- Added `s3://` URI support for `LITELLM_MODEL_COST_MAP_URL` ([#​46972](https://github.com/BerriAI/litellm/issues/46972))
- Added `model_info.pricing_provider` to price a deployment from another provider's catalog rates instead of $0 ([#​47620](https://github.com/BerriAI/litellm/issues/47620))
- Added `x-litellm-upstream-model` header so pass-through upstreams can report the model name for spend ([#​48275](https://github.com/BerriAI/litellm/issues/48275))
- Added a per-guardrail spend breakdown to user, team and organization daily activity ([#​48702](https://github.com/BerriAI/litellm/issues/48702))
- Fixed …
….109.1 ) (#3743)
This PR contains the following updates:
| Package | Update | Change |
|---|---|---|
| [ghcr.io/berriai/litellm](https://images.chainguard.dev/directory/image/wolfi-base/overview) ([source](https://github.com/BerriAI/litellm)) | minor | `v1.106.4` → `v1.109.1` |
---
> ⚠️ **Warning**
>
> Some dependencies could not be looked up. Check the [Dependency Dashboard](issues/3566) for more information.
---
### Release Notes
<details>
<summary>BerriAI/litellm (ghcr.io/berriai/litellm)</summary>
### [`v1.109.1`](https://github.com/BerriAI/litellm/releases/tag/v1.109.1)
[Compare Source](https://github.com/BerriAI/litellm/compare/v1.109.0...v1.109.1)
#### Verify Docker Image Signature
All LiteLLM Docker images are signed with [cosign](https://docs.sigstore.dev/cosign/overview/). This release is signed with the key introduced in [commit `e82a3c6`](https://github.com/BerriAI/litellm/commit/e82a3c646908ba0a6ee0beddc4310d7a6cac4065).
**Verify using the pinned commit hash (recommended):**
A commit hash is cryptographically immutable, so this is the strongest way to ensure you are using the published signing key:
```bash
cosign verify \
--key https://raw.githubusercontent.com/BerriAI/litellm/e82a3c646908ba0a6ee0beddc4310d7a6cac4065/cosign.pub \
ghcr.io/berriai/litellm:v1.109.1
```
**Verify using the release tag (convenience):**
Tags are protected in this repository and resolve to the same key. This option is easier to read but relies on tag protection rules:
```bash
cosign verify \
--key https://raw.githubusercontent.com/BerriAI/litellm/v1.109.1/cosign.pub \
ghcr.io/berriai/litellm:v1.109.1
```
Expected output:
```
The following checks were performed on each of these signatures:
- The cosign claims were validated
- The signatures were verified against the specified public key
```
***
#### What's Changed
- security(proxy): backport [#​51254](https://github.com/BerriAI/litellm/issues/51254) to stable/1.109.x by [@​shrey-berri](https://github.com/shrey-berri) in [#​51264](https://github.com/BerriAI/litellm/pull/51264)
- chore: bump litellm 1.109.0 -> 1.109.1 by [@​yuneng-berri](https://github.com/yuneng-berri) in [#​51298](https://github.com/BerriAI/litellm/pull/51298)
**Full Changelog**: <https://github.com/BerriAI/litellm/compare/v1.109.0...v1.109.1>
### [`v1.109.0`](https://github.com/BerriAI/litellm/releases/tag/v1.109.0)
[Compare Source](https://github.com/BerriAI/litellm/compare/v1.108.7...v1.109.0)
#### Verify this release
```bash
cosign verify \
--key https://raw.githubusercontent.com/BerriAI/litellm/e82a3c646908ba0a6ee0beddc4310d7a6cac4065/cosign.pub \
ghcr.io/berriai/litellm:v1.109.0
```
Same command for `litellm-database`, `litellm-non_root` and the `docker.io/litellm/*` images
#### What's new in 1.109.0
982 PRs. 144 added, 424 fixed, 60 changed, 17 improved, 9 removed. 5 need action
##### Action required
- **Routing and fallbacks:** Change string fallback targets to lists of model names ([#​48943](https://github.com/BerriAI/litellm/issues/48943))
- **Caching:** Switch `cache_params.type` from `disk` to `local` or `redis`, since the `disk` cache backend (diskcache) has been removed ([#​48114](https://github.com/BerriAI/litellm/issues/48114))
- **Routing and fallbacks:** Add `optional_pre_call_checks: ["enforce_model_rate_limits"]` to keep a hard `rpm` cap on deployments ([#​48873](https://github.com/BerriAI/litellm/issues/48873))
- **Vertex AI and Gemini:** Set `drop_params: true` or stop sending `temperature`, `top_p` and `top_k` to Gemini 3.6 Flash, 3.5 Flash-Lite and newer ([#​47645](https://github.com/BerriAI/litellm/issues/47645))
- **Deployment:** Deploy Lens from its own chart and set `lens.*` in your values ([#​49169](https://github.com/BerriAI/litellm/issues/49169))
##### Highlights
- **Admin UI:** Added a Chat UI with a model hub, image generation and usage metrics ([#​48108](https://github.com/BerriAI/litellm/issues/48108))
- **Routing and fallbacks:** Added mid-stream fallback continuation so a streaming chat cut off mid-answer continues on the configured fallback ([#​41127](https://github.com/BerriAI/litellm/issues/41127))
- **Deployment:** Added `LITELLM_OFFLINE_MODE` to turn off every fetch LiteLLM makes on its own with one switch ([#​48096](https://github.com/BerriAI/litellm/issues/48096))
- **Cost tracking and pricing:** Added `model_info.pricing_provider` to price a deployment from another provider's catalog rates instead of $0 ([#​47620](https://github.com/BerriAI/litellm/issues/47620))
- **Vertex AI and Gemini:** Added Gemini 3.1 Flash TTS support, including multi-speaker voices and `mp3`, `opus`, `alaw` and `mulaw` output ([#​31915](https://github.com/BerriAI/litellm/issues/31915))
- **SDK:** Fixed tool calls on `completion()` and `responses()` failing with `No module named 'mcp'` on base SDK installs ([#​45961](https://github.com/BerriAI/litellm/issues/45961)) <sup>Also in [1.108.4](https://github.com/BerriAI/litellm/releases/tag/v1.108.4)</sup>
##### All changes
<details><summary><b>OpenAI</b> (19)</summary>
- Added per-deployment workload identity on non-chat routes, realtime and the moderation guardrail ([#​39966](https://github.com/BerriAI/litellm/issues/39966))
- Added the 12-hour cache write rate for `gpt-5.6-cyber` ([#​48246](https://github.com/BerriAI/litellm/issues/48246))
- Added OpenAI `gpt-6.1-terra` with pricing ([#​48429](https://github.com/BerriAI/litellm/issues/48429))
- Added Batch and Ultrafast 12-hour cache write rates for OpenAI models ([#​48433](https://github.com/BerriAI/litellm/issues/48433))
- Added `gpt-6-rosalind` to the model cost map with its published prices ([#​49268](https://github.com/BerriAI/litellm/issues/49268))
- Added `gpt-6-astra-law` with pricing from the OpenAI pricing page ([#​49444](https://github.com/BerriAI/litellm/issues/49444))
- Fixed 400 errors and $0 spend logs on `gpt-transcribe` calls without `response_format` ([#​44021](https://github.com/BerriAI/litellm/issues/44021))
- Fixed nonstreaming `aiohttp_openai` responses dropping `service_tier` ([#​47263](https://github.com/BerriAI/litellm/issues/47263))
- Fixed `prompt_cache_retention` such as `24h` being silently dropped instead of sent upstream ([#​47480](https://github.com/BerriAI/litellm/issues/47480))
- Fixed `/health` marking OpenAI and Azure audio chat models unhealthy ([#​47730](https://github.com/BerriAI/litellm/issues/47730))
- Fixed OpenAI `context_length_exceeded` errors raising `BadRequestError` instead of `ContextWindowExceededError` ([#​47954](https://github.com/BerriAI/litellm/issues/47954))
- Fixed 12-hour prompt cache writes on `openai/gpt-5.6` and newer billing at the 30-minute rate ([#​48088](https://github.com/BerriAI/litellm/issues/48088))
- Fixed uncatalogued ChatGPT models hitting an unsupported Chat Completions endpoint ([#​48244](https://github.com/BerriAI/litellm/issues/48244))
- Fixed the whole `reasoning_effort` dict not being sent when chat is bridged to Responses ([#​48807](https://github.com/BerriAI/litellm/issues/48807))
- Fixed 400 `invalid_beta` on Agents API calls through the OpenAI passthrough ([#​49009](https://github.com/BerriAI/litellm/issues/49009))
- Fixed empty `e.response.text` on OpenAI and Azure errors so the upstream error body is readable ([#​49079](https://github.com/BerriAI/litellm/issues/49079))
- Changed OpenAI 401 and 404 `invalid_request_error` to raise matching exceptions, not `BadRequestError` ([#​32537](https://github.com/BerriAI/litellm/issues/32537))
- Changed the ChatGPT session id to derive from `prompt_cache_key` for stable cache affinity ([#​42014](https://github.com/BerriAI/litellm/issues/42014))
- Changed `gpt-6-luna` Decisions cache rates to the standard cached and write rates ([#​48066](https://github.com/BerriAI/litellm/issues/48066))
</details>
<details><summary><b>Azure</b> (18)</summary>
- Added Entra ID auth, including keyless auth, for Azure Decisions on `/v1/decisions` and `/v1/systemone` ([#​46539](https://github.com/BerriAI/litellm/issues/46539), [#​48529](https://github.com/BerriAI/litellm/issues/48529))
- Added access to Foundry agents through the project Responses API for `azure_ai/agents/<name>` ([#​47717](https://github.com/BerriAI/litellm/issues/47717))
- Added `azure_ai/MAI-Code-1.1-Flash` ([#​47779](https://github.com/BerriAI/litellm/issues/47779))
- Added `max_input_tokens` of 32768 for `azure_ai/Microsoft-Decision-1` ([#​48434](https://github.com/BerriAI/litellm/issues/48434))
- Added `outputContentFormat=markdown` support on `/ocr` for Azure Document Intelligence ([#​48926](https://github.com/BerriAI/litellm/issues/48926))
- Fixed Foundry chat requests losing OpenAI prompt cache breakpoints ([#​45299](https://github.com/BerriAI/litellm/issues/45299))
- Fixed `/v1/responses` 404 on dated `api_version` deployments and `azure_ai` Grok reasoning token billing ([#​46377](https://github.com/BerriAI/litellm/issues/46377))
- Fixed under-billed Grok reasoning tokens on `azure_ai` when the deployment name lacks "grok" ([#​46969](https://github.com/BerriAI/litellm/issues/46969))
- Fixed Azure realtime over WebRTC failing with a 404 on `client_secrets` and an invalid token on the SDP exchange ([#​47316](https://github.com/BerriAI/litellm/issues/47316))
- Fixed 400 from Foundry when tool results contain `tool_reference` parts on chat ([#​48032](https://github.com/BerriAI/litellm/issues/48032))
- Fixed 400 on `azure_ai/claude-*` when using `thinking.block_binding` ([#​48033](https://github.com/BerriAI/litellm/issues/48033))
- Fixed Responses API calls that use an explicit v1 Azure base URL ([#​48118](https://github.com/BerriAI/litellm/issues/48118))
- Fixed 404 on Azure vector store retrieve, update and delete ([#​48224](https://github.com/BerriAI/litellm/issues/48224))
- Fixed null audio capability metadata on two Azure audio snapshot models ([#​48475](https://github.com/BerriAI/litellm/issues/48475))
- Fixed Azure `context_length_exceeded` raising `BadRequestError` so `context_window_fallbacks` never ran ([#​48616](https://github.com/BerriAI/litellm/issues/48616))
- Fixed batch calls on unversioned `azure/` o3, o4-mini, o3-mini, gpt-4o and gpt-4o-mini billing at the standard rate ([#​49182](https://github.com/BerriAI/litellm/issues/49182))
- Changed `max_input_tokens` to 128000 for `gpt-chat-latest` on Azure ([#​48252](https://github.com/BerriAI/litellm/issues/48252))
- Improved Entra auth by reusing credentials and tokens across requests and refreshing them off the event loop ([#​46421](https://github.com/BerriAI/litellm/issues/46421), [#​47348](https://github.com/BerriAI/litellm/issues/47348), [#​48769](https://github.com/BerriAI/litellm/issues/48769))
</details>
<details><summary><b>Anthropic</b> (16)</summary>
- Fixed a fake `[System: ...]` message being added to tool-call-only assistant turns sent to Anthropic ([#​34822](https://github.com/BerriAI/litellm/issues/34822))
- Fixed PDFs sent as chat `image_url` being rejected with 400 by sending them as document blocks ([#​46984](https://github.com/BerriAI/litellm/issues/46984))
- Fixed Claude `json_schema` answers losing keys listed only in `required` and escaping non-ASCII characters ([#​47478](https://github.com/BerriAI/litellm/issues/47478))
- Fixed replayed `redacted_thinking` blocks being dropped, and Bedrock Converse 400s when sent twice ([#​47489](https://github.com/BerriAI/litellm/issues/47489))
- Fixed `clear_tool_uses` `input_tokens` trigger ignoring the system prompt, which delayed clearing ([#​47857](https://github.com/BerriAI/litellm/issues/47857))
- Fixed native Anthropic responses omitting a null `stop_sequence` ([#​47987](https://github.com/BerriAI/litellm/issues/47987))
- Fixed streamed responses leaving native web search fees out of the reconstructed usage cost ([#​48528](https://github.com/BerriAI/litellm/issues/48528))
- Fixed `drop_params` not dropping `speed` on `claude-opus-4-7`, which Anthropic rejects with 400 ([#​48764](https://github.com/BerriAI/litellm/issues/48764))
- Fixed 400 from beta-gated body fields when `drop_params: true`, including Claude Code and Codex traffic ([#​48793](https://github.com/BerriAI/litellm/issues/48793))
- Fixed `model_context_window_exceeded` being reported as `stop` instead of `length` ([#​48874](https://github.com/BerriAI/litellm/issues/48874))
- Fixed 400 on `/v1/messages` with many strict tools under `drop_params` by retrying without `strict` ([#​49102](https://github.com/BerriAI/litellm/issues/49102))
- Fixed Claude `pause_turn` reported as finished and refusal explanations dropped on chat and Responses ([#​49192](https://github.com/BerriAI/litellm/issues/49192))
- Fixed 500 on a non-string role or tool call id, now a 400 that names the field ([#​49237](https://github.com/BerriAI/litellm/issues/49237))
- Fixed `metadata.user_id` being dropped on Anthropic `/v1/messages` pass-through routes ([#​49333](https://github.com/BerriAI/litellm/issues/49333))
- Changed the default `max_tokens` for unmapped Anthropic models from 4096 to 128000 ([#​48502](https://github.com/BerriAI/litellm/issues/48502))
- Changed the opening prompt usage estimate in the Chat Completions adapter to be off by default ([#​48633](https://github.com/BerriAI/litellm/issues/48633))
</details>
<details><summary><b>AWS Bedrock</b> (28)</summary>
- Added context and output token limits for the Nova Sonic models ([#​48247](https://github.com/BerriAI/litellm/issues/48247))
- Added pricing for native `guardrailConfig` trace usage to spend and `x-litellm-response-cost` ([#​48278](https://github.com/BerriAI/litellm/issues/48278))
- Added `global.openai.gpt-6.1-terra` and `us.openai.gpt-6.1-terra` Bedrock models with pricing ([#​48441](https://github.com/BerriAI/litellm/issues/48441))
- Added token counting for three Mantle-native Bedrock Claude models ([#​48682](https://github.com/BerriAI/litellm/issues/48682))
- Added published Priority, Batch and Flex prices to 46 Bedrock regional rows ([#​49113](https://github.com/BerriAI/litellm/issues/49113))
- Fixed Bedrock Voxtral transcription returning 400, logging $0 spend and ignoring `language` ([#​41565](https://github.com/BerriAI/litellm/issues/41565))
- Fixed `Unknown provider=None` 404 for Bedrock models missing from the cost map ([#​43290](https://github.com/BerriAI/litellm/issues/43290))
- Fixed 400 errors on Bedrock Kimi K3 Converse calls with `max_tokens` below 16 ([#​43875](https://github.com/BerriAI/litellm/issues/43875))
- Fixed 400 `invalid beta flag` on Claude Code auto mode requests that carry no `safeguards` ([#​44471](https://github.com/BerriAI/litellm/issues/44471))
- Fixed a malformed Bedrock batch JSONL line failing the upload with a 500 instead of a 400 ([#​45992](https://github.com/BerriAI/litellm/issues/45992))
- Fixed `post_call` guardrails not scanning Claude output on `invoke-with-response-stream` passthrough ([#​46524](https://github.com/BerriAI/litellm/issues/46524))
- Fixed Claude `json_schema` streams dropping reasoning and thinking blocks and ending on `tool_calls` with no tool calls ([#​46863](https://github.com/BerriAI/litellm/issues/46863))
- Fixed JSON schema requests failing on Fable 5 and Sonnet 4.6 and losing adaptive thinking on Haiku 5.5 ([#​46870](https://github.com/BerriAI/litellm/issues/46870))
- Fixed `bedrock_request_metadata_fields` being ignored on the `/bedrock` pass-through routes ([#​47040](https://github.com/BerriAI/litellm/issues/47040))
- Fixed Bedrock Opus 4.8 and Sonnet 5 dropping reasoning on `json_schema` requests by trying native output first ([#​47100](https://github.com/BerriAI/litellm/issues/47100))
- Fixed Bedrock batch jobs ignoring a configured control-plane endpoint ([#​47260](https://github.com/BerriAI/litellm/issues/47260))
- Fixed AWS region lookups through Vault blocking the event loop and stalling other requests on the worker ([#​47331](https://github.com/BerriAI/litellm/issues/47331))
- Fixed $0 spend and `ModelNotMappedError` for `bedrock/claude_platform/<id>` calls ([#​48150](https://github.com/BerriAI/litellm/issues/48150))
- Fixed `max_input_tokens` to 922000 on Bedrock GPT models and added Mantle token counting for `claude-opus-5-5` ([#​48479](https://github.com/BerriAI/litellm/issues/48479))
- Fixed Bedrock rejecting `strict` tool schemas by retrying without `strict` under `drop_params` ([#​48733](https://github.com/BerriAI/litellm/issues/48733))
- Fixed 400 on Bedrock when Codex repeats its tool list across turns ([#​49006](https://github.com/BerriAI/litellm/issues/49006))
- Fixed region-prefixed Bedrock embedding models not routing to their region or billing its price ([#​49072](https://github.com/BerriAI/litellm/issues/49072))
- Fixed `bedrock_mantle/openai.gpt-5.6-cyber` token limits and endpoints to match its model card ([#​49350](https://github.com/BerriAI/litellm/issues/49350))
- Fixed `max_output_tokens` for Bedrock GovCloud West Llama 3 models, now 8192 ([#​49543](https://github.com/BerriAI/litellm/issues/49543))
- Changed `converse-stream` pass-through to stream frames through post_call guardrails instead of buffering the reply ([#​46307](https://github.com/BerriAI/litellm/issues/46307))
- Changed `/bedrock` pass-through routes to apply a model's `guardrailConfig`, returning 400 if Bedrock cannot use it ([#​47429](https://github.com/BerriAI/litellm/issues/47429))
- Changed Bedrock pass-through to use request metadata as the session id, fixing 400s with `missing_session_id: reject` ([#​49193](https://github.com/BerriAI/litellm/issues/49193))
- Changed Bedrock Invoke and Mantle Claude to use the model's own default `max_tokens` ([#​49724](https://github.com/BerriAI/litellm/issues/49724))
</details>
<details><summary><b>Vertex AI and Gemini</b> (34)</summary>
- Added Gemini 3.1 Flash TTS support, including multi-speaker voices and `mp3`, `opus`, `alaw` and `mulaw` output ([#​31915](https://github.com/BerriAI/litellm/issues/31915))
- Added a setting to drop chosen `anthropic-beta` values on the Vertex AI pass-through routes ([#​47185](https://github.com/BerriAI/litellm/issues/47185))
- Added `LITELLM_GEMINI_DEFAULT_MAX_OUTPUT_TOKENS` to set the output limit for requests that set none ([#​47542](https://github.com/BerriAI/litellm/issues/47542))
- Added `thought_signature_in_tool_call_id` to keep Gemini tool call ids short for clients that cap them ([#​47692](https://github.com/BerriAI/litellm/issues/47692))
- Added a 2026-06-30 deprecation date to `vertex_ai/veo-2.0-generate-001` ([#​47847](https://github.com/BerriAI/litellm/issues/47847))
- Added Batch rates for two Llama 4 MaaS models so Vertex batch jobs no longer bill at on-demand rates ([#​48085](https://github.com/BerriAI/litellm/issues/48085))
- Added Vertex batch prices above 200k tokens and image output prices for Gemini models ([#​48945](https://github.com/BerriAI/litellm/issues/48945))
- Fixed the Gemini 3 sampling deprecation warning logging on every request, now once per model per worker ([#​40868](https://github.com/BerriAI/litellm/issues/40868))
- Fixed `vertex_ai/*` keys not listing partner, Veo and embedding models and dropping publisher prefixes ([#​41959](https://github.com/BerriAI/litellm/issues/41959))
- Fixed Gemini TTS `/v1/audio/speech` calling Google twice and logging 0 tokens in spend ([#​44551](https://github.com/BerriAI/litellm/issues/44551))
- Fixed 400 from compaction, thinking display and tool change betas on Claude via Vertex AI and Azure AI ([#​44747](https://github.com/BerriAI/litellm/issues/44747))
- Fixed context caching on Vertex AI failing when a custom `api_base` is set ([#​44783](https://github.com/BerriAI/litellm/issues/44783))
- Fixed streamed Vertex AI pass-through calls missing the regional 10% uplift and custom deployment prices ([#​44795](https://github.com/BerriAI/litellm/issues/44795))
- Fixed Gemini not receiving integer enum values in tool parameters ([#​44908](https://github.com/BerriAI/litellm/issues/44908))
- Fixed Vertex Claude batches returning 404 at create ([#​45715](https://github.com/BerriAI/litellm/issues/45715))
- Fixed cache-marked requests listing all `cachedContents` on every call and creating duplicate caches ([#​46857](https://github.com/BerriAI/litellm/issues/46857))
- Fixed Vertex AI rate limit errors returned as 403 when the error text contains 403 ([#​47134](https://github.com/BerriAI/litellm/issues/47134))
- Fixed Gemini audio input and cached audio billed at the Standard rate on flex, priority and batch tiers ([#​48086](https://github.com/BerriAI/litellm/issues/48086))
- Fixed `gemini-2.5-flash-native-audio` video input billed at the text rate instead of the audio/video rate ([#​48248](https://github.com/BerriAI/litellm/issues/48248))
- Fixed Gemini 2.5 rejecting tool results with images and the history replay that follows ([#​48428](https://github.com/BerriAI/litellm/issues/48428))
- Fixed Vertex AI shared credential cache growing without bound across credential and project pairs ([#​48442](https://github.com/BerriAI/litellm/issues/48442))
- Fixed Vertex AI image sizes outside the old lookup table silently producing square output ([#​48463](https://github.com/BerriAI/litellm/issues/48463))
- Fixed slow Google credential requests blocking the proxy worker on Claude `/v1/messages` ([#​48523](https://github.com/BerriAI/litellm/issues/48523))
- Fixed explicit Gemini and Vertex embedding timeouts silently becoming 300 seconds ([#​48690](https://github.com/BerriAI/litellm/issues/48690))
- Fixed Gemini grounding keeping only the first web source for a passage ([#​48745](https://github.com/BerriAI/litellm/issues/48745))
- Fixed `labels` on `vertex_ai/claude-*` returning 400 by sending them as `X-Vertex-AI-Labels` ([#​48753](https://github.com/BerriAI/litellm/issues/48753))
- Fixed 400 on `countTokens` and `generateContent` when repeated fields are a single object or null ([#​48771](https://github.com/BerriAI/litellm/issues/48771))
- Fixed Vertex Claude `/v1/messages` returning 400 when the SDK sends `anthropic-version` as a header ([#​48814](https://github.com/BerriAI/litellm/issues/48814))
- Fixed Claude web search billing per request on Vertex AI deployments priced in `model_info` ([#​49160](https://github.com/BerriAI/litellm/issues/49160))
- Fixed batch image output billed at the Standard rate on `gemini-nano-banana-2.1` and `gemini-3.1-flash-lite-image` ([#​49317](https://github.com/BerriAI/litellm/issues/49317), [#​49358](https://github.com/BerriAI/litellm/issues/49358))
- Changed Gemini 3.6 Flash, 3.5 Flash-Lite and newer to refuse `temperature`, `top_p` and `top_k` without `drop_params` ([#​47645](https://github.com/BerriAI/litellm/issues/47645))
- Improved rerank latency by reusing cached Google credentials on every request ([#​48430](https://github.com/BerriAI/litellm/issues/48430))
- Improved failure logs for Gemini and Vertex pass-through calls by adding the URL model and declared provider ([#​49075](https://github.com/BerriAI/litellm/issues/49075))
- Removed the floor `deprecation_date` from `gemini-3.1-flash-lite-image` ([#​48587](https://github.com/BerriAI/litellm/issues/48587))
</details>
<details><summary><b>Other providers</b> (3)</summary>
- Added 11 new providers: ai&, BigModel, CLF AI Gateway, Hostinger Router, Kyma API, Nace, OpenCode Go, OpenInfer, Refuseless, StreamLake and ZeroGPU ([#​38958](https://github.com/BerriAI/litellm/issues/38958), [#​39324](https://github.com/BerriAI/litellm/issues/39324), [#​41006](https://github.com/BerriAI/litellm/issues/41006), [#​41034](https://github.com/BerriAI/litellm/issues/41034), [#​43874](https://github.com/BerriAI/litellm/issues/43874), [#​44863](https://github.com/BerriAI/litellm/issues/44863), [#​46523](https://github.com/BerriAI/litellm/issues/46523), [#​48140](https://github.com/BerriAI/litellm/issues/48140), [#​48497](https://github.com/BerriAI/litellm/issues/48497), [#​48563](https://github.com/BerriAI/litellm/issues/48563), [#​48756](https://github.com/BerriAI/litellm/issues/48756))
- Added models, endpoints and options for smaller providers (31 PRs) ([#​41021](https://github.com/BerriAI/litellm/issues/41021), [#​41522](https://github.com/BerriAI/litellm/issues/41522), [#​46156](https://github.com/BerriAI/litellm/issues/46156), [#​46875](https://github.com/BerriAI/litellm/issues/46875), [#​47401](https://github.com/BerriAI/litellm/issues/47401), [#​47473](https://github.com/BerriAI/litellm/issues/47473), [#​47610](https://github.com/BerriAI/litellm/issues/47610), [#​47690](https://github.com/BerriAI/litellm/issues/47690), [#​47785](https://github.com/BerriAI/litellm/issues/47785), [#​47812](https://github.com/BerriAI/litellm/issues/47812), [#​48158](https://github.com/BerriAI/litellm/issues/48158), [#​48251](https://github.com/BerriAI/litellm/issues/48251), [#​48335](https://github.com/BerriAI/litellm/issues/48335), [#​48448](https://github.com/BerriAI/litellm/issues/48448), [#​48450](https://github.com/BerriAI/litellm/issues/48450), [#​48453](https://github.com/BerriAI/litellm/issues/48453), [#​48498](https://github.com/BerriAI/litellm/issues/48498), [#​48621](https://github.com/BerriAI/litellm/issues/48621), [#​48651](https://github.com/BerriAI/litellm/issues/48651), [#​48676](https://github.com/BerriAI/litellm/issues/48676), [#​48677](https://github.com/BerriAI/litellm/issues/48677), [#​48735](https://github.com/BerriAI/litellm/issues/48735), [#​48871](https://github.com/BerriAI/litellm/issues/48871), [#​48998](https://github.com/BerriAI/litellm/issues/48998), [#​49252](https://github.com/BerriAI/litellm/issues/49252), [#​49280](https://github.com/BerriAI/litellm/issues/49280), [#​49281](https://github.com/BerriAI/litellm/issues/49281), [#​49282](https://github.com/BerriAI/litellm/issues/49282), [#​49287](https://github.com/BerriAI/litellm/issues/49287), [#​49297](https://github.com/BerriAI/litellm/issues/49297), [#​49542](https://github.com/BerriAI/litellm/issues/49542))
- Fixed issues and updated behavior on smaller providers (41 PRs) ([#​38736](https://github.com/BerriAI/litellm/issues/38736), [#​40152](https://github.com/BerriAI/litellm/issues/40152), [#​43390](https://github.com/BerriAI/litellm/issues/43390), [#​44723](https://github.com/BerriAI/litellm/issues/44723), [#​45092](https://github.com/BerriAI/litellm/issues/45092), [#​45567](https://github.com/BerriAI/litellm/issues/45567), [#​46091](https://github.com/BerriAI/litellm/issues/46091), [#​46861](https://github.com/BerriAI/litellm/issues/46861), [#​46945](https://github.com/BerriAI/litellm/issues/46945), [#​46959](https://github.com/BerriAI/litellm/issues/46959), [#​47091](https://github.com/BerriAI/litellm/issues/47091), [#​47423](https://github.com/BerriAI/litellm/issues/47423), [#​47424](https://github.com/BerriAI/litellm/issues/47424), [#​47432](https://github.com/BerriAI/litellm/issues/47432), [#​47495](https://github.com/BerriAI/litellm/issues/47495), [#​47784](https://github.com/BerriAI/litellm/issues/47784), [#​47794](https://github.com/BerriAI/litellm/issues/47794), [#​48121](https://github.com/BerriAI/litellm/issues/48121), [#​48254](https://github.com/BerriAI/litellm/issues/48254), [#​48265](https://github.com/BerriAI/litellm/issues/48265), [#​48268](https://github.com/BerriAI/litellm/issues/48268), [#​48270](https://github.com/BerriAI/litellm/issues/48270), [#​48455](https://github.com/BerriAI/litellm/issues/48455), [#​48522](https://github.com/BerriAI/litellm/issues/48522), [#​48527](https://github.com/BerriAI/litellm/issues/48527), [#​48668](https://github.com/BerriAI/litellm/issues/48668), [#​48684](https://github.com/BerriAI/litellm/issues/48684), [#​48706](https://github.com/BerriAI/litellm/issues/48706), [#​48707](https://github.com/BerriAI/litellm/issues/48707), [#​48778](https://github.com/BerriAI/litellm/issues/48778), [#​48820](https://github.com/BerriAI/litellm/issues/48820), [#​48837](https://github.com/BerriAI/litellm/issues/48837), [#​49068](https://github.com/BerriAI/litellm/issues/49068), [#​49158](https://github.com/BerriAI/litellm/issues/49158), [#​49278](https://github.com/BerriAI/litellm/issues/49278), [#​49344](https://github.com/BerriAI/litellm/issues/49344), [#​49458](https://github.com/BerriAI/litellm/issues/49458), [#​49462](https://github.com/BerriAI/litellm/issues/49462), [#​49498](https://github.com/BerriAI/litellm/issues/49498), [#​49502](https://github.com/BerriAI/litellm/issues/49502), [#​49616](https://github.com/BerriAI/litellm/issues/49616))
</details>
<details><summary><b>Chat completions</b> (17)</summary>
- Fixed streams with `logprobs` ending in a 500 error frame before the finish chunk ([#​33549](https://github.com/BerriAI/litellm/issues/33549))
- Fixed 500 errors when a prompt template omits `initial_prompt_value` or `final_prompt_value` ([#​39762](https://github.com/BerriAI/litellm/issues/39762))
- Fixed rebuilt streamed text completions returning null `finish_reason` and zero `prompt_tokens` ([#​44349](https://github.com/BerriAI/litellm/issues/44349))
- Fixed Foundry deployments and Claude fallbacks getting the wrong cache options, which caused 400s ([#​45295](https://github.com/BerriAI/litellm/issues/45295))
- Fixed non-streaming chat dropping upstream response headers on `bedrock_mantle/` and other OpenAI-like providers ([#​46928](https://github.com/BerriAI/litellm/issues/46928))
- Fixed chat streams failing with a proxy error when progress chunks have no choice index ([#​46947](https://github.com/BerriAI/litellm/issues/46947))
- Fixed the overhead header under-reporting on chat requests when guardrails add `litellm_metadata` ([#​47790](https://github.com/BerriAI/litellm/issues/47790))
- Fixed streamed chunks containing `[DONE]` being read as end of stream and dropped ([#​47832](https://github.com/BerriAI/litellm/issues/47832))
- Fixed completions streams including `usage` when it was not requested ([#​48052](https://github.com/BerriAI/litellm/issues/48052))
- Fixed an upstream `abort` on streamed chat completions returning a clean HTTP 200 instead of a server error ([#​48328](https://github.com/BerriAI/litellm/issues/48328))
- Fixed unbalanced think tags in merged streams and SSE lines splitting on characters other than CR/LF ([#​48755](https://github.com/BerriAI/litellm/issues/48755))
- Fixed 400 on system-first models like Qwen3.5 when a later `developer` message appears ([#​48897](https://github.com/BerriAI/litellm/issues/48897))
- Fixed streamed chat completions with `n>1` rebuilding each choice ([#​49002](https://github.com/BerriAI/litellm/issues/49002))
- Fixed streaming clients missing tool execution when OpenAI-compatible providers end tool calls with `stop` ([#​49388](https://github.com/BerriAI/litellm/issues/49388))
- Changed the `include_usage` stream chunk to send an empty `choices` array like OpenAI ([#​47109](https://github.com/BerriAI/litellm/issues/47109))
- Changed stalled stream reads to raise a 408 `litellm.Timeout` on chat, messages and responses ([#​47198](https://github.com/BerriAI/litellm/issues/47198))
- Changed streams that end without a finish reason to fail as errors instead of reporting a normal completion ([#​47665](https://github.com/BerriAI/litellm/issues/47665))
</details>
<details><summary><b>Responses API</b> (34)</summary>
- Added `max_agentic_loops` support to raise the streamed MCP auto-execute round cap above 5 ([#​47688](https://github.com/BerriAI/litellm/issues/47688))
- Added resuming background response streams with `stream` and `starting_after` on retrieve ([#​48819](https://github.com/BerriAI/litellm/issues/48819))
- Added Codex client `tool_search` support on Anthropic and other bridged providers, cutting input tokens ([#​48972](https://github.com/BerriAI/litellm/issues/48972))
- Fixed Responses API logging tasks being dropped by garbage collection and cut off at shutdown ([#​31074](https://github.com/BerriAI/litellm/issues/31074))
- Fixed non-stream MCP auto-execute on `/v1/responses` logging and billing only one of its two model calls ([#​43667](https://github.com/BerriAI/litellm/issues/43667))
- Fixed 400 from malformed `prompt_cache_breakpoint` on `/v1/responses` with `drop_params: true` ([#​45330](https://github.com/BerriAI/litellm/issues/45330))
- Fixed later turns on an open Responses WebSocket skipping deployment checks and not counting toward budgets ([#​45727](https://github.com/BerriAI/litellm/issues/45727))
- Fixed streamed `/v1/responses` events showing the backend deployment name in nested `response.model` ([#​46662](https://github.com/BerriAI/litellm/issues/46662))
- Fixed `/v1/responses` on Claude dropping returned and replayed `compaction` items ([#​46754](https://github.com/BerriAI/litellm/issues/46754))
- Fixed Responses WebSocket running `pre_call` guardrails on turn one only and rebilling that cost every turn ([#​47013](https://github.com/BerriAI/litellm/issues/47013))
- Fixed OpenAI pass-through `GET /responses/{id}` being billed again on every call ([#​47171](https://github.com/BerriAI/litellm/issues/47171))
- Fixed background spend not counting toward the key's project or per-model budgets ([#​47504](https://github.com/BerriAI/litellm/issues/47504))
- Fixed the billed cost of background responses not reaching key and team loggers ([#​47506](https://github.com/BerriAI/litellm/issues/47506))
- Fixed failed Responses streams billing 0 tokens and bridged `/v1/messages` stream failures not being reported ([#​47537](https://github.com/BerriAI/litellm/issues/47537))
- Fixed `clear_tool_uses_20250919` being silently dropped for `openai/` models on the Responses API ([#​47861](https://github.com/BerriAI/litellm/issues/47861))
- Fixed per-call `input_cost_per_token` and `output_cost_per_token` being ignored by `responses()` ([#​48119](https://github.com/BerriAI/litellm/issues/48119))
- Fixed 500 when replaying `web_search_call` input items that have no `action` ([#​48417](https://github.com/BerriAI/litellm/issues/48417))
- Fixed audio, PDF and image tool results and history media being dropped in Responses and Gemini conversions ([#​48484](https://github.com/BerriAI/litellm/issues/48484))
- Fixed retries from `previous_response_id` returning 400 on Bedrock after a failed turn ([#​48647](https://github.com/BerriAI/litellm/issues/48647))
- Fixed Responses params the chat bridge cannot translate causing 400s like `max_tool_calls` on Bedrock Claude ([#​48655](https://github.com/BerriAI/litellm/issues/48655))
- Fixed typed streaming text access breaking on `/v1/responses` when `logprobs` is omitted ([#​48686](https://github.com/BerriAI/litellm/issues/48686))
- Fixed `moderation` on `/v1/responses` being dropped before the OpenAI call ([#​48708](https://github.com/BerriAI/litellm/issues/48708))
- Fixed later citation batches and pending citations being dropped when streaming Responses ([#​48747](https://github.com/BerriAI/litellm/issues/48747))
- Fixed replayed Responses output items being rejected by OpenAI because of a null `created_by` ([#​48783](https://github.com/BerriAI/litellm/issues/48783))
- Fixed an empty `function_call_output` reaching models as serialized JSON instead of an empty tool result ([#​48845](https://github.com/BerriAI/litellm/issues/48845))
- Fixed Responses compaction by dropping params it rejects and sending Azure compaction to the v1 route ([#​48876](https://github.com/BerriAI/litellm/issues/48876))
- Fixed Responses item order, phase and boundaries not being replayed on the next chat turn ([#​48912](https://github.com/BerriAI/litellm/issues/48912))
- Fixed bridged Responses requests losing the requested text verbosity when sent to chat completions ([#​49049](https://github.com/BerriAI/litellm/issues/49049))
- Fixed deployment `itpm` and `otpm` limits not being checked or counted on later Responses WebSocket turns ([#​49069](https://github.com/BerriAI/litellm/issues/49069))
- Fixed `litellm.responses()` through `litellm_proxy/` leaving `e.body`, `e.code` and `e.type` empty on errors ([#​49073](https://github.com/BerriAI/litellm/issues/49073))
- Fixed dict `reasoning_effort` losing `mode` and `context` on Azure, ChatGPT, Perplexity, xAI, Fireworks and Copilot ([#​49082](https://github.com/BerriAI/litellm/issues/49082))
- Fixed repeated Codex tools being merged for all callers, now only merged when `drop_params` is on ([#​49112](https://github.com/BerriAI/litellm/issues/49112))
- Fixed native `/v1/responses` WebSocket turns not counting toward key and tag `tpm_limit` ([#​49257](https://github.com/BerriAI/litellm/issues/49257))
- Changed a lone Responses built-in tool on Claude to return 400 before token counting ([#​48798](https://github.com/BerriAI/litellm/issues/48798))
</details>
<details><summary><b>Messages API</b> (14)</summary>
- Fixed web-search-only requests coming back without native search blocks on streamed replies ([#​40967](https://github.com/BerriAI/litellm/issues/40967))
- Fixed retried `/v1/messages` attempts mixing up usage and spend logs, and exhausted retries billing only the last ([#​45194](https://github.com/BerriAI/litellm/issues/45194))
- Fixed `safeguard_results` and `stop_details` missing from streamed `/v1/messages` `message_delta` events ([#​46096](https://github.com/BerriAI/litellm/issues/46096))
- Fixed the `clear_tool_uses` polyfill ignoring `clear_at_least`, `exclude_tools` and `clear_tool_inputs` ([#​47123](https://github.com/BerriAI/litellm/issues/47123))
- Fixed `/v1/messages` PDF documents being sent to Azure OpenAI models as images instead of file parts ([#​47166](https://github.com/BerriAI/litellm/issues/47166))
- Fixed 500 on `/v1/messages` and count_tokens for null or numeric `tool_result` text, now a 400 ([#​47347](https://github.com/BerriAI/litellm/issues/47347))
- Fixed 400 `Tool reference not found` for tool names over 64 chars when a guardrail rewrites `/v1/messages` ([#​47434](https://github.com/BerriAI/litellm/issues/47434))
- Fixed canceled `/v1/messages` streams not closing the upstream request ([#​48220](https://github.com/BerriAI/litellm/issues/48220))
- Fixed `stop_sequences` being ignored for OpenAI models on `/v1/messages` ([#​48534](https://github.com/BerriAI/litellm/issues/48534))
- Fixed the client's `anthropic-beta` replacing the deployment's on `/v1/messages` ([#​48594](https://github.com/BerriAI/litellm/issues/48594))
- Fixed `/v1/messages` streams reporting zero `input_tokens` in `message_start` when bridged to Chat Completions ([#​48618](https://github.com/BerriAI/litellm/issues/48618))
- Fixed Anthropic-format `tool_choice` crashing input token counting and causing false budget refusals ([#​48624](https://github.com/BerriAI/litellm/issues/48624))
- Fixed 400 on `/v1/messages` caused by a non-spec `custom` object in tool definitions ([#​48893](https://github.com/BerriAI/litellm/issues/48893))
- Fixed Mistral thinking text being lost on streaming `/v1/messages` ([#​49059](https://github.com/BerriAI/litellm/issues/49059))
</details>
<details><summary><b>Realtime</b> (4)</summary>
- Added Soniox realtime speech-to-text on `/v1/realtime` with `stt-rt-v5` ([#​44822](https://github.com/BerriAI/litellm/issues/44822))
- Fixed Gemini Live ignoring `session.update` instructions and tools, and answering text clients with audio ([#​39864](https://github.com/BerriAI/litellm/issues/39864))
- Fixed `/health` reporting OpenAI realtime deployments with a missing or invalid key as healthy ([#​41233](https://github.com/BerriAI/litellm/issues/41233))
- Fixed sessions going silent when a transcript guardrail sent `turn_detection` with no `type` to OpenAI ([#​44939](https://github.com/BerriAI/litellm/issues/44939))
</details>
<details><summary><b>Embeddings, images and audio</b> (8)</summary>
- Added a per-request input batch limit on `/v1/embeddings` to cap how many inputs one call can send ([#​44574](https://github.com/BerriAI/litellm/issues/44574))
- Fixed video status and content polling failing with per-model keys by keeping `model_id` in video ids ([#​44614](https://github.com/BerriAI/litellm/issues/44614))
- Fixed `aws_polly/standard`, `long-form` and `generative` being sent with the `neural` engine ([#​47963](https://github.com/BerriAI/litellm/issues/47963))
- Fixed image generation ignoring `max_retries` and Router retries multiplying upstream attempts ([#​48705](https://github.com/BerriAI/litellm/issues/48705))
- Fixed async image edits with no image returning HTTP 500 instead of 400 ([#​48872](https://github.com/BerriAI/litellm/issues/48872))
- Fixed key and team `router_settings` being ignored on `/v1/images/generations` ([#​49286](https://github.com/BerriAI/litellm/issues/49286))
- Changed unsupported transcription providers to return 400 naming the provider and model instead of 500 ([#​47971](https://github.com/BerriAI/litellm/issues/47971))
- Removed `dall-e-2` and `dall-e-3` support, and image generation without a model now returns 400 ([#​48703](https://github.com/BerriAI/litellm/issues/48703))
</details>
<details><summary><b>Batches and files</b> (8)</summary>
- Added routing of `POST /v1/batches` to batch deployments and `supported_endpoints` on `/model_group/info` ([#​47376](https://github.com/BerriAI/litellm/issues/47376))
- Fixed 400 on `GET /files/{id}/content` with raw `gs://` file ids from the unmanaged Vertex batch flow ([#​40621](https://github.com/BerriAI/litellm/issues/40621))
- Fixed fine-tuning jobs failing with 400 for files uploaded with `target_model_names` ([#​46552](https://github.com/BerriAI/litellm/issues/46552))
- Fixed completed batches skipping success callbacks and losing usage under redaction ([#​47192](https://github.com/BerriAI/litellm/issues/47192))
- Fixed file lists showing every file on the shared key and ignoring `limit` and `after` with `require_managed_files` ([#​47682](https://github.com/BerriAI/litellm/issues/47682))
- Fixed batch retrieve showing zero prompt and completion tokens ([#​47740](https://github.com/BerriAI/litellm/issues/47740))
- Fixed unbillable batches blocking file deletes and new-batch polling ([#​48752](https://github.com/BerriAI/litellm/issues/48752))
- Fixed unmanaged `gs://` Vertex batches being costed through the wrong deployment and reading zero spend ([#​49301](https://github.com/BerriAI/litellm/issues/49301))
</details>
<details><summary><b>Vector stores</b> (5)</summary>
- Added OpenSearch k-NN search as a vector store provider ([#​47759](https://github.com/BerriAI/litellm/issues/47759))
- Fixed `/rag/ingest` and `/rag/query` ignoring team provider credentials and denying viewers and team JWTs ([#​45497](https://github.com/BerriAI/litellm/issues/45497))
- Fixed team key vector store search failing when the team's first model is from a different provider ([#​46894](https://github.com/BerriAI/litellm/issues/46894))
- Fixed team and key Allowed Vector Stores being ignored on `/v1/responses` `file_search` without a registry ([#​48915](https://github.com/BerriAI/litellm/issues/48915))
- Improved Vertex AI Search vector store searches by reusing HTTP/2 connections and OAuth tokens ([#​40631](https://github.com/BerriAI/litellm/issues/40631))
</details>
<details><summary><b>Token counting</b> (10)</summary>
- Added one log line per token count call with its id, model and count ([#​47657](https://github.com/BerriAI/litellm/issues/47657))
- Fixed `/v1/messages/count_tokens` and `/utils/token_counter` failing on histories with a compaction block ([#​44784](https://github.com/BerriAI/litellm/issues/44784))
- Fixed DeepSeek V4 token counts missing Azure's billed tokens by using DeepSeek's own tokenizer ([#​47173](https://github.com/BerriAI/litellm/issues/47173), [#​47353](https://github.com/BerriAI/litellm/issues/47353))
- Fixed `count_tokens` overcounting PDFs about 12x for OpenAI and Azure models ([#​47554](https://github.com/BerriAI/litellm/issues/47554))
- Fixed token counts retrying a failed HuggingFace tokenizer download and adding about 23s per request ([#​47586](https://github.com/BerriAI/litellm/issues/47586))
- Fixed HTTP 500 when counting tokens for Anthropic search results and unsupported blocks ([#​48699](https://github.com/BerriAI/litellm/issues/48699))
- Fixed token counts for OpenAI models newer than the tiktoken table by using `o200k_base` ([#​48728](https://github.com/BerriAI/litellm/issues/48728))
- Fixed a loaded Hugging Face tokenizer being hidden when a later download fails ([#​48916](https://github.com/BerriAI/litellm/issues/48916))
- Changed Responses input token counts to match inference, fixing Claude counts with tools and `text.format` ([#​47363](https://github.com/BerriAI/litellm/issues/47363))
- Improved `token_counter` for inline `auto` images, including images under 768 pixels, with no HTTP requests ([#​48526](https://github.com/BerriAI/litellm/issues/48526))
</details>
<details><summary><b>MCP</b> (27)</summary>
- Added upstream status and response body to the log when an MCP health check fails ([#​44125](https://github.com/BerriAI/litellm/issues/44125))
- Added support for redeeming an ID-JAG as an RFC 7523 `jwt-bearer` grant on the gateway token endpoint ([#​46748](https://github.com/BerriAI/litellm/issues/46748))
- Added Authorization URL, Token URL and Scopes fields to OAuth Delegate and True Passthrough server forms ([#​46941](https://github.com/BerriAI/litellm/issues/46941))
- Added tool search and multi-select to the MCP toolset editor in the Admin UI ([#​48601](https://github.com/BerriAI/litellm/issues/48601))
- Added failure logging for MCP SDK request rejections, shown as `MCP: request_rejected` ([#​49184](https://github.com/BerriAI/litellm/issues/49184))
- Fixed `LITELLM_MCP_TOOL_LISTING_TIMEOUT` not applying to paginated `tools/list` on `/mcp` ([#​46513](https://github.com/BerriAI/litellm/issues/46513))
- Fixed `tools/list` returning an empty list when servers answer 429, now retried with an error if all fail ([#​46649](https://github.com/BerriAI/litellm/issues/46649))
- Fixed 412 on MCP calls with `id_jag_subject_source: refresh_token` after an Okta OIDC login ([#​46745](https://github.com/BerriAI/litellm/issues/46745), [#​46747](https://github.com/BerriAI/litellm/issues/46747), [#​47004](https://github.com/BerriAI/litellm/issues/47004))
- Fixed the caller's LiteLLM key being forwarded to upstream MCP servers when `Authorization` is in `extra_headers` ([#​46932](https://github.com/BerriAI/litellm/issues/46932))
- Fixed VS Code sign-in to DCR bridge MCP servers when the upstream rejects loopback redirect URIs ([#​46940](https://github.com/BerriAI/litellm/issues/46940))
- Fixed 403 when `proxy_admin_viewer` stores its own MCP credentials ([#​46994](https://github.com/BerriAI/litellm/issues/46994))
- Fixed large MCP SSE tool results failing, and invalid size limits breaking MCP discovery and tool calls ([#​47034](https://github.com/BerriAI/litellm/issues/47034))
- Fixed streamed MCP auto-execute billing only the first of its two model calls ([#​47422](https://github.com/BerriAI/litellm/issues/47422), [#​47445](https://github.com/BerriAI/litellm/issues/47445), [#​48899](https://github.com/BerriAI/litellm/issues/48899))
- Fixed an upstream MCP 429 on session handshake being reported as an internal error ([#​47569](https://github.com/BerriAI/litellm/issues/47569))
- Fixed MCP OAuth sign-in callback returning 403 behind AWS WAF by sealing the `litellm_cp_return_to` cookie ([#​47595](https://github.com/BerriAI/litellm/issues/47595))
- Fixed per-user auth MCP servers missing from `/mcp-rest/tools/list` and `/mcp` `tools/list` ([#​47677](https://github.com/BerriAI/litellm/issues/47677))
- Fixed streaming MCP follow-ups on `/v1/responses` dropping all but the latest tool round ([#​47698](https://github.com/BerriAI/litellm/issues/47698))
- Fixed slow MCP tool calls delaying response headers until the SSE ping ([#​47897](https://github.com/BerriAI/litellm/issues/47897))
- Fixed MCP management routes to follow the gateway's existing access rules ([#​48080](https://github.com/BerriAI/litellm/issues/48080))
- Fixed a readonly MCP toolset URL returning every tool instead of only the toolset's tools ([#​48095](https://github.com/BerriAI/litellm/issues/48095))
- Fixed oversized SSE tool catalogs returning a generic 500, now 502 with the size limit and pagination advice ([#​48424](https://github.com/BerriAI/litellm/issues/48424))
- Fixed MCP toolset OAuth login advertising a resource URL that clients reject ([#​48474](https://github.com/BerriAI/litellm/issues/48474))
- Fixed revoked or expired browser sessions still being accepted during gateway authorization ([#​48494](https://github.com/BerriAI/litellm/issues/48494))
- Fixed MCP OpenAPI loading to accept valid YAML specs ([#​48622](https://github.com/BerriAI/litellm/issues/48622))
- Fixed MCP tools in both `allowed_tools` and `disallowed_tools` still being callable ([#​48625](https://github.com/BerriAI/litellm/issues/48625))
- Fixed MCP tools hidden by discovery guardrails still being callable by name ([#​48669](https://github.com/BerriAI/litellm/issues/48669))
- Changed admin-owned team keys to reach only their team's MCP servers and toolsets ([#​49161](https://github.com/BerriAI/litellm/issues/49161))
</details>
<details><summary><b>Agents</b> (10)</summary>
- Added the pi harness to `litellm.agent()` and fixed harness turn `cost` ignoring prompt cache prices ([#​45467](https://github.com/BerriAI/litellm/issues/45467))
- Added request log entries for rejected A2A calls to forbidden or unknown agents ([#​49492](https://github.com/BerriAI/litellm/issues/49492))
- Fixed OpenCode via `litellm.agent()` using the script's folder instead of the sandbox, and hanging on resume ([#​47530](https://github.com/BerriAI/litellm/issues/47530))
- Fixed Gemini Managed Agents create returning 400 for `name` and interactions dropping inline `agent_config` ([#​48750](https://github.com/BerriAI/litellm/issues/48750))
- Fixed `/a2a` calls to completion-bridge agents logging $0 on send and no spend row on stream ([#​49150](https://github.com/BerriAI/litellm/issues/49150))
- Fixed 404 on `/a2a/{agent_id}/message/stream` and `/v1/a2a/{agent_id}/message/stream` ([#​49471](https://github.com/BerriAI/litellm/issues/49471))
- Fixed agent `litellm_params.api_key` not being sent as bearer auth on A2A calls ([#​49474](https://github.com/BerriAI/litellm/issues/49474))
- Fixed agent list and detail responses showing non-admins the backend URL instead of the proxy URL ([#​49483](https://github.com/BerriAI/litellm/issues/49483))
- Fixed a blank search embedding model returning 503 instead of the `*_not_configured` 400 on agent and skill search ([#​49485](https://github.com/BerriAI/litellm/issues/49485))
- Changed proxy refusals on `/a2a` POST routes to return JSON-RPC errors ([#​49476](https://github.com/BerriAI/litellm/issues/49476))
</details>
<details><summary><b>Guardrails</b> (21)</summary>
- Added opt-in `response_masked_data` on PANW Prisma AIRS `post_call` blocks ([#​46219](https://github.com/BerriAI/litellm/issues/46219))
- Added `num_retries` to `generic_guardrail_api` for checks lost after connecting ([#​46965](https://github.com/BerriAI/litellm/issues/46965))
- Added a native Reco guardrail that blocks requests on Reco errors unless `fail_on_error: false` ([#​48243](https://github.com/BerriAI/litellm/issues/48243))
- Added Ovalix guardrail scanning of files, tool calls and tool results ([#​49309](https://github.com/BerriAI/litellm/issues/49309))
- Added `litellm.guardrails.apply` SDK helper to invoke configured guardrails and get native findings ([#​49460](https://github.com/BerriAI/litellm/issues/49460), [#​49469](https://github.com/BerriAI/litellm/issues/49469), [#​49470](https://github.com/BerriAI/litellm/issues/49470))
- Fixed guardrail masks on messages and tools not reaching Bedrock Converse requests ([#​45874](https://github.com/BerriAI/litellm/issues/45874))
- Fixed `generic_guardrail_api` rejecting Gemini native tools that have no `type` key ([#​46338](https://github.com/BerriAI/litellm/issues/46338))
- Fixed corrupted numbered PII tokens in Presidio when one value matches several entities with `output_parse_pii` ([#​47024](https://github.com/BerriAI/litellm/issues/47024))
- Fixed `hide-secrets` missing secrets in tool results, tool inputs, `tool_calls` arguments, and system prompts ([#​47122](https://github.com/BerriAI/litellm/issues/47122))
- Fixed generic guardrails with `mode: pre_mcp_call` being rejected at startup so MCP calls went unchecked ([#​48060](https://github.com/BerriAI/litellm/issues/48060))
- Fixed pass-through guardrails scanning `litellm_metadata` fields added by LiteLLM, which caused false matches ([#​48276](https://github.com/BerriAI/litellm/issues/48276))
- Fixed `hide-secrets` ignoring `skip_tool_message_in_guardrail` ([#​48689](https://github.com/BerriAI/litellm/issues/48689))
- Fixed guardrails chosen in a Responses WebSocket frame not running, and a 500 with other guardrail settings ([#​48725](https://github.com/BerriAI/litellm/issues/48725))
- Fixed Responses tool results not reaching `texts` guardrails ([#​48827](https://github.com/BerriAI/litellm/issues/48827))
- Fixed `google_text_moderation` scanning embeddings input ([#​48934](https://github.com/BerriAI/litellm/issues/48934))
- Fixed guardrail blocks on streamed `/v1/messages` not returning Anthropic events ([#​49010](https://github.com/BerriAI/litellm/issues/49010))
- Fixed streamed `/v1/completions` skipping `post_call` guardrails for masking and blocking ([#​49035](https://github.com/BerriAI/litellm/issues/49035))
- Fixed mid-stream upstream errors on `/v1/messages` being turned into a guardrail 400 ([#​49088](https://github.com/BerriAI/litellm/issues/49088))
- Changed guardrail blocks mid-stream to end chat completions streams with an error event, not a cut connection ([#​46953](https://github.com/BerriAI/litellm/issues/46953))
- Changed `lakera_v2` `on_flagged: block` to reject PII-only detections and added `on_flagged: mask` ([#​48944](https://github.com/BerriAI/litellm/issues/48944))
- Improved streaming by running sampled guardrail scans in the background so chunks no longer pause ([#​48952](https://github.com/BerriAI/litellm/issues/48952))
</details>
<details><summary><b>Caching</b> (4)</summary>
- Fixed streamed cache hits dropping reasoning, citations and audio and reordering tool calls ([#​32096](https://github.com/BerriAI/litellm/issues/32096))
- Fixed `cache_control` being stripped from caller messages and tools, which broke caching on Claude fallbacks ([#​35602](https://github.com/BerriAI/litellm/issues/35602))
- Fixed the cache key's model group being read from caller metadata instead of the router's metadata ([#​48917](https://github.com/BerriAI/litellm/issues/48917))
- Removed the disk cache backend, so `cache_params.type: disk` now stops proxy startup ([#​48114](https://github.com/BerriAI/litellm/issues/48114))
</details>
<details><summary><b>Routing and fallbacks</b> (44)</summary>
- Added mid-stream fallback continuation so a streaming chat cut off mid-answer continues on the configured fallback ([#​41127](https://github.com/BerriAI/litellm/issues/41127))
- Added Kubernetes pod discovery to spread load across pods behind a headless service `api_base` ([#​44342](https://github.com/BerriAI/litellm/issues/44342), [#​44393](https://github.com/BerriAI/litellm/issues/44393), [#​44666](https://github.com/BerriAI/litellm/issues/44666))
- Added opt-in filtering that keeps chat requests off deployments flagged as non-chat ([#​46257](https://github.com/BerriAI/litellm/issues/46257))
- Added the `x-litellm-priority` header to set request priority ([#​47618](https://github.com/BerriAI/litellm/issues/47618))
- Added opt-in session repinning to the replacement deployment after a successful failover ([#​48206](https://github.com/BerriAI/litellm/issues/48206))
- Added a `clamp` mode for complexity routing that keeps the caller's smaller output token limit ([#​48632](https://github.com/BerriAI/litellm/issues/48632))
- Added deployment `rpd` and `tpd` daily limits to `enforce_model_rate_limits` ([#​48875](https://github.com/BerriAI/litellm/issues/48875), [#​48957](https://github.com/BerriAI/litellm/issues/48957))
- Added inferring custom classifier tiers from model mappings, and fixed a crash on plan-mode requests ([#​48987](https://github.com/BerriAI/litellm/issues/48987))
- Fixed weighted failover skipping healthy same-group deployments under affinity ([#​32309](https://github.com/BerriAI/litellm/issues/32309))
- Fixed `content_policy_fallbacks` not applying after `POST /fallback` or `/config/update` changes ([#​45428](https://github.com/BerriAI/litellm/issues/45428))
- Fixed an explicit `allowed_fails: 3` not counting failures and fallbacks cooling down healthy deployments ([#​46183](https://github.com/BerriAI/litellm/issues/46183))
- Fixed a `bedrock_mantle` deployment's `mode` switching sibling deployments between Chat Completions and Responses ([#​46263](https://github.com/BerriAI/litellm/issues/46263))
- Fixed prompt caching affinity ignoring tools and the `/v1/messages` system prompt when choosing a deployment ([#​46411](https://github.com/BerriAI/litellm/issues/46411))
- Fixed all-cooled router 429 rows in SpendLogs not recording which deployments were cooling ([#​47120](https://github.com/BerriAI/litellm/issues/47120))
- Fixed `stream_timeout` cutting off slow answers when Bedrock serves a `stream=True` call without streaming ([#​47162](https://github.com/BerriAI/litellm/issues/47162))
- Fixed key and team `router_settings` reaching the provider and dropping retries, fallbacks and timeout ([#​47257](https://github.com/BerriAI/litellm/issues/47257))
- Fixed 500s from `router_settings.default_priority` or an integer `priority`, and now reject a malformed `priority` ([#​47498](https://github.com/BerriAI/litellm/issues/47498))
- Fixed fallback retries logging a negative completion time and dropping latency-routed groups ([#​47541](https://github.com/BerriAI/litellm/issues/47541))
- Fixed prompt caching affinity raising on non-dict `tools` entries instead of returning the provider's 400 ([#​47565](https://github.com/BerriAI/litellm/issues/47565))
- Fixed cut Responses streams returning `server_error` instead of continuing on a fallback without prefill ([#​47672](https://github.com/BerriAI/litellm/issues/47672))
- Fixed `IndexError` and wrong deployment lookups when deployments are deleted or added concurrently ([#​47680](https://github.com/BerriAI/litellm/issues/47680))
- Fixed native Responses latency using different units than bridged responses in latency-based routing ([#​47727](https://github.com/BerriAI/litellm/issues/47727))
- Fixed the router sending image requests to `supports_vision: false` deployments in mixed model groups ([#​48149](https://github.com/BerriAI/litellm/issues/48149), [#​48152](https://github.com/BerriAI/litellm/issues/48152), [#​48241](https://github.com/BerriAI/litellm/issues/48241))
- Fixed Decisions calls routing to deployments whose provider does not support them ([#​48175](https://github.com/BerriAI/litellm/issues/48175))
- Fixed 500s on every request to a model group after one negative or NaN latency sample under latency routing ([#​48216](https://github.com/BerriAI/litellm/issues/48216))
- Fixed tag fail-open groups rejecting unmatched tags after affinity or cooldown filtering ([#​48470](https://github.com/BerriAI/litellm/issues/48470))
- Fixed one caller's exhausted forwarded Claude subscription putting the shared model into cooldown for others ([#​48485](https://github.com/BerriAI/litellm/issues/48485))
- Fixed proxy-wide wildcard deployments shadowing a team's own wildcard deployment for that team's keys ([#​48490](https://github.com/BerriAI/litellm/issues/48490))
- Fixed complexity router replacing the held `user_turn` route on Codex compaction requests ([#​48627](https://github.com/BerriAI/litellm/issues/48627))
- Fixed session tier pins diverging between proxy workers when using Redis ([#​48645](https://github.com/BerriAI/litellm/issues/48645))
- Fixed nested environment references in router classifier connections being sent literally ([#​48717](https://github.com/BerriAI/litellm/issues/48717))
- Fixed lifecycle events not passing through on background OpenAI Responses streams that cannot fall back ([#​48817](https://github.com/BerriAI/litellm/issues/48817))
- Fixed new fallback rules erasing older ones when Redis refuses `DEL` ([#​48999](https://github.com/BerriAI/litellm/issues/48999))
- Fixed a deployment's own `model_id` being overridden by the request body's ([#​49045](https://github.com/BerriAI/litellm/issues/49045))
- Fixed 429s on requests without `max_tokens` and token counters not dropping to real usage after calls ([#​49054](https://github.com/BerriAI/litellm/issues/49054))
- Fixed streamed context window errors skipping fallbacks when they occur before any output ([#​49293](https://github.com/BerriAI/litellm/issues/49293))
- Fixed large requests silently falling back to heuristic routing when they exceed the classifier's input limit ([#​49306](https://github.com/BerriAI/litellm/issues/49306))
- Fixed queued requests waiting until a 408 when a dead replica left expired scheduler queue entries ([#​49387](https://github.com/BerriAI/litellm/issues/49387))
- Changed per-deployment `reasoning_effort_levels` to apply on every provider and route, including `azure_ai` ([#​46601](https://github.com/BerriAI/litellm/issues/46601))
- Changed tag routing to use only prefixed caller tags once `tag_routing_prefix` is set ([#​47428](https://github.com/BerriAI/litellm/issues/47428))
- Changed router `allowed_fails` to keep a lone deployment with no fallback in rotation instead of returning 429 ([#​48644](https://github.com/BerriAI/litellm/issues/48644))
- Changed `user_turn` routing so child agent requests keep their own tier pin ([#​48701](https://github.com/BerriAI/litellm/issues/48701))
- Changed Router init to reject string fallback targets that never routed ([#​48943](https://github.com/BerriAI/litellm/issues/48943))
- Removed the deployment `rpm` filter from `enable_pre_call_checks` ([#​48873](https://github.com/BerriAI/litellm/issues/48873))
</details>
<details><summary><b>Cost tracking and pricing</b> (36)</summary>
- Added `s3://` URI support for `LITELLM_MODEL_COST_MAP_URL` ([#​46972](https://github.com/BerriAI/litellm/issues/46972))
- Added `model_info.pricing_provider` to price a deployment from another provider's catalog rates instead of $0 ([#​47620](https://github.com/BerriAI/litellm/issues/47620))
- Added `x-litellm-upstream-model` header so pass-through upstreams can report the model name for spend ([#​48275](https://github.com/BerriAI/litellm/issues/48275))
- Added a per-guardrail spend breakdown to user, team and organization daily activity ([#​48702](https://github.com/BerriAI/litellm/issues/48702))
- F…
…ons before the provider call Backport of #49960 to lts/1.108.x, folding its commits into one adapted commit The /v1/messages check goes in litellm/llms/anthropic/pass_through/messages/handler.py, where this line keeps the chat bridge. The line has no litellm.utils.is_gemini_tts_model, so this adds the same name check main got in #31915. text_completion keeps the line's **optional_params spread The test fixture drops register_model's add_to_provider_model_sets flag, which this line does not have Cherry-picked from ec882be, c37c252, 9b6b65e, 16255e8, 675bf5d, 3d505a2, 22777c8, 3c5ed0a, a345bc4 (litellm_fix_gemini_audio_bridges)
This adds Gemini 3.1 Flash TTS on Vertex AI and AI Studio, with two speakers and mp3, opus, alaw, or mulaw from Vertex. Voice settings now reach Gemini on speech, chat audio, and batch files. Those four formats need the Google Cloud Text-to-Speech API enabled
Details
Breaking change: check Gemini TTS voice objects on speech, chat audio, and Vertex batch files before upgrading. Unknown voice keys, nested ones included, get a 400 unless
drop_paramsis set, and Google now rejects bad voices it never saw before. mateo-berri approved this under thedrop_paramsconventionTLDR
Problem this solves:
How it solves it:
Intentional product change: voice objects now reach Gemini
Design decisions
Routing goes by response format. Only the four formats generateContent cannot return (mp3, opus, alaw, mulaw) move to Cloud TTS, so wav and pcm callers stay on the API they use today, with usage that Google reports. The alternative, sending every Gemini TTS request to Cloud TTS, would move working wav and pcm traffic onto a second Google API that needs its own enablement and only gives estimated usage
Every other format (aac, flac, pcm16, linear16, an upper-case
WAV) gets a 400 before calling Google, as main already does, with the message now listing all six Vertex formats. Mapping aac to MP3 or pcm16 to WAV was the alternative, but that returns a format the caller did not ask for. FLAC is not offered because Cloud TTS has no FLAC encodingGoogle documents four Cloud TTS locations for Gemini TTS (global, us, eu, northamerica-northeast1, read 2026-10-20), and many Vertex regions have no
{region}-texttospeechhost. So the US Vertex regions Google lists go tous, the EU ones toeu, northamerica-northeast1 to its own host, andglobalto the global host. With no location set, even after theVERTEXAI_LOCATIONfallback, the deployment uses the Vertex default us-central1 as wav does, so mp3 goes tous. Any other region gets a 400 naming the served ones before Google is called. Aus-*oreurope-*prefix rule was the alternative, but it sends London or Zurich deployments to the EU multi-region. A deployment withapi_baseset gets a 400 asking for wav or pcm, since its endpoint may not serve Cloud TTSA Cloud TTS 404 comes back as a 400, so a voice that only one Google API rejects does not put a deployment that still serves wav into router cooldown. Chirp keeps its 404. The us and eu hosts already answer a misspelled voice with Google's 400, as generateContent does on main
Model names reach Cloud TTS as given, so a model it does not serve, such as
gemini-3.8-flash-tts, gets Google's 400 "model is not supported" on mp3, opus, alaw, and mulaw instead of main's local 400. A local list of Cloud TTS models was the alternative, but it would block a model the day Google ships itWith no voice, or a voice object that names none, Cloud TTS formats send the Gemini voice Kore, which OpenAI's
alloymaps to. Leaving the name out was the alternative, but Google then answers with a non-Gemini default voice billed at Gemini ratesA voice name with a hyphen, such as
en-US-Studio-O, is a Cloud TTS voice, and no Gemini voice name has one. On Cloud TTS formats it gets a 400 asking for a Gemini voice, or the default Gemini voice underdrop_params, per litellm's convention for unsupported values. Passing it on was the alternative, but Google speaks it with that non-Gemini voice at Gemini rates, while wav gets Google's 400 for itSpeaker entries in Cloud TTS's shape (
speakerAliasandspeakerId) become Gemini'sspeakerandvoiceConfigon wav, pcm, and chat audio, so one voice object works on every format. A speaker entry that names no speaker or voice gets a 400 naming the accepted shapes on Cloud TTS formats, and is dropped only underdrop_params. Skipping it silently was the alternative, but Google then answers with an error about the speaker count that hides the field that is wrongGemini TTS voices reject SSML, so input that contains
<speak>is sent as text for Gemini TTS models, and Chirp keeps main's SSML auto-detect. Sending it as SSML gets Google's 400 "This voice does not support SSML input"On wav, pcm, and the default format,
speedandinstructionsare dropped as on main, since generateContent has no field for them. Thedrop_paramsconvention would answer 400 there, but that fails requests main serves todayCloud TTS returns ALAW and MULAW with a WAV header, as Google documents, and the response passes those bytes through labeled
audio/wav. Stripping the header was the alternative, but bare G.711 bytes carry no sample rate and most players cannot open themOpenAI's
instructionsmaps to Cloud TTSinput.prompt, the field Google documents for style direction. Style text written insideinputis spoken on Cloud TTS formats, as it is when calling Cloud TTS directly. Stripping it was the alternative, but free text gives no reliable way to tell direction from speechGemini TTS detection goes by model name ("gemini" plus "tts"), the same test the speech bridge already uses. Reading cost-map metadata instead missed newer Vertex TTS models such as
gemini-3.8-flash-tts, which then got Chirp voice handling and a 400 from GoogleCloud TTS returns no token counts, so prompt tokens come from the token counter and audio tokens from the audio length at 25 tokens per second, the rate Google's pricing page gives. The standard cost calculator prices them with the model or deployment rates. Usage reads only the input text, encoding, and sample rate back from the sent request, so other audio settings, such as a numeric
speakingRate, pass through untouched. A directcompletion_cost(custom_cost_per_token=...)call now prices that usage too, where main priced the prompt alone. The proxy already billed custom rates this way. When the audio length cannot be measured, the response still returns the audio, logs a warning, and bills no audio tokens. Raising there would fail a request Google already charged for, and billing a guessed length could overchargeSpeech maps OpenAI params only for Gemini TTS models, so
vertex_ai_betaChirp and Lyria get the params they got on main, and Lyria 2 with mp3 andspeedstill returns audio. Mapping them too was the alternative, but that answers 400 for params those models ignore on mainOn mp3, opus, alaw, and mulaw, a voice that is a list, an empty string, or another non-object type gets a 400 naming the accepted shapes, or the default Gemini voice under
drop_params. Voice keys Gemini TTS does not read and a non-stringinstructionsget the same treatment. So do nested voice fields Cloud TTS has no place for, such asreplicatedVoiceConfig,voiceConfig.voice, or an unknown key insideprebuiltVoiceConfigor a speaker entry, and the 400 names their paths. A speaker that also namesspeakerIdis checked as sent, and a value of the wrong type, such as a listlanguageCode, gets the same 400. So do aspeechConfigthat is not an object, which would fall back to the default voice, and a speaker with bothspeakerIdand a prebuilt voice, where onlyspeakerIdwould reach Cloud TTS. Ignoring them was the alternative, but the caller then gets a voice or language they did not ask for. main answered 400 for every request on those formats, so no request it served now failsOn wav, pcm, the default format, chat audio, and Vertex batch file rows, top-level voice keys Gemini TTS does not read get the same 400 naming them, or are dropped when
drop_paramsis set on the request, the batch row, the deployment, or globally, per litellm's convention for unsupported values. A voice object carrying bothspeechConfigandspeech_configgets that 400 forspeech_config, since onlyspeechConfigis read. A proxy batch upload that names its deployment withmodelpasses that deployment'sdrop_paramsto the rows, as the load-balanced upload does, and one the request carries wins. OnlyvoiceConfig,multiSpeakerVoiceConfig, andlanguageCodereach Google. AspeechConfigset to null counts as absent, so aspeech_configbeside it is read. Dropping unknown keys silently was the alternative, but the caller then gets a voice they did not ask for with no sign whyWithout
drop_params, keys nested inside those settings, and voice names, go to Google as sent, and Google answers 400 for one it does not know. Underdrop_params, speech and chat audio keep only the nested fields that Google's AI Studio and Vertex discovery documents list forSpeechConfig(revisions 20261019 and 20261012), such asprebuiltVoiceConfig.voiceNameandreplicatedVoiceConfig, and drop the rest. Checking that list withoutdrop_paramswas the alternative, but a field Google adds later would then get a local 400 until litellm ships itWhen a voice object spells a field both ways, such as
voiceConfigandvoice_config, the one written last wins. A 400 for the clash was the alternative, but that fails chat audio and Vertex batch requests main serves today. For the same reason, wav, chat audio, and batch rows still answer 200 for aspeechConfigthat is not an object, with the default voice, and for a prebuilt voice besidespeakerId, with thespeakerIdvoiceThe 400 for unknown voice keys names at most 10 of them, each cut to 100 characters, then says how many more there are. Naming every key in full was the alternative, but a voice object with thousands of long keys then put the whole request into the error and the logs
Gemini TTS audio on speech is wrapped as WAV when either the requested model or the model in Google's response is a Gemini TTS name, so an SDK
model_alias_mapalias still gets WAV as on main. Checking only the requested name was the alternative, but an alias then got raw PCM labeledaudio/mpegThe proxy, the cost map, and the google_genai request mappers are unchanged from main
Chirp and Lyria keep their existing routing. Model identifiers and rates were checked against Google TTS documentation and pricing
User Flow
Before: a developer asking Vertex Gemini 3.1 Flash TTS for a two-speaker dialogue gets a 400, and mp3 is refused
model: gemini-ttsand a voice object giving Ryan Umbriel and Katie LedaAfter: the same requests return two-voice audio in the requested format
model: gemini-ttsand a voice object giving Ryan Umbriel and Katie Leda"response_format": "mp3"x-litellm-response-costheaderRelevant issues
#44545 and #44548 touch only the speech bridge's WAV wrapping
Pre-Submission checklist
Please complete all items before asking a LiteLLM maintainer to review your PR
uv run pytest tests/unit/<your_test_file>.py -v. Leave the suites (make test-unit-*,make test-unit) to CI: it finishes in ~15 minutes where a laptop takes an hour or moreDelays in PR merge?
If you're seeing a delay in your PR being merged, ping the LiteLLM Team on Slack (#pr-review).
Screenshots / Proof of Fix
Two 2-worker proxies hit real Vertex AI, Gemini, and OpenAI. Rows use Vertex 3.1 unless named, and "Voices heard" rows use
gpt-4o-transcribe-diarizeReplicated voice payloads
The replicated voice case uses
studio-tts-38, which isgemini/gemini-3.8-flash-ttson AI Studio. Each proxy sent its Google traffic through a recording forwarder, so that case also shows thespeechConfigGoogle got{"model": "studio-tts-38", "modalities": ["audio"], "drop_params": true, "messages": [{"role": "user", "content": "Say hello in a warm voice"}], "audio": {"format": "pcm16", "speech_config": {"voice_config": {"replicated_voice_config": {"mime_type": "audio/wav", "voice_sample_audio": "<a short WAV, base64>"}}}}} {"model": "studio-tts-38", "input": "Say hello in a warm voice", "response_format": "wav", "drop_params": true, "voice": {"speech_config": {"voice_config": {"replicated_voice_config": {"mime_type": "audio/wav", "voice_sample_audio": "<a short WAV, base64>"}}}}}The config, scripts, and before outputs are in this gist
More cases that changed
<speak>, speakingRatemodeluploadmodel_alias_map, default formatmodel_alias_map, voice objectCases that answer 400 on both sides
Before (06d56eb)
Vertex 3.1 with two speakers
Snake_case replicated voice, drop_params
Steps and output
Fields Vertex mp3 cannot send
Steps and output
gemini-tts, each once plain and once with"drop_params": true. They are a replicated voice sample, a listlanguageCode, a speaker with bothspeakerIdand a replicated voice, a stringspeechConfig, a listspeech_config, and a speaker with bothspeakerIdand a prebuilt voice (ther17_*.jsonandr18_*.jsonfiles in the gist)Voices beside a wrapper
Steps and output
gemini-ttsthat keep the voice outside aspeech_configwrapper holding only the language, two speakers in one and avoice_confignaming Puck in the other (ther20_*.jsonfiles in the gist). These two ran at 17db64e, the merge base once main was merged inFields given twice
Steps and output
gemini-tts(ther21_*.jsonfiles in the gist). One has two speakers outside in camelCase and two others insidespeech_configin snake_case, one has a language outside and another insidespeech_config, and one has anamebeside avoice_config. These ran at 17db64eEvery other case
Outputs are in the gist's
before_outputs.mdAfter (373c592)
Vertex 3.1 with two speakers
Send the same request
The proxy answers
Command and output
Snake_case replicated voice, drop_params
Steps and output
Fields Vertex mp3 cannot send
Steps and output
gemini-tts, each once plain and once with"drop_params": true. They are a replicated voice sample, a listlanguageCode, a speaker with bothspeakerIdand a replicated voice, a stringspeechConfig, a listspeech_config, and a speaker with bothspeakerIdand a prebuilt voice (ther17_*.jsonandr18_*.jsonfiles in the gist)Voices beside a wrapper
Steps and output
Fields given twice
Steps and output
Every other case
Outputs are in the gist's
after_outputs_373c5923af.mdType
🆕 New Feature
🐛 Bug Fix
Caveats (if any)
Medium
input, so useinstructionsinputandinstructionsat 4,000 bytes, not 8,000speech_metadata.speakerLow
speedandinstructions, as on mainapi_base, or on unserved modelsdrop_params, a speaker of only unknown keys gets Google's 400voiceConfigandvoice_config, uses the last onespeechConfigor a prebuilt voice besidespeakerIdFinal Attestation
Bugbot summary
b325181 passes /live-pr-risk
ddfb55b passes /live-pr-risk
49fcc86 passes /live-pr-risk
396b2fb passes /live-pr-risk
373c592 passes /live-pr-risk