Skip to content

fix(azure): add keyless Decisions authentication (#48386) - #48529

Merged
ishaan-j-berri merged 4 commits into
mainfrom
codex/azure-decisions-48386
Oct 27, 2026
Merged

ishaan-j-berri merged 4 commits into
mainfrom
codex/azure-decisions-48386

Conversation

@ishaan-j-berri

@ishaan-j-berri ishaan-j-berri commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #48386

Add azure/ Decisions support using the Azure deployment name and /openai/v1/decisions. Reuse the OpenAI transformations and BaseAzureLLM.base_validate_azure_environment() for Azure authentication. With no API key, use Entra credentials and a cached, refreshable Azure credential provider; no extra refresh flag is required. Keep Azure API-key authentication available.

Before (3b8ad37296f4) and after (dea9a746203a)

I sent these requests to the real proxy app and Router, with a local upstream and a controlled DefaultAzureCredential. The synthetic tokens expire within Azure's refresh window so the next request exercises refresh. The proxy has no upstream key configured and enable_azure_ad_token_refresh=False.

curl -sS -i http://127.0.0.1:48386/v1/decisions \
  -H 'Content-Type: application/json' \
  -d '{"model":"luna","input":"The export job hangs.","questions":[{"type":"predicate","name":"defect","instructions":"Is this a defect?"}]}'

curl -sS -i http://127.0.0.1:48386/v1/systemone \
  -H 'Content-Type: application/json' \
  -d '{"model":"luna","state":"The export job hangs.","questions":{"defect":{"type":"noul","instructions":"Is this a defect?"}}}'

Before, both endpoints returned:

HTTP/1.1 400 Bad Request
{"error":{"message":"litellm.BadRequestError: Unknown Decisions provider 'azure'. Supported providers: openai, openrouter, azure_ai, perplexity, typesafe, nace, strands_decider, laya, bespoke, cloudflare, fireworks_ai, databricks, hosted_vllm\n\nLiteLLM: model group 'luna' failed with the error above. No fallback was attempted.","type":"invalid_request_error","param":null,"code":"400"}}

The upstream received no requests and the credential issued no tokens.

After, /v1/decisions returned:

HTTP/1.1 200 OK
{"model":"luna-deployment","answers":[{"type":"predicate","name":"defect","probability":0.9}],"usage":{"input_tokens":10,"input_tokens_details":{"cached_tokens":0,"cache_write_tokens":0},"output_tokens":1,"output_tokens_details":{"reasoning_tokens":0},"total_tokens":11}}

After, /v1/systemone returned:

HTTP/1.1 200 OK
{"model":"luna-deployment","answers":{"defect":{"type":"noul","noul":0.9}},"usage":{"input_tokens":10,"output_tokens":1}}

The upstream capture confirms both calls used the Azure OpenAI route, preserved luna-deployment, sent bearer tokens of generations 1 and 2, and sent no API key:

curl -sS http://127.0.0.1:48386/observations
{"upstream_requests":[{"path":"/openai/v1/decisions","body":{"model":"luna-deployment","input":"The export job hangs.","questions":[{"type":"predicate","name":"defect","instructions":"Is this a defect?"}]},"entra_generation":1,"api_key_present":false},{"path":"/openai/v1/decisions","body":{"model":"luna-deployment","input":"The export job hangs.","questions":[{"type":"predicate","name":"defect","instructions":"Is this a defect?"}]},"entra_generation":2,"api_key_present":false}],"issued_tokens":[{"scope":["https://cognitiveservices.azure.com/.default"],"generation":1},{"scope":["https://cognitiveservices.azure.com/.default"],"generation":2}]}
Controlled reproduction setup

At either commit, save this as /tmp/reproduce_azure_decisions.py and run PYTHONPATH="$PWD" uv run --no-sync python /tmp/reproduce_azure_decisions.py, then send the requests above. This uses the proxy app with startup disabled to avoid a database dependency; it does not contact Azure.

import os
for name in tuple(os.environ):
    if name.startswith(('AZURE_', 'OPENAI_', 'LITELLM_', 'ANTHROPIC_')):
        os.environ.pop(name, None)
os.environ['PYTHON_DOTENV_DISABLED'] = '1'
os.environ['LITELLM_LOCAL_MODEL_COST_MAP'] = 'True'
import time
import azure.identity
from azure.core.credentials import AccessToken
import uvicorn
from fastapi import Request
import litellm
from litellm.proxy import proxy_server
from litellm.proxy.decisions_endpoints.endpoints import router

observations = []
issued = []
class ControlledDefaultAzureCredential:
    def get_token(self, *scopes, **kwargs):
        issued.append({'scope': list(scopes), 'generation': len(issued) + 1})
        return AccessToken(f'synthetic-entra-{len(issued)}', int(time.time()) + 120)
azure.identity.DefaultAzureCredential = ControlledDefaultAzureCredential
litellm.enable_azure_ad_token_refresh = False
litellm.disable_aiohttp_transport = True
proxy_server.master_key = None
proxy_server.general_settings = {}
proxy_server.llm_router = litellm.Router(model_list=[{
    'model_name': 'luna',
    'litellm_params': {'model': 'azure/luna-deployment', 'api_base': 'http://127.0.0.1:48386'},
}], num_retries=0)
app = proxy_server.app
app.include_router(router)
@app.post('/openai/v1/decisions')
async def upstream(request: Request):
    body = await request.json()
    auth = request.headers.get('authorization', '')
    observations.append({'path': request.url.path, 'body': body,
                         'entra_generation': int(auth.removeprefix('Bearer synthetic-entra-')) if auth.startswith('Bearer synthetic-entra-') else None,
                         'api_key_present': 'api-key' in request.headers})
    return {'model': body['model'], 'answers': [{'type':'predicate','name':'defect','probability':0.9}],
            'usage': {'input_tokens':10,'output_tokens':1,'total_tokens':11}}
app.router.routes.insert(0, app.router.routes.pop())
@app.get('/observations')
async def observed():
    return {'upstream_requests': observations, 'issued_tokens': issued}
uvicorn.run(app, host='127.0.0.1', port=48386, lifespan='off', log_level='error')

Full unit-suite verification remains incomplete: the local run failed in PgBouncer startup, Prometheus dashboard metric coverage, and spend-event shutdown (AF_UNIX path too long). Live Azure credential acquisition and a live Azure deployment remain unverified.

@codecov

codecov Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@ishaan-j-berri
ishaan-j-berri enabled auto-merge (squash) October 27, 2026 02:46
@codspeed

codspeed Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Merging this PR will not alter performance

1 warning

⚠️ 2 benchmarks are dominated by system calls

System calls cannot be simulated consistently and are left out of the measure. The reported value understates the real cost. Switch to the Walltime instrument to measure them.

Learn more about system calls

See affected benchmarks

✅ 35 untouched benchmarks


Comparing codex/azure-decisions-48386 (b9800ef) with main (ebe0871)

Open in CodSpeed

@ishaan-j-berri
ishaan-j-berri merged commit e575793 into main Oct 27, 2026
99 of 101 checks passed
@ishaan-j-berri
ishaan-j-berri deleted the codex/azure-decisions-48386 branch October 27, 2026 03:10
kerry-berri added a commit that referenced this pull request Nov 12, 2026
…08_x

fix(azure): backport Azure OpenAI Decisions support to lts/1.108.x (#48529)
GiorgioAresu pushed a commit to GiorgioAresu/home-ops that referenced this pull request Nov 15, 2026
…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 [#&#8203;51254](https://github.com/BerriAI/litellm/issues/51254) to stable/1.109.x by [@&#8203;shrey-berri](https://github.com/shrey-berri) in [#&#8203;51264](https://github.com/BerriAI/litellm/pull/51264)
- chore: bump litellm 1.109.0 -> 1.109.1 by [@&#8203;yuneng-berri](https://github.com/yuneng-berri) in [#&#8203;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 ([#&#8203;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 ([#&#8203;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 ([#&#8203;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 ([#&#8203;47645](https://github.com/BerriAI/litellm/issues/47645))
- **Deployment:** Deploy Lens from its own chart and set `lens.*` in your values ([#&#8203;49169](https://github.com/BerriAI/litellm/issues/49169))

##### Highlights

- **Admin UI:** Added a Chat UI with a model hub, image generation and usage metrics ([#&#8203;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 ([#&#8203;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 ([#&#8203;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 ([#&#8203;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 ([#&#8203;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 ([#&#8203;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 ([#&#8203;39966](https://github.com/BerriAI/litellm/issues/39966))
- Added the 12-hour cache write rate for `gpt-5.6-cyber` ([#&#8203;48246](https://github.com/BerriAI/litellm/issues/48246))
- Added OpenAI `gpt-6.1-terra` with pricing ([#&#8203;48429](https://github.com/BerriAI/litellm/issues/48429))
- Added Batch and Ultrafast 12-hour cache write rates for OpenAI models ([#&#8203;48433](https://github.com/BerriAI/litellm/issues/48433))
- Added `gpt-6-rosalind` to the model cost map with its published prices ([#&#8203;49268](https://github.com/BerriAI/litellm/issues/49268))
- Added `gpt-6-astra-law` with pricing from the OpenAI pricing page ([#&#8203;49444](https://github.com/BerriAI/litellm/issues/49444))
- Fixed 400 errors and $0 spend logs on `gpt-transcribe` calls without `response_format` ([#&#8203;44021](https://github.com/BerriAI/litellm/issues/44021))
- Fixed nonstreaming `aiohttp_openai` responses dropping `service_tier` ([#&#8203;47263](https://github.com/BerriAI/litellm/issues/47263))
- Fixed `prompt_cache_retention` such as `24h` being silently dropped instead of sent upstream ([#&#8203;47480](https://github.com/BerriAI/litellm/issues/47480))
- Fixed `/health` marking OpenAI and Azure audio chat models unhealthy ([#&#8203;47730](https://github.com/BerriAI/litellm/issues/47730))
- Fixed OpenAI `context_length_exceeded` errors raising `BadRequestError` instead of `ContextWindowExceededError` ([#&#8203;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 ([#&#8203;48088](https://github.com/BerriAI/litellm/issues/48088))
- Fixed uncatalogued ChatGPT models hitting an unsupported Chat Completions endpoint ([#&#8203;48244](https://github.com/BerriAI/litellm/issues/48244))
- Fixed the whole `reasoning_effort` dict not being sent when chat is bridged to Responses ([#&#8203;48807](https://github.com/BerriAI/litellm/issues/48807))
- Fixed 400 `invalid_beta` on Agents API calls through the OpenAI passthrough ([#&#8203;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 ([#&#8203;49079](https://github.com/BerriAI/litellm/issues/49079))
- Changed OpenAI 401 and 404 `invalid_request_error` to raise matching exceptions, not `BadRequestError` ([#&#8203;32537](https://github.com/BerriAI/litellm/issues/32537))
- Changed the ChatGPT session id to derive from `prompt_cache_key` for stable cache affinity ([#&#8203;42014](https://github.com/BerriAI/litellm/issues/42014))
- Changed `gpt-6-luna` Decisions cache rates to the standard cached and write rates ([#&#8203;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` ([#&#8203;46539](https://github.com/BerriAI/litellm/issues/46539), [#&#8203;48529](https://github.com/BerriAI/litellm/issues/48529))
- Added access to Foundry agents through the project Responses API for `azure_ai/agents/<name>` ([#&#8203;47717](https://github.com/BerriAI/litellm/issues/47717))
- Added `azure_ai/MAI-Code-1.1-Flash` ([#&#8203;47779](https://github.com/BerriAI/litellm/issues/47779))
- Added `max_input_tokens` of 32768 for `azure_ai/Microsoft-Decision-1` ([#&#8203;48434](https://github.com/BerriAI/litellm/issues/48434))
- Added `outputContentFormat=markdown` support on `/ocr` for Azure Document Intelligence ([#&#8203;48926](https://github.com/BerriAI/litellm/issues/48926))
- Fixed Foundry chat requests losing OpenAI prompt cache breakpoints ([#&#8203;45299](https://github.com/BerriAI/litellm/issues/45299))
- Fixed `/v1/responses` 404 on dated `api_version` deployments and `azure_ai` Grok reasoning token billing ([#&#8203;46377](https://github.com/BerriAI/litellm/issues/46377))
- Fixed under-billed Grok reasoning tokens on `azure_ai` when the deployment name lacks "grok" ([#&#8203;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 ([#&#8203;47316](https://github.com/BerriAI/litellm/issues/47316))
- Fixed 400 from Foundry when tool results contain `tool_reference` parts on chat ([#&#8203;48032](https://github.com/BerriAI/litellm/issues/48032))
- Fixed 400 on `azure_ai/claude-*` when using `thinking.block_binding` ([#&#8203;48033](https://github.com/BerriAI/litellm/issues/48033))
- Fixed Responses API calls that use an explicit v1 Azure base URL ([#&#8203;48118](https://github.com/BerriAI/litellm/issues/48118))
- Fixed 404 on Azure vector store retrieve, update and delete ([#&#8203;48224](https://github.com/BerriAI/litellm/issues/48224))
- Fixed null audio capability metadata on two Azure audio snapshot models ([#&#8203;48475](https://github.com/BerriAI/litellm/issues/48475))
- Fixed Azure `context_length_exceeded` raising `BadRequestError` so `context_window_fallbacks` never ran ([#&#8203;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 ([#&#8203;49182](https://github.com/BerriAI/litellm/issues/49182))
- Changed `max_input_tokens` to 128000 for `gpt-chat-latest` on Azure ([#&#8203;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 ([#&#8203;46421](https://github.com/BerriAI/litellm/issues/46421), [#&#8203;47348](https://github.com/BerriAI/litellm/issues/47348), [#&#8203;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 ([#&#8203;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 ([#&#8203;46984](https://github.com/BerriAI/litellm/issues/46984))
- Fixed Claude `json_schema` answers losing keys listed only in `required` and escaping non-ASCII characters ([#&#8203;47478](https://github.com/BerriAI/litellm/issues/47478))
- Fixed replayed `redacted_thinking` blocks being dropped, and Bedrock Converse 400s when sent twice ([#&#8203;47489](https://github.com/BerriAI/litellm/issues/47489))
- Fixed `clear_tool_uses` `input_tokens` trigger ignoring the system prompt, which delayed clearing ([#&#8203;47857](https://github.com/BerriAI/litellm/issues/47857))
- Fixed native Anthropic responses omitting a null `stop_sequence` ([#&#8203;47987](https://github.com/BerriAI/litellm/issues/47987))
- Fixed streamed responses leaving native web search fees out of the reconstructed usage cost ([#&#8203;48528](https://github.com/BerriAI/litellm/issues/48528))
- Fixed `drop_params` not dropping `speed` on `claude-opus-4-7`, which Anthropic rejects with 400 ([#&#8203;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 ([#&#8203;48793](https://github.com/BerriAI/litellm/issues/48793))
- Fixed `model_context_window_exceeded` being reported as `stop` instead of `length` ([#&#8203;48874](https://github.com/BerriAI/litellm/issues/48874))
- Fixed 400 on `/v1/messages` with many strict tools under `drop_params` by retrying without `strict` ([#&#8203;49102](https://github.com/BerriAI/litellm/issues/49102))
- Fixed Claude `pause_turn` reported as finished and refusal explanations dropped on chat and Responses ([#&#8203;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 ([#&#8203;49237](https://github.com/BerriAI/litellm/issues/49237))
- Fixed `metadata.user_id` being dropped on Anthropic `/v1/messages` pass-through routes ([#&#8203;49333](https://github.com/BerriAI/litellm/issues/49333))
- Changed the default `max_tokens` for unmapped Anthropic models from 4096 to 128000 ([#&#8203;48502](https://github.com/BerriAI/litellm/issues/48502))
- Changed the opening prompt usage estimate in the Chat Completions adapter to be off by default ([#&#8203;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 ([#&#8203;48247](https://github.com/BerriAI/litellm/issues/48247))
- Added pricing for native `guardrailConfig` trace usage to spend and `x-litellm-response-cost` ([#&#8203;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 ([#&#8203;48441](https://github.com/BerriAI/litellm/issues/48441))
- Added token counting for three Mantle-native Bedrock Claude models ([#&#8203;48682](https://github.com/BerriAI/litellm/issues/48682))
- Added published Priority, Batch and Flex prices to 46 Bedrock regional rows ([#&#8203;49113](https://github.com/BerriAI/litellm/issues/49113))
- Fixed Bedrock Voxtral transcription returning 400, logging $0 spend and ignoring `language` ([#&#8203;41565](https://github.com/BerriAI/litellm/issues/41565))
- Fixed `Unknown provider=None` 404 for Bedrock models missing from the cost map ([#&#8203;43290](https://github.com/BerriAI/litellm/issues/43290))
- Fixed 400 errors on Bedrock Kimi K3 Converse calls with `max_tokens` below 16 ([#&#8203;43875](https://github.com/BerriAI/litellm/issues/43875))
- Fixed 400 `invalid beta flag` on Claude Code auto mode requests that carry no `safeguards` ([#&#8203;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 ([#&#8203;45992](https://github.com/BerriAI/litellm/issues/45992))
- Fixed `post_call` guardrails not scanning Claude output on `invoke-with-response-stream` passthrough ([#&#8203;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 ([#&#8203;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 ([#&#8203;46870](https://github.com/BerriAI/litellm/issues/46870))
- Fixed `bedrock_request_metadata_fields` being ignored on the `/bedrock` pass-through routes ([#&#8203;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 ([#&#8203;47100](https://github.com/BerriAI/litellm/issues/47100))
- Fixed Bedrock batch jobs ignoring a configured control-plane endpoint ([#&#8203;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 ([#&#8203;47331](https://github.com/BerriAI/litellm/issues/47331))
- Fixed $0 spend and `ModelNotMappedError` for `bedrock/claude_platform/<id>` calls ([#&#8203;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` ([#&#8203;48479](https://github.com/BerriAI/litellm/issues/48479))
- Fixed Bedrock rejecting `strict` tool schemas by retrying without `strict` under `drop_params` ([#&#8203;48733](https://github.com/BerriAI/litellm/issues/48733))
- Fixed 400 on Bedrock when Codex repeats its tool list across turns ([#&#8203;49006](https://github.com/BerriAI/litellm/issues/49006))
- Fixed region-prefixed Bedrock embedding models not routing to their region or billing its price ([#&#8203;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 ([#&#8203;49350](https://github.com/BerriAI/litellm/issues/49350))
- Fixed `max_output_tokens` for Bedrock GovCloud West Llama 3 models, now 8192 ([#&#8203;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 ([#&#8203;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 ([#&#8203;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` ([#&#8203;49193](https://github.com/BerriAI/litellm/issues/49193))
- Changed Bedrock Invoke and Mantle Claude to use the model's own default `max_tokens` ([#&#8203;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 ([#&#8203;31915](https://github.com/BerriAI/litellm/issues/31915))
- Added a setting to drop chosen `anthropic-beta` values on the Vertex AI pass-through routes ([#&#8203;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 ([#&#8203;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 ([#&#8203;47692](https://github.com/BerriAI/litellm/issues/47692))
- Added a 2026-06-30 deprecation date to `vertex_ai/veo-2.0-generate-001` ([#&#8203;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 ([#&#8203;48085](https://github.com/BerriAI/litellm/issues/48085))
- Added Vertex batch prices above 200k tokens and image output prices for Gemini models ([#&#8203;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 ([#&#8203;40868](https://github.com/BerriAI/litellm/issues/40868))
- Fixed `vertex_ai/*` keys not listing partner, Veo and embedding models and dropping publisher prefixes ([#&#8203;41959](https://github.com/BerriAI/litellm/issues/41959))
- Fixed Gemini TTS `/v1/audio/speech` calling Google twice and logging 0 tokens in spend ([#&#8203;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 ([#&#8203;44747](https://github.com/BerriAI/litellm/issues/44747))
- Fixed context caching on Vertex AI failing when a custom `api_base` is set ([#&#8203;44783](https://github.com/BerriAI/litellm/issues/44783))
- Fixed streamed Vertex AI pass-through calls missing the regional 10% uplift and custom deployment prices ([#&#8203;44795](https://github.com/BerriAI/litellm/issues/44795))
- Fixed Gemini not receiving integer enum values in tool parameters ([#&#8203;44908](https://github.com/BerriAI/litellm/issues/44908))
- Fixed Vertex Claude batches returning 404 at create ([#&#8203;45715](https://github.com/BerriAI/litellm/issues/45715))
- Fixed cache-marked requests listing all `cachedContents` on every call and creating duplicate caches ([#&#8203;46857](https://github.com/BerriAI/litellm/issues/46857))
- Fixed Vertex AI rate limit errors returned as 403 when the error text contains 403 ([#&#8203;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 ([#&#8203;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 ([#&#8203;48248](https://github.com/BerriAI/litellm/issues/48248))
- Fixed Gemini 2.5 rejecting tool results with images and the history replay that follows ([#&#8203;48428](https://github.com/BerriAI/litellm/issues/48428))
- Fixed Vertex AI shared credential cache growing without bound across credential and project pairs ([#&#8203;48442](https://github.com/BerriAI/litellm/issues/48442))
- Fixed Vertex AI image sizes outside the old lookup table silently producing square output ([#&#8203;48463](https://github.com/BerriAI/litellm/issues/48463))
- Fixed slow Google credential requests blocking the proxy worker on Claude `/v1/messages` ([#&#8203;48523](https://github.com/BerriAI/litellm/issues/48523))
- Fixed explicit Gemini and Vertex embedding timeouts silently becoming 300 seconds ([#&#8203;48690](https://github.com/BerriAI/litellm/issues/48690))
- Fixed Gemini grounding keeping only the first web source for a passage ([#&#8203;48745](https://github.com/BerriAI/litellm/issues/48745))
- Fixed `labels` on `vertex_ai/claude-*` returning 400 by sending them as `X-Vertex-AI-Labels` ([#&#8203;48753](https://github.com/BerriAI/litellm/issues/48753))
- Fixed 400 on `countTokens` and `generateContent` when repeated fields are a single object or null ([#&#8203;48771](https://github.com/BerriAI/litellm/issues/48771))
- Fixed Vertex Claude `/v1/messages` returning 400 when the SDK sends `anthropic-version` as a header ([#&#8203;48814](https://github.com/BerriAI/litellm/issues/48814))
- Fixed Claude web search billing per request on Vertex AI deployments priced in `model_info` ([#&#8203;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` ([#&#8203;49317](https://github.com/BerriAI/litellm/issues/49317), [#&#8203;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` ([#&#8203;47645](https://github.com/BerriAI/litellm/issues/47645))
- Improved rerank latency by reusing cached Google credentials on every request ([#&#8203;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 ([#&#8203;49075](https://github.com/BerriAI/litellm/issues/49075))
- Removed the floor `deprecation_date` from `gemini-3.1-flash-lite-image` ([#&#8203;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 ([#&#8203;38958](https://github.com/BerriAI/litellm/issues/38958), [#&#8203;39324](https://github.com/BerriAI/litellm/issues/39324), [#&#8203;41006](https://github.com/BerriAI/litellm/issues/41006), [#&#8203;41034](https://github.com/BerriAI/litellm/issues/41034), [#&#8203;43874](https://github.com/BerriAI/litellm/issues/43874), [#&#8203;44863](https://github.com/BerriAI/litellm/issues/44863), [#&#8203;46523](https://github.com/BerriAI/litellm/issues/46523), [#&#8203;48140](https://github.com/BerriAI/litellm/issues/48140), [#&#8203;48497](https://github.com/BerriAI/litellm/issues/48497), [#&#8203;48563](https://github.com/BerriAI/litellm/issues/48563), [#&#8203;48756](https://github.com/BerriAI/litellm/issues/48756))
- Added models, endpoints and options for smaller providers (31 PRs) ([#&#8203;41021](https://github.com/BerriAI/litellm/issues/41021), [#&#8203;41522](https://github.com/BerriAI/litellm/issues/41522), [#&#8203;46156](https://github.com/BerriAI/litellm/issues/46156), [#&#8203;46875](https://github.com/BerriAI/litellm/issues/46875), [#&#8203;47401](https://github.com/BerriAI/litellm/issues/47401), [#&#8203;47473](https://github.com/BerriAI/litellm/issues/47473), [#&#8203;47610](https://github.com/BerriAI/litellm/issues/47610), [#&#8203;47690](https://github.com/BerriAI/litellm/issues/47690), [#&#8203;47785](https://github.com/BerriAI/litellm/issues/47785), [#&#8203;47812](https://github.com/BerriAI/litellm/issues/47812), [#&#8203;48158](https://github.com/BerriAI/litellm/issues/48158), [#&#8203;48251](https://github.com/BerriAI/litellm/issues/48251), [#&#8203;48335](https://github.com/BerriAI/litellm/issues/48335), [#&#8203;48448](https://github.com/BerriAI/litellm/issues/48448), [#&#8203;48450](https://github.com/BerriAI/litellm/issues/48450), [#&#8203;48453](https://github.com/BerriAI/litellm/issues/48453), [#&#8203;48498](https://github.com/BerriAI/litellm/issues/48498), [#&#8203;48621](https://github.com/BerriAI/litellm/issues/48621), [#&#8203;48651](https://github.com/BerriAI/litellm/issues/48651), [#&#8203;48676](https://github.com/BerriAI/litellm/issues/48676), [#&#8203;48677](https://github.com/BerriAI/litellm/issues/48677), [#&#8203;48735](https://github.com/BerriAI/litellm/issues/48735), [#&#8203;48871](https://github.com/BerriAI/litellm/issues/48871), [#&#8203;48998](https://github.com/BerriAI/litellm/issues/48998), [#&#8203;49252](https://github.com/BerriAI/litellm/issues/49252), [#&#8203;49280](https://github.com/BerriAI/litellm/issues/49280), [#&#8203;49281](https://github.com/BerriAI/litellm/issues/49281), [#&#8203;49282](https://github.com/BerriAI/litellm/issues/49282), [#&#8203;49287](https://github.com/BerriAI/litellm/issues/49287), [#&#8203;49297](https://github.com/BerriAI/litellm/issues/49297), [#&#8203;49542](https://github.com/BerriAI/litellm/issues/49542))
- Fixed issues and updated behavior on smaller providers (41 PRs) ([#&#8203;38736](https://github.com/BerriAI/litellm/issues/38736), [#&#8203;40152](https://github.com/BerriAI/litellm/issues/40152), [#&#8203;43390](https://github.com/BerriAI/litellm/issues/43390), [#&#8203;44723](https://github.com/BerriAI/litellm/issues/44723), [#&#8203;45092](https://github.com/BerriAI/litellm/issues/45092), [#&#8203;45567](https://github.com/BerriAI/litellm/issues/45567), [#&#8203;46091](https://github.com/BerriAI/litellm/issues/46091), [#&#8203;46861](https://github.com/BerriAI/litellm/issues/46861), [#&#8203;46945](https://github.com/BerriAI/litellm/issues/46945), [#&#8203;46959](https://github.com/BerriAI/litellm/issues/46959), [#&#8203;47091](https://github.com/BerriAI/litellm/issues/47091), [#&#8203;47423](https://github.com/BerriAI/litellm/issues/47423), [#&#8203;47424](https://github.com/BerriAI/litellm/issues/47424), [#&#8203;47432](https://github.com/BerriAI/litellm/issues/47432), [#&#8203;47495](https://github.com/BerriAI/litellm/issues/47495), [#&#8203;47784](https://github.com/BerriAI/litellm/issues/47784), [#&#8203;47794](https://github.com/BerriAI/litellm/issues/47794), [#&#8203;48121](https://github.com/BerriAI/litellm/issues/48121), [#&#8203;48254](https://github.com/BerriAI/litellm/issues/48254), [#&#8203;48265](https://github.com/BerriAI/litellm/issues/48265), [#&#8203;48268](https://github.com/BerriAI/litellm/issues/48268), [#&#8203;48270](https://github.com/BerriAI/litellm/issues/48270), [#&#8203;48455](https://github.com/BerriAI/litellm/issues/48455), [#&#8203;48522](https://github.com/BerriAI/litellm/issues/48522), [#&#8203;48527](https://github.com/BerriAI/litellm/issues/48527), [#&#8203;48668](https://github.com/BerriAI/litellm/issues/48668), [#&#8203;48684](https://github.com/BerriAI/litellm/issues/48684), [#&#8203;48706](https://github.com/BerriAI/litellm/issues/48706), [#&#8203;48707](https://github.com/BerriAI/litellm/issues/48707), [#&#8203;48778](https://github.com/BerriAI/litellm/issues/48778), [#&#8203;48820](https://github.com/BerriAI/litellm/issues/48820), [#&#8203;48837](https://github.com/BerriAI/litellm/issues/48837), [#&#8203;49068](https://github.com/BerriAI/litellm/issues/49068), [#&#8203;49158](https://github.com/BerriAI/litellm/issues/49158), [#&#8203;49278](https://github.com/BerriAI/litellm/issues/49278), [#&#8203;49344](https://github.com/BerriAI/litellm/issues/49344), [#&#8203;49458](https://github.com/BerriAI/litellm/issues/49458), [#&#8203;49462](https://github.com/BerriAI/litellm/issues/49462), [#&#8203;49498](https://github.com/BerriAI/litellm/issues/49498), [#&#8203;49502](https://github.com/BerriAI/litellm/issues/49502), [#&#8203;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 ([#&#8203;33549](https://github.com/BerriAI/litellm/issues/33549))
- Fixed 500 errors when a prompt template omits `initial_prompt_value` or `final_prompt_value` ([#&#8203;39762](https://github.com/BerriAI/litellm/issues/39762))
- Fixed rebuilt streamed text completions returning null `finish_reason` and zero `prompt_tokens` ([#&#8203;44349](https://github.com/BerriAI/litellm/issues/44349))
- Fixed Foundry deployments and Claude fallbacks getting the wrong cache options, which caused 400s ([#&#8203;45295](https://github.com/BerriAI/litellm/issues/45295))
- Fixed non-streaming chat dropping upstream response headers on `bedrock_mantle/` and other OpenAI-like providers ([#&#8203;46928](https://github.com/BerriAI/litellm/issues/46928))
- Fixed chat streams failing with a proxy error when progress chunks have no choice index ([#&#8203;46947](https://github.com/BerriAI/litellm/issues/46947))
- Fixed the overhead header under-reporting on chat requests when guardrails add `litellm_metadata` ([#&#8203;47790](https://github.com/BerriAI/litellm/issues/47790))
- Fixed streamed chunks containing `[DONE]` being read as end of stream and dropped ([#&#8203;47832](https://github.com/BerriAI/litellm/issues/47832))
- Fixed completions streams including `usage` when it was not requested ([#&#8203;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 ([#&#8203;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 ([#&#8203;48755](https://github.com/BerriAI/litellm/issues/48755))
- Fixed 400 on system-first models like Qwen3.5 when a later `developer` message appears ([#&#8203;48897](https://github.com/BerriAI/litellm/issues/48897))
- Fixed streamed chat completions with `n>1` rebuilding each choice ([#&#8203;49002](https://github.com/BerriAI/litellm/issues/49002))
- Fixed streaming clients missing tool execution when OpenAI-compatible providers end tool calls with `stop` ([#&#8203;49388](https://github.com/BerriAI/litellm/issues/49388))
- Changed the `include_usage` stream chunk to send an empty `choices` array like OpenAI ([#&#8203;47109](https://github.com/BerriAI/litellm/issues/47109))
- Changed stalled stream reads to raise a 408 `litellm.Timeout` on chat, messages and responses ([#&#8203;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 ([#&#8203;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 ([#&#8203;47688](https://github.com/BerriAI/litellm/issues/47688))
- Added resuming background response streams with `stream` and `starting_after` on retrieve ([#&#8203;48819](https://github.com/BerriAI/litellm/issues/48819))
- Added Codex client `tool_search` support on Anthropic and other bridged providers, cutting input tokens ([#&#8203;48972](https://github.com/BerriAI/litellm/issues/48972))
- Fixed Responses API logging tasks being dropped by garbage collection and cut off at shutdown ([#&#8203;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 ([#&#8203;43667](https://github.com/BerriAI/litellm/issues/43667))
- Fixed 400 from malformed `prompt_cache_breakpoint` on `/v1/responses` with `drop_params: true` ([#&#8203;45330](https://github.com/BerriAI/litellm/issues/45330))
- Fixed later turns on an open Responses WebSocket skipping deployment checks and not counting toward budgets ([#&#8203;45727](https://github.com/BerriAI/litellm/issues/45727))
- Fixed streamed `/v1/responses` events showing the backend deployment name in nested `response.model` ([#&#8203;46662](https://github.com/BerriAI/litellm/issues/46662))
- Fixed `/v1/responses` on Claude dropping returned and replayed `compaction` items ([#&#8203;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 ([#&#8203;47013](https://github.com/BerriAI/litellm/issues/47013))
- Fixed OpenAI pass-through `GET /responses/{id}` being billed again on every call ([#&#8203;47171](https://github.com/BerriAI/litellm/issues/47171))
- Fixed background spend not counting toward the key's project or per-model budgets ([#&#8203;47504](https://github.com/BerriAI/litellm/issues/47504))
- Fixed the billed cost of background responses not reaching key and team loggers ([#&#8203;47506](https://github.com/BerriAI/litellm/issues/47506))
- Fixed failed Responses streams billing 0 tokens and bridged `/v1/messages` stream failures not being reported ([#&#8203;47537](https://github.com/BerriAI/litellm/issues/47537))
- Fixed `clear_tool_uses_20250919` being silently dropped for `openai/` models on the Responses API ([#&#8203;47861](https://github.com/BerriAI/litellm/issues/47861))
- Fixed per-call `input_cost_per_token` and `output_cost_per_token` being ignored by `responses()` ([#&#8203;48119](https://github.com/BerriAI/litellm/issues/48119))
- Fixed 500 when replaying `web_search_call` input items that have no `action` ([#&#8203;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 ([#&#8203;48484](https://github.com/BerriAI/litellm/issues/48484))
- Fixed retries from `previous_response_id` returning 400 on Bedrock after a failed turn ([#&#8203;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 ([#&#8203;48655](https://github.com/BerriAI/litellm/issues/48655))
- Fixed typed streaming text access breaking on `/v1/responses` when `logprobs` is omitted ([#&#8203;48686](https://github.com/BerriAI/litellm/issues/48686))
- Fixed `moderation` on `/v1/responses` being dropped before the OpenAI call ([#&#8203;48708](https://github.com/BerriAI/litellm/issues/48708))
- Fixed later citation batches and pending citations being dropped when streaming Responses ([#&#8203;48747](https://github.com/BerriAI/litellm/issues/48747))
- Fixed replayed Responses output items being rejected by OpenAI because of a null `created_by` ([#&#8203;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 ([#&#8203;48845](https://github.com/BerriAI/litellm/issues/48845))
- Fixed Responses compaction by dropping params it rejects and sending Azure compaction to the v1 route ([#&#8203;48876](https://github.com/BerriAI/litellm/issues/48876))
- Fixed Responses item order, phase and boundaries not being replayed on the next chat turn ([#&#8203;48912](https://github.com/BerriAI/litellm/issues/48912))
- Fixed bridged Responses requests losing the requested text verbosity when sent to chat completions ([#&#8203;49049](https://github.com/BerriAI/litellm/issues/49049))
- Fixed deployment `itpm` and `otpm` limits not being checked or counted on later Responses WebSocket turns ([#&#8203;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 ([#&#8203;49073](https://github.com/BerriAI/litellm/issues/49073))
- Fixed dict `reasoning_effort` losing `mode` and `context` on Azure, ChatGPT, Perplexity, xAI, Fireworks and Copilot ([#&#8203;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 ([#&#8203;49112](https://github.com/BerriAI/litellm/issues/49112))
- Fixed native `/v1/responses` WebSocket turns not counting toward key and tag `tpm_limit` ([#&#8203;49257](https://github.com/BerriAI/litellm/issues/49257))
- Changed a lone Responses built-in tool on Claude to return 400 before token counting ([#&#8203;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 ([#&#8203;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 ([#&#8203;45194](https://github.com/BerriAI/litellm/issues/45194))
- Fixed `safeguard_results` and `stop_details` missing from streamed `/v1/messages` `message_delta` events ([#&#8203;46096](https://github.com/BerriAI/litellm/issues/46096))
- Fixed the `clear_tool_uses` polyfill ignoring `clear_at_least`, `exclude_tools` and `clear_tool_inputs` ([#&#8203;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 ([#&#8203;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 ([#&#8203;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` ([#&#8203;47434](https://github.com/BerriAI/litellm/issues/47434))
- Fixed canceled `/v1/messages` streams not closing the upstream request ([#&#8203;48220](https://github.com/BerriAI/litellm/issues/48220))
- Fixed `stop_sequences` being ignored for OpenAI models on `/v1/messages` ([#&#8203;48534](https://github.com/BerriAI/litellm/issues/48534))
- Fixed the client's `anthropic-beta` replacing the deployment's on `/v1/messages` ([#&#8203;48594](https://github.com/BerriAI/litellm/issues/48594))
- Fixed `/v1/messages` streams reporting zero `input_tokens` in `message_start` when bridged to Chat Completions ([#&#8203;48618](https://github.com/BerriAI/litellm/issues/48618))
- Fixed Anthropic-format `tool_choice` crashing input token counting and causing false budget refusals ([#&#8203;48624](https://github.com/BerriAI/litellm/issues/48624))
- Fixed 400 on `/v1/messages` caused by a non-spec `custom` object in tool definitions ([#&#8203;48893](https://github.com/BerriAI/litellm/issues/48893))
- Fixed Mistral thinking text being lost on streaming `/v1/messages` ([#&#8203;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` ([#&#8203;44822](https://github.com/BerriAI/litellm/issues/44822))
- Fixed Gemini Live ignoring `session.update` instructions and tools, and answering text clients with audio ([#&#8203;39864](https://github.com/BerriAI/litellm/issues/39864))
- Fixed `/health` reporting OpenAI realtime deployments with a missing or invalid key as healthy ([#&#8203;41233](https://github.com/BerriAI/litellm/issues/41233))
- Fixed sessions going silent when a transcript guardrail sent `turn_detection` with no `type` to OpenAI ([#&#8203;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 ([#&#8203;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 ([#&#8203;44614](https://github.com/BerriAI/litellm/issues/44614))
- Fixed `aws_polly/standard`, `long-form` and `generative` being sent with the `neural` engine ([#&#8203;47963](https://github.com/BerriAI/litellm/issues/47963))
- Fixed image generation ignoring `max_retries` and Router retries multiplying upstream attempts ([#&#8203;48705](https://github.com/BerriAI/litellm/issues/48705))
- Fixed async image edits with no image returning HTTP 500 instead of 400 ([#&#8203;48872](https://github.com/BerriAI/litellm/issues/48872))
- Fixed key and team `router_settings` being ignored on `/v1/images/generations` ([#&#8203;49286](https://github.com/BerriAI/litellm/issues/49286))
- Changed unsupported transcription providers to return 400 naming the provider and model instead of 500 ([#&#8203;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 ([#&#8203;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` ([#&#8203;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 ([#&#8203;40621](https://github.com/BerriAI/litellm/issues/40621))
- Fixed fine-tuning jobs failing with 400 for files uploaded with `target_model_names` ([#&#8203;46552](https://github.com/BerriAI/litellm/issues/46552))
- Fixed completed batches skipping success callbacks and losing usage under redaction ([#&#8203;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` ([#&#8203;47682](https://github.com/BerriAI/litellm/issues/47682))
- Fixed batch retrieve showing zero prompt and completion tokens ([#&#8203;47740](https://github.com/BerriAI/litellm/issues/47740))
- Fixed unbillable batches blocking file deletes and new-batch polling ([#&#8203;48752](https://github.com/BerriAI/litellm/issues/48752))
- Fixed unmanaged `gs://` Vertex batches being costed through the wrong deployment and reading zero spend ([#&#8203;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 ([#&#8203;47759](https://github.com/BerriAI/litellm/issues/47759))
- Fixed `/rag/ingest` and `/rag/query` ignoring team provider credentials and denying viewers and team JWTs ([#&#8203;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 ([#&#8203;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 ([#&#8203;48915](https://github.com/BerriAI/litellm/issues/48915))
- Improved Vertex AI Search vector store searches by reusing HTTP/2 connections and OAuth tokens ([#&#8203;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 ([#&#8203;47657](https://github.com/BerriAI/litellm/issues/47657))
- Fixed `/v1/messages/count_tokens` and `/utils/token_counter` failing on histories with a compaction block ([#&#8203;44784](https://github.com/BerriAI/litellm/issues/44784))
- Fixed DeepSeek V4 token counts missing Azure's billed tokens by using DeepSeek's own tokenizer ([#&#8203;47173](https://github.com/BerriAI/litellm/issues/47173), [#&#8203;47353](https://github.com/BerriAI/litellm/issues/47353))
- Fixed `count_tokens` overcounting PDFs about 12x for OpenAI and Azure models ([#&#8203;47554](https://github.com/BerriAI/litellm/issues/47554))
- Fixed token counts retrying a failed HuggingFace tokenizer download and adding about 23s per request ([#&#8203;47586](https://github.com/BerriAI/litellm/issues/47586))
- Fixed HTTP 500 when counting tokens for Anthropic search results and unsupported blocks ([#&#8203;48699](https://github.com/BerriAI/litellm/issues/48699))
- Fixed token counts for OpenAI models newer than the tiktoken table by using `o200k_base` ([#&#8203;48728](https://github.com/BerriAI/litellm/issues/48728))
- Fixed a loaded Hugging Face tokenizer being hidden when a later download fails ([#&#8203;48916](https://github.com/BerriAI/litellm/issues/48916))
- Changed Responses input token counts to match inference, fixing Claude counts with tools and `text.format` ([#&#8203;47363](https://github.com/BerriAI/litellm/issues/47363))
- Improved `token_counter` for inline `auto` images, including images under 768 pixels, with no HTTP requests ([#&#8203;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 ([#&#8203;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 ([#&#8203;46748](https://github.com/BerriAI/litellm/issues/46748))
- Added Authorization URL, Token URL and Scopes fields to OAuth Delegate and True Passthrough server forms ([#&#8203;46941](https://github.com/BerriAI/litellm/issues/46941))
- Added tool search and multi-select to the MCP toolset editor in the Admin UI ([#&#8203;48601](https://github.com/BerriAI/litellm/issues/48601))
- Added failure logging for MCP SDK request rejections, shown as `MCP: request_rejected` ([#&#8203;49184](https://github.com/BerriAI/litellm/issues/49184))
- Fixed `LITELLM_MCP_TOOL_LISTING_TIMEOUT` not applying to paginated `tools/list` on `/mcp` ([#&#8203;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 ([#&#8203;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 ([#&#8203;46745](https://github.com/BerriAI/litellm/issues/46745), [#&#8203;46747](https://github.com/BerriAI/litellm/issues/46747), [#&#8203;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` ([#&#8203;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 ([#&#8203;46940](https://github.com/BerriAI/litellm/issues/46940))
- Fixed 403 when `proxy_admin_viewer` stores its own MCP credentials ([#&#8203;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 ([#&#8203;47034](https://github.com/BerriAI/litellm/issues/47034))
- Fixed streamed MCP auto-execute billing only the first of its two model calls ([#&#8203;47422](https://github.com/BerriAI/litellm/issues/47422), [#&#8203;47445](https://github.com/BerriAI/litellm/issues/47445), [#&#8203;48899](https://github.com/BerriAI/litellm/issues/48899))
- Fixed an upstream MCP 429 on session handshake being reported as an internal error ([#&#8203;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 ([#&#8203;47595](https://github.com/BerriAI/litellm/issues/47595))
- Fixed per-user auth MCP servers missing from `/mcp-rest/tools/list` and `/mcp` `tools/list` ([#&#8203;47677](https://github.com/BerriAI/litellm/issues/47677))
- Fixed streaming MCP follow-ups on `/v1/responses` dropping all but the latest tool round ([#&#8203;47698](https://github.com/BerriAI/litellm/issues/47698))
- Fixed slow MCP tool calls delaying response headers until the SSE ping ([#&#8203;47897](https://github.com/BerriAI/litellm/issues/47897))
- Fixed MCP management routes to follow the gateway's existing access rules ([#&#8203;48080](https://github.com/BerriAI/litellm/issues/48080))
- Fixed a readonly MCP toolset URL returning every tool instead of only the toolset's tools ([#&#8203;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 ([#&#8203;48424](https://github.com/BerriAI/litellm/issues/48424))
- Fixed MCP toolset OAuth login advertising a resource URL that clients reject ([#&#8203;48474](https://github.com/BerriAI/litellm/issues/48474))
- Fixed revoked or expired browser sessions still being accepted during gateway authorization ([#&#8203;48494](https://github.com/BerriAI/litellm/issues/48494))
- Fixed MCP OpenAPI loading to accept valid YAML specs ([#&#8203;48622](https://github.com/BerriAI/litellm/issues/48622))
- Fixed MCP tools in both `allowed_tools` and `disallowed_tools` still being callable ([#&#8203;48625](https://github.com/BerriAI/litellm/issues/48625))
- Fixed MCP tools hidden by discovery guardrails still being callable by name ([#&#8203;48669](https://github.com/BerriAI/litellm/issues/48669))
- Changed admin-owned team keys to reach only their team's MCP servers and toolsets ([#&#8203;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 ([#&#8203;45467](https://github.com/BerriAI/litellm/issues/45467))
- Added request log entries for rejected A2A calls to forbidden or unknown agents ([#&#8203;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 ([#&#8203;47530](https://github.com/BerriAI/litellm/issues/47530))
- Fixed Gemini Managed Agents create returning 400 for `name` and interactions dropping inline `agent_config` ([#&#8203;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 ([#&#8203;49150](https://github.com/BerriAI/litellm/issues/49150))
- Fixed 404 on `/a2a/{agent_id}/message/stream` and `/v1/a2a/{agent_id}/message/stream` ([#&#8203;49471](https://github.com/BerriAI/litellm/issues/49471))
- Fixed agent `litellm_params.api_key` not being sent as bearer auth on A2A calls ([#&#8203;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 ([#&#8203;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 ([#&#8203;49485](https://github.com/BerriAI/litellm/issues/49485))
- Changed proxy refusals on `/a2a` POST routes to return JSON-RPC errors ([#&#8203;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 ([#&#8203;46219](https://github.com/BerriAI/litellm/issues/46219))
- Added `num_retries` to `generic_guardrail_api` for checks lost after connecting ([#&#8203;46965](https://github.com/BerriAI/litellm/issues/46965))
- Added a native Reco guardrail that blocks requests on Reco errors unless `fail_on_error: false` ([#&#8203;48243](https://github.com/BerriAI/litellm/issues/48243))
- Added Ovalix guardrail scanning of files, tool calls and tool results ([#&#8203;49309](https://github.com/BerriAI/litellm/issues/49309))
- Added `litellm.guardrails.apply` SDK helper to invoke configured guardrails and get native findings ([#&#8203;49460](https://github.com/BerriAI/litellm/issues/49460), [#&#8203;49469](https://github.com/BerriAI/litellm/issues/49469), [#&#8203;49470](https://github.com/BerriAI/litellm/issues/49470))
- Fixed guardrail masks on messages and tools not reaching Bedrock Converse requests ([#&#8203;45874](https://github.com/BerriAI/litellm/issues/45874))
- Fixed `generic_guardrail_api` rejecting Gemini native tools that have no `type` key ([#&#8203;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` ([#&#8203;47024](https://github.com/BerriAI/litellm/issues/47024))
- Fixed `hide-secrets` missing secrets in tool results, tool inputs, `tool_calls` arguments, and system prompts ([#&#8203;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 ([#&#8203;48060](https://github.com/BerriAI/litellm/issues/48060))
- Fixed pass-through guardrails scanning `litellm_metadata` fields added by LiteLLM, which caused false matches ([#&#8203;48276](https://github.com/BerriAI/litellm/issues/48276))
- Fixed `hide-secrets` ignoring `skip_tool_message_in_guardrail` ([#&#8203;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 ([#&#8203;48725](https://github.com/BerriAI/litellm/issues/48725))
- Fixed Responses tool results not reaching `texts` guardrails ([#&#8203;48827](https://github.com/BerriAI/litellm/issues/48827))
- Fixed `google_text_moderation` scanning embeddings input ([#&#8203;48934](https://github.com/BerriAI/litellm/issues/48934))
- Fixed guardrail blocks on streamed `/v1/messages` not returning Anthropic events ([#&#8203;49010](https://github.com/BerriAI/litellm/issues/49010))
- Fixed streamed `/v1/completions` skipping `post_call` guardrails for masking and blocking ([#&#8203;49035](https://github.com/BerriAI/litellm/issues/49035))
- Fixed mid-stream upstream errors on `/v1/messages` being turned into a guardrail 400 ([#&#8203;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 ([#&#8203;46953](https://github.com/BerriAI/litellm/issues/46953))
- Changed `lakera_v2` `on_flagged: block` to reject PII-only detections and added `on_flagged: mask` ([#&#8203;48944](https://github.com/BerriAI/litellm/issues/48944))
- Improved streaming by running sampled guardrail scans in the background so chunks no longer pause ([#&#8203;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 ([#&#8203;32096](https://github.com/BerriAI/litellm/issues/32096))
- Fixed `cache_control` being stripped from caller messages and tools, which broke caching on Claude fallbacks ([#&#8203;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 ([#&#8203;48917](https://github.com/BerriAI/litellm/issues/48917))
- Removed the disk cache backend, so `cache_params.type: disk` now stops proxy startup ([#&#8203;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 ([#&#8203;41127](https://github.com/BerriAI/litellm/issues/41127))
- Added Kubernetes pod discovery to spread load across pods behind a headless service `api_base` ([#&#8203;44342](https://github.com/BerriAI/litellm/issues/44342), [#&#8203;44393](https://github.com/BerriAI/litellm/issues/44393), [#&#8203;44666](https://github.com/BerriAI/litellm/issues/44666))
- Added opt-in filtering that keeps chat requests off deployments flagged as non-chat ([#&#8203;46257](https://github.com/BerriAI/litellm/issues/46257))
- Added the `x-litellm-priority` header to set request priority ([#&#8203;47618](https://github.com/BerriAI/litellm/issues/47618))
- Added opt-in session repinning to the replacement deployment after a successful failover ([#&#8203;48206](https://github.com/BerriAI/litellm/issues/48206))
- Added a `clamp` mode for complexity routing that keeps the caller's smaller output token limit ([#&#8203;48632](https://github.com/BerriAI/litellm/issues/48632))
- Added deployment `rpd` and `tpd` daily limits to `enforce_model_rate_limits` ([#&#8203;48875](https://github.com/BerriAI/litellm/issues/48875), [#&#8203;48957](https://github.com/BerriAI/litellm/issues/48957))
- Added inferring custom classifier tiers from model mappings, and fixed a crash on plan-mode requests ([#&#8203;48987](https://github.com/BerriAI/litellm/issues/48987))
- Fixed weighted failover skipping healthy same-group deployments under affinity ([#&#8203;32309](https://github.com/BerriAI/litellm/issues/32309))
- Fixed `content_policy_fallbacks` not applying after `POST /fallback` or `/config/update` changes ([#&#8203;45428](https://github.com/BerriAI/litellm/issues/45428))
- Fixed an explicit `allowed_fails: 3` not counting failures and fallbacks cooling down healthy deployments ([#&#8203;46183](https://github.com/BerriAI/litellm/issues/46183))
- Fixed a `bedrock_mantle` deployment's `mode` switching sibling deployments between Chat Completions and Responses ([#&#8203;46263](https://github.com/BerriAI/litellm/issues/46263))
- Fixed prompt caching affinity ignoring tools and the `/v1/messages` system prompt when choosing a deployment ([#&#8203;46411](https://github.com/BerriAI/litellm/issues/46411))
- Fixed all-cooled router 429 rows in SpendLogs not recording which deployments were cooling ([#&#8203;47120](https://github.com/BerriAI/litellm/issues/47120))
- Fixed `stream_timeout` cutting off slow answers when Bedrock serves a `stream=True` call without streaming ([#&#8203;47162](https://github.com/BerriAI/litellm/issues/47162))
- Fixed key and team `router_settings` reaching the provider and dropping retries, fallbacks and timeout ([#&#8203;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` ([#&#8203;47498](https://github.com/BerriAI/litellm/issues/47498))
- Fixed fallback retries logging a negative completion time and dropping latency-routed groups ([#&#8203;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 ([#&#8203;47565](https://github.com/BerriAI/litellm/issues/47565))
- Fixed cut Responses streams returning `server_error` instead of continuing on a fallback without prefill ([#&#8203;47672](https://github.com/BerriAI/litellm/issues/47672))
- Fixed `IndexError` and wrong deployment lookups when deployments are deleted or added concurrently ([#&#8203;47680](https://github.com/BerriAI/litellm/issues/47680))
- Fixed native Responses latency using different units than bridged responses in latency-based routing ([#&#8203;47727](https://github.com/BerriAI/litellm/issues/47727))
- Fixed the router sending image requests to `supports_vision: false` deployments in mixed model groups ([#&#8203;48149](https://github.com/BerriAI/litellm/issues/48149), [#&#8203;48152](https://github.com/BerriAI/litellm/issues/48152), [#&#8203;48241](https://github.com/BerriAI/litellm/issues/48241))
- Fixed Decisions calls routing to deployments whose provider does not support them ([#&#8203;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 ([#&#8203;48216](https://github.com/BerriAI/litellm/issues/48216))
- Fixed tag fail-open groups rejecting unmatched tags after affinity or cooldown filtering ([#&#8203;48470](https://github.com/BerriAI/litellm/issues/48470))
- Fixed one caller's exhausted forwarded Claude subscription putting the shared model into cooldown for others ([#&#8203;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 ([#&#8203;48490](https://github.com/BerriAI/litellm/issues/48490))
- Fixed complexity router replacing the held `user_turn` route on Codex compaction requests ([#&#8203;48627](https://github.com/BerriAI/litellm/issues/48627))
- Fixed session tier pins diverging between proxy workers when using Redis ([#&#8203;48645](https://github.com/BerriAI/litellm/issues/48645))
- Fixed nested environment references in router classifier connections being sent literally ([#&#8203;48717](https://github.com/BerriAI/litellm/issues/48717))
- Fixed lifecycle events not passing through on background OpenAI Responses streams that cannot fall back ([#&#8203;48817](https://github.com/BerriAI/litellm/issues/48817))
- Fixed new fallback rules erasing older ones when Redis refuses `DEL` ([#&#8203;48999](https://github.com/BerriAI/litellm/issues/48999))
- Fixed a deployment's own `model_id` being overridden by the request body's ([#&#8203;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 ([#&#8203;49054](https://github.com/BerriAI/litellm/issues/49054))
- Fixed streamed context window errors skipping fallbacks when they occur before any output ([#&#8203;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 ([#&#8203;49306](https://github.com/BerriAI/litellm/issues/49306))
- Fixed queued requests waiting until a 408 when a dead replica left expired scheduler queue entries ([#&#8203;49387](https://github.com/BerriAI/litellm/issues/49387))
- Changed per-deployment `reasoning_effort_levels` to apply on every provider and route, including `azure_ai` ([#&#8203;46601](https://github.com/BerriAI/litellm/issues/46601))
- Changed tag routing to use only prefixed caller tags once `tag_routing_prefix` is set ([#&#8203;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 ([#&#8203;48644](https://github.com/BerriAI/litellm/issues/48644))
- Changed `user_turn` routing so child agent requests keep their own tier pin ([#&#8203;48701](https://github.com/BerriAI/litellm/issues/48701))
- Changed Router init to reject string fallback targets that never routed ([#&#8203;48943](https://github.com/BerriAI/litellm/issues/48943))
- Removed the deployment `rpm` filter from `enable_pre_call_checks` ([#&#8203;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` ([#&#8203;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 ([#&#8203;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 ([#&#8203;48275](https://github.com/BerriAI/litellm/issues/48275))
- Added a per-guardrail spend breakdown to user, team and organization daily activity ([#&#8203;48702](https://github.com/BerriAI/litellm/issues/48702))
- Fixed …
pamanseau added a commit to KubeTEE-AI/litellm that referenced this pull request Nov 16, 2026
* fix(anthropic): stop logging rejected encrypted reasoning

The retry warning keeps provider, model, status, and error code, and leaves the ciphertext out.

Backport of the third #49076 commit to lts/1.108.x. Cherry-picked from c62c92d2ad0.

Co-authored-by: DDT <141296842+Hugo-DDT@users.noreply.github.com>

* fix(ollama): keep replayed tool arguments out of a rejected replay's error chain

Backport of #49183 to lts/1.108.x.
Cherry-picked from 0f7003a2aeb84651230b0fcbcb8403e4ed957af8 (fix-ollama-chat-stream-tool-call-index).

* fix(anthropic): start a new streamed block for each reasoning item

The backported Responses bridge tags each reasoning item's thinking block with its output index, but this line's Anthropic stream wrapper only opened a new block when the block type changed, so a second reasoning item of the same type was dropped. This ports the index check from #46863, which main already has.

* fix(anthropic): keep each streamed reasoning summary with its own item

A summary delta carries no item index, so the next item's summary joined the block that already got its signature. A thinking chunk after an indexed signature now opens a new block.

* fix(ollama): keep the repair warning's argument preview unless message logging is off

Backport of #49183 to lts/1.108.x.
Cherry-picked from 5ef6d62cca7e0a9a9e6db2609ca435e9b957de5e (fix-ollama-chat-stream-tool-call-index).
Adapted to the line. The repair warning lives in common_utils.py here.

* fix(anthropic): stream reasoning signatures only to Messages clients, keep xAI web search reasoning, and retry only when the sent request carried it

* fix(anthropic): send openai/ Messages turns again once without encrypted reasoning a backend rejects

The openai/ Responses path on /v1/messages had no retry, so a chatgpt/ block left in history answered 400 on every later openai/ turn. That path now sends the turn once more without encrypted reasoning, the same way the chat bridge does. The retry matches only invalid_encrypted_content or a "could not be verified" message naming the content, so the exception mapper's own hint no longer triggers it. The xAI web search keep path is backed out, since xAI sends no encrypted reasoning over the bridge.

Backport of 15e60170124 from #49076 to lts/1.108.x, ported by hand onto the pass_through modules.

Co-authored-by: DDT <141296842+Hugo-DDT@users.noreply.github.com>

* test(ollama): cover short and boundary-length repair warning previews

Backport of #49183 to lts/1.108.x.
Cherry-picked from 1f71ed377f459792b383bcd2bd1e5e4f4b2137ae (fix-ollama-chat-stream-tool-call-index).
Adapted to the line. The repair warning tests live in test_litellm_core_utils_prompt_templates_common_utils.py here.

* test(utils): drop a duplicate schema key the line already had on lts/1.108.x

The picks touch tests/unit/test_utils.py, so ruff now checks it, and
the line's model info schema lists supports_bedrock_native_structured_output
twice with the same value. The second copy goes

* fix(tool_choice): accept OpenAI allowed_tools on chat completions and flatten it for the Responses bridge (#49043)

Backport of #49043 to lts/1.108.x.
Cherry-picked from 28c80048ed47d53befd819f22b5ac1bb112ec3fd (main). Import conflicts in the Responses bridge and the Azure chat config resolved to the line's imports plus the helper import.

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* fix(tool_choice): accept the Responses API's flat allowed_tools layout on chat completions

Backport of #50467 to lts/1.108.x.
Cherry-picked from e56c060363c741b24579ecc01279c992d2d339d1 (litellm_allowed_tools_flat_tool_choice).

* fix(tool_choice): drop an allowed_tools choice under drop_params and refuse conflicting flat entries

Backport of #50467 to lts/1.108.x.
Cherry-picked from 361aecae72f2a9153a12b3998c90515f679896fd (litellm_allowed_tools_flat_tool_choice). Azure chat config import conflict resolved to the line's imports.

* fix(tool-choice): keep the 400 when LiteLLM runs the tools, report auto after a drop

Backport of #50467 to lts/1.108.x.
Cherry-picked from 5f8f54a6ca0dbd5bfc443b55e4c49e34b6b8176e (litellm_allowed_tools_flat_tool_choice). Conflicts resolved by applying this commit's hunks to the line's simpler Responses bridge handler and responses() bridge branch, and appending its new tests to the line's test files.

* fix(tool-choice): refuse an excluded tool right before LiteLLM runs it

Backport of #50467 to lts/1.108.x.
Cherry-picked from e25a82c3f54ff54178b5ebb98fb1da6a753e1fe2 (litellm_allowed_tools_flat_tool_choice). Conflicts resolved by applying this commit's hunks to the line's code. Test hunks that need main-only test helpers are carried by the line's test adaptation commit.

* fix(tool-choice): drop the choice under drop_params and hand an excluded MCP call back unrun

Backport of #50467 to lts/1.108.x.
Cherry-picked from be0bb7a57e55712476b903a8244802024416bd96 (litellm_allowed_tools_flat_tool_choice). Conflicts resolved by applying this commit's hunks to the line's MCP handlers and responses(). Test hunks that need main-only test helpers are carried by the line's test adaptation commit.

* fix(tool-choice): refuse an allowed_tools entry whose name is not a string

Backport of #50467 to lts/1.108.x.
Cherry-picked from 2ac020c070c7fdd47ec912f5ae334923ec85356c (litellm_allowed_tools_flat_tool_choice). Test hunks that need main-only test helpers are carried by the line's test adaptation commit.

* fix(tool-choice): honor server-level and null-name mcp entries and stop hooks running excluded calls

Backport of #50467 to lts/1.108.x.
Cherry-picked from 939034d8a4bc3a9f7d337471ca97738df933e300 (litellm_allowed_tools_flat_tool_choice). Resolved: tool_precheck.py is not on the line, so server_labels_serving lives in litellm_proxy_mcp_handler.py. The line has no refused-turn path, so a hook turn holding a call the choice excludes answers 400 through refuse_tool_calls_the_choice_excludes. Test hunks that need main-only fixtures move to the line test commit.

* fix(tool-choice): match named mcp entries by server label and let built-in entries allow their interception call

Backport of #50467 to lts/1.108.x.
Cherry-picked from 4755727276c84a50107c3d5aef9d398e7d0d4603 (litellm_allowed_tools_flat_tool_choice). Resolved: kept only this pick's helper and import where the line lacks main's sandbox result types and core_helpers import. Test hunks that need main-only fixtures move to the line test commit.

* fix(tool-choice): leave a malformed allowed_tools choice unrewritten in the interception hooks

Backport of #50467 to lts/1.108.x.
Cherry-picked from cd076fb13ab (litellm_allowed_tools_flat_tool_choice).

* fix(tool-choice): resolve mcp entries like the gateway and keep the choice on every hook path

Backport of #50467 to lts/1.108.x.
Cherry-picked from 6be4f0b9ead (litellm_allowed_tools_flat_tool_choice). Resolved: the line has no tool_precheck.py or agentic_loop_refusal.py, so the MCP label resolver lives in litellm_proxy_mcp_handler.py and mirrors the line's own toolset resolution (admin view and granted toolsets, no access-group fallback), and the line's toolset listing now calls the same resolver. A chat hook turn holding a call the choice excludes answers 400 through the line's AgenticLoopSafetyError path. Main-only code in the conflicted hunks (internal_sub_call, first-round billing, Claude Code web search prefix) is left out. Test hunks that need main-only fixtures move to the line test commit.

* fix(allowed_tools): stop web search and code interpreter follow-ups forcing another call

Backport of #50467 to lts/1.108.x.
Cherry-picked from 478fb95d6b1 (litellm_allowed_tools_flat_tool_choice). Resolved: test imports merged with the line's, and the tests that need main's web search fixtures move to the line test commit.

* fix(openai): refuse an openai chat hook call the allowed_tools choice excludes

The line's OpenAI chat handler runs its own agentic hook loop instead of
the shared one main uses, so the picked exclusion check never reached
it. This checks the response before a hook runs, like the line's HTTP
handler already does after the picks, and answers 400 when the model
called a tool the choice leaves out. Chat calls with an allowed_tools
choice answer 400 on the line today, so no call that succeeds changes.

* test(tool-choice): adapt the picked tests to lts/1.108.x

The picked test files reach a few names the line does not have, so this
ports them to the line's code without bringing those features over.
The MCP response tests stub the line's own proxy_server imports, the
web search tests get main's perplexity_search fixture, and the chat and
Responses hook tests expect what the line does. An excluded chat hook
call answers 400, and native /v1/responses hooks run as before since
the line cannot end a Responses turn early

* fix(allowed_tools): stop the Responses web search follow-up forcing another call

Backport of #50467 to lts/1.108.x.
Cherry-picked from 08eb785ee22 (litellm_allowed_tools_flat_tool_choice). Resolved: adds main's _WEB_SEARCH_FUNCTION_CALL test constant, which came with #38885 and is not on the line, and wraps one long test line.

* fix(responses): send a malformed allowed_tools choice as given on lts/1.108.x

On the line, native /v1/responses with gateway MCP tools passes any
tool_choice through to the provider, with or without drop_params, and
providers that accept a malformed allowed_tools choice answer 200. The
picks answer 400 for it without drop_params and drop it under
drop_params, so this keeps the line's behavior. The choice reaches the
provider unchanged and the gateway enforces nothing for it, while a
choice that parses still gets the picked rewrite and enforcement

* fix(tool-choice): keep an allowed_tools type with a function as a named tool choice on lts/1.108.x

On the line, a tool_choice of type allowed_tools that also carries a
function passes validation and reaches the provider as a named function
choice, so Anthropic and other providers that read function.name force
that tool and answer 200. The picks treat it as a malformed allowed_tools
choice, which answers 400 without drop_params and drops the choice with
it. This keeps the line's behavior, so such a choice is not read as an
allowed_tools choice anywhere and goes on as the named choice it was

* style(tool-choice): format called_tool_names on lts/1.108.x

* fix(tool-choice): keep the caller's allowed_tools choice on agentic follow-up calls on lts/1.108.x

On main the agentic follow-up keeps the caller's allowed_tools choice
under a reserved kwarg that main lists among its loop control keys.
That list does not exist on the line, so the line's acompletion dropped
the key and a follow-up call could run a hook call the caller's choice
leaves out. acompletion now passes the key on when the caller sent it or
sent an allowed_tools choice, and leaves every other call as it was

* fix(types): widen untyped request dicts for the allowed_tools refusal on lts/1.108.x

The line types the hook loop's kwargs and optional_params as plain
dicts, so passing them to the picked refusal helpers added unknown
argument errors that main does not have. They are now cast to
Mapping[str, object] at the call sites, and the loop settings reader
takes a Mapping

The new cast import in the agentic loop would grow the banned-API
count, so the duplicate function-level cast import in
llm_http_handler.py goes, since the module already imports cast

* fix(anthropic): keep every non-streamed reasoning item for Messages clients and read a deployment's reasoning_summary in the keep check

Backport of #49076 to lts/1.108.x.
Ported from cadfe1d1798 (cursor/chatgpt-encrypted-reasoning-messages-1723) onto the line's pass_through/adapters layout.

* fix(anthropic): keep every non-streamed reasoning item for Messages clients on the line's bridge

This line's transform_request rewrites the logging call_type to responses, so the non-streamed reply read the Messages-client check after the rewrite and kept only the last reasoning item. The bridge handler now reads it before the request transform and passes it to transform_response, as the streamed path already does.

* fix(anthropic): log only the outcome of a turn sent again, and keep every reasoning item in Messages logs on the line

A /v1/messages turn whose replayed encrypted block the backend rejects is sent
once more without it. The rejected first attempt no longer fires failure
callbacks or releases its parallel slot and budget reservation, so only the
turn sent again is logged and counted.

Success logs for a Messages client now keep every reasoning item of a
non-streamed turn, matching the reply the client got.

* test(anthropic): type the parameters of the failure-recording test loggers

Backport of 3d53f0047d1 (#49076) to lts/1.108.x.

* test(anthropic): type the success logger and use a fixed token expiry in the bridge tests

* fix(anthropic): skip the SDK num_retries retry for an attempt that is sent again

* fix(anthropic): stop SDK retries from resending a rejected block or clearing the global num_retries

A transient 429 or 500 on a /v1/messages turn that carries a replayed encrypted
block was retried by an SDK call's num_retries loop, which sent the block again
until every retry was rejected. On async calls the loop then raised the first
transient error, so the turn failed instead of being sent again without the
block. The retry loop now stops at that rejection and passes it on, so the turn
is sent again once without encrypted blocks.

A rejected first try on a sync call also cleared the process-wide
litellm.num_retries, so later calls in the process were no longer retried. That
setting now stays as configured.

* fix(anthropic): stop a cancelled SDK retry from starting another call

The resent-failure retry predicate returned true for BaseException
subclasses such as asyncio.CancelledError, so a cancelled
acompletion_with_retries or aresponses_with_retries call could start
another provider call. Retry only Exception subclasses again, as
tenacity's default did, while still skipping a resent failure.

* test(anthropic): type the retry helper parameter in the cancellation test

* test(integration): backport main's Gateway.rows, Scenario.model name and MCP ack fix to lts/1.108.x

Backports test-only changes from main so the line's integration signal stops reporting stale helpers as failures.

Gateway.database_url and Gateway.rows come from #47213 (fc27dfdc7d), and the name keyword on Scenario.model comes from #48917 (ebf84f8649). Only those hunks of tests/integration/_support/client.py are taken. The rest of #47213 gives each owned proxy its own database and Redis, which none of the line's tests need, and the workers field from a later main change is left out.

The MCP progress and cancellation test wraps its upstream in _acknowledge_notifications_after_dispatch, from #49967 (b5952f243a). The helper is already on the line.

* fix(bedrock)!: backport #47429 deployment guardrailConfig on /bedrock pass-through routes to lts/1.108.x

The router-model pass-through dropped a Bedrock deployment's guardrailConfig, so converse, converse-stream, invoke and invoke-with-response-stream reached Bedrock unguarded while /v1/chat/completions on the same deployment was blocked. The signer now sends it the way Bedrock reads it, in the body for Converse and as the X-Amzn-Bedrock-Guardrail* headers for Invoke, replacing any guardrail the caller sent

Adapted to the line, which does not have #47040. The guardrail headers are merged through merge_bedrock_invoke_headers without the request metadata header, and the unit tests drop the request metadata assertions and the identity argument that only #47040 needs

* refactor(bedrock): drop the unused converse URL helper and cover a trailing-slash converse pass-through

* test(e2e): repin the Together reasoning replay backend to MiniMax-M3.1-Flash

MiniMax-M3 reached its 2026-11-06 deprecation date in the cost map, which names MiniMax-M3.1-Flash as its successor

(cherry picked from commit 90f7ab6fe6837152b21617c8cb7dc73a541c42e9)

* fix(sdk): backport #45961 to lts/1.108.x

completion() loaded the MCP gateway handler for any request with tools,
and the handler pulls in mcp 2.x only code, so tool calls failed on
installs with mcp 1.x (google-adk 1.36.1) or no mcp at all

Cherry-picked from 783cf06f31. Only conflict was import context in
litellm/responses/main.py

(cherry picked from commit 783cf06f31e55e8f7ab84c2d7c708b0d90e68001)

* fix(router): serve a team's wildcard deployment before a proxy-wide wildcard (#48490)

Backport of #48490 to lts/1.108.x.
Cherry-picked from 76d001a7c06d5dbf93f9191b247db0ef981b6c66 (main). The line has no wildcard_routed_models helper and no get_models_by_pattern, so only wildcard_route_deployments is changed.

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* fix(videos)!: keep model_id in proxy video ids so per-model keys resolve on status/content (#44614)

Backport of #44614 to lts/1.108.x.
Cherry-picked from ba61ecdf570c91a2409560138170ff9ab1fe7ad7 (main). The line has no splits_stream_timeout on _update_kwargs_with_deployment, so only the _video_call_pin wrapping is added around deployment selection. The line has no litellm/llms/base_llm/videos/async_task_utils.py, so its _id_safe_name dedupe is applied to the dashscope video transformation that holds the same helper on this line.

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* chore: bump litellm 1.108.3 -> 1.108.4

litellm 1.108.3 already shipped, so the next release off this line is 1.108.4

* fix(proxy): check s3 URIs inside encoded file ids and on queued chat completions

The s3 media check now decodes model-embedded and unified file ids, since
completion() turns them back into the raw s3 URI they carry. The
/queue/chat/completions endpoint skips common request processing, so it now
runs the same check. The media walk goes level by level instead of
recursing, which the recursive_detector code-quality step requires.

(cherry picked from commit 5b45c632c57fd46b9dda537b694edcda2e0f41d3)

* fix(anthropic-messages): apply additional_drop_params before the unsupported param checks

* fix(proxy): let a key send managed file ids it may read and refuse s3 sources hidden in model_file_id_mapping

The s3 media gate refused every LiteLLM managed file id whose upload sits under the
managed prefix, even when the key's own user or team created it. It now asks the
managed files hook which unified ids the key may read and skips only the objects
those ids embed. A forged or unowned id, or a proxy without the hook, still gets a 403.

The gate also reads the provider file ids in a client-supplied model_file_id_mapping,
so an alias can no longer point a non-admin request at an unlisted or managed object.

Markdown documents (.md, .markdown) now map to Bedrock's md document format, so an
s3 Markdown source without an explicit format no longer fails with an unknown media type.

On lts/1.108.x the gate still walks the body before it reads the key role, so callers that pass a
specced UserAPIKeyAuth mock keep working, and it reads self.data and general_settings directly
since the line has no raw_request_fields.

(cherry picked from commit 37f085c966dd83e84b646eb3acbdfbaef7b6b0db)

* fix(mcp): refuse a hook call the allowed_tools choice excludes on every surface

The line has no terminal-response path outside Anthropic Messages, so the check skipped /v1/responses and streamed hook loops and the excluded call ran. It now raises AgenticLoopToolChoiceError there too

* fix(mcp): scope each MCP entry to its own allowed_tools and keep the allowlist on follow-ups

A label now covers only the tools its own allowed_tools lists, so a second label on the same server no longer widens it. Responses MCP follow-ups, streamed or not, keep an allowed_tools choice in auto mode instead of dropping it. The new Responses tests fake only the upstream MCP listing, so LiteLLM's own discovery runs

* fix(agentic): answer a 400 when an allowed_tools choice excludes a hook call on /v1/responses

The line cannot end a Responses turn early, so the refusal was re-raised as a
plain error and reached clients as a retryable 500. It now answers the same 400
the chat path gives for an excluded call. The stream path still raises the
safety error its iterator catches.

* fix(mcp): match an entry's allowed_tools against the tool name the gateway lists

A server with a display name override lists the display name, and the listing
filter matches allowed_tools against it, but the label scope only checked the
original name, so no spelling worked. The scope now also accepts the listed
name and its unprefixed part, like the listing filter. Tests now cover the
whole gateway and toolset entries and a display-named tool.

* fix(proxy): keep inline tool-result video dropped and let an admitted client AWS identity skip the s3 bucket list

A tool result forwards a video to Bedrock only when it is an s3Location. An inline
base64 video is dropped with a warning, as it was before this change, since Converse
rejects video in a toolResult block

A non-admin key that sends an AWS identity its deployment admits through
configurable_clientside_auth_params (aws_role_name, aws_web_identity_token or
aws_profile_name) skips the bucket list, because Bedrock then reads the object with
that identity. The managed-prefix 403 still applies

The check now skips the body walk when no string starts with s3:// and no file_id or
model_file_id_mapping key is present, which keeps large image bodies cheap

Adapted for lts/1.108.x. The per-frame check on WS /v1/responses is not ported,
because this line has no Responses WebSocket frame guard to hook it into. The gate
keeps this line's admits_s3_bucket allowlist and its order of walking the body
before the admin role check

(cherry picked from commit 6662cb34d768bd68a7dc34ea27c363a1bd7f6578)

* feat(decisions): support Vercel AI Gateway decision models

Backport of #50642 to lts/1.108.x.
Cherry-picked from bdd017e908e2380de83b059b08c9363431227666 (mishdotdev:vercel-ai-gateway-decisions).
Adapted to the line: the line registers decisions configs in its own if-chain and lazy-import tables, and its OpenAI decisions config has no resolve_credential hook, so only resolve_api_key is overridden.

* test(decisions): cover Vercel AI Gateway dispatch through the proxy

Backport of #50642 to lts/1.108.x.
Cherry-picked from dd1057b018f8bce2408627a15ea7e7a65c2e33b1 (mishdotdev:vercel-ai-gateway-decisions).
Adapted to the line: the new test is appended to the line's own copy of the test file, whose tail differs from main's.

* feat(decisions): add Vercel AI Gateway cost map rows for Jev

Backport of #50642 to lts/1.108.x.
Cherry-picked from 3f9539201cef70aa965fc494fbdb3179b6560c1f (mishdotdev:vercel-ai-gateway-decisions).

* fix(decisions): bill Vercel AI Gateway decisions at the charge Vercel reports

Backport of #50642 to lts/1.108.x.
Cherry-picked from 7c40b75f5657ec067f9a6fe2c7c91f8662c81a78 (mishdotdev:vercel-ai-gateway-decisions).
Adapted to the line: its decisions usage is never None, so the None guards are dropped, and the resolve_credential override stays out as in the first pick.

* fix(decisions): bill Vercel gateway charges with margin and BYOK, forward providerOptions

Backport of #50642 to lts/1.108.x.
Cherry-picked from 1f50a7c91f5032cbd350ab71af204245f2c640a7 (mishdotdev:vercel-ai-gateway-decisions).
Adapted to the line: the line has no upstream_usage_cost billing path (main got it in #48953), so the reported charge still goes out as the line's response-cost header and the operator discount and margin do not apply to it there, the same as OpenRouter decisions on the line. The image check is resolved once per request beside the line's box-question check, and the tests read the billed cost the way the line bills it.

* fix(proxy): check s3 media on every Responses WebSocket frame on the LTS line

The managed Responses WebSocket handler calls litellm.aresponses once per
response.create frame, and the HTTP s3 media check only saw the first frame as a raw
JSON string. A non-admin key could send an s3 object from an unlisted bucket, or one
under LiteLLM-managed storage, to Bedrock over WS /v1/responses

The WS route now hands the handler a frame check bound to the connection's key,
general_settings, managed files hook and router. The handler runs it on the params it
is about to forward for every frame, the first one included, and a refused frame gets
an invalid_request_error frame with the 403 message while the socket keeps serving
later frames

* fix(decisions): stop forwarding caller providerOptions to Vercel and send Jev images

Backport of #50642 to lts/1.108.x.
Cherry-picked from c8122bc6a5305fd8ce0bc3c1d534581d4dd1227a (mishdotdev:vercel-ai-gateway-decisions).
Adapted to the line: decisions/call.py goes back to the line's own version, since the line never had the per-model support record main edits here, and the discount and margin test this commit touches on main is not on the line.

* fix(decisions): report provider charges on the cost header and read Vercel's cache split from the serving provider

Backport of #50642 to lts/1.108.x
Cherry-picked from ec26925103f82742866219bd73d19f88cc3de84e (mishdotdev:vercel-ai-gateway-decisions)

The Jev 1.13.0 and 1.14.0 rows record their image probes

Conflicts resolved to main's result. The call.py hunk is dropped because the line already reports provider charges on the response-cost header. The proxy test keeps only its paid call, since the line's proxy drops a zero response-cost header for every provider

* fix(proxy): let a client AWS identity skip the s3 bucket list only when Bedrock signs with it

An admitted aws_role_name, aws_web_identity_token or aws_profile_name now skips the
bucket list only when it decides the credentials get_credentials picks, on every
deployment of the model group. A web identity token without a role and a session
name does not, since get_credentials then ignores it. A profile does not when the
deployment or the environment sets a role, since the role branch runs first. In
those cases Bedrock still reads with the proxy's credentials, so the bucket list
applies

BaseAWSLLM.identity_choosing_params mirrors the branch order of get_credentials, and
both read the same AWS_* environment fallbacks through one helper

Ported to lts/1.108.x, where the model group is read with Router.get_model_list

* fix(mcp): match an entry's allowed_tools only against a server's own prefix, and a tool no server resolves only by its exact name

* fix(proxy): keep the s3 bucket list for non-admin keys that send a client AWS identity

A client AWS identity field does not prove that the caller can read the bucket. A
role or profile name picks credentials the proxy holds, and Bedrock reads the object
with them. So the bucket list now applies to every non-admin s3 media part, whatever
AWS identity fields the request sends. allow_client_side_credentials: true still
turns it off

This removes BaseAWSLLM.identity_choosing_params and the router lookup that only the
skip needed

Ported to lts/1.108.x

* fix(cost): bill transcriptions by the seconds the provider reports

Line port of the usage.seconds billing slice onto lts/1.108.x: normalized_audio_duration_seconds and _get_transcription_usage_duration from #35600 (ecb8ef5ca8), and the provider-seconds-first _transcription_duration_for_cost from #50727 (dfb1aac8b1), with their unit tests. The rest of #35600 stays on main.

* fix(transcription): treat libsndfile's unknown frame count as no duration

Backport of #50842 to lts/1.108.x.
Cherry-picked from e6a0534785 (litellm_transcription_unknown_frame_count).

* refactor(transcription): inline the unknown frame count check

Backport of #50842 to lts/1.108.x.
Cherry-picked from b6d25f2752 (litellm_transcription_unknown_frame_count).

* fix(transcription): read the frame count once to keep the type gate flat

Backport of #50842 to lts/1.108.x.
Cherry-picked from 54dcd9230f (litellm_transcription_unknown_frame_count).

* test(transcription): annotate the new passthrough test's locals as Final

Backport of #50842 to lts/1.108.x.
Cherry-picked from eb0f251b47 (litellm_transcription_unknown_frame_count).

* feat(openai)!: honor per-deployment workload identity on non-chat routes (#39966)

Backport of #39966 to lts/1.108.x.
Cherry-picked from b39eadcb8228e05b76506df78fa2723628494669 (main).

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* fix(mcp): refuse a tool whose display name only looks like an allowed name, and let the chat follow-up answer

An MCP entry's allowed_tools now matches a tool only by its exact listed name or a spelling routing
accepts for its real name, so a display name that carries the server's own prefix no longer passes for
another tool. The chat MCP follow-up keeps an allowed_tools choice in auto mode, so the model can answer
with text after the tool ran.

* chore: bump litellm 1.108.4 -> 1.108.5

litellm 1.108.4 already shipped, so the next release off this line is 1.108.5

* fix(mcp): match a toolset label's tools by exact native name

A toolset label served any tool whose name a routing spelling of a granted name matched, so a toolset granting the literal name "server-tool" also served the real tool "tool" that only another toolset grants. It now serves a tool only when the toolset grants its exact native name, the same check tool_is_granted uses when the gateway lists tools

* feat(bedrock): search knowledge bases by image and return image hits

vector_stores.search and asearch take a query_image (base64 jpeg, png, gif or webp), and query is optional when it is sent. Bedrock sends it as an IMAGE retrievalQuery, and a caller's own retrievalQuery in extra_body still wins

Bedrock IMAGE hits now come back as image content items instead of being dropped. The media type comes from the source file mime type metadata, then the data URI label, then application/octet-stream

A request with both query and query_image, with neither, or with a malformed image gets a 400. So does query_image on a provider without image search, unless drop_params is on. The proxy accepts query_image in place of query on /v1/vector_stores/{id}/search

Spend logs redact image data when prompts are not stored. Emulated file_search skips image-only hits, RAG rerank maps its indices to the text documents it ranked, and the dashboard tester renders image hits

(cherry picked from commit 55587c70122fc0fa4369cc23886e753a91b47ee0)

* fix(vector-stores): keep image hits to image searches and reject a caller retrievalQuery

Port of the main branch change. Text searches return the same text hits as before, image hits come back only for query_image searches, a caller retrievalQuery answers 400 or drops under drop_params, a file_search tool carrying query_image searches again, and a non-string query next to an image answers 400

On this line the typed views use as_str_mapping and a local list helper, since decoded_json_object and as_object_list are not on lts/1.108.x

(cherry picked from commit 65a7206199c4c51b46084f8417bf7235d33fd378)

* fix(compresr): let the retrieve call run under an allowed_tools choice on lts/1.108.x

The line's CompresrGuardrail did not list compresr_retrieve in server_fulfilled_tool_names, so the allowed_tools exclusion check counted the model's retrieve call as excluded and the request answered 400. Main has declared it since #49227, and this adds the same attribute with a regression test

* fix(usage): restore per-user spend breakdown on the user aggregated route (#49464)

Backport of #49464 to lts/1.108.x. Cherry-picked from 639625d6791e9236cb12e72790fdf7f00fc55323 (main).

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* style: preserve spacing around the user metadata helper

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* test(translation): expect encrypted reasoning in message responses (#50576)

Co-authored-by: mateo <277851410+mateo-berri@users.noreply.github.com>
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
(cherry picked from commit 7617e66acfe1f3f9bb2984646c7da7c2f7d9db1b)

* test(integration): decode video ids with the product decoder in the callback delivery test

Ports only the tests/integration/observability/test_callback_delivery.py hunk of #47600. Video ids on this line now carry a ;deployment_id: suffix after #50693, so splitting on video_id: kept the suffix. The shares_worker_state pytestmark from that hunk's context belongs to a change not on this line and is left out

(cherry picked from commit e78f7b4602c15a5328f6f211c4bc9f3d664e1d50)

* test(integration): let an owned proxy opt into a private database and Redis

Ports the harness part of #47213 (process.py, workers.py, the remaining client.py hunks and its unit tests) so owned_proxy and owned_proxy_process accept state=OwnedState.PRIVATE and boot on a scratch database and their own redis-server, and Scenario cleanup checks read the database the proxy writes to.

Adapted for this line. Main makes private the default and marks 189 test files with shares_worker_state to keep them on the worker's state. This line keeps the worker's state as the default, so no existing test changes behavior and only callers that pass state=OwnedState.PRIVATE go private. The isolated_gateway rewrite and the conftest marker plumbing are left out, and the unit tests cover the shared default plus the explicit private opt-in

(cherry picked from commit fc27dfdc7d9be704a1c5bffb9c954caeae9dc886)

* test(integration): run the body upload disconnect test on a private database

Ports only the tests/integration/observability/test_guardrail_effects.py hunk of #49310. The test asserts the only spend row is its own control call, so on the shared worker database it picked up rows other tests wrote

(cherry picked from commit fbd126e5182040a5ed8b97d54d41b5febc94452b)

* test(compresr): annotate the allowed_tools choice test's locals as Final

* test(integration): give each kill-burst its own prompts so cached control replies cannot stand in for late traffic (#50569)

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
(cherry picked from commit 0d0bf8f75f63a9c76ab75d121cdd6b7f498f2607)

* fix: make scheduled key, user, and team spend resets idempotent (#50298)

Backport of #50298 to lts/1.108.x.
Cherry-picked from ac08eb566314a2dec9f73ede0bb8c687118b5608 (main).

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* fix(proxy): add execute_raw to the PrismaBatch protocol

Prerequisite for the #50298 backport to lts/1.108.x, which queues guarded raw spend resets on the batch.
Hand-ported from 24a7bf6af728272eca2ba3277a2f3cdfa7e60863 (#48260, main).

* fix(azure): accept explicit v1 Responses bases (#48072) (#48118)

Backport of #48118 to lts/1.108.x.
Hand-ported from 96abce842b (main): the line lacks #46377's api-version resolution helpers.

* fix(azure): send no api-version on Foundry project /openai/v1 Responses bases

Backport of the main fix on branch litellm_azure_responses_project_v1_api_version to lts/1.108.x.
Cherry-picked from 2a8cdecb15 and adapted to the line's get_complete_url.

* fix(vector-stores): redact query images and keep store search params out of image checks

(cherry picked from commit 0574a8e11965c95dac58ffe037064ff43bf6846b)

* fix(mcp): backport #50717 to lts/1.108.x

Cherry-pick of e6db6206d1 with module paths moved to litellm/proxy/_experimental/mcp_server.

* fix(responses): keep unset-effort gpt-5.4/5.5 tool calls on chat completions (#50968)

Backport of #50968 to lts/1.108.x.
Cherry-picked from d47c03175bba41a39c4c3f8a947e28938708eef2 (main).

Line adaptation: the line has no bridge_reasoning_effort helper or deployment-pinned
routing mode, so the bridge-flag tests pass the effort directly and skip the mode pin.

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* fix(vertex_ai): bill gemini image edits by token usage (#51038)

Backport of #51038 to lts/1.108.x.
Cherry-picked from 53e1e9b87b36dabed967b17338948535020b7abc (main).

Line adaptation: the line has no map_vertex_image_size or the Gemini image-size tests, so only
the usage test and the token-usage response path come across.

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* test(mcp): backport #51065 to lts/1.108.x

The connect check regression test mocked the credential reader, so a broken
stored grant still passed. It now saves the grant with the real writer into an
in-memory table and lets the connect check read and decode it.

Cherry-picked from 478d9bf5d2 on main, with module paths moved to
_experimental/mcp_server.

* fix(vector-stores): redact images nested in extra_body and keep a store's extra_body retrievalQuery out of searches

(cherry picked from commit c99fd3631b256caf20bdc5eab530226d02be0b80)

* fix(responses): read reasoning_effort from extra_body for the bridge gate

Minimal prerequisite for #50968 on lts/1.108.x: the bridge_reasoning_effort and
str_keyed_mapping helpers from 897dda7920 (#46263, main), so a reasoning_effort sent
in extra_body still bridges gpt-5.4+ function-tool calls now that an unset effort
stays on chat completions.

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* fix(vector_stores): keep a caller's image query through store and router params

A deployment's retrievalQuery no longer reaches a routed search, a caller's query fields survive a store's own extra_body, and an extra_body image stops before the provider. file_search forwards rewrite_query, both retrieval query spellings are redacted, and the cost error stops echoing the response when message logging is off

(cherry picked from commit c65634d4ade59d5c06dabacb946b77161aa79365)

* feat(azure_ai): support gpt-image edits on Azure AI Foundry

Foundry hosts gpt-image deployments on the same /openai/deployments/{deployment}/images/edits route as Azure OpenAI, but the azure_ai image-edit factory only knew MAI and FLUX, so gpt-image-2 and the gpt-image-2.5 models raised a ValueError before any request was sent

Reuse AzureImageEditConfig for the request, URL, and multipart handling, and resolve the api_base and credentials with the azure_ai helpers

Co-Authored-By: AaronHowell <111272993+AaronHowell@users.noreply.github.com>
(cherry picked from commit 4c29e1846a7de81bc986f23058c91816be2e5581)

* fix(azure_ai): default gpt-image edits to an edit-capable api-version

Foundry gpt-image edits now fall back to 2025-04-01-preview when no api_version is set, since the shared Azure default 2025-02-01-preview answers 404 on /images/edits. The config returns merged headers instead of updating the caller's dict, and the tests check the request each gpt-image model sends

(cherry picked from commit 233a0d99f12c939f1050b67324e83aeb0c42dc23)

* fix(azure_ai): ignore the Azure OpenAI api-version env for Foundry gpt-image edits

The proxy CLI always sets AZURE_API_VERSION to 2025-02-01-preview, which
Foundry answers with 404 on image edits. gpt-image edits now read only
litellm_params, AZURE_AI_API_VERSION, and litellm.api_version before the
2025-04-01-preview default, matching the other azure_ai edit configs

(cherry picked from commit c93fd388d4d34e865b426b1d53297f469734fad4)

* fix(azure_ai): route custom Foundry deployments, require a Foundry api_base, and honor caller auth for gpt-image edits

A deployment name the edit factory does not recognize now uses the gpt-image route instead of raising, since Foundry deployment names are free-form. A gpt-image edit with no Foundry api_base raises like the MAI and FLUX configs instead of borrowing AZURE_API_BASE. The shared edit handler passes the call's extra_headers to validate_environment, so a caller's api-key or Authorization header is sent alone

(cherry picked from commit 6be34701e6bc69d43659e5b9068cdd149cf5c9cf)

* fix(azure_ai): keep the shared edit handler unchanged and send caller auth headers like azure_ai chat

(cherry picked from commit 31348e4c5f90c85fbf4e981e73ccb258eea9431e)

* fix(cost): leave image search responses out of the cost error text

(cherry picked from commit b892162eb3dfc7c7d8bf24d54130ee9e794832c3)

* fix(vector_stores): accept line-wrapped base64 in query_image data

Bedrock takes inlineContent wrapped with \n or \r\n line breaks, as plain base64 writes it, so the check ignores only those before decoding and the data goes to Bedrock as sent

(cherry picked from commit c2cad843b07609f3d216a46db6150c186568d595)

* chore: bump litellm 1.108.5 -> 1.108.6

litellm 1.108.5 already shipped, so the next release off this line is 1.108.6

* fix(usage): keep spend when metadata lookups hit database failures (#50253)

* fix(usage): tolerate entity metadata database failures

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* fix(usage): keep spend when metadata lookups hit database failures

Treat transport errors and the query engine crash on a closed connection as database
failures in the key, user and guardrail lookups of the aggregated, keys, users,
model_top_keys and cache_leakage_keys routes, and keep prisma out of module-level imports
so a proxy install without prisma still imports the usage endpoints.

* fix(usage): fall back only on database outages, on every daily activity route

Data-layer Prisma errors such as a rejected query or a missing table return 500 again, a key whose details failed to load reports key_exists null instead of false, and the non-aggregated daily activity routes keep spend when the key or entity metadata lookup hits an outage

* fix(proxy): skip the key metadata lookup when the daily rows carry no keys

* fix(usage): keep the guardrail breakdown fallback for any Prisma error

A missing guardrail usage table or column made the Usage call return 500 after the outage-only narrowing. The guardrail lookup now falls back on outages and on any Prisma error, as it did before this PR

* fix(usage): keep spend when the team, organization, customer, or agent name lookup drops

---------

Co-authored-by: mateo <277851410+mateo-berri@users.noreply.github.com>
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
(cherry picked from commit 5d66f2d8ff55378ee01c0cb04f3193330dc09e83)

* fix(ci): install tzdata so zoneinfo tests pass on runners without legacy tz aliases (#51057)

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
(cherry picked from commit ebd5a15b22ba012d2f5a5ee654afc93cd51add5e)

* fix(baseten): forward reasoning_effort to Baseten Model API (#40152)

* fix(baseten): forward reasoning_effort to Baseten Model API

Baseten's Model API accepts a top-level reasoning_effort parameter and
validates it server-side (https://docs.baseten.co/inference/model-apis/reasoning),
but BasetenConfig.get_supported_openai_params did not list it, so LiteLLM
silently dropped it when drop_params=True and raised UnsupportedParamsError
otherwise.

Add reasoning_effort to the supported params so map_openai_params forwards
it verbatim, mirroring the hosted_vllm and deepseek providers. Baseten
returns a clear 400 for values outside a model's supported set and ignores
the parameter on non-reasoning models, so verbatim passthrough is safe for
the whole catalog.

[Claude_Code]

* fix(baseten): forward reasoning_effort to Baseten Model API

Baseten's Model API accepts a top-level reasoning_effort parameter and
validates it server-side (https://docs.baseten.co/inference/model-apis/reasoning),
but BasetenConfig.get_supported_openai_params did not list it, so LiteLLM
silently dropped it when drop_params=True and raised UnsupportedParamsError
otherwise.

Add reasoning_effort to the supported params so map_openai_params forwards
it verbatim, mirroring the hosted_vllm and deepseek providers. Baseten
returns a clear 400 for values outside a model's supported set and ignores
the parameter on non-reasoning models, so verbatim passthrough is safe for
the whole catalog.

---------

Co-authored-by: ryan-crabbe-berri <ryan@berri.ai>
(cherry picked from commit 13335266f59a822dcafaadf7329c6a938867c265)

* fix(baseten): list current Model APIs instead of retired 2023 deployment IDs (#46945)

* fix(baseten): list current Model APIs instead of retired 2023 deployment IDs

`baseten/*` wildcard expansion and `/v1/models` read a hardcoded set of
three 2023 deployment IDs (Falcon 7B / WizardLM / MosaicML) that no longer
exist, while the model cost map already carries current Baseten entries.

- Populate `baseten_models` from the model cost map, like fireworks_ai.
- Add `BasetenConfig.get_models()` against the Model API `/v1/models`
  endpoint and register it in `ProviderConfigManager.get_provider_model_info`,
  so `check_provider_endpoint: true` returns the live catalog.
- Remove the retired deployment IDs from `constants.py`.

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

* fix(baseten): mark retired Model APIs deprecated and skip them in listings

15 Baseten entries in the model cost map are no longer servable: the Model
API returns 410 "model version ... has been deprecated" (DeepSeek-V3.1
returns 400 deactivated), and none appear in `inference.baseten.co/v1/models`.

- Set `deprecation_date` on those entries (kept for spend tracking).
- Skip entries past their `deprecation_date` when building `baseten_models`,
  so `baseten/*` expansion only lists models that still serve.

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

* test(baseten): assert the custom api_base model listing on the returned models

The custom api_base test only inspected the patched client's call args, which trips the
TQ002 mock-echo gate. Serve the custom URL with respx and assert on the models that come
back instead, so a wrong host or a broken parse both fail.

* fix(baseten): drop newly retired models on cost map reload and fake discovery at the HTTP boundary

A cost map refresh only ever added to the Baseten set, so a model that gained a past
deprecation_date after boot stayed listed under baseten/* until restart. Discard it on reload.

Tests now serve the catalog with respx instead of patching our own HTTP client, the
isinstance registration test is gone since the get_valid_models test already proves
discovery end to end, and new test locals carry Final.

---------

Co-authored-by: AlexKer <AlexKer@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: ryan-crabbe-berri <ryan@berri.ai>
(cherry picked from commit 3eeee3e76118783671bd7c9dd44a192eedf917ad)

* fix(router): route decisions calls only to deployments whose provider supports decisions (#48175)

* fix(router): route decisions calls only to deployments whose provider supports decisions

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* test(router): account for indirect route helper coverage

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* test(router): pin the chat leg so the mixed-group check is deterministic

Weights pick the Bedrock leg for chat instead of relying on simple-shuffle landing on both legs. The route filter now passes the candidate list through unchanged in type, so the pre-existing selector lines lose their pyright ignores

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

---------

Co-authored-by: joshua <joshua@berri.ai>
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
(cherry picked from commit 4710c3b30e5c1459dbb11a060ad733ee06f06c18)

* fix(responses): keep every MCP tool round in streaming follow-up input (#47698)

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: ryan-crabbe-berri <ryan@berri.ai>
(cherry picked from commit f1795e6d447a4e5a3660de0d2fde5e1f44f52929)

* fix(responses): skip failed spend-log turns when rebuilding a session from previous_response_id (#48647)

* fix(responses): skip failed spend-log turns when rebuilding a session from previous_response_id

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* fix(responses): guard the failed-turn status read and annotate the regression test locals

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

---------

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
(cherry picked from commit df9091deb666f0d689c7df01056374569019c03e)

* fix(responses): reject or drop Responses params the chat completions bridge cannot translate (#48655)

* fix(responses): reject or drop Responses params the chat completions bridge cannot translate

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* fix(responses): keep additional_drop_params working for Responses fields the bridge cannot translate

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* Update litellm/responses/main.py

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>

* style(responses): drop the blank line ruff format rejects after the dataclass header

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

---------

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
(cherry picked from commit e32d8a4d03f62ca0ec123e0a9377f6be32653bc0)

* fix(vector_stores): drop rewrite_query false from the chat file_search tool

False asks for the default search every store already runs, and MongoDB
rejects the field outright, so forwarding it made a MongoDB chat lose the
store's context for a no-op flag. True is still forwarded.

(cherry picked from commit ee74a39a776)

* fix(responses): serialize sequence_number on every bridged streaming event (#44944)

* fix(responses): serialize sequence_number on every bridged streaming event

* test(responses): cover sequence_number on bridged streaming events

* fix(responses): read undeclared fields through dict accessors and number guardrail block continuations

* fix(responses): scope dict reads that see undeclared fields to Responses stream events

Moves the extras-aware __getitem__, get, __contains__ and items from the
shared response base onto a new base for the 37 stream event classes, so
usage, Gemini, Interactions and moderation objects keep reading __dict__
and Gemini responses keep _hidden_params out of .get

* fix(router): renumber Responses stream events only after a fallback takes over

A stream that never falls back now keeps its provider's own sequence numbers, repeats included, so a starting_after resume still matches them. After a fallback the wrapper continues above the highest number the client saw

* fix(guardrails): keep Responses stream numbers unique when LLM Shield flushes held text

The restorer's flush copied the last delta and kept its sequence_number, so a
native stream repeated a number and a bridged stream sent the flush unnumbered.
A flush now takes the done event's slot and later events move up by one, and a
stream the provider never closed numbers its flush after the last event.

Also pins the created_at in the streaming iterator test fixture instead of
reading the clock.

---------

Co-authored-by: mateo-berri <277851410+mateo-berri@users.noreply.github.com>
(cherry picked from commit 6f3251c7e31fb6fed73a786becc6c62f2df56ce7)

* fix(decisions): keep the Vercel AI Gateway key off the OpenAI credential fallback on lts/1.108.x

The line gained the Decisions resolve_credential hook in the backport of #39966 after this branch was cut, so the Vercel provider would inherit OpenAI's fallback to OPENAI_API_KEY. Take main's override from #50642, which returns the gateway key as is.

* test(e2e): remove the secret manager suite (#51241)

The secret manager lanes ran the proxy against a Vault dev container and a
Conjur container that we start ourselves, so nothing in them needed a real
third-party service. They have not run a single test since late October,
because the co-located proxy cannot boot in the lane pod, and they were
soft_fail outside the promotion gate, so they only added noise.

The AWS test in the folder was skipped on every lane, since no aws lane
ever existed.

The four coverage registry rows go with the tests, because the registry is
the e2e denominator and this behavior belongs in the integration tier if it
gets covered again. The Vault and CyberArk clients keep their unit tests.

(cherry picked from commit 587902becf7d48d843befca9d7ea359a216e39d7)

* fix(proxy): stop request body fields from conflicting with admin-set deployment fields

Six fields that also configure Azure sign-in on a deployment (tenant_id, client_id, client_secret, azure_username, azure_password, azure_scope) could be set in a request body, where they conflicted with the values an admin set on the deployment

They are now refused at the body root, in extra_body and in litellm_embedding_config unless an admin opted in with allow_client_side_credentials or configurable_clientside_auth_params. Credential fields and user_config deployments also refuse values in the os.environ/ and oidc/ format, which only admin config uses. Deployment management routes are unchanged

Routes where these names are the API's own fields keep accepting them. That covers client_secret on the realtime transcription_sessions routes, client_id and client_secret on the MCP server OAuth form and on /introspect, and all six as metadata tags

Co-authored-by: Oliver Jensen <oliver@berri.ai>
(cherry picked from commit 6ba6b041e517bd424e8fb4d75aa724962abe289d)

* test(proxy): drop the two request body classifications the field ban removed

client_secret and azure_password are no longer accepted in a request body by default, so the registry's list of credential params a client may send no longer includes them

(cherry picked from commit 2b7e860982d0bdd60f7b5f3ec88d60ce871c3c78)

* test(proxy): import Mapping for the backported request body tests

* fix(proxy): check user_config search_tools for admin-format values too

The source change checks user_config search_tools entries as well as model_list and default_litellm_params. This line's walker skips search_tools, so the backport walks them for this check

* fix(vertex_ai): bill gemini image text, thinking and priority tokens at their own rates (#51017)

Backport of #51017 to lts/1.108.x.
Cherry-picked from 461b56b14b2a024ff73e59f56c01db169dfb902f (main).
Conflicts resolved: vertex_gemini_transformation.py import block (the line does not import map_vertex_image_size) and test_image_usage_transformation.py (the line lacked the ValidationError import and the rejects test, both taken from the pick).

* feat(gemini): file-backed batch jobs on /v1/batches with output download and spend tracking (#51032)

Backport of #51032 to lts/1.108.x as the prerequisite of #51279.
Cherry-picked from a0f2562088 (main).
Conflicts resolved: http_handler.py (the line has no _send_streaming_get, so only the anchor_handler_to rename was taken, including the line's own call site), tests/unit/batches/test_batch_utils.py and test_main.py (the line lacks the hosted_vllm batch tests the pick was formatted next to, so only the new gemini tests were taken). Line adaptation: join_api_base and _strip_trailing_slashes_keeping_the_scheme copied from main's url_utils (#47535) because the gemini files transformation needs them and the line never received that helper.

Line adaptation: the three join_api_base call sites validate GeminiModelInfo.get_api_base through TypeAdapter(str), because the line still annotates that helper as str | None while main returns str, so the type gate would otherwise count three new reportArgumentType errors.

* fix(gemini): attribute /gemini batchGenerateContent batches to the calling key (#51279)

Backport of #51279 to lts/1.108.x.
Cherry-picked from 801e139c35af5eca132e8761cb11be19621218c4 (main).
Conflicts resolved: gemini_passthrough_logging_handler.py import block (the line keeps its import re) and test_gemini_passthrough_logging_handler.py, where the line lacks the gemini pass-through pricing probe tests, so only the new batch tests and their asyncio and base64 imports were taken.
Line adaptation: gemini_deployment_id reads deployments through llm_router.get_model_list(model_name=...), the line's name for what main calls llm_router.registry().deployments(model_name=...).

* fix(bedrock): check OpenAI vector store filter values per operator and keep nested groups within the AWS limit

AWS in and notIn take only a non-empty list of strings, so an in or nin list holding a number now goes out as orAll of equals or andAll of notEquals, and a one-item list as a single equals or notEquals

Each OpenAI filter now refuses keys it does not define and checks its value by operator: eq and ne take a scalar, gt, gte, lt and lte take a number, in and nin take a non-empty list. An empty filters object is invalid too. Each of these answers 400 before any AWS call, or is dropped under drop_params, where before it reached AWS and failed there or, for a stray key, was silently ignored

AWS rejects a RetrievalFilter nested more than 2 levels deep, so a group whose member is the same kind of group, written by the caller or made from a numeric in or nin, now takes that member's items. A mix of and and or nested deeper than AWS allows still fails at AWS

_aws_group_members joins the recursion detector's ignore list, since it walks only a validated filter that pydantic-core stops at 255 levels

Backport to lts/1.108.x.
Cherry-picked from b15ac0fe6b and 2232dba0db (litellm_bedrock_vector_store_openai_filters), whose main PR follows as the forward-port.

* fix(azure_ai): send reasoning_effort to Foundry Kimi K3 and keep its reasoning_content

Foundry models whose loaded catalog row declares reasoning_effort_levels now take reasoning_effort as a level string, rounded up to the nearest declared level, and an effort object is unwrapped to its level. Fireworks-hosted FW- models keep reasoning_content in replayed history, so Kimi K3 can read back what it decided in its earlier thinking. The gate reads the catalog as loaded, so levels a router copies onto the shared row for one deployment do not open reasoning_effort for an undeclared sibling

* fix(responses): preserve mixed reasoning and answer deltas on lts

Partial backport of #46754 to lts/1.108.x. Source merge commit a8113b0dd721804c752a6f1952367fb642205224. Preserve the reasoning/answer split only, excluding the unrelated Anthropic compaction changes.

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* fix(proxy): look up managed file ids only when they can change the s3 refusal

(cherry picked from commit 0043e3020f5258d6542cad2031f70b2928b89101)

* fix(bedrock): check every file id field, skip MCP tool calls, accept registered S3 media types

(cherry picked from commit 2b13898be4959f51255d7a40978cc6515a522a8a)

* fix(proxy): refuse unlisted s3 media on the rag query and adapter routes

(cherry picked from commit 1d85ba2c1de440543a38b1ca58f0636d8c1bb631)

* style(proxy): format the merged collections.abc import

(cherry picked from commit 91bb8946180b52a708944a7c939e337704834d0e)

* fix(proxy): walk tuples when checking s3 media and skip plain number lists

(cherry picked from commit 5d8f25696341df2acf559ada53ef66ff53dd448d)

* fix(proxy): skip numbers when walking a request body for s3 media

A body with large token-id lists and any s3:// string or file_id key made
the full walk build a node per number, taking seconds per request. The walk
and its prefilter now skip int, float, bool and None values.

(cherry picked from commit 57e73a8f7de294abbc90bef55bdd58acb30f24a6)

* test(proxy): check the s3 refusal through the real request setup

(cherry picked from commit 03624164af4ba7dc35112041a201775436ddd4a6)

* test(proxy): exercise real setup for allowed s3 media

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
(cherry picked from commit 5f11068f76d77e05519fcc90a7087a2d9ef7fe95)

* fix(proxy): preserve lts allowlist contract after backport

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* fix(responses): preserve explicit media formats on lts

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* fix(model-armor): fail closed on remote s3 documents

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
(cherry picked from commit f9ad9f8aad6e9df611d8b4f470aeacee7ac0ff85)

* chore: bump litellm 1.108.6 -> 1.108.7

litellm 1.108.6 already shipped, so the next release off this line is 1.108.7

* feat(azure-ai): support Entra ID auth for Microsoft-Decision-1 on /v1/decisions and /v1/systemone (#46539)

Backport of #46539 to lts/1.108.x.
Cherry-picked from caad4d62045e76c1a8428ab8f316d351ca9a0a7e (main).

* refactor(azure): expose the api_base resolver and the cached Entra token provider

Prerequisite for the backport of #48529 to lts/1.108.x.
Hand-ported from the litellm/llms/azure/common_utils.py hunks of 9cf09c18fe (#46377, BaseAzureLLM.resolve_azure_api_base) and c0d88b46c9 (#47348, cached_azure_ad_token_refresh_provider) on main. The rest of those two commits is not picked.

* fix(azure): add keyless Decisions authentication (#48386) (#48529)

Backport of #48529 to lts/1.108.x.
Cherry-picked from e5757934fd7e1e37ecf566cd712ea66313315ccf (main).

* fix(files): match every spelling of a provider file id in the ownership check

enforce_provider_file_access matched the stored provider file id by exact string, and a Gemini output file
can be addressed as files/<id>, files%2F<id>, <id>/ or its full URL, all of which the Gemini file transformation
sends to the same file. Those spellings found no ownership row and fell through the no-row pass-through path.

canonical_provider_file_id collapses the spellings to the bare id; the ownership check looks up both the
spelling the caller sent and the canonical one, and store_batch_output_file_ownership stores the canonical id.

(cherry picked from commit 85e6a98866910c98d699bbbaa9b0c3af677c2719)
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* fix(files): unwrap model-encoded ids and index canonical provider ids in ownership rows

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
(cherry picked from commit 97c9152552a80695cedd8eb72544e2b4ddebe640)

* test(files): assert the ownership lookup outcome instead of its query shape

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
(cherry picked from commit 07abf10d3ef4fbd4f79ad4c69802f30d5646acb5)

* fix(files): map provider ids back to their unified file by canonical spelling

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
(cherry picked from commit 214e17884a61f51ffa8f307bf94e75db2bd4c834)

* chore(files): record the bound on the ownership lookup's in filter

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
(cherry picked from commit d2a5f0799444c7e05295452b5efaed0e1c945318)

* fix(files): reduce any scheme or case wrapping files/<id> the way gemini does before the ownership lookup

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
(cherry picked from commit e2dad6c914d337471ef9d8b6c08db72502b5f16b)

* test(files): assert the provider id lookup covers the requested ids instead of its exact list

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* fix(files): bind the reverse lookup match with a walrus instead of a Final inside the loop

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
(cherry picked from commit 32dabac9f8537bc431fb99ef95a11f79a64f8370)

* fix(files): keep non-Gemini storage URLs opaque so an upload name cannot index another key's provider id

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
(cherry picked from commit c9c9d1024816573500b2fda53d4f025e3ad8adaa)

* test(files): judge the provider id resolver by the mapping it returns only

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
(cherry picked from commit b145f34c0b1bed76607aa7c7d6614bcd870b3f22)

* fix(mcp): treat the mcp_all scope as a wildcard any grant covers (#51578)

Datadog answers a request for mcp_all with its granular scopes, so the connect
check never found mcp_all and users looped back to Connect. Reconnecting also
re-asked every granular scope from the old grant, which overflowed the sign-in
cookie. Any non-empty grant now covers mcp_all, and a request for mcp_all does
not re-as…
mateo-berri pushed a commit to rhea-tk/litellm that referenced this pull request Nov 18, 2026
…ken provider

Prerequisite for the backport of BerriAI#48529 to lts/1.108.x.
Hand-ported from the litellm/llms/azure/common_utils.py hunks of 9cf09c1 (BerriAI#46377, BaseAzureLLM.resolve_azure_api_base) and c0d88b4 (BerriAI#47348, cached_azure_ad_token_refresh_provider) on main. The rest of those two commits is not picked.
mateo-berri pushed a commit to rhea-tk/litellm that referenced this pull request Nov 18, 2026
rogerrum pushed a commit to rogerrum/k8s-gitops that referenced this pull request Nov 22, 2026
….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 [#&#8203;51254](https://github.com/BerriAI/litellm/issues/51254) to stable/1.109.x by [@&#8203;shrey-berri](https://github.com/shrey-berri) in [#&#8203;51264](https://github.com/BerriAI/litellm/pull/51264)
- chore: bump litellm 1.109.0 -> 1.109.1 by [@&#8203;yuneng-berri](https://github.com/yuneng-berri) in [#&#8203;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 ([#&#8203;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 ([#&#8203;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 ([#&#8203;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 ([#&#8203;47645](https://github.com/BerriAI/litellm/issues/47645))
- **Deployment:** Deploy Lens from its own chart and set `lens.*` in your values ([#&#8203;49169](https://github.com/BerriAI/litellm/issues/49169))

##### Highlights

- **Admin UI:** Added a Chat UI with a model hub, image generation and usage metrics ([#&#8203;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 ([#&#8203;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 ([#&#8203;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 ([#&#8203;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 ([#&#8203;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 ([#&#8203;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 ([#&#8203;39966](https://github.com/BerriAI/litellm/issues/39966))
- Added the 12-hour cache write rate for `gpt-5.6-cyber` ([#&#8203;48246](https://github.com/BerriAI/litellm/issues/48246))
- Added OpenAI `gpt-6.1-terra` with pricing ([#&#8203;48429](https://github.com/BerriAI/litellm/issues/48429))
- Added Batch and Ultrafast 12-hour cache write rates for OpenAI models ([#&#8203;48433](https://github.com/BerriAI/litellm/issues/48433))
- Added `gpt-6-rosalind` to the model cost map with its published prices ([#&#8203;49268](https://github.com/BerriAI/litellm/issues/49268))
- Added `gpt-6-astra-law` with pricing from the OpenAI pricing page ([#&#8203;49444](https://github.com/BerriAI/litellm/issues/49444))
- Fixed 400 errors and $0 spend logs on `gpt-transcribe` calls without `response_format` ([#&#8203;44021](https://github.com/BerriAI/litellm/issues/44021))
- Fixed nonstreaming `aiohttp_openai` responses dropping `service_tier` ([#&#8203;47263](https://github.com/BerriAI/litellm/issues/47263))
- Fixed `prompt_cache_retention` such as `24h` being silently dropped instead of sent upstream ([#&#8203;47480](https://github.com/BerriAI/litellm/issues/47480))
- Fixed `/health` marking OpenAI and Azure audio chat models unhealthy ([#&#8203;47730](https://github.com/BerriAI/litellm/issues/47730))
- Fixed OpenAI `context_length_exceeded` errors raising `BadRequestError` instead of `ContextWindowExceededError` ([#&#8203;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 ([#&#8203;48088](https://github.com/BerriAI/litellm/issues/48088))
- Fixed uncatalogued ChatGPT models hitting an unsupported Chat Completions endpoint ([#&#8203;48244](https://github.com/BerriAI/litellm/issues/48244))
- Fixed the whole `reasoning_effort` dict not being sent when chat is bridged to Responses ([#&#8203;48807](https://github.com/BerriAI/litellm/issues/48807))
- Fixed 400 `invalid_beta` on Agents API calls through the OpenAI passthrough ([#&#8203;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 ([#&#8203;49079](https://github.com/BerriAI/litellm/issues/49079))
- Changed OpenAI 401 and 404 `invalid_request_error` to raise matching exceptions, not `BadRequestError` ([#&#8203;32537](https://github.com/BerriAI/litellm/issues/32537))
- Changed the ChatGPT session id to derive from `prompt_cache_key` for stable cache affinity ([#&#8203;42014](https://github.com/BerriAI/litellm/issues/42014))
- Changed `gpt-6-luna` Decisions cache rates to the standard cached and write rates ([#&#8203;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` ([#&#8203;46539](https://github.com/BerriAI/litellm/issues/46539), [#&#8203;48529](https://github.com/BerriAI/litellm/issues/48529))
- Added access to Foundry agents through the project Responses API for `azure_ai/agents/<name>` ([#&#8203;47717](https://github.com/BerriAI/litellm/issues/47717))
- Added `azure_ai/MAI-Code-1.1-Flash` ([#&#8203;47779](https://github.com/BerriAI/litellm/issues/47779))
- Added `max_input_tokens` of 32768 for `azure_ai/Microsoft-Decision-1` ([#&#8203;48434](https://github.com/BerriAI/litellm/issues/48434))
- Added `outputContentFormat=markdown` support on `/ocr` for Azure Document Intelligence ([#&#8203;48926](https://github.com/BerriAI/litellm/issues/48926))
- Fixed Foundry chat requests losing OpenAI prompt cache breakpoints ([#&#8203;45299](https://github.com/BerriAI/litellm/issues/45299))
- Fixed `/v1/responses` 404 on dated `api_version` deployments and `azure_ai` Grok reasoning token billing ([#&#8203;46377](https://github.com/BerriAI/litellm/issues/46377))
- Fixed under-billed Grok reasoning tokens on `azure_ai` when the deployment name lacks "grok" ([#&#8203;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 ([#&#8203;47316](https://github.com/BerriAI/litellm/issues/47316))
- Fixed 400 from Foundry when tool results contain `tool_reference` parts on chat ([#&#8203;48032](https://github.com/BerriAI/litellm/issues/48032))
- Fixed 400 on `azure_ai/claude-*` when using `thinking.block_binding` ([#&#8203;48033](https://github.com/BerriAI/litellm/issues/48033))
- Fixed Responses API calls that use an explicit v1 Azure base URL ([#&#8203;48118](https://github.com/BerriAI/litellm/issues/48118))
- Fixed 404 on Azure vector store retrieve, update and delete ([#&#8203;48224](https://github.com/BerriAI/litellm/issues/48224))
- Fixed null audio capability metadata on two Azure audio snapshot models ([#&#8203;48475](https://github.com/BerriAI/litellm/issues/48475))
- Fixed Azure `context_length_exceeded` raising `BadRequestError` so `context_window_fallbacks` never ran ([#&#8203;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 ([#&#8203;49182](https://github.com/BerriAI/litellm/issues/49182))
- Changed `max_input_tokens` to 128000 for `gpt-chat-latest` on Azure ([#&#8203;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 ([#&#8203;46421](https://github.com/BerriAI/litellm/issues/46421), [#&#8203;47348](https://github.com/BerriAI/litellm/issues/47348), [#&#8203;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 ([#&#8203;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 ([#&#8203;46984](https://github.com/BerriAI/litellm/issues/46984))
- Fixed Claude `json_schema` answers losing keys listed only in `required` and escaping non-ASCII characters ([#&#8203;47478](https://github.com/BerriAI/litellm/issues/47478))
- Fixed replayed `redacted_thinking` blocks being dropped, and Bedrock Converse 400s when sent twice ([#&#8203;47489](https://github.com/BerriAI/litellm/issues/47489))
- Fixed `clear_tool_uses` `input_tokens` trigger ignoring the system prompt, which delayed clearing ([#&#8203;47857](https://github.com/BerriAI/litellm/issues/47857))
- Fixed native Anthropic responses omitting a null `stop_sequence` ([#&#8203;47987](https://github.com/BerriAI/litellm/issues/47987))
- Fixed streamed responses leaving native web search fees out of the reconstructed usage cost ([#&#8203;48528](https://github.com/BerriAI/litellm/issues/48528))
- Fixed `drop_params` not dropping `speed` on `claude-opus-4-7`, which Anthropic rejects with 400 ([#&#8203;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 ([#&#8203;48793](https://github.com/BerriAI/litellm/issues/48793))
- Fixed `model_context_window_exceeded` being reported as `stop` instead of `length` ([#&#8203;48874](https://github.com/BerriAI/litellm/issues/48874))
- Fixed 400 on `/v1/messages` with many strict tools under `drop_params` by retrying without `strict` ([#&#8203;49102](https://github.com/BerriAI/litellm/issues/49102))
- Fixed Claude `pause_turn` reported as finished and refusal explanations dropped on chat and Responses ([#&#8203;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 ([#&#8203;49237](https://github.com/BerriAI/litellm/issues/49237))
- Fixed `metadata.user_id` being dropped on Anthropic `/v1/messages` pass-through routes ([#&#8203;49333](https://github.com/BerriAI/litellm/issues/49333))
- Changed the default `max_tokens` for unmapped Anthropic models from 4096 to 128000 ([#&#8203;48502](https://github.com/BerriAI/litellm/issues/48502))
- Changed the opening prompt usage estimate in the Chat Completions adapter to be off by default ([#&#8203;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 ([#&#8203;48247](https://github.com/BerriAI/litellm/issues/48247))
- Added pricing for native `guardrailConfig` trace usage to spend and `x-litellm-response-cost` ([#&#8203;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 ([#&#8203;48441](https://github.com/BerriAI/litellm/issues/48441))
- Added token counting for three Mantle-native Bedrock Claude models ([#&#8203;48682](https://github.com/BerriAI/litellm/issues/48682))
- Added published Priority, Batch and Flex prices to 46 Bedrock regional rows ([#&#8203;49113](https://github.com/BerriAI/litellm/issues/49113))
- Fixed Bedrock Voxtral transcription returning 400, logging $0 spend and ignoring `language` ([#&#8203;41565](https://github.com/BerriAI/litellm/issues/41565))
- Fixed `Unknown provider=None` 404 for Bedrock models missing from the cost map ([#&#8203;43290](https://github.com/BerriAI/litellm/issues/43290))
- Fixed 400 errors on Bedrock Kimi K3 Converse calls with `max_tokens` below 16 ([#&#8203;43875](https://github.com/BerriAI/litellm/issues/43875))
- Fixed 400 `invalid beta flag` on Claude Code auto mode requests that carry no `safeguards` ([#&#8203;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 ([#&#8203;45992](https://github.com/BerriAI/litellm/issues/45992))
- Fixed `post_call` guardrails not scanning Claude output on `invoke-with-response-stream` passthrough ([#&#8203;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 ([#&#8203;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 ([#&#8203;46870](https://github.com/BerriAI/litellm/issues/46870))
- Fixed `bedrock_request_metadata_fields` being ignored on the `/bedrock` pass-through routes ([#&#8203;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 ([#&#8203;47100](https://github.com/BerriAI/litellm/issues/47100))
- Fixed Bedrock batch jobs ignoring a configured control-plane endpoint ([#&#8203;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 ([#&#8203;47331](https://github.com/BerriAI/litellm/issues/47331))
- Fixed $0 spend and `ModelNotMappedError` for `bedrock/claude_platform/<id>` calls ([#&#8203;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` ([#&#8203;48479](https://github.com/BerriAI/litellm/issues/48479))
- Fixed Bedrock rejecting `strict` tool schemas by retrying without `strict` under `drop_params` ([#&#8203;48733](https://github.com/BerriAI/litellm/issues/48733))
- Fixed 400 on Bedrock when Codex repeats its tool list across turns ([#&#8203;49006](https://github.com/BerriAI/litellm/issues/49006))
- Fixed region-prefixed Bedrock embedding models not routing to their region or billing its price ([#&#8203;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 ([#&#8203;49350](https://github.com/BerriAI/litellm/issues/49350))
- Fixed `max_output_tokens` for Bedrock GovCloud West Llama 3 models, now 8192 ([#&#8203;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 ([#&#8203;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 ([#&#8203;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` ([#&#8203;49193](https://github.com/BerriAI/litellm/issues/49193))
- Changed Bedrock Invoke and Mantle Claude to use the model's own default `max_tokens` ([#&#8203;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 ([#&#8203;31915](https://github.com/BerriAI/litellm/issues/31915))
- Added a setting to drop chosen `anthropic-beta` values on the Vertex AI pass-through routes ([#&#8203;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 ([#&#8203;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 ([#&#8203;47692](https://github.com/BerriAI/litellm/issues/47692))
- Added a 2026-06-30 deprecation date to `vertex_ai/veo-2.0-generate-001` ([#&#8203;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 ([#&#8203;48085](https://github.com/BerriAI/litellm/issues/48085))
- Added Vertex batch prices above 200k tokens and image output prices for Gemini models ([#&#8203;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 ([#&#8203;40868](https://github.com/BerriAI/litellm/issues/40868))
- Fixed `vertex_ai/*` keys not listing partner, Veo and embedding models and dropping publisher prefixes ([#&#8203;41959](https://github.com/BerriAI/litellm/issues/41959))
- Fixed Gemini TTS `/v1/audio/speech` calling Google twice and logging 0 tokens in spend ([#&#8203;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 ([#&#8203;44747](https://github.com/BerriAI/litellm/issues/44747))
- Fixed context caching on Vertex AI failing when a custom `api_base` is set ([#&#8203;44783](https://github.com/BerriAI/litellm/issues/44783))
- Fixed streamed Vertex AI pass-through calls missing the regional 10% uplift and custom deployment prices ([#&#8203;44795](https://github.com/BerriAI/litellm/issues/44795))
- Fixed Gemini not receiving integer enum values in tool parameters ([#&#8203;44908](https://github.com/BerriAI/litellm/issues/44908))
- Fixed Vertex Claude batches returning 404 at create ([#&#8203;45715](https://github.com/BerriAI/litellm/issues/45715))
- Fixed cache-marked requests listing all `cachedContents` on every call and creating duplicate caches ([#&#8203;46857](https://github.com/BerriAI/litellm/issues/46857))
- Fixed Vertex AI rate limit errors returned as 403 when the error text contains 403 ([#&#8203;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 ([#&#8203;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 ([#&#8203;48248](https://github.com/BerriAI/litellm/issues/48248))
- Fixed Gemini 2.5 rejecting tool results with images and the history replay that follows ([#&#8203;48428](https://github.com/BerriAI/litellm/issues/48428))
- Fixed Vertex AI shared credential cache growing without bound across credential and project pairs ([#&#8203;48442](https://github.com/BerriAI/litellm/issues/48442))
- Fixed Vertex AI image sizes outside the old lookup table silently producing square output ([#&#8203;48463](https://github.com/BerriAI/litellm/issues/48463))
- Fixed slow Google credential requests blocking the proxy worker on Claude `/v1/messages` ([#&#8203;48523](https://github.com/BerriAI/litellm/issues/48523))
- Fixed explicit Gemini and Vertex embedding timeouts silently becoming 300 seconds ([#&#8203;48690](https://github.com/BerriAI/litellm/issues/48690))
- Fixed Gemini grounding keeping only the first web source for a passage ([#&#8203;48745](https://github.com/BerriAI/litellm/issues/48745))
- Fixed `labels` on `vertex_ai/claude-*` returning 400 by sending them as `X-Vertex-AI-Labels` ([#&#8203;48753](https://github.com/BerriAI/litellm/issues/48753))
- Fixed 400 on `countTokens` and `generateContent` when repeated fields are a single object or null ([#&#8203;48771](https://github.com/BerriAI/litellm/issues/48771))
- Fixed Vertex Claude `/v1/messages` returning 400 when the SDK sends `anthropic-version` as a header ([#&#8203;48814](https://github.com/BerriAI/litellm/issues/48814))
- Fixed Claude web search billing per request on Vertex AI deployments priced in `model_info` ([#&#8203;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` ([#&#8203;49317](https://github.com/BerriAI/litellm/issues/49317), [#&#8203;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` ([#&#8203;47645](https://github.com/BerriAI/litellm/issues/47645))
- Improved rerank latency by reusing cached Google credentials on every request ([#&#8203;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 ([#&#8203;49075](https://github.com/BerriAI/litellm/issues/49075))
- Removed the floor `deprecation_date` from `gemini-3.1-flash-lite-image` ([#&#8203;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 ([#&#8203;38958](https://github.com/BerriAI/litellm/issues/38958), [#&#8203;39324](https://github.com/BerriAI/litellm/issues/39324), [#&#8203;41006](https://github.com/BerriAI/litellm/issues/41006), [#&#8203;41034](https://github.com/BerriAI/litellm/issues/41034), [#&#8203;43874](https://github.com/BerriAI/litellm/issues/43874), [#&#8203;44863](https://github.com/BerriAI/litellm/issues/44863), [#&#8203;46523](https://github.com/BerriAI/litellm/issues/46523), [#&#8203;48140](https://github.com/BerriAI/litellm/issues/48140), [#&#8203;48497](https://github.com/BerriAI/litellm/issues/48497), [#&#8203;48563](https://github.com/BerriAI/litellm/issues/48563), [#&#8203;48756](https://github.com/BerriAI/litellm/issues/48756))
- Added models, endpoints and options for smaller providers (31 PRs) ([#&#8203;41021](https://github.com/BerriAI/litellm/issues/41021), [#&#8203;41522](https://github.com/BerriAI/litellm/issues/41522), [#&#8203;46156](https://github.com/BerriAI/litellm/issues/46156), [#&#8203;46875](https://github.com/BerriAI/litellm/issues/46875), [#&#8203;47401](https://github.com/BerriAI/litellm/issues/47401), [#&#8203;47473](https://github.com/BerriAI/litellm/issues/47473), [#&#8203;47610](https://github.com/BerriAI/litellm/issues/47610), [#&#8203;47690](https://github.com/BerriAI/litellm/issues/47690), [#&#8203;47785](https://github.com/BerriAI/litellm/issues/47785), [#&#8203;47812](https://github.com/BerriAI/litellm/issues/47812), [#&#8203;48158](https://github.com/BerriAI/litellm/issues/48158), [#&#8203;48251](https://github.com/BerriAI/litellm/issues/48251), [#&#8203;48335](https://github.com/BerriAI/litellm/issues/48335), [#&#8203;48448](https://github.com/BerriAI/litellm/issues/48448), [#&#8203;48450](https://github.com/BerriAI/litellm/issues/48450), [#&#8203;48453](https://github.com/BerriAI/litellm/issues/48453), [#&#8203;48498](https://github.com/BerriAI/litellm/issues/48498), [#&#8203;48621](https://github.com/BerriAI/litellm/issues/48621), [#&#8203;48651](https://github.com/BerriAI/litellm/issues/48651), [#&#8203;48676](https://github.com/BerriAI/litellm/issues/48676), [#&#8203;48677](https://github.com/BerriAI/litellm/issues/48677), [#&#8203;48735](https://github.com/BerriAI/litellm/issues/48735), [#&#8203;48871](https://github.com/BerriAI/litellm/issues/48871), [#&#8203;48998](https://github.com/BerriAI/litellm/issues/48998), [#&#8203;49252](https://github.com/BerriAI/litellm/issues/49252), [#&#8203;49280](https://github.com/BerriAI/litellm/issues/49280), [#&#8203;49281](https://github.com/BerriAI/litellm/issues/49281), [#&#8203;49282](https://github.com/BerriAI/litellm/issues/49282), [#&#8203;49287](https://github.com/BerriAI/litellm/issues/49287), [#&#8203;49297](https://github.com/BerriAI/litellm/issues/49297), [#&#8203;49542](https://github.com/BerriAI/litellm/issues/49542))
- Fixed issues and updated behavior on smaller providers (41 PRs) ([#&#8203;38736](https://github.com/BerriAI/litellm/issues/38736), [#&#8203;40152](https://github.com/BerriAI/litellm/issues/40152), [#&#8203;43390](https://github.com/BerriAI/litellm/issues/43390), [#&#8203;44723](https://github.com/BerriAI/litellm/issues/44723), [#&#8203;45092](https://github.com/BerriAI/litellm/issues/45092), [#&#8203;45567](https://github.com/BerriAI/litellm/issues/45567), [#&#8203;46091](https://github.com/BerriAI/litellm/issues/46091), [#&#8203;46861](https://github.com/BerriAI/litellm/issues/46861), [#&#8203;46945](https://github.com/BerriAI/litellm/issues/46945), [#&#8203;46959](https://github.com/BerriAI/litellm/issues/46959), [#&#8203;47091](https://github.com/BerriAI/litellm/issues/47091), [#&#8203;47423](https://github.com/BerriAI/litellm/issues/47423), [#&#8203;47424](https://github.com/BerriAI/litellm/issues/47424), [#&#8203;47432](https://github.com/BerriAI/litellm/issues/47432), [#&#8203;47495](https://github.com/BerriAI/litellm/issues/47495), [#&#8203;47784](https://github.com/BerriAI/litellm/issues/47784), [#&#8203;47794](https://github.com/BerriAI/litellm/issues/47794), [#&#8203;48121](https://github.com/BerriAI/litellm/issues/48121), [#&#8203;48254](https://github.com/BerriAI/litellm/issues/48254), [#&#8203;48265](https://github.com/BerriAI/litellm/issues/48265), [#&#8203;48268](https://github.com/BerriAI/litellm/issues/48268), [#&#8203;48270](https://github.com/BerriAI/litellm/issues/48270), [#&#8203;48455](https://github.com/BerriAI/litellm/issues/48455), [#&#8203;48522](https://github.com/BerriAI/litellm/issues/48522), [#&#8203;48527](https://github.com/BerriAI/litellm/issues/48527), [#&#8203;48668](https://github.com/BerriAI/litellm/issues/48668), [#&#8203;48684](https://github.com/BerriAI/litellm/issues/48684), [#&#8203;48706](https://github.com/BerriAI/litellm/issues/48706), [#&#8203;48707](https://github.com/BerriAI/litellm/issues/48707), [#&#8203;48778](https://github.com/BerriAI/litellm/issues/48778), [#&#8203;48820](https://github.com/BerriAI/litellm/issues/48820), [#&#8203;48837](https://github.com/BerriAI/litellm/issues/48837), [#&#8203;49068](https://github.com/BerriAI/litellm/issues/49068), [#&#8203;49158](https://github.com/BerriAI/litellm/issues/49158), [#&#8203;49278](https://github.com/BerriAI/litellm/issues/49278), [#&#8203;49344](https://github.com/BerriAI/litellm/issues/49344), [#&#8203;49458](https://github.com/BerriAI/litellm/issues/49458), [#&#8203;49462](https://github.com/BerriAI/litellm/issues/49462), [#&#8203;49498](https://github.com/BerriAI/litellm/issues/49498), [#&#8203;49502](https://github.com/BerriAI/litellm/issues/49502), [#&#8203;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 ([#&#8203;33549](https://github.com/BerriAI/litellm/issues/33549))
- Fixed 500 errors when a prompt template omits `initial_prompt_value` or `final_prompt_value` ([#&#8203;39762](https://github.com/BerriAI/litellm/issues/39762))
- Fixed rebuilt streamed text completions returning null `finish_reason` and zero `prompt_tokens` ([#&#8203;44349](https://github.com/BerriAI/litellm/issues/44349))
- Fixed Foundry deployments and Claude fallbacks getting the wrong cache options, which caused 400s ([#&#8203;45295](https://github.com/BerriAI/litellm/issues/45295))
- Fixed non-streaming chat dropping upstream response headers on `bedrock_mantle/` and other OpenAI-like providers ([#&#8203;46928](https://github.com/BerriAI/litellm/issues/46928))
- Fixed chat streams failing with a proxy error when progress chunks have no choice index ([#&#8203;46947](https://github.com/BerriAI/litellm/issues/46947))
- Fixed the overhead header under-reporting on chat requests when guardrails add `litellm_metadata` ([#&#8203;47790](https://github.com/BerriAI/litellm/issues/47790))
- Fixed streamed chunks containing `[DONE]` being read as end of stream and dropped ([#&#8203;47832](https://github.com/BerriAI/litellm/issues/47832))
- Fixed completions streams including `usage` when it was not requested ([#&#8203;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 ([#&#8203;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 ([#&#8203;48755](https://github.com/BerriAI/litellm/issues/48755))
- Fixed 400 on system-first models like Qwen3.5 when a later `developer` message appears ([#&#8203;48897](https://github.com/BerriAI/litellm/issues/48897))
- Fixed streamed chat completions with `n>1` rebuilding each choice ([#&#8203;49002](https://github.com/BerriAI/litellm/issues/49002))
- Fixed streaming clients missing tool execution when OpenAI-compatible providers end tool calls with `stop` ([#&#8203;49388](https://github.com/BerriAI/litellm/issues/49388))
- Changed the `include_usage` stream chunk to send an empty `choices` array like OpenAI ([#&#8203;47109](https://github.com/BerriAI/litellm/issues/47109))
- Changed stalled stream reads to raise a 408 `litellm.Timeout` on chat, messages and responses ([#&#8203;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 ([#&#8203;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 ([#&#8203;47688](https://github.com/BerriAI/litellm/issues/47688))
- Added resuming background response streams with `stream` and `starting_after` on retrieve ([#&#8203;48819](https://github.com/BerriAI/litellm/issues/48819))
- Added Codex client `tool_search` support on Anthropic and other bridged providers, cutting input tokens ([#&#8203;48972](https://github.com/BerriAI/litellm/issues/48972))
- Fixed Responses API logging tasks being dropped by garbage collection and cut off at shutdown ([#&#8203;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 ([#&#8203;43667](https://github.com/BerriAI/litellm/issues/43667))
- Fixed 400 from malformed `prompt_cache_breakpoint` on `/v1/responses` with `drop_params: true` ([#&#8203;45330](https://github.com/BerriAI/litellm/issues/45330))
- Fixed later turns on an open Responses WebSocket skipping deployment checks and not counting toward budgets ([#&#8203;45727](https://github.com/BerriAI/litellm/issues/45727))
- Fixed streamed `/v1/responses` events showing the backend deployment name in nested `response.model` ([#&#8203;46662](https://github.com/BerriAI/litellm/issues/46662))
- Fixed `/v1/responses` on Claude dropping returned and replayed `compaction` items ([#&#8203;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 ([#&#8203;47013](https://github.com/BerriAI/litellm/issues/47013))
- Fixed OpenAI pass-through `GET /responses/{id}` being billed again on every call ([#&#8203;47171](https://github.com/BerriAI/litellm/issues/47171))
- Fixed background spend not counting toward the key's project or per-model budgets ([#&#8203;47504](https://github.com/BerriAI/litellm/issues/47504))
- Fixed the billed cost of background responses not reaching key and team loggers ([#&#8203;47506](https://github.com/BerriAI/litellm/issues/47506))
- Fixed failed Responses streams billing 0 tokens and bridged `/v1/messages` stream failures not being reported ([#&#8203;47537](https://github.com/BerriAI/litellm/issues/47537))
- Fixed `clear_tool_uses_20250919` being silently dropped for `openai/` models on the Responses API ([#&#8203;47861](https://github.com/BerriAI/litellm/issues/47861))
- Fixed per-call `input_cost_per_token` and `output_cost_per_token` being ignored by `responses()` ([#&#8203;48119](https://github.com/BerriAI/litellm/issues/48119))
- Fixed 500 when replaying `web_search_call` input items that have no `action` ([#&#8203;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 ([#&#8203;48484](https://github.com/BerriAI/litellm/issues/48484))
- Fixed retries from `previous_response_id` returning 400 on Bedrock after a failed turn ([#&#8203;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 ([#&#8203;48655](https://github.com/BerriAI/litellm/issues/48655))
- Fixed typed streaming text access breaking on `/v1/responses` when `logprobs` is omitted ([#&#8203;48686](https://github.com/BerriAI/litellm/issues/48686))
- Fixed `moderation` on `/v1/responses` being dropped before the OpenAI call ([#&#8203;48708](https://github.com/BerriAI/litellm/issues/48708))
- Fixed later citation batches and pending citations being dropped when streaming Responses ([#&#8203;48747](https://github.com/BerriAI/litellm/issues/48747))
- Fixed replayed Responses output items being rejected by OpenAI because of a null `created_by` ([#&#8203;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 ([#&#8203;48845](https://github.com/BerriAI/litellm/issues/48845))
- Fixed Responses compaction by dropping params it rejects and sending Azure compaction to the v1 route ([#&#8203;48876](https://github.com/BerriAI/litellm/issues/48876))
- Fixed Responses item order, phase and boundaries not being replayed on the next chat turn ([#&#8203;48912](https://github.com/BerriAI/litellm/issues/48912))
- Fixed bridged Responses requests losing the requested text verbosity when sent to chat completions ([#&#8203;49049](https://github.com/BerriAI/litellm/issues/49049))
- Fixed deployment `itpm` and `otpm` limits not being checked or counted on later Responses WebSocket turns ([#&#8203;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 ([#&#8203;49073](https://github.com/BerriAI/litellm/issues/49073))
- Fixed dict `reasoning_effort` losing `mode` and `context` on Azure, ChatGPT, Perplexity, xAI, Fireworks and Copilot ([#&#8203;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 ([#&#8203;49112](https://github.com/BerriAI/litellm/issues/49112))
- Fixed native `/v1/responses` WebSocket turns not counting toward key and tag `tpm_limit` ([#&#8203;49257](https://github.com/BerriAI/litellm/issues/49257))
- Changed a lone Responses built-in tool on Claude to return 400 before token counting ([#&#8203;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 ([#&#8203;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 ([#&#8203;45194](https://github.com/BerriAI/litellm/issues/45194))
- Fixed `safeguard_results` and `stop_details` missing from streamed `/v1/messages` `message_delta` events ([#&#8203;46096](https://github.com/BerriAI/litellm/issues/46096))
- Fixed the `clear_tool_uses` polyfill ignoring `clear_at_least`, `exclude_tools` and `clear_tool_inputs` ([#&#8203;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 ([#&#8203;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 ([#&#8203;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` ([#&#8203;47434](https://github.com/BerriAI/litellm/issues/47434))
- Fixed canceled `/v1/messages` streams not closing the upstream request ([#&#8203;48220](https://github.com/BerriAI/litellm/issues/48220))
- Fixed `stop_sequences` being ignored for OpenAI models on `/v1/messages` ([#&#8203;48534](https://github.com/BerriAI/litellm/issues/48534))
- Fixed the client's `anthropic-beta` replacing the deployment's on `/v1/messages` ([#&#8203;48594](https://github.com/BerriAI/litellm/issues/48594))
- Fixed `/v1/messages` streams reporting zero `input_tokens` in `message_start` when bridged to Chat Completions ([#&#8203;48618](https://github.com/BerriAI/litellm/issues/48618))
- Fixed Anthropic-format `tool_choice` crashing input token counting and causing false budget refusals ([#&#8203;48624](https://github.com/BerriAI/litellm/issues/48624))
- Fixed 400 on `/v1/messages` caused by a non-spec `custom` object in tool definitions ([#&#8203;48893](https://github.com/BerriAI/litellm/issues/48893))
- Fixed Mistral thinking text being lost on streaming `/v1/messages` ([#&#8203;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` ([#&#8203;44822](https://github.com/BerriAI/litellm/issues/44822))
- Fixed Gemini Live ignoring `session.update` instructions and tools, and answering text clients with audio ([#&#8203;39864](https://github.com/BerriAI/litellm/issues/39864))
- Fixed `/health` reporting OpenAI realtime deployments with a missing or invalid key as healthy ([#&#8203;41233](https://github.com/BerriAI/litellm/issues/41233))
- Fixed sessions going silent when a transcript guardrail sent `turn_detection` with no `type` to OpenAI ([#&#8203;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 ([#&#8203;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 ([#&#8203;44614](https://github.com/BerriAI/litellm/issues/44614))
- Fixed `aws_polly/standard`, `long-form` and `generative` being sent with the `neural` engine ([#&#8203;47963](https://github.com/BerriAI/litellm/issues/47963))
- Fixed image generation ignoring `max_retries` and Router retries multiplying upstream attempts ([#&#8203;48705](https://github.com/BerriAI/litellm/issues/48705))
- Fixed async image edits with no image returning HTTP 500 instead of 400 ([#&#8203;48872](https://github.com/BerriAI/litellm/issues/48872))
- Fixed key and team `router_settings` being ignored on `/v1/images/generations` ([#&#8203;49286](https://github.com/BerriAI/litellm/issues/49286))
- Changed unsupported transcription providers to return 400 naming the provider and model instead of 500 ([#&#8203;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 ([#&#8203;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` ([#&#8203;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 ([#&#8203;40621](https://github.com/BerriAI/litellm/issues/40621))
- Fixed fine-tuning jobs failing with 400 for files uploaded with `target_model_names` ([#&#8203;46552](https://github.com/BerriAI/litellm/issues/46552))
- Fixed completed batches skipping success callbacks and losing usage under redaction ([#&#8203;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` ([#&#8203;47682](https://github.com/BerriAI/litellm/issues/47682))
- Fixed batch retrieve showing zero prompt and completion tokens ([#&#8203;47740](https://github.com/BerriAI/litellm/issues/47740))
- Fixed unbillable batches blocking file deletes and new-batch polling ([#&#8203;48752](https://github.com/BerriAI/litellm/issues/48752))
- Fixed unmanaged `gs://` Vertex batches being costed through the wrong deployment and reading zero spend ([#&#8203;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 ([#&#8203;47759](https://github.com/BerriAI/litellm/issues/47759))
- Fixed `/rag/ingest` and `/rag/query` ignoring team provider credentials and denying viewers and team JWTs ([#&#8203;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 ([#&#8203;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 ([#&#8203;48915](https://github.com/BerriAI/litellm/issues/48915))
- Improved Vertex AI Search vector store searches by reusing HTTP/2 connections and OAuth tokens ([#&#8203;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 ([#&#8203;47657](https://github.com/BerriAI/litellm/issues/47657))
- Fixed `/v1/messages/count_tokens` and `/utils/token_counter` failing on histories with a compaction block ([#&#8203;44784](https://github.com/BerriAI/litellm/issues/44784))
- Fixed DeepSeek V4 token counts missing Azure's billed tokens by using DeepSeek's own tokenizer ([#&#8203;47173](https://github.com/BerriAI/litellm/issues/47173), [#&#8203;47353](https://github.com/BerriAI/litellm/issues/47353))
- Fixed `count_tokens` overcounting PDFs about 12x for OpenAI and Azure models ([#&#8203;47554](https://github.com/BerriAI/litellm/issues/47554))
- Fixed token counts retrying a failed HuggingFace tokenizer download and adding about 23s per request ([#&#8203;47586](https://github.com/BerriAI/litellm/issues/47586))
- Fixed HTTP 500 when counting tokens for Anthropic search results and unsupported blocks ([#&#8203;48699](https://github.com/BerriAI/litellm/issues/48699))
- Fixed token counts for OpenAI models newer than the tiktoken table by using `o200k_base` ([#&#8203;48728](https://github.com/BerriAI/litellm/issues/48728))
- Fixed a loaded Hugging Face tokenizer being hidden when a later download fails ([#&#8203;48916](https://github.com/BerriAI/litellm/issues/48916))
- Changed Responses input token counts to match inference, fixing Claude counts with tools and `text.format` ([#&#8203;47363](https://github.com/BerriAI/litellm/issues/47363))
- Improved `token_counter` for inline `auto` images, including images under 768 pixels, with no HTTP requests ([#&#8203;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 ([#&#8203;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 ([#&#8203;46748](https://github.com/BerriAI/litellm/issues/46748))
- Added Authorization URL, Token URL and Scopes fields to OAuth Delegate and True Passthrough server forms ([#&#8203;46941](https://github.com/BerriAI/litellm/issues/46941))
- Added tool search and multi-select to the MCP toolset editor in the Admin UI ([#&#8203;48601](https://github.com/BerriAI/litellm/issues/48601))
- Added failure logging for MCP SDK request rejections, shown as `MCP: request_rejected` ([#&#8203;49184](https://github.com/BerriAI/litellm/issues/49184))
- Fixed `LITELLM_MCP_TOOL_LISTING_TIMEOUT` not applying to paginated `tools/list` on `/mcp` ([#&#8203;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 ([#&#8203;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 ([#&#8203;46745](https://github.com/BerriAI/litellm/issues/46745), [#&#8203;46747](https://github.com/BerriAI/litellm/issues/46747), [#&#8203;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` ([#&#8203;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 ([#&#8203;46940](https://github.com/BerriAI/litellm/issues/46940))
- Fixed 403 when `proxy_admin_viewer` stores its own MCP credentials ([#&#8203;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 ([#&#8203;47034](https://github.com/BerriAI/litellm/issues/47034))
- Fixed streamed MCP auto-execute billing only the first of its two model calls ([#&#8203;47422](https://github.com/BerriAI/litellm/issues/47422), [#&#8203;47445](https://github.com/BerriAI/litellm/issues/47445), [#&#8203;48899](https://github.com/BerriAI/litellm/issues/48899))
- Fixed an upstream MCP 429 on session handshake being reported as an internal error ([#&#8203;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 ([#&#8203;47595](https://github.com/BerriAI/litellm/issues/47595))
- Fixed per-user auth MCP servers missing from `/mcp-rest/tools/list` and `/mcp` `tools/list` ([#&#8203;47677](https://github.com/BerriAI/litellm/issues/47677))
- Fixed streaming MCP follow-ups on `/v1/responses` dropping all but the latest tool round ([#&#8203;47698](https://github.com/BerriAI/litellm/issues/47698))
- Fixed slow MCP tool calls delaying response headers until the SSE ping ([#&#8203;47897](https://github.com/BerriAI/litellm/issues/47897))
- Fixed MCP management routes to follow the gateway's existing access rules ([#&#8203;48080](https://github.com/BerriAI/litellm/issues/48080))
- Fixed a readonly MCP toolset URL returning every tool instead of only the toolset's tools ([#&#8203;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 ([#&#8203;48424](https://github.com/BerriAI/litellm/issues/48424))
- Fixed MCP toolset OAuth login advertising a resource URL that clients reject ([#&#8203;48474](https://github.com/BerriAI/litellm/issues/48474))
- Fixed revoked or expired browser sessions still being accepted during gateway authorization ([#&#8203;48494](https://github.com/BerriAI/litellm/issues/48494))
- Fixed MCP OpenAPI loading to accept valid YAML specs ([#&#8203;48622](https://github.com/BerriAI/litellm/issues/48622))
- Fixed MCP tools in both `allowed_tools` and `disallowed_tools` still being callable ([#&#8203;48625](https://github.com/BerriAI/litellm/issues/48625))
- Fixed MCP tools hidden by discovery guardrails still being callable by name ([#&#8203;48669](https://github.com/BerriAI/litellm/issues/48669))
- Changed admin-owned team keys to reach only their team's MCP servers and toolsets ([#&#8203;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 ([#&#8203;45467](https://github.com/BerriAI/litellm/issues/45467))
- Added request log entries for rejected A2A calls to forbidden or unknown agents ([#&#8203;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 ([#&#8203;47530](https://github.com/BerriAI/litellm/issues/47530))
- Fixed Gemini Managed Agents create returning 400 for `name` and interactions dropping inline `agent_config` ([#&#8203;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 ([#&#8203;49150](https://github.com/BerriAI/litellm/issues/49150))
- Fixed 404 on `/a2a/{agent_id}/message/stream` and `/v1/a2a/{agent_id}/message/stream` ([#&#8203;49471](https://github.com/BerriAI/litellm/issues/49471))
- Fixed agent `litellm_params.api_key` not being sent as bearer auth on A2A calls ([#&#8203;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 ([#&#8203;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 ([#&#8203;49485](https://github.com/BerriAI/litellm/issues/49485))
- Changed proxy refusals on `/a2a` POST routes to return JSON-RPC errors ([#&#8203;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 ([#&#8203;46219](https://github.com/BerriAI/litellm/issues/46219))
- Added `num_retries` to `generic_guardrail_api` for checks lost after connecting ([#&#8203;46965](https://github.com/BerriAI/litellm/issues/46965))
- Added a native Reco guardrail that blocks requests on Reco errors unless `fail_on_error: false` ([#&#8203;48243](https://github.com/BerriAI/litellm/issues/48243))
- Added Ovalix guardrail scanning of files, tool calls and tool results ([#&#8203;49309](https://github.com/BerriAI/litellm/issues/49309))
- Added `litellm.guardrails.apply` SDK helper to invoke configured guardrails and get native findings ([#&#8203;49460](https://github.com/BerriAI/litellm/issues/49460), [#&#8203;49469](https://github.com/BerriAI/litellm/issues/49469), [#&#8203;49470](https://github.com/BerriAI/litellm/issues/49470))
- Fixed guardrail masks on messages and tools not reaching Bedrock Converse requests ([#&#8203;45874](https://github.com/BerriAI/litellm/issues/45874))
- Fixed `generic_guardrail_api` rejecting Gemini native tools that have no `type` key ([#&#8203;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` ([#&#8203;47024](https://github.com/BerriAI/litellm/issues/47024))
- Fixed `hide-secrets` missing secrets in tool results, tool inputs, `tool_calls` arguments, and system prompts ([#&#8203;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 ([#&#8203;48060](https://github.com/BerriAI/litellm/issues/48060))
- Fixed pass-through guardrails scanning `litellm_metadata` fields added by LiteLLM, which caused false matches ([#&#8203;48276](https://github.com/BerriAI/litellm/issues/48276))
- Fixed `hide-secrets` ignoring `skip_tool_message_in_guardrail` ([#&#8203;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 ([#&#8203;48725](https://github.com/BerriAI/litellm/issues/48725))
- Fixed Responses tool results not reaching `texts` guardrails ([#&#8203;48827](https://github.com/BerriAI/litellm/issues/48827))
- Fixed `google_text_moderation` scanning embeddings input ([#&#8203;48934](https://github.com/BerriAI/litellm/issues/48934))
- Fixed guardrail blocks on streamed `/v1/messages` not returning Anthropic events ([#&#8203;49010](https://github.com/BerriAI/litellm/issues/49010))
- Fixed streamed `/v1/completions` skipping `post_call` guardrails for masking and blocking ([#&#8203;49035](https://github.com/BerriAI/litellm/issues/49035))
- Fixed mid-stream upstream errors on `/v1/messages` being turned into a guardrail 400 ([#&#8203;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 ([#&#8203;46953](https://github.com/BerriAI/litellm/issues/46953))
- Changed `lakera_v2` `on_flagged: block` to reject PII-only detections and added `on_flagged: mask` ([#&#8203;48944](https://github.com/BerriAI/litellm/issues/48944))
- Improved streaming by running sampled guardrail scans in the background so chunks no longer pause ([#&#8203;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 ([#&#8203;32096](https://github.com/BerriAI/litellm/issues/32096))
- Fixed `cache_control` being stripped from caller messages and tools, which broke caching on Claude fallbacks ([#&#8203;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 ([#&#8203;48917](https://github.com/BerriAI/litellm/issues/48917))
- Removed the disk cache backend, so `cache_params.type: disk` now stops proxy startup ([#&#8203;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 ([#&#8203;41127](https://github.com/BerriAI/litellm/issues/41127))
- Added Kubernetes pod discovery to spread load across pods behind a headless service `api_base` ([#&#8203;44342](https://github.com/BerriAI/litellm/issues/44342), [#&#8203;44393](https://github.com/BerriAI/litellm/issues/44393), [#&#8203;44666](https://github.com/BerriAI/litellm/issues/44666))
- Added opt-in filtering that keeps chat requests off deployments flagged as non-chat ([#&#8203;46257](https://github.com/BerriAI/litellm/issues/46257))
- Added the `x-litellm-priority` header to set request priority ([#&#8203;47618](https://github.com/BerriAI/litellm/issues/47618))
- Added opt-in session repinning to the replacement deployment after a successful failover ([#&#8203;48206](https://github.com/BerriAI/litellm/issues/48206))
- Added a `clamp` mode for complexity routing that keeps the caller's smaller output token limit ([#&#8203;48632](https://github.com/BerriAI/litellm/issues/48632))
- Added deployment `rpd` and `tpd` daily limits to `enforce_model_rate_limits` ([#&#8203;48875](https://github.com/BerriAI/litellm/issues/48875), [#&#8203;48957](https://github.com/BerriAI/litellm/issues/48957))
- Added inferring custom classifier tiers from model mappings, and fixed a crash on plan-mode requests ([#&#8203;48987](https://github.com/BerriAI/litellm/issues/48987))
- Fixed weighted failover skipping healthy same-group deployments under affinity ([#&#8203;32309](https://github.com/BerriAI/litellm/issues/32309))
- Fixed `content_policy_fallbacks` not applying after `POST /fallback` or `/config/update` changes ([#&#8203;45428](https://github.com/BerriAI/litellm/issues/45428))
- Fixed an explicit `allowed_fails: 3` not counting failures and fallbacks cooling down healthy deployments ([#&#8203;46183](https://github.com/BerriAI/litellm/issues/46183))
- Fixed a `bedrock_mantle` deployment's `mode` switching sibling deployments between Chat Completions and Responses ([#&#8203;46263](https://github.com/BerriAI/litellm/issues/46263))
- Fixed prompt caching affinity ignoring tools and the `/v1/messages` system prompt when choosing a deployment ([#&#8203;46411](https://github.com/BerriAI/litellm/issues/46411))
- Fixed all-cooled router 429 rows in SpendLogs not recording which deployments were cooling ([#&#8203;47120](https://github.com/BerriAI/litellm/issues/47120))
- Fixed `stream_timeout` cutting off slow answers when Bedrock serves a `stream=True` call without streaming ([#&#8203;47162](https://github.com/BerriAI/litellm/issues/47162))
- Fixed key and team `router_settings` reaching the provider and dropping retries, fallbacks and timeout ([#&#8203;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` ([#&#8203;47498](https://github.com/BerriAI/litellm/issues/47498))
- Fixed fallback retries logging a negative completion time and dropping latency-routed groups ([#&#8203;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 ([#&#8203;47565](https://github.com/BerriAI/litellm/issues/47565))
- Fixed cut Responses streams returning `server_error` instead of continuing on a fallback without prefill ([#&#8203;47672](https://github.com/BerriAI/litellm/issues/47672))
- Fixed `IndexError` and wrong deployment lookups when deployments are deleted or added concurrently ([#&#8203;47680](https://github.com/BerriAI/litellm/issues/47680))
- Fixed native Responses latency using different units than bridged responses in latency-based routing ([#&#8203;47727](https://github.com/BerriAI/litellm/issues/47727))
- Fixed the router sending image requests to `supports_vision: false` deployments in mixed model groups ([#&#8203;48149](https://github.com/BerriAI/litellm/issues/48149), [#&#8203;48152](https://github.com/BerriAI/litellm/issues/48152), [#&#8203;48241](https://github.com/BerriAI/litellm/issues/48241))
- Fixed Decisions calls routing to deployments whose provider does not support them ([#&#8203;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 ([#&#8203;48216](https://github.com/BerriAI/litellm/issues/48216))
- Fixed tag fail-open groups rejecting unmatched tags after affinity or cooldown filtering ([#&#8203;48470](https://github.com/BerriAI/litellm/issues/48470))
- Fixed one caller's exhausted forwarded Claude subscription putting the shared model into cooldown for others ([#&#8203;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 ([#&#8203;48490](https://github.com/BerriAI/litellm/issues/48490))
- Fixed complexity router replacing the held `user_turn` route on Codex compaction requests ([#&#8203;48627](https://github.com/BerriAI/litellm/issues/48627))
- Fixed session tier pins diverging between proxy workers when using Redis ([#&#8203;48645](https://github.com/BerriAI/litellm/issues/48645))
- Fixed nested environment references in router classifier connections being sent literally ([#&#8203;48717](https://github.com/BerriAI/litellm/issues/48717))
- Fixed lifecycle events not passing through on background OpenAI Responses streams that cannot fall back ([#&#8203;48817](https://github.com/BerriAI/litellm/issues/48817))
- Fixed new fallback rules erasing older ones when Redis refuses `DEL` ([#&#8203;48999](https://github.com/BerriAI/litellm/issues/48999))
- Fixed a deployment's own `model_id` being overridden by the request body's ([#&#8203;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 ([#&#8203;49054](https://github.com/BerriAI/litellm/issues/49054))
- Fixed streamed context window errors skipping fallbacks when they occur before any output ([#&#8203;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 ([#&#8203;49306](https://github.com/BerriAI/litellm/issues/49306))
- Fixed queued requests waiting until a 408 when a dead replica left expired scheduler queue entries ([#&#8203;49387](https://github.com/BerriAI/litellm/issues/49387))
- Changed per-deployment `reasoning_effort_levels` to apply on every provider and route, including `azure_ai` ([#&#8203;46601](https://github.com/BerriAI/litellm/issues/46601))
- Changed tag routing to use only prefixed caller tags once `tag_routing_prefix` is set ([#&#8203;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 ([#&#8203;48644](https://github.com/BerriAI/litellm/issues/48644))
- Changed `user_turn` routing so child agent requests keep their own tier pin ([#&#8203;48701](https://github.com/BerriAI/litellm/issues/48701))
- Changed Router init to reject string fallback targets that never routed ([#&#8203;48943](https://github.com/BerriAI/litellm/issues/48943))
- Removed the deployment `rpm` filter from `enable_pre_call_checks` ([#&#8203;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` ([#&#8203;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 ([#&#8203;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 ([#&#8203;48275](https://github.com/BerriAI/litellm/issues/48275))
- Added a per-guardrail spend breakdown to user, team and organization daily activity ([#&#8203;48702](https://github.com/BerriAI/litellm/issues/48702))
- F…
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Azure OpenAI Entra ID (keyless) auth for /v1/decisions and /v1/systemone

2 participants