Skip to content

fix(gemini): resend once with the placeholder signature when the other backend rejects a replayed thought signature - #49697

Merged
mateo-berri merged 6 commits into
BerriAI:mainfrom
tavren27:litellm_gemini_thought_signature_resend
Nov 3, 2026
Merged

mateo-berri merged 6 commits into
BerriAI:mainfrom
tavren27:litellm_gemini_thought_signature_resend

Conversation

@tavren27

@tavren27 tavren27 commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

A Gemini thought signature validates only on the backend that minted it, so a router fallback between vertex_ai/ and gemini/ turns a retryable error into a 400 on every turn after the first tool call

LiteLLM now resends on that 400 with Google's documented skip_thought_signature_validator placeholder in place of the replayed signatures, on chat, /v1/messages, /v1/responses and native generateContent, streaming or not. A context cache stays in use unless it holds the rejected signature. Other errors come back unchanged

Original

TLDR

Problem this solves:

  • AI Studio 400s a Vertex signature ("Corrupted thought signature.") and Vertex the reverse ("Invalid")
  • The dummy signature fills only missing signatures, never foreign ones

How it solves it:

  • On a 400 naming a thought signature, resend with the placeholder and keep the context cache
  • A cache holding the rejected signature, found at creation or read, goes inline

Why every slot, on any rejected signature:

User Flow

Before: a developer whose router falls back from vertex_ai/gemini-3.8-flash to gemini/gemini-3.8-flash gets a 400 mid-conversation

  1. They send POST https://litellm-domain/v1/chat/completions with a weather tool and get a Vertex tool call back
  2. They send the tool result, Vertex fails, and the router replays the messages to AI Studio
  3. AI Studio answers 400 Corrupted thought signature., the other direction Invalid thought signature., and their app shows an error
  4. The same 400 comes back with cache_control blocks and on POST https://litellm-domain/v1beta/models/gemini-3.8-flash:generateContent

After: the same follow-up turn answers on the twin

  1. They send POST https://litellm-domain/v1/chat/completions with a weather tool and get a Vertex tool call back
  2. They send the tool result, Vertex fails, and the router replays the messages to AI Studio
  3. AI Studio answers 200 with the assistant's reply, streaming or not, and so does the other direction
  4. The same turn answers 200 with cache_control blocks, the cache still read, and on POST https://litellm-domain/v1beta/models/gemini-3.8-flash:generateContent

Relevant issues

Fixes #32140. Supersedes #33471, which misses SDK replays

Pre-Submission checklist

Please complete all items before asking a LiteLLM maintainer to review your PR

  • I have added meaningful tests
  • The handful of test files covering my change pass locally, e.g. uv run pytest tests/unit/<your_test_file>.py -v. Leave the suites (make test-unit-*, make test-unit) to CI: it finishes in ~15 minutes where a laptop takes an hour or more
  • My PR passes all required CI/CD checks (e.g., lint, schema.d.ts sync check, etc.)
  • My PR's scope is as isolated as possible; it only solves 1 specific problem
  • Every automated review on my PR's latest commit has finished, and I have addressed or replied to each of its findings before requesting a maintainer review
What the tests check

Unit tests are tests/unit/llms/vertex_ai/gemini/test_rejected_thought_signature_retry.py. The 12 handler cases (async and sync, streaming and non-streaming, both backend wordings) drive litellm.acompletion and litellm.completion against an httpx MockTransport that answers the 400 first and assert exactly two posts, the second carrying only the placeholder in every signature slot and an otherwise identical body. Two more cells replay a history whose cache has expired and whose signature is foreign, in either order, and assert the final body carries the fresh cache and the placeholder

The cached-prefix cells put the foreign signature inside cache_control blocks against a scripted Google that stores each cachedContents body and rejects a generateContent whose contents or referenced cache hold a non-placeholder signature. A signature after the cached prefix is resent with cachedContent kept and only the inline signatures swapped, and one inside the cache goes inline with the placeholder. With signatures both inside and after the cache, the run makes three posts, and the cache-kept resend is rejected before the inline one. Four more cells reject the signature while the cache is created, the way Vertex does, and assert one generateContent call with the history inline and the placeholder. The native cells call litellm.google_genai.generate_content, agenerate_content and both stream variants with thoughtSignature and thought_signature spellings. At 6e5ca47 the 4 cached-prefix and 8 native resend cells fail with the 400, at ff5ad35 the 4 cache-creation cells fail, at 86d19ea the 8 cache-kept cells fail because the resend dropped the cache, and all 54 pass at the tip

The black box test is tests/integration/providers/test_gemini_thinking_replay_wire.py::test_gemini_tool_call_signature_the_backend_rejects_is_resent_once_with_the_placeholder, six cells over /v1/chat/completions, /v1/messages and /v1/responses, streaming and not. The scripted upstream answers the first replay with the 400 and the second with the answer, and the test asserts the caller gets 200, the resent body carries only the placeholder with everything else identical, and one success spend row lands

Delays in PR merge?

If you're seeing a delay in your PR being merged, ping the LiteLLM Team on Slack (#pr-review).

Screenshots / Proof of Fix

One proxy per tree, 2 uvicorn workers each, own Postgres, real Vertex and AI Studio. Each *-first primary points at http://127.0.0.1:9 and falls back to the other backend. No Redis, since the resend keeps no state

Worker PIDs and dropped QA flags
port 26255 proxy 3427343: python litellm/proxy/proxy_cli.py --config config.yaml --host 127.0.0.1 --port 26255 --num_workers 2 --timeout_worker_healthcheck 60 --telemetry False --use_prisma_db_push
  tree 5a2638b53c, workers: 3431742 3431743 
port 26502 proxy 3156130: python litellm/proxy/proxy_cli.py --config config.yaml --host 127.0.0.1 --port 26502 --num_workers 2 --timeout_worker_healthcheck 60 --telemetry False --use_prisma_db_push
  tree 2dc4847579, workers: 3156456 3156457 

--reload is off because the base predates multi-worker reload (#45909) and would serve one worker. --use_prisma_db_push builds each tree's fresh database in place of --use_v2_migration_resolver, and --detailed_debug only adds log lines the proof does not read

Case Before After
chat fails 200
messages fails 200
responses fails 200
chat cache_control fails 200
cache kept fails 200, cached
generateContent fails 200
SDK Router fails answer

Each row holds from Vertex to AI Studio and back, streaming and not

Headline case, /v1/chat/completions with Vertex falling back to AI Studio

  1. POST /v1/chat/completions to vertex-mint with a get_weather tool, and Vertex returns a tool call
  2. POST the history and tool result to vertex-first, whose primary fails over to AI Studio
python litellm/proxy/proxy_cli.py --config config.yaml --host 127.0.0.1 --port $PORT --num_workers 2 --timeout_worker_healthcheck 60 --use_prisma_db_push
bash run_client.sh http://127.0.0.1:$PORT

Before (2dc4847), non-streaming

/v1/chat/completions vertex-first stream=false minted call_394070__thought__AY89a1/7a0QW... replay HTTP 500 Fallback to vertex-first-fallback also failed: litellm.BadRequestError: GeminiException BadRequestError - Corrupted thought signature.

After (5a2638b)

/v1/chat/completions vertex-first stream=false minted call_702399__thought__AY89a18tgmKL... replay HTTP 200 x-litellm-attempted-fallbacks=1 x-litellm-model-group=vertex-first-fallback "It is currently 18\u00b0C and sunny in Paris."
Proxy config and client scripts
model_list:
  - model_name: vertex-mint
    litellm_params:
      model: vertex_ai/gemini-3.8-flash
      vertex_project: os.environ/VERTEXAI_PROJECT
      vertex_location: global
  - model_name: studio-mint
    litellm_params:
      model: gemini/gemini-3.8-flash
      api_key: os.environ/GEMINI_API_KEY
  - model_name: vertex-first
    litellm_params:
      model: vertex_ai/gemini-3.8-flash
      vertex_project: os.environ/VERTEXAI_PROJECT
      vertex_location: global
      api_base: http://127.0.0.1:9
  - model_name: vertex-first-fallback
    litellm_params:
      model: gemini/gemini-3.8-flash
      api_key: os.environ/GEMINI_API_KEY
  - model_name: studio-first
    litellm_params:
      model: gemini/gemini-3.8-flash
      api_key: os.environ/GEMINI_API_KEY
      api_base: http://127.0.0.1:9
  - model_name: studio-first-fallback
    litellm_params:
      model: vertex_ai/gemini-3.8-flash
      vertex_project: os.environ/VERTEXAI_PROJECT
      vertex_location: global

router_settings:
  fallbacks:
    - vertex-first: ["vertex-first-fallback"]
    - studio-first: ["studio-first-fallback"]
  num_retries: 0
  disable_cooldowns: true

general_settings:
  master_key: os.environ/LITELLM_MASTER_KEY

run_client.sh, run as bash run_client.sh http://127.0.0.1:$PORT against each tree's proxy

export LITELLM_MASTER_KEY=$(python3 -c "import json,pathlib;print(json.loads((pathlib.Path.home()/\"rigs/pr49697/manifest.json\").read_text())[\"master_key\"])")
echo "tree $(git rev-parse --short=10 HEAD), changes outside tests/: $(git status --porcelain | grep -v " tests/" | wc -l)"
python3 - "$@" <<'PYEOF'
import json
import re
import os
import sys
import urllib.error
import urllib.request

BASE = sys.argv[1]
KEY = os.environ["LITELLM_MASTER_KEY"]
QUESTION = "What is the weather in Paris? Use the tool."
FOLLOW_UP = "Thanks. Answer in one short sentence."
MINT = {"vertex-first": "vertex-mint", "studio-first": "studio-mint"}
NONCE = sys.argv[2] if len(sys.argv) > 2 else "run"
CC = {"type": "ephemeral"}
SCHEMA = {"type": "object", "properties": {"city": {"type": "string"}}, "required": ["city"]}


def post(path, body):
    request = urllib.request.Request(
        BASE + path,
        data=json.dumps(body).encode(),
        headers={"Authorization": f"Bearer {KEY}", "Content-Type": "application/json"},
    )
    try:
        with urllib.request.urlopen(request, timeout=180) as response:
            return response.status, dict(response.headers), response.read().decode()
    except urllib.error.HTTPError as error:
        return error.code, dict(error.headers), error.read().decode()


def sse_events(raw):
    for line in raw.splitlines():
        if line.startswith("data: ") and line[6:].strip() != "[DONE]":
            yield json.loads(line[6:])


def chat(group, stream):
    tools = [{"type": "function", "function": {"name": "get_weather", "description": "Weather for a city", "parameters": SCHEMA}}]
    _, _, raw = post("/v1/chat/completions", {"model": MINT[group], "messages": [{"role": "user", "content": QUESTION}], "tools": tools, "tool_choice": "required"})
    message = json.loads(raw)["choices"][0]["message"]
    call_id = message["tool_calls"][0]["id"]
    history = [
        {"role": "user", "content": QUESTION},
        {k: message[k] for k in ("role", "content", "tool_calls")},
        {"role": "tool", "tool_call_id": call_id, "content": "18C and sunny"},
        {"role": "user", "content": FOLLOW_UP},
    ]
    status, headers, raw = post("/v1/chat/completions", {"model": group, "messages": history, "tools": tools, "stream": stream})
    if status != 200:
        return call_id, status, headers, raw
    if stream:
        text = "".join(e["choices"][0]["delta"].get("content") or "" for e in sse_events(raw) if e.get("choices")) or "STREAM ERROR " + stream_error(raw)
    else:
        text = json.loads(raw)["choices"][0]["message"]["content"]
    return call_id, status, headers, text


def messages(group, stream):
    tools = [{"name": "get_weather", "description": "Weather for a city", "input_schema": SCHEMA}]
    _, _, raw = post("/v1/messages", {"model": MINT[group], "max_tokens": 1024, "messages": [{"role": "user", "content": QUESTION}], "tools": tools, "tool_choice": {"type": "any"}})
    content = json.loads(raw)["content"]
    tool_use = next(block for block in content if block["type"] == "tool_use")
    history = [
        {"role": "user", "content": QUESTION},
        {"role": "assistant", "content": content},
        {"role": "user", "content": [{"type": "tool_result", "tool_use_id": tool_use["id"], "content": "18C and sunny"}, {"type": "text", "text": FOLLOW_UP}]},
    ]
    status, headers, raw = post("/v1/messages", {"model": group, "max_tokens": 1024, "messages": history, "tools": tools, "stream": stream})
    if status != 200:
        return tool_use["id"], status, headers, raw
    if stream:
        text = "".join(e["delta"].get("text", "") for e in sse_events(raw) if e.get("type") == "content_block_delta") or "STREAM ERROR " + stream_error(raw)
    else:
        text = "".join(block.get("text", "") for block in json.loads(raw)["content"] if block["type"] == "text")
    return tool_use["id"], status, headers, text


def responses(group, stream):
    tools = [{"type": "function", "name": "get_weather", "description": "Weather for a city", "parameters": SCHEMA}]
    _, _, raw = post("/v1/responses", {"model": MINT[group], "input": QUESTION, "tools": tools, "tool_choice": "required"})
    output = json.loads(raw)["output"]
    call = next(item for item in output if item["type"] == "function_call")
    history = [
        {"role": "user", "content": QUESTION},
        *output,
        {"type": "function_call_output", "call_id": call["call_id"], "output": "18C and sunny"},
        {"role": "user", "content": FOLLOW_UP},
    ]
    status, headers, raw = post("/v1/responses", {"model": group, "input": history, "tools": tools, "stream": stream})
    if status != 200:
        return call["call_id"], status, headers, raw
    if stream:
        text = "".join(e.get("delta", "") for e in sse_events(raw) if e.get("type") == "response.output_text.delta") or "STREAM ERROR " + stream_error(raw)
    else:
        body = json.loads(raw)
        text = "".join(part.get("text", "") for item in body["output"] if item["type"] == "message" for part in item["content"])
    return call["call_id"], status, headers, text


def chat_cached(group, stream):
    tools = [{"type": "function", "function": {"name": "get_weather", "description": "Weather for a city", "parameters": SCHEMA}}]
    _, _, raw = post("/v1/chat/completions", {"model": MINT[group], "messages": [{"role": "user", "content": QUESTION}], "tools": tools, "tool_choice": "required"})
    message = json.loads(raw)["choices"][0]["message"]
    call_id = message["tool_calls"][0]["id"]
    prefix = " ".join(f"Reference paragraph {i} ({NONCE} {group} {stream}): the weather service reports values in Celsius." for i in range(500))
    history = [
        {"role": "system", "content": [{"type": "text", "text": prefix, "cache_control": CC}]},
        {"role": "user", "content": [{"type": "text", "text": QUESTION, "cache_control": CC}]},
        {"role": "assistant", "content": [{"type": "text", "text": "Calling the tool.", "cache_control": CC}], "tool_calls": message["tool_calls"]},
        {"role": "tool", "tool_call_id": call_id, "content": [{"type": "text", "text": "18C and sunny", "cache_control": CC}]},
        {"role": "user", "content": [{"type": "text", "text": "Got it.", "cache_control": CC}]},
        {"role": "assistant", "content": "Noted."},
        {"role": "user", "content": FOLLOW_UP},
    ]
    status, headers, raw = post("/v1/chat/completions", {"model": group, "messages": history, "tools": tools, "stream": stream})
    if status != 200:
        return call_id, status, headers, raw
    if stream:
        text = "".join(e["choices"][0]["delta"].get("content") or "" for e in sse_events(raw) if e.get("choices")) or "STREAM ERROR " + stream_error(raw)
    else:
        text = json.loads(raw)["choices"][0]["message"]["content"]
    return call_id, status, headers, text


NATIVE_TOOLS = [{"functionDeclarations": [{"name": "get_weather", "description": "Weather for a city", "parameters": SCHEMA}]}]


def native(group, stream):
    _, _, raw = post(f"/v1beta/models/{MINT[group]}:generateContent", {"contents": [{"role": "user", "parts": [{"text": QUESTION}]}], "tools": NATIVE_TOOLS, "toolConfig": {"functionCallingConfig": {"mode": "ANY"}}})
    model_content = json.loads(raw)["candidates"][0]["content"]
    signature = next(part["thoughtSignature"] for part in model_content["parts"] if "thoughtSignature" in part)
    call = next(part["functionCall"] for part in model_content["parts"] if "functionCall" in part)
    contents = [
        {"role": "user", "parts": [{"text": QUESTION}]},
        model_content,
        {"role": "user", "parts": [{"functionResponse": {"name": call["name"], "response": {"result": "18C and sunny"}}}]},
    ]
    path = f"/v1beta/models/{group}:streamGenerateContent?alt=sse" if stream else f"/v1beta/models/{group}:generateContent"
    status, headers, raw = post(path, {"contents": contents, "tools": NATIVE_TOOLS})
    if status != 200:
        return signature, status, headers, raw
    events = list(sse_events(raw)) if stream else [json.loads(raw)]
    text = "".join(part.get("text", "") for e in events for c in e.get("candidates", []) for part in c.get("content", {}).get("parts", []))
    return signature, status, headers, text or "NO TEXT " + raw[-300:]


def error_message(raw):
    try:
        message = json.loads(raw)["error"]["message"]
    except (ValueError, KeyError, TypeError):
        message = raw
    fallback = re.search(r"(Fallback to \S+ also failed: [^{]*).*?\"message\": \"([^\"]+)\"", message, re.S)
    return f"{fallback.group(1).strip()} {fallback.group(2)}" if fallback else message


def stream_error(raw):
    errors = [line for line in raw.splitlines() if "error" in line.lower()]
    return error_message(errors[-1][6:] if errors and errors[-1].startswith("data: ") else (errors[-1] if errors else raw[-300:]))


for name, case in (("/v1/chat/completions", chat), ("/v1/messages", messages), ("/v1/responses", responses), ("/v1/chat/completions cache_control", chat_cached), ("/v1beta generateContent", native)):
    for group in ("vertex-first", "studio-first"):
        for stream in (False, True):
            try:
                call_id, status, headers, result = case(group, stream)
            except Exception as error:
                print(f"{name} {group} stream={str(stream).lower()}: CLIENT ERROR {type(error).__name__} {error}")
                continue
            lowered = {k.lower(): v for k, v in headers.items()}
            served = lowered.get("x-litellm-model-group", "?")
            prefix = f"{name} {group} stream={str(stream).lower()} minted {call_id[:34]}... replay HTTP {status}"
            if status == 200:
                print(f"{prefix} x-litellm-attempted-fallbacks={lowered.get('x-litellm-attempted-fallbacks')} x-litellm-model-group={served} {json.dumps(result)}")
            else:
                print(f"{prefix} {' '.join(error_message(result).split())[:400]}")
            sys.stdout.flush()
PYEOF
All 20 proxy runs, both trees

Before

tree 2dc4847579, changes outside tests/: 0
/v1/chat/completions vertex-first stream=false minted call_394070__thought__AY89a1/7a0QW... replay HTTP 500 Fallback to vertex-first-fallback also failed: litellm.BadRequestError: GeminiException BadRequestError - Corrupted thought signature.
/v1/chat/completions vertex-first stream=true minted call_2601583__thought__AY89a1+E7MR... replay HTTP 500 Cannot connect to host REDACTED:9 ssl:<ssl.SSLContext object at 0x7fa6bb0874d0> [Connect call failed ('REDACTED', 9)]
/v1/chat/completions studio-first stream=false minted call_246668__thought__EqUCCqICAWkU... replay HTTP 500 Fallback to studio-first-fallback also failed: litellm.BadRequestError: Vertex_aiException BadRequestError - Invalid thought signature.
/v1/chat/completions studio-first stream=true minted call_281836__thought__EqQCCqECAWkU... replay HTTP 500 Cannot connect to host REDACTED:9 ssl:<ssl.SSLContext object at 0x739ab01739d0> [Connect call failed ('REDACTED', 9)]
/v1/messages vertex-first stream=false minted call_964952... replay HTTP 500 Fallback to vertex-first-fallback also failed: litellm.BadRequestError: GeminiException BadRequestError - Corrupted thought signature.
/v1/messages vertex-first stream=true minted call_3162018... replay HTTP 200 x-litellm-attempted-fallbacks=1 x-litellm-model-group=vertex-first-fallback "STREAM ERROR litellm.BadRequestError: Vertex_ai_betaException BadRequestError - b'{\\n  \"error\": {\\n    \"code\": 400,\\n    \"message\": \"Corrupted thought signature.\",\\n    \"status\": \"INVALID_ARGUMENT\"\\n  }\\n}\\n'"
/v1/messages studio-first stream=false minted call_267225... replay HTTP 500 Fallback to studio-first-fallback also failed: litellm.BadRequestError: Vertex_aiException BadRequestError - Invalid thought signature.
/v1/messages studio-first stream=true minted call_285551... replay HTTP 200 x-litellm-attempted-fallbacks=1 x-litellm-model-group=studio-first-fallback "STREAM ERROR litellm.BadRequestError: Vertex_ai_betaException BadRequestError - b'{\\n  \"error\": {\\n    \"code\": 400,\\n    \"message\": \"Invalid thought signature.\",\\n    \"status\": \"INVALID_ARGUMENT\"\\n  }\\n}\\n'"
/v1/responses vertex-first stream=false minted call_1666162__thought__AY89a1/eWnD... replay HTTP 500 Fallback to vertex-first-fallback also failed: litellm.BadRequestError: GeminiException BadRequestError - Corrupted thought signature.
/v1/responses vertex-first stream=true minted call_1595516__thought__AY89a19FkRK... replay HTTP 200 x-litellm-attempted-fallbacks=1 x-litellm-model-group=vertex-first-fallback "STREAM ERROR {\"type\":\"response.failed\",\"response\":{\"id\":\"resp_837e620ab6514bc1ae24654befd49d23\",\"created_at\":1793654867,\"error\":{\"code\":\"invalid_request_error\",\"message\":\"litellm.BadRequestError: Vertex_ai_betaException BadRequestError - b'{\\\\n  \\\"error\\\": {\\\\n    \\\"code\\\": 400,\\\\n    \\\"message\\\": \\\"Corrupted thought signature.\\\",\\\\n    \\\"status\\\": \\\"INVALID_ARGUMENT\\\"\\\\n  }\\\\n}\\\\n'\"},\"object\":\"response\",\"output\":[],\"status\":\"failed\"},\"sequence_number\":0}"
/v1/responses studio-first stream=false minted call_282905__thought__EtgCCtUCAWkU... replay HTTP 500 Fallback to studio-first-fallback also failed: litellm.BadRequestError: Vertex_aiException BadRequestError - Invalid thought signature.
/v1/responses studio-first stream=true minted call_352001__thought__EqUCCqICAWkU... replay HTTP 200 x-litellm-attempted-fallbacks=1 x-litellm-model-group=studio-first-fallback "STREAM ERROR {\"type\":\"response.failed\",\"response\":{\"id\":\"resp_18a4d0fd335a4e3d95637c3bccccef86\",\"created_at\":1793654871,\"error\":{\"code\":\"invalid_request_error\",\"message\":\"litellm.BadRequestError: Vertex_ai_betaException BadRequestError - b'{\\\\n  \\\"error\\\": {\\\\n    \\\"code\\\": 400,\\\\n    \\\"message\\\": \\\"Invalid thought signature.\\\",\\\\n    \\\"status\\\": \\\"INVALID_ARGUMENT\\\"\\\\n  }\\\\n}\\\\n'\"},\"object\":\"response\",\"output\":[],\"status\":\"failed\"},\"sequence_number\":0}"
/v1/chat/completions cache_control vertex-first stream=false minted call_1261538__thought__AY89a1/Pqmt... replay HTTP 500 Fallback to vertex-first-fallback also failed: litellm.BadRequestError: GeminiException BadRequestError - Corrupted thought signature.
/v1/chat/completions cache_control vertex-first stream=true minted call_957555__thought__AY89a1+pcFeb... replay HTTP 500 Fallback to vertex-first-fallback also failed: b' Corrupted thought signature.
/v1/chat/completions cache_control studio-first stream=false minted call_224057__thought__EscCCsQCAWkU... replay HTTP 500 Fallback to studio-first-fallback also failed: litellm.BadRequestError: Vertex_aiException BadRequestError - Invalid thought signature. (qos=SHEDDABLE_PLUS); RPC to BAG server failed: INVALID_ARGUMENT: Invalid thought signature. (qos=SHEDDABLE_PLUS) [type.googleapis.com/util.MessageSetPayload='[google.rpc.error_details_ext] { message: \
/v1/chat/completions cache_control studio-first stream=true minted call_347757__thought__ErICCq8CAWkU... replay HTTP 500 Fallback to studio-first-fallback also failed: litellm.BadRequestError: Vertex_aiException BadRequestError - Invalid thought signature. (qos=SHEDDABLE_PLUS); RPC to BAG server failed: INVALID_ARGUMENT: Invalid thought signature. (qos=SHEDDABLE_PLUS) [type.googleapis.com/util.ErrorSpacePayload='beyond::dependency::INVALID_ARGUMENT'] [type.googleapis.com/util.MessageSetPayload='[google.rpc.error_det
/v1beta generateContent vertex-first stream=false minted AY89a1+CONQuQ7zakjf/xORm9Zy4nJ+CNp... replay HTTP 500 Fallback to vertex-first-fallback also failed: litellm.BadRequestError: GeminiException BadRequestError - Corrupted thought signature.
/v1beta generateContent vertex-first stream=true minted AY89a18zRa5Z6Bn7oaFmdnAfLgVrlNJnAy... replay HTTP 500 Fallback to vertex-first-fallback also failed: litellm.BadRequestError: GeminiException BadRequestError - Corrupted thought signature.
/v1beta generateContent studio-first stream=false minted EoEDCv4CAWkUfROlsSyQaC6RmZMdCCQm93... replay HTTP 500 Fallback to studio-first-fallback also failed: litellm.BadRequestError: Vertex_aiException BadRequestError - Invalid thought signature.
/v1beta generateContent studio-first stream=true minted Ep0CCpoCAWkUfRPhtXvX7r5HEIef0xa4Ao... replay HTTP 500 Fallback to studio-first-fallback also failed: litellm.BadRequestError: Vertex_aiException BadRequestError - Invalid thought signature.

After

tree 5a2638b53c, changes outside tests/: 0
/v1/chat/completions vertex-first stream=false minted call_702399__thought__AY89a18tgmKL... replay HTTP 200 x-litellm-attempted-fallbacks=1 x-litellm-model-group=vertex-first-fallback "It is currently 18\u00b0C and sunny in Paris."
/v1/chat/completions vertex-first stream=true minted call_2023680__thought__AY89a19p3WA... replay HTTP 200 x-litellm-attempted-fallbacks=1 x-litellm-model-group=vertex-first-fallback "It is currently sunny and 18\u00b0C in Paris."
/v1/chat/completions studio-first stream=false minted call_14827__thought__ErICCq8CAWkUf... replay HTTP 200 x-litellm-attempted-fallbacks=1 x-litellm-model-group=studio-first-fallback "It is currently 18\u00b0C and sunny in Paris."
/v1/chat/completions studio-first stream=true minted call_12405__thought__ErICCq8CAWkUf... replay HTTP 200 x-litellm-attempted-fallbacks=1 x-litellm-model-group=studio-first-fallback "It is currently 18\u00b0C and sunny in Paris."
/v1/messages vertex-first stream=false minted call_2114004... replay HTTP 200 x-litellm-attempted-fallbacks=1 x-litellm-model-group=vertex-first-fallback "It is currently 18\u00b0C and sunny in Paris."
/v1/messages vertex-first stream=true minted call_1363570... replay HTTP 200 x-litellm-attempted-fallbacks=1 x-litellm-model-group=vertex-first-fallback "The weather in Paris is currently 18\u00b0C and sunny."
/v1/messages studio-first stream=false minted call_85369... replay HTTP 200 x-litellm-attempted-fallbacks=1 x-litellm-model-group=studio-first-fallback "It is currently 18\u00b0C and sunny in Paris."
/v1/messages studio-first stream=true minted call_32732... replay HTTP 200 x-litellm-attempted-fallbacks=1 x-litellm-model-group=studio-first-fallback "The weather in Paris is 18\u00b0C and sunny."
/v1/responses vertex-first stream=false minted call_420958__thought__AY89a1/ZISGm... replay HTTP 200 x-litellm-attempted-fallbacks=1 x-litellm-model-group=vertex-first-fallback "The weather in Paris is currently 18\u00b0C and sunny."
/v1/responses vertex-first stream=true minted call_1962907__thought__AY89a1+ANMs... replay HTTP 200 x-litellm-attempted-fallbacks=1 x-litellm-model-group=vertex-first-fallback "The weather in Paris is currently 18\u00b0C and sunny."
/v1/responses studio-first stream=false minted call_3571__thought__EqsCCqgCAWkUfR... replay HTTP 200 x-litellm-attempted-fallbacks=1 x-litellm-model-group=studio-first-fallback "It is currently 18\u00b0C and sunny in Paris."
/v1/responses studio-first stream=true minted call_12197__thought__EpwCCpkCAWkUf... replay HTTP 200 x-litellm-attempted-fallbacks=1 x-litellm-model-group=studio-first-fallback "The weather in Paris is 18\u00b0C and sunny."
/v1/chat/completions cache_control vertex-first stream=false minted call_1298396__thought__AY89a1/IpSu... replay HTTP 200 x-litellm-attempted-fallbacks=1 x-litellm-model-group=vertex-first-fallback "The weather in Paris is 18\u00b0C and sunny."
/v1/chat/completions cache_control vertex-first stream=true minted call_1114144__thought__AY89a1/sHkl... replay HTTP 200 x-litellm-attempted-fallbacks=1 x-litellm-model-group=vertex-first-fallback "It is currently 18\u00b0C and sunny in Paris."
/v1/chat/completions cache_control studio-first stream=false minted call_12755__thought__EvEBCu4BAWkUf... replay HTTP 200 x-litellm-attempted-fallbacks=1 x-litellm-model-group=studio-first-fallback "The weather in Paris is sunny and 18\u00b0C."
/v1/chat/completions cache_control studio-first stream=true minted call_11464__thought__EpwCCpkCAWkUf... replay HTTP 200 x-litellm-attempted-fallbacks=1 x-litellm-model-group=studio-first-fallback "The weather in Paris is currently 18\u00b0C and sunny."
/v1beta generateContent vertex-first stream=false minted AY89a184Gr6mtPDskcghzfD3odMkx2Flyr... replay HTTP 200 x-litellm-attempted-fallbacks=1 x-litellm-model-group=vertex-first-fallback "The weather in Paris is currently 18\u00b0C and sunny."
/v1beta generateContent vertex-first stream=true minted AY89a1//j6E9od3jLzrYGGbVwMKAS6OT9h... replay HTTP 200 x-litellm-attempted-fallbacks=1 x-litellm-model-group=vertex-first-fallback "The weather in Paris is 18\u00b0C and sunny."
/v1beta generateContent studio-first stream=false minted EswCCskCAWkUfRO/tyqJAm9wkhJaEMQift... replay HTTP 200 x-litellm-attempted-fallbacks=1 x-litellm-model-group=studio-first-fallback "The weather in Paris is currently 18\u00b0C and sunny."
/v1beta generateContent studio-first stream=true minted EoUCCoICAWkUfRNWnygIDAPBxBPpvqhIAm... replay HTTP 200 x-litellm-attempted-fallbacks=1 x-litellm-model-group=studio-first-fallback "The weather in Paris is currently 18\u00b0C and sunny."
Context cache kept on the resend

The cached prefix holds a tool call the serving backend minted, and a second tool call after it comes from the other backend. The cached block ends on a user turn, since the cachedContents API rejects one ending on a model turn. cached_tokens is the part of the prompt the answer read from the cache

bash cache_kept.sh http://127.0.0.1:$PORT <nonce>
cache_kept.sh
export LITELLM_MASTER_KEY=$(python3 -c "import json,pathlib;print(json.loads((pathlib.Path.home()/\"rigs/pr49697/manifest.json\").read_text())[\"master_key\"])")
echo "tree $(git rev-parse --short=10 HEAD), changes outside tests/: $(git status --porcelain | grep -v " tests/" | wc -l)"
python3 - "$@" <<'PYEOF'
import json
import re
import os
import sys
import urllib.error
import urllib.request

BASE = sys.argv[1]
KEY = os.environ["LITELLM_MASTER_KEY"]
QUESTION = "What is the weather in Paris? Use the tool."
FOLLOW_UP = "Thanks. Answer in one short sentence."
MINT = {"vertex-first": "vertex-mint", "studio-first": "studio-mint"}
NONCE = sys.argv[2] if len(sys.argv) > 2 else "run"
CC = {"type": "ephemeral"}
SCHEMA = {"type": "object", "properties": {"city": {"type": "string"}}, "required": ["city"]}


def post(path, body):
    request = urllib.request.Request(
        BASE + path,
        data=json.dumps(body).encode(),
        headers={"Authorization": f"Bearer {KEY}", "Content-Type": "application/json"},
    )
    try:
        with urllib.request.urlopen(request, timeout=180) as response:
            return response.status, dict(response.headers), response.read().decode()
    except urllib.error.HTTPError as error:
        return error.code, dict(error.headers), error.read().decode()


def sse_events(raw):
    for line in raw.splitlines():
        if line.startswith("data: ") and line[6:].strip() != "[DONE]":
            yield json.loads(line[6:])


TOOLS = [{"type": "function", "function": {"name": "get_weather", "description": "Weather for a city", "parameters": SCHEMA}}]
OWN = {"vertex-first": "studio-mint", "studio-first": "vertex-mint"}
FOREIGN = {"vertex-first": "vertex-mint", "studio-first": "studio-mint"}


def mint(group, question):
    _, _, raw = post("/v1/chat/completions", {"model": group, "messages": [{"role": "user", "content": question}], "tools": TOOLS, "tool_choice": "required"})
    return json.loads(raw)["choices"][0]["message"]


def chat_cache_kept(group, stream):
    paris = mint(OWN[group], QUESTION)
    berlin_question = "And in Berlin? Use the tool."
    berlin = mint(FOREIGN[group], berlin_question)
    prefix = " ".join(f"Reference paragraph {i} ({NONCE} {group} {stream}): the weather service reports values in Celsius." for i in range(500))
    history = [
        {"role": "system", "content": [{"type": "text", "text": prefix, "cache_control": CC}]},
        {"role": "user", "content": [{"type": "text", "text": QUESTION, "cache_control": CC}]},
        {"role": "assistant", "content": [{"type": "text", "text": "Calling the tool.", "cache_control": CC}], "tool_calls": paris["tool_calls"]},
        {"role": "tool", "tool_call_id": paris["tool_calls"][0]["id"], "content": [{"type": "text", "text": "18C and sunny", "cache_control": CC}]},
        {"role": "user", "content": [{"type": "text", "text": berlin_question, "cache_control": CC}]},
        {"role": "assistant", "content": None, "tool_calls": berlin["tool_calls"]},
        {"role": "tool", "tool_call_id": berlin["tool_calls"][0]["id"], "content": "12C and cloudy"},
        {"role": "user", "content": "Thanks. Compare both cities in one short sentence."},
    ]
    body = {"model": group, "messages": history, "tools": TOOLS, "stream": stream}
    if stream:
        body["stream_options"] = {"include_usage": True}
    status, headers, raw = post("/v1/chat/completions", body)
    if status != 200:
        return status, headers, None, raw
    if stream:
        events = list(sse_events(raw))
        text = "".join(e["choices"][0]["delta"].get("content") or "" for e in events if e.get("choices")) or "STREAM ERROR " + stream_error(raw)
        usage = next((e["usage"] for e in reversed(events) if e.get("usage")), {})
    else:
        parsed = json.loads(raw)
        text = parsed["choices"][0]["message"]["content"]
        usage = parsed.get("usage", {})
    return status, headers, usage, text


def error_message(raw):
    try:
        message = json.loads(raw)["error"]["message"]
    except (ValueError, KeyError, TypeError):
        message = raw
    fallback = re.search(r"(Fallback to \S+ also failed: [^{]*).*?\"message\": \"([^\"]+)\"", message, re.S)
    return f"{fallback.group(1).strip()} {fallback.group(2)}" if fallback else message


def stream_error(raw):
    errors = [line for line in raw.splitlines() if "error" in line.lower()]
    return error_message(errors[-1][6:] if errors and errors[-1].startswith("data: ") else (errors[-1] if errors else raw[-300:]))


for group in ("vertex-first", "studio-first"):
    for stream in (False, True):
        try:
            status, headers, usage, result = chat_cache_kept(group, stream)
        except Exception as error:
            print(f"cache kept {group} stream={str(stream).lower()}: CLIENT ERROR {type(error).__name__} {error}")
            continue
        lowered = {k.lower(): v for k, v in headers.items()}
        line = f"/v1/chat/completions cache_control, own signature cached, foreign one after it, {group} stream={str(stream).lower()} replay HTTP {status}"
        if status == 200:
            cached = (usage.get("prompt_tokens_details") or {}).get("cached_tokens")
            print(f"{line} x-litellm-attempted-fallbacks={lowered.get('x-litellm-attempted-fallbacks')} prompt_tokens={usage.get('prompt_tokens')} cached_tokens={cached} {json.dumps(result)}")
        else:
            print(f"{line} {' '.join(error_message(result).split())[:400]}")
        sys.stdout.flush()
PYEOF

Before

tree 2dc4847579, changes outside tests/: 0
/v1/chat/completions cache_control, own signature cached, foreign one after it, vertex-first stream=false replay HTTP 500 Fallback to vertex-first-fallback also failed: litellm.BadRequestError: GeminiException BadRequestError - Corrupted thought signature.
/v1/chat/completions cache_control, own signature cached, foreign one after it, vertex-first stream=true replay HTTP 500 Fallback to vertex-first-fallback also failed: b' Corrupted thought signature.
/v1/chat/completions cache_control, own signature cached, foreign one after it, studio-first stream=false replay HTTP 500 Fallback to studio-first-fallback also failed: litellm.BadRequestError: Vertex_aiException BadRequestError - Invalid thought signature.
/v1/chat/completions cache_control, own signature cached, foreign one after it, studio-first stream=true replay HTTP 500 Fallback to studio-first-fallback also failed: b' Invalid thought signature.

After. The turn that creates the cache reports about double prompt_tokens on both trees, which this PR leaves alone

tree 5a2638b53c, changes outside tests/: 0
/v1/chat/completions cache_control, own signature cached, foreign one after it, vertex-first stream=false replay HTTP 200 x-litellm-attempted-fallbacks=1 prompt_tokens=24082 cached_tokens=11990 "Paris is warmer and sunny at 18\u00b0C, while Berlin is cooler and cloudy at 12\u00b0C."
/v1/chat/completions cache_control, own signature cached, foreign one after it, vertex-first stream=true replay HTTP 200 x-litellm-attempted-fallbacks=1 prompt_tokens=24062 cached_tokens=11990 "Paris is warmer and sunny at 18\u00b0C, while Berlin is cooler and cloudy at 12\u00b0C."
/v1/chat/completions cache_control, own signature cached, foreign one after it, studio-first stream=false replay HTTP 200 x-litellm-attempted-fallbacks=1 prompt_tokens=24037 cached_tokens=12003 "Paris is warmer and sunny at 18\u00b0C, while Berlin is cooler and cloudy at 12\u00b0C."
/v1/chat/completions cache_control, own signature cached, foreign one after it, studio-first stream=true replay HTTP 200 x-litellm-attempted-fallbacks=1 prompt_tokens=24041 cached_tokens=12005 "Paris is warmer and sunnier at 18\u00b0C, while Berlin is cooler and cloudy at 12\u00b0C."
SDK Router case from #32140

Run with PYTHONPATH=<tree> <tree>/.venv/bin/python router_fallback.py from each worktree

import asyncio
import json
import os

import litellm
from litellm import Router

VERTEX = {
    "model": "vertex_ai/gemini-3.8-flash",
    "vertex_project": os.environ["VERTEXAI_PROJECT"],
    "vertex_location": "global",
}
STUDIO = {"model": "gemini/gemini-3.8-flash", "api_key": os.environ["GEMINI_API_KEY"]}
BROKEN_VERTEX = {**VERTEX, "api_base": "http://127.0.0.1:9"}
BROKEN_STUDIO = {**STUDIO, "api_base": "http://127.0.0.1:9"}
MINT = {"vertex-first": "vertex-mint", "studio-first": "studio-mint"}

router = Router(
    model_list=[
        {"model_name": "vertex-mint", "litellm_params": VERTEX},
        {"model_name": "studio-mint", "litellm_params": STUDIO},
        {"model_name": "vertex-first", "litellm_params": BROKEN_VERTEX},
        {"model_name": "vertex-first-fallback", "litellm_params": STUDIO},
        {"model_name": "studio-first", "litellm_params": BROKEN_STUDIO},
        {"model_name": "studio-first-fallback", "litellm_params": VERTEX},
    ],
    fallbacks=[
        {"vertex-first": ["vertex-first-fallback"]},
        {"studio-first": ["studio-first-fallback"]},
    ],
    num_retries=0,
    disable_cooldowns=True,
)

TOOLS = [
    {
        "type": "function",
        "function": {
            "name": "get_weather",
            "description": "Weather for a city",
            "parameters": {"type": "object", "properties": {"city": {"type": "string"}}, "required": ["city"]},
        },
    }
]
QUESTION = {"role": "user", "content": "What is the weather in Paris? Use the tool."}


def backend(response) -> str:
    return router.get_deployment(model_id=response._hidden_params["model_id"]).litellm_params.model


async def run(model_group: str, stream: bool) -> None:
    first = await router.acompletion(model=MINT[model_group], messages=[QUESTION], tools=TOOLS, tool_choice="required")
    message = first.choices[0].message
    call = message.tool_calls[0]
    print(f"turn 1 answered by {backend(first)}: tool call {call.id[:40]}...")
    history = [
        QUESTION,
        message.model_dump(exclude_none=True),
        {"role": "tool", "tool_call_id": call.id, "content": "18C and sunny"},
        {"role": "user", "content": "Thanks. Answer in one short sentence."},
    ]
    try:
        second = await router.acompletion(
            model=model_group, messages=history, tools=TOOLS, stream=stream, include_fallback_errors=True,
        )
        if stream:
            text = "".join([chunk.choices[0].delta.content or "" async for chunk in second])
        else:
            text = second.choices[0].message.content
        provider = backend(second)
        print(f"turn 2 (primary failed, router fell back to {provider}, stream={stream}): OK {json.dumps(text)}")
    except Exception as error:
        print(f"turn 2 (primary failed, router fell back, stream={stream}): {' '.join(str(error).split())}")


async def main() -> None:
    print(f"litellm from {os.path.dirname(litellm.__file__)}")
    for model_group in ("vertex-first", "studio-first"):
        for stream in (False, True):
            print(f"== {model_group} stream={stream}")
            await run(model_group, stream)


asyncio.run(main())

Before (2dc4847). The raised error names the primary, and the Router's own log shows the fallback's 400 on the streaming turns

== vertex-first stream=False
turn 1 answered by vertex_ai/gemini-3.8-flash: tool call call_1671035__thought__AY89a19NAQIUkUJSy...
turn 2 (primary failed, router fell back, stream=False): litellm.APIConnectionError: Vertex_aiException - Cannot connect to host 127.0.0.1:9 ssl:<ssl.SSLContext object at 0x7e33b4191bd0> [Connect call failed ('127.0.0.1', 9)] LiteLLM: model group 'vertex-first' failed with the error above. Fallback to vertex-first-fallback also failed: litellm.BadRequestError: GeminiException BadRequestError - { "error": { "code": 400, "message": "Corrupted thought signature.", "status": "INVALID_ARGUMENT" } }
== vertex-first stream=True
turn 1 answered by vertex_ai/gemini-3.8-flash: tool call call_2927516__thought__AY89a19kad9idrQXC...
turn 2 (primary failed, router fell back, stream=True): Cannot connect to host 127.0.0.1:9 ssl:<ssl.SSLContext object at 0x7e33b4191bd0> [Connect call failed ('127.0.0.1', 9)]
== studio-first stream=False
turn 1 answered by gemini/gemini-3.8-flash: tool call call_290237__thought__EocCCoQCAWkUfRPs6W...
turn 2 (primary failed, router fell back, stream=False): litellm.APIConnectionError: GeminiException - Cannot connect to host 127.0.0.1:9 ssl:<ssl.SSLContext object at 0x7e33b4191bd0> [Connect call failed ('127.0.0.1', 9)] LiteLLM: model group 'studio-first' failed with the error above. Fallback to studio-first-fallback also failed: litellm.BadRequestError: Vertex_aiException BadRequestError - { "error": { "code": 400, "message": "Invalid thought signature.", "status": "INVALID_ARGUMENT" } }
== studio-first stream=True
turn 1 answered by gemini/gemini-3.8-flash: tool call call_359333__thought__EooCCocCAWkUfRNV3L...
turn 2 (primary failed, router fell back, stream=True): Cannot connect to host 127.0.0.1:9 ssl:<ssl.SSLContext object at 0x7e33b4191bd0> [Connect call failed ('127.0.0.1', 9)]
21:28:32 - LiteLLM Router:ERROR: router.py:8770 - litellm.router.py::async_function_with_fallbacks() - Error occurred while trying to do fallbacks - b'{\n  "error": {\n    "code": 400,\n    "message": "Corrupted thought 
21:28:32 - LiteLLM Router:ERROR: router.py:8770 - litellm.router.py::async_function_with_fallbacks() - Error occurred while trying to do fallbacks - b'{\n  "error": {\n    "code": 400,\n    "message": "Corrupted thought 
21:28:36 - LiteLLM Router:ERROR: router.py:8770 - litellm.router.py::async_function_with_fallbacks() - Error occurred while trying to do fallbacks - b'{\n  "error": {\n    "code": 400,\n    "message": "Invalid thought si
21:28:36 - LiteLLM Router:ERROR: router.py:8770 - litellm.router.py::async_function_with_fallbacks() - Error occurred while trying to do fallbacks - b'{\n  "error": {\n    "code": 400,\n    "message": "Invalid thought si

After (5a2638b)

== vertex-first stream=False
turn 1 answered by vertex_ai/gemini-3.8-flash: tool call call_1824567__thought__AY89a19oc1v8Cr8l+...
turn 2 (primary failed, router fell back to gemini/gemini-3.8-flash, stream=False): OK "The weather in Paris is currently 18\u00b0C and sunny."
== vertex-first stream=True
turn 1 answered by vertex_ai/gemini-3.8-flash: tool call call_3186920__thought__AY89a18CaMyGDiOC4...
turn 2 (primary failed, router fell back to gemini/gemini-3.8-flash, stream=True): OK "The weather in Paris is currently 18\u00b0C and sunny."
== studio-first stream=False
turn 1 answered by gemini/gemini-3.8-flash: tool call call_55250__thought__EqgCCqUCAWkUfRNVYIJ...
turn 2 (primary failed, router fell back to vertex_ai/gemini-3.8-flash, stream=False): OK "The weather in Paris is sunny and 18\u00b0C."
== studio-first stream=True
turn 1 answered by gemini/gemini-3.8-flash: tool call call_13740__thought__EskCCsYCAWkUfRO9ILb...
turn 2 (primary failed, router fell back to vertex_ai/gemini-3.8-flash, stream=True): OK "It is currently 18\u00b0C and sunny in Paris."
Streaming chat sent straight to the twin

The base's streaming fallback reports the primary's connect error, so this sends the replayed history straight to the other backend's group with stream: true. twin_stream.sh is run_client.sh with this case in place of the matrix

bash twin_stream.sh http://127.0.0.1:$PORT

Before

tree 2dc4847579, changes outside tests/: 0
/v1/chat/completions vertex-mint history replayed straight to studio-mint stream=true minted call_1916091__thought__AY89a18Qht7... HTTP 400 b'{\n "error": {\n "code": 400,\n "message": "Corrupted thought signature.",\n "status": "INVALID_ARGUMENT"\n }\n}\n' LiteLLM: model group 'studio-mint' failed with the error above and no fallback model group was found for it, so the request was not retried on another model. Fallbacks are configured for: vertex-first, studio-first. Add a fallbacks entry for that model group (Router fallbacks or pr
/v1/chat/completions studio-mint history replayed straight to vertex-mint stream=true minted call_1017__thought__EqgCCqUCAWkUfR... HTTP 400 b'{\n "error": {\n "code": 400,\n "message": "Invalid thought signature.",\n "status": "INVALID_ARGUMENT"\n }\n}\n' LiteLLM: model group 'vertex-mint' failed with the error above and no fallback model group was found for it, so the request was not retried on another model. Fallbacks are configured for: vertex-first, studio-first. Add a fallbacks entry for that model group (Router fallbacks or prox

After

tree 5a2638b53c, changes outside tests/: 0
/v1/chat/completions vertex-mint history replayed straight to studio-mint stream=true minted call_515568__thought__AY89a1/zwHG4... HTTP 200 "The weather in Paris is currently 18\u00b0C and sunny."
/v1/chat/completions studio-mint history replayed straight to vertex-mint stream=true minted call_46883__thought__EosCCogCAWkUf... HTTP 200 "It is currently 18\u00b0C and sunny in Paris."

Observations

  • Base streaming fallback 500s name the primary, and this PR leaves that alone

/live-pr-risk

No path that worked before changes on the base, the tip, or the tip merged into main (cells)

Breaking, backward incompatible, regression risk, graph, not verified

Each run used 2-worker proxies with real Vertex and AI Studio behind wire recorders, and the merged tree is 76a4b77ab8

Breaking

None. Every cell that answered on the base answers the same on the head, status and upstream calls alike. That covers chat, native generateContent, both streaming, a small cache, an unrelated 400 (temperature: 5, an unsupported param), an int, list or empty signature, and an unauthenticated call. The Vertex stale-cache rows differ only by which worker holds the old cache, and both trees show the same 400 cc, GET cachedContents, 200 cc rebuild

Backward incompatible

  • A rejected signature now costs a second call with the placeholder in every slot, the serving backend's valid ones too (c2_native_foreign_sig, base one 400, head 400 then 200). Decided by the PR author in the TLDR's "Why every slot", the behavior [Bug]: Router fallback between vertex_ai and gemini replays endpoint-bound thought signatures -> 400 "Corrupted thought signature" (Gemini 3.x) #32140 asks for
  • A truncated or corrupted signature now gets 200, not 400 (c8_native_5kb, base 400 Invalid thought signature., head 400 then 200). Same decision
  • Each turn on a mixed-backend history pays one 400 first. Same decision, since signatures are opaque
  • An AI Studio cache holding a Vertex signature costs three calls per turn. Kept as the Medium caveat, follow-up filed
  • A client's own cachedContent holding a foreign signature reaches Google twice before its 400. Kept as a Low caveat, follow-up filed
  • A resend runs the pre-call callbacks again, and OTel response_duration leaves out the rejected call. Kept as a Low caveat, follow-up filed

Regression risk

The integration round at 5a2638b (providers, SDK and accounting groups) finds no red of its own. Every head red but two also fails on the base, and those two, a worker SIGKILL chaos case and a Vertex model-garden route, timed out under box load and then passed on a head rerun and on the base

Integration round
  lpr-providers            head  providers   exit=1 wall=2462s  1773 collected, 1748 passed, 17 failed, 8 skipped, pytest 2403s
  lpr-providers-base-reds  base  providers   exit=1 wall=282s  14 collected, -1 passed, 15 failed, 0 skipped, pytest 141s
  lpr-providers-rerun      head  providers   exit=1 wall=180s  14 collected, 0 passed, 14 failed, 0 skipped, pytest 136s
  lpr-sdk                  head  sdk         exit=0 wall=226s  75 collected, 75 passed, 0 failed, 0 skipped, pytest 175s
  lpr-accounting           head  accounting  exit=1 wall=457s  14 collected, 13 passed, 1 failed, 0 skipped, pytest 421s
  lpr-accounting-base-reds base  accounting  exit=1 wall=191s  1 collected, 0 passed, 1 failed, 0 skipped, pytest 149s
  lpr-accounting-rerun     head  accounting  exit=1 wall=195s  1 collected, 0 passed, 1 failed, 0 skipped, pytest 154s
  pre-existing providers/test_gemini_long_decode_wire.py::test_count_or_cap_that_is_not_a_number_makes_one_request_and_is_never_continued[n-empty-sync]  (base red, head rerun red)
  pre-existing providers/test_gemini_long_decode_wire.py::test_count_or_cap_that_is_not_a_number_makes_one_request_and_is_never_continued[n-empty-stream]  (base red, head rerun red)
  flake        providers/test_gemini_thinking_replay_chaos.py::test_worker_sigkill_mid_burst_leaves_the_sibling_replaying_thinking_signature_free  (base green, head rerun green)
  pre-existing providers/test_gemini_tool_result_part_reference_wire.py::test_a_multimodal_tool_result_with_a_ref_keeps_its_image_parts_beside_the_raw_text[gemini-chat]  (base red, head rerun red)
  pre-existing providers/test_gemini_tool_result_part_reference_wire.py::test_a_multimodal_tool_result_with_a_ref_keeps_its_image_parts_beside_the_raw_text[gemini-messages]  (base red, head rerun red)
  pre-existing providers/test_gemini_tool_result_part_reference_wire.py::test_a_multimodal_tool_result_with_a_ref_keeps_its_image_parts_beside_the_raw_text[vertex_ai-chat]  (base red, head rerun red)
  pre-existing providers/test_google_genai_vertex_routes_wire.py::test_generate_content_reaches_the_route_handler_chat_uses[model_garden_publisher]  (base red, head rerun green)
  flake        providers/test_google_genai_vertex_routes_wire.py::test_generate_content_reaches_the_route_handler_chat_uses[model_garden_endpoint]  (base green, head rerun green)
  pre-existing providers/test_vertex_gemini_fragmented_stream_wire.py::test_vertex_gemini_stream_split_across_many_fragments_completes_without_stalling  (base red, head rerun red)
  pre-existing providers/test_vertex_gemini_function_call_wire.py::test_vertex_gemini_kwargs_extra_param_reaches_generation_config  (base red, head rerun red)
  pre-existing routing/test_reasoning_effort_levels_wire.py::test_reasoning_effort_reaches_a_declaring_deployment_as_one_of_its_levels[chat-invoke-output-config-beside-budget-keeps-display-updates]  (base red, head rerun red)
  pre-existing translation/chat_completions/sampling/test_chat_completions_sampling_gemini.py::test_chat_completions_sampling_gemini[gemini/gemini-3.8-flash-temperature]  (base red, head rerun red)
  pre-existing translation/chat_completions/sampling/test_chat_completions_sampling_gemini.py::test_chat_completions_sampling_gemini[vertex_ai/gemini-3.8-flash-temperature]  (base red, head rerun red)
  pre-existing translation/chat_completions/sampling/test_chat_completions_sampling_gemini.py::test_chat_completions_sampling_gemini[gemini/gemini-3.8-flash-zero_temperature]  (base red, head rerun red)
  pre-existing spend/test_cache_and_quota.py::test_scheduled_budget_reset_reconnects_after_db_transport_failure_and_unblocks_key  (base red, head rerun red)
round exit=1

The native cost-header and SSE-framing e2e cases fail on both trees because gemini-2.5-flash is retired upstream (404). The rig's native cells cover that route live on gemini-3.8-flash

The pre-call callbacks were traced, not run live. A resend calls them a second time, so a callback that counts calls sees two for one request. A custom callback on the rig that counts pre-call hooks would show it

Dependency graph

Dependent Status
chat, plain and stream verified live
router fallback, both ways verified live
native generateContent verified live
native stream verified live
/v1/messages verified live in QA
/v1/responses verified live in QA
cache kept on resend verified live in QA
Vertex stale-cache rebuild verified live
AI Studio cache, custom api_base verified live, merged tree
unrelated 400 verified live
hostile signature values verified live
unauthenticated call verified live
spend rows verified live
google_genai SDK adapter tested
pre-call callbacks traced, not run
OpenCode Go Gemini unchanged path
other generate_content providers unreachable

The handler resends only for Gemini and Vertex, so other generate_content providers never reach it. OpenCode Go calls _transform_request_body, which this PR leaves alone, plus the renamed placeholder helper

Not verified

Type

🐛 Bug Fix

Caveats (if any)

Medium

  • An AI Studio cache holding a Vertex signature costs three calls every turn
    • AI Studio creates it but rejects each read with 400 Corrupted thought signature., so it never serves in its one-hour TTL

Low

  • Each turn on a mixed-backend history pays one 400 first
  • The resend replaces every signature, the serving backend's valid ones too
    • A truncated or corrupted signature gets an unmarked 200, and Google says skipped signatures may degrade answers
  • A client's own cachedContent holding a foreign signature, with one inline too, reaches Google twice before its 400
  • The OpenCode Go Gemini route does not get the resend
  • A resend runs the pre-call callbacks again, so OTel response_duration leaves out the rejected call

Final Attestation

  • The tests check the right things, including the edge cases, and regressions in the respective real-world customer use-cases are not possible after this PR
Bugbot summary

[!NOTE]
Medium Risk
Changes core Gemini/Vertex request paths with automatic retries that alter request bodies and interact with context caching; wrong detection could mask real 400s or add latency on every mixed-backend turn.

Overview
Adds automatic recovery when Vertex AI and AI Studio reject thought signatures minted by the other backend (400 with “Corrupted” / “Invalid thought signature”), which commonly breaks router fallbacks and multi-turn tool use after the first call.

A new rejected_thought_signature_retry layer detects those 400s and resends once with Google’s documented skip_thought_signature_validator placeholder in every signature slot (via renamed public get_dummy_thought_signature). It is wired into Vertex/Gemini chat (sync/async, streaming and not), native generateContent in llm_http_handler, and layered with existing context-cache retry: cache_rebuilds supplies both a fresh-cache rebuild and an context_caching=False inline rebuild when the cached prefix holds a bad signature. Context caching helpers honor a new context_caching flag so inline history can be rebuilt without creating a cache.

Unrelated 400s and bodies that already only use the placeholder are not retried. Logging for generate-content uses a shared _log_generate_content_request helper so resends re-log the body actually sent.

Reviewed by Cursor Bugbot for commit 5a2638b. Bugbot is set up for automated code reviews on this repo. Configure here.

mateo-berri and others added 3 commits November 2, 2026 10:28
…r backend rejects a replayed thought signature

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
… is resent once with the placeholder

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
…either rejection order ends in an accepted body

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

codspeed Bot commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

Merging this PR will not alter performance

1 warning

⚠️ 1 benchmark is 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

✅ 43 untouched benchmarks


Comparing tavren27:litellm_gemini_thought_signature_resend (5a2638b) with main (7fe6b1d)

Open in CodSpeed

@codecov

codecov Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 91.66667% with 15 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...rtex_ai/gemini/rejected_thought_signature_retry.py 92.48% 10 Missing ⚠️
litellm/llms/custom_httpx/llm_http_handler.py 75.00% 5 Missing ⚠️

📢 Thoughts on this report? Let us know!

@mateo-berri

Copy link
Copy Markdown
Contributor

@greptileai

@greptile-apps

greptile-apps Bot commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge, with no new actionable findings

Summary

Adds recovery when Gemini or Vertex rejects a replayed thought signature. The latest change tries placeholder signatures while keeping the cache, then sends the history inline if the cache also holds a rejected signature

  • Gemini and Vertex requests retry after a backend rejects a thought signature.

Reviews (4) · Last reviewed commit: "fix(gemini): keep the context cache on a..." · Reviewed by Greptile

… generateContent

When the rejected signature sits inside a cachedContents prefix, the
placeholder resend now carries the history inline, since replacing the
signature in the request body cannot reach the cache. The native
generateContent handlers get the same one-time resend.
@mateo-berri

Copy link
Copy Markdown
Contributor

@greptileai

@mateo-berri

Copy link
Copy Markdown
Contributor

@greptileai

@mateo-berri

Copy link
Copy Markdown
Contributor

bugbot run

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 5a2638b. Configure here.

@mateo-berri

Copy link
Copy Markdown
Contributor

@greptileai

@mateo-berri mateo-berri left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mateo-berri
mateo-berri merged commit 640a87f into BerriAI:main Nov 3, 2026
96 checks passed
mateo-berri added a commit to izzybn/litellm that referenced this pull request Nov 22, 2026
…rejects a replayed signature

lts/1.108.x lacks main's BerriAI#49697, so a Vertex image-only reply replayed to
AI Studio answered 400 "Corrupted thought signature." once the image
carried its own signature. This ports BerriAI#49697's chat completions resend:
on a 400 naming a thought signature, swap every replayed signature for
Google's skip-validator placeholder and post once more. The context cache
inline resend and the native generateContent resend stay main-only.
rogerrum pushed a commit to rogerrum/k8s-gitops that referenced this pull request Nov 24, 2026
…110.3 ) (#3828)

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.109.1` → `1.110.3` |

---

### Release Notes

<details>
<summary>BerriAI/litellm (ghcr.io/berriai/litellm)</summary>

### [`v1.110.3`](https://github.com/BerriAI/litellm/releases/tag/v1.110.3)

[Compare Source](https://github.com/BerriAI/litellm/compare/v1.110.2...v1.110.3)

#### Verify Docker Image Signature

```bash
cosign verify \
  --certificate-identity https://github.com/BerriAI/project-releaser/.github/workflows/release.yml@refs/heads/main \
  --certificate-oidc-issuer https://token.actions.githubusercontent.com \
  ghcr.io/berriai/litellm:v1.110.3
```

#### What's Changed

- fix(mcp)!: backport gateway DCR opt-in to 1.110 ([#&#8203;53059](https://github.com/BerriAI/litellm/issues/53059)) by [@&#8203;shrey-berri](https://github.com/shrey-berri) in [#&#8203;53178](https://github.com/BerriAI/litellm/pull/53178)
- fix(proxy): backport audit log fixes to stable/1.110.x ([#&#8203;50929](https://github.com/BerriAI/litellm/issues/50929), [#&#8203;53305](https://github.com/BerriAI/litellm/issues/53305)) by [@&#8203;kerry-berri](https://github.com/kerry-berri) in [#&#8203;53298](https://github.com/BerriAI/litellm/pull/53298)
- chore(release): backport [#&#8203;53171](https://github.com/BerriAI/litellm/issues/53171), [#&#8203;53210](https://github.com/BerriAI/litellm/issues/53210) to stable/1.110.x by [@&#8203;kerry-berri](https://github.com/kerry-berri) in [#&#8203;53207](https://github.com/BerriAI/litellm/pull/53207)
- fix(router): fall back by the group a pick was routed to (backport [#&#8203;52510](https://github.com/BerriAI/litellm/issues/52510) to stable/1.110.x) by [@&#8203;kerry-berri](https://github.com/kerry-berri) in [#&#8203;53109](https://github.com/BerriAI/litellm/pull/53109)
- chore: bump versions on stable/1.110.x by [@&#8203;yuneng-berri](https://github.com/yuneng-berri) in [#&#8203;54010](https://github.com/BerriAI/litellm/pull/54010)

**Full Changelog**: <https://github.com/BerriAI/litellm/compare/v1.110.2...v1.110.3>

### [`v1.110.2`](https://github.com/BerriAI/litellm/releases/tag/v1.110.2)

[Compare Source](https://github.com/BerriAI/litellm/compare/v1.110.1...v1.110.2)

#### Verify this release

```bash
cosign verify \
  --certificate-identity https://github.com/BerriAI/project-releaser/.github/workflows/release.yml@refs/heads/main \
  --certificate-oidc-issuer https://token.actions.githubusercontent.com \
  ghcr.io/berriai/litellm:v1.110.2
```

Same command for `litellm-database`, `litellm-non_root` and the `docker.io/litellm/*` images

#### What's new in 1.110.2

11 PRs. 8 fixed. No action needed to upgrade

##### Changes

- **Anthropic:** Fixed `temperature=1` returning 400 on Claude models that removed sampling params on Anthropic, Vertex AI and Azure AI, broken since v1.110.0-rc.2 ([#&#8203;52341](https://github.com/BerriAI/litellm/issues/52341))
- **Responses API:** Fixed streams retrying after output reached the client, which sent duplicate events and billed extra calls ([#&#8203;52461](https://github.com/BerriAI/litellm/issues/52461))
- **Responses API:** Fixed streams that fail after reasoning output restarting on a fallback group and sending a second response ([#&#8203;52616](https://github.com/BerriAI/litellm/issues/52616))
- **Caching:** Fixed GPT-6.2 system prompts missing the prompt cache on `/v1/chat/completions` and `/v1/messages` unless `store: false` ([#&#8203;52906](https://github.com/BerriAI/litellm/issues/52906)) <sup>Also in [1.106.12](https://github.com/BerriAI/litellm/releases/tag/v1.106.12), [1.108.13](https://github.com/BerriAI/litellm/releases/tag/v1.108.13), [1.109.3](https://github.com/BerriAI/litellm/releases/tag/v1.109.3)</sup>
- **Cost tracking and pricing:** Fixed forwarded Anthropic credentials on `/v1/messages` ignoring the deployment's custom prices, broken since v1.109.0 ([#&#8203;52313](https://github.com/BerriAI/litellm/issues/52313))
- **Keys, teams and auth:** Fixed JWT key mappings without `jwt_issuer` taking 5 minutes to apply when `litellm_jwtauth.issuers` is set, broken since v1.103.0 ([#&#8203;52350](https://github.com/BerriAI/litellm/issues/52350)) <sup>Also in [1.108.13](https://github.com/BerriAI/litellm/releases/tag/v1.108.13), [1.109.3](https://github.com/BerriAI/litellm/releases/tag/v1.109.3)</sup>
- **Keys, teams and auth:** Fixed `/key/info` letting a key with no user read other userless keys by hash or alias ([#&#8203;52838](https://github.com/BerriAI/litellm/issues/52838), [#&#8203;52925](https://github.com/BerriAI/litellm/issues/52925)) <sup>Also in [1.106.12](https://github.com/BerriAI/litellm/releases/tag/v1.106.12), [1.108.13](https://github.com/BerriAI/litellm/releases/tag/v1.108.13), [1.109.3](https://github.com/BerriAI/litellm/releases/tag/v1.109.3)</sup>
- **Performance:** Fixed memory growth from every finished request staying in memory until a full GC pass, broken since v1.110.0-rc.1 ([#&#8203;51888](https://github.com/BerriAI/litellm/issues/51888))

***

Backport [#&#8203;52463](https://github.com/BerriAI/litellm/issues/52463) · Backport [#&#8203;52469](https://github.com/BerriAI/litellm/issues/52469) · Backport [#&#8203;52690](https://github.com/BerriAI/litellm/issues/52690) · Backport [#&#8203;52751](https://github.com/BerriAI/litellm/issues/52751) · Backport [#&#8203;52920](https://github.com/BerriAI/litellm/issues/52920) · Backport [#&#8203;52938](https://github.com/BerriAI/litellm/issues/52938) · [Full changelog](https://github.com/BerriAI/litellm/compare/v1.110.1...v1.110.2)

### [`v1.110.1`](https://github.com/BerriAI/litellm/releases/tag/v1.110.1)

[Compare Source](https://github.com/BerriAI/litellm/compare/v1.110.0...v1.110.1)

#### Verify this release

```bash
cosign verify \
  --certificate-identity https://github.com/BerriAI/project-releaser/.github/workflows/release.yml@refs/heads/main \
  --certificate-oidc-issuer https://token.actions.githubusercontent.com \
  ghcr.io/berriai/litellm:v1.110.1
```

Same command for `litellm-database`, `litellm-non_root` and the `docker.io/litellm/*` images

#### What's new in 1.110.1

3 PRs. 1 fixed, 2 changed. No action needed to upgrade

##### Changes

- **OpenAI:** Fixed GPT-6.2 prompt caching for system prompts sent to `/v1/chat/completions` or `/v1/messages` with `store: false` ([#&#8203;52658](https://github.com/BerriAI/litellm/issues/52658))
- **Deployment:** Changed the UI image to slim nginx, which drops `curl` but keeps `wget` and `nc` ([#&#8203;52595](https://github.com/BerriAI/litellm/issues/52595))
- **Deployment:** Changed the Docker images to a newer Wolfi base image ([#&#8203;52749](https://github.com/BerriAI/litellm/issues/52749))

***

[Full changelog](https://github.com/BerriAI/litellm/compare/v1.110.0...v1.110.1)

### [`v1.110.0`](https://github.com/BerriAI/litellm/releases/tag/v1.110.0)

[Compare Source](https://github.com/BerriAI/litellm/compare/v1.109.4...v1.110.0)

#### Verify Docker Image Signature

```bash
cosign verify \
  --certificate-identity https://github.com/BerriAI/project-releaser/.github/workflows/release.yml@refs/heads/main \
  --certificate-oidc-issuer https://token.actions.githubusercontent.com \
  ghcr.io/berriai/litellm:v1.110.0
```

#### What's Changed

- fix(gemini)!: answer 400 for an unsupported chat audio format, drop it under drop_params by [@&#8203;paveln83](https://github.com/paveln83) in [#&#8203;49423](https://github.com/BerriAI/litellm/pull/49423)
- fix(router): keep encrypted reasoning when a fallback hops between same-key deployments with no api_base by [@&#8203;tessellark](https://github.com/tessellark) in [#&#8203;49396](https://github.com/BerriAI/litellm/pull/49396)
- fix(anthropic)!: sync the beta header allowlist with what anthropic, vertex_ai, and azure_ai accept by [@&#8203;tavren27](https://github.com/tavren27) in [#&#8203;49409](https://github.com/BerriAI/litellm/pull/49409)
- fix(responses): serialize sequence_number on every bridged streaming event by [@&#8203;kaust1495](https://github.com/kaust1495) in [#&#8203;44944](https://github.com/BerriAI/litellm/pull/44944)
- fix(proxy): make /update/sso_settings a true PATCH and send only changed SSO fields from the UI by [@&#8203;jesus-berri](https://github.com/jesus-berri) in [#&#8203;49527](https://github.com/BerriAI/litellm/pull/49527)
- test(integration): fix four flaky integration tests by [@&#8203;yuneng-berri](https://github.com/yuneng-berri) in [#&#8203;49554](https://github.com/BerriAI/litellm/pull/49554)
- fix(anthropic): stream azure_ai natively on an Azure OpenAI host on /v1/messages by [@&#8203;mika-lt](https://github.com/mika-lt) in [#&#8203;49216](https://github.com/BerriAI/litellm/pull/49216)
- fix(proxy): check the model in every OpenAI websocket passthrough frame by [@&#8203;zoveki](https://github.com/zoveki) in [#&#8203;48979](https://github.com/BerriAI/litellm/pull/48979)
- fix(proxy): keep provider fields on streamed chat completion chunks by [@&#8203;quietjules](https://github.com/quietjules) in [#&#8203;49398](https://github.com/BerriAI/litellm/pull/49398)
- fix(providers): trim prompt_cache_breakpoint to what each API takes under drop_params by [@&#8203;tavren27](https://github.com/tavren27) in [#&#8203;49064](https://github.com/BerriAI/litellm/pull/49064)
- fix(bedrock): price Web Search on the GPT-5.4 and later Mantle rows and the GovCloud West Mantle rows by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;49687](https://github.com/BerriAI/litellm/pull/49687)
- fix(model-catalog): declare the tool and Responses token count framing keys by [@&#8203;tavren27](https://github.com/tavren27) in [#&#8203;49683](https://github.com/BerriAI/litellm/pull/49683)
- fix(proxy): count the context_management edits /v1/messages applies on every bridged provider by [@&#8203;tessellark](https://github.com/tessellark) in [#&#8203;49234](https://github.com/BerriAI/litellm/pull/49234)
- fix(fireworks): keep developer items in place for models that accept a later system message by [@&#8203;tessellark](https://github.com/tessellark) in [#&#8203;49399](https://github.com/BerriAI/litellm/pull/49399)
- fix(databricks): join plain text blocks for non-Claude json_object requests by [@&#8203;zoveki](https://github.com/zoveki) in [#&#8203;49385](https://github.com/BerriAI/litellm/pull/49385)
- test(integration): repair stale contract fixtures by [@&#8203;yuneng-berri](https://github.com/yuneng-berri) in [#&#8203;49700](https://github.com/BerriAI/litellm/pull/49700)
- fix(bedrock)!: give Invoke and Mantle Claude the model's own default max_tokens by [@&#8203;zoveki](https://github.com/zoveki) in [#&#8203;49692](https://github.com/BerriAI/litellm/pull/49692)
- fix(count_tokens): count grok-4-1, grok-4.3 and DeepSeek V4.1 tool requests the way their hosts bill them by [@&#8203;tavren27](https://github.com/tavren27) in [#&#8203;49074](https://github.com/BerriAI/litellm/pull/49074)
- fix(cohere): map Cohere v2 finish_reason on non-streaming chat responses by [@&#8203;jesus-berri](https://github.com/jesus-berri) in [#&#8203;49529](https://github.com/BerriAI/litellm/pull/49529)
- test(integration): align remaining release qualification checks by [@&#8203;yuneng-berri](https://github.com/yuneng-berri) in [#&#8203;49714](https://github.com/BerriAI/litellm/pull/49714)
- fix(prometheus): retain deployment attribution on proxy failures by [@&#8203;yuneng-berri](https://github.com/yuneng-berri) in [#&#8203;49717](https://github.com/BerriAI/litellm/pull/49717)
- test(integration): isolate stranger batch authorization from the batch-cost poller by [@&#8203;mateo-berri](https://github.com/mateo-berri) in [#&#8203;49522](https://github.com/BerriAI/litellm/pull/49522)
- fix(mcp): answer 400 for a hosted MCP tool a translated route cannot run, drop it under drop_params by [@&#8203;simonp9](https://github.com/simonp9) in [#&#8203;48931](https://github.com/BerriAI/litellm/pull/48931)
- feat(hosted_vllm)!: keep vLLM's stop_reason and token_ids on chat choices and stream chunks by [@&#8203;PrabalParihar](https://github.com/PrabalParihar) in [#&#8203;48393](https://github.com/BerriAI/litellm/pull/48393)
- feat(proxy)!: honor model_info.max_input_tokens in the Codex catalog for stock models by [@&#8203;tessellark](https://github.com/tessellark) in [#&#8203;49701](https://github.com/BerriAI/litellm/pull/49701)
- ci: remove workflows whose secrets are dead by [@&#8203;mateo-berri](https://github.com/mateo-berri) in [#&#8203;49722](https://github.com/BerriAI/litellm/pull/49722)
- test(integration): repair agent reads and bulk deletion setup by [@&#8203;yuneng-berri](https://github.com/yuneng-berri) in [#&#8203;49719](https://github.com/BerriAI/litellm/pull/49719)
- test(e2e): share the coding-CLI harness between suites by [@&#8203;ryan-crabbe-berri](https://github.com/ryan-crabbe-berri) in [#&#8203;49370](https://github.com/BerriAI/litellm/pull/49370)
- feat(model_info): add supports_continuation capability flag for Gemini long decode continuation by [@&#8203;jesus-berri](https://github.com/jesus-berri) in [#&#8203;49500](https://github.com/BerriAI/litellm/pull/49500)
- fix(spend)!: save streamed /v1/responses spend rows under the encrypted resp\_ id the client received by [@&#8203;simonp9](https://github.com/simonp9) in [#&#8203;49493](https://github.com/BerriAI/litellm/pull/49493)
- fix(cost): add deepgram/streaming/nova-3-medical and update stale Nova-3 streaming rates by [@&#8203;jesus-berri](https://github.com/jesus-berri) in [#&#8203;49733](https://github.com/BerriAI/litellm/pull/49733)
- build(deps): allow huggingface-hub 2.x by [@&#8203;davanstrien](https://github.com/davanstrien) in [#&#8203;49056](https://github.com/BerriAI/litellm/pull/49056)
- fix(proxy): charge budget windows when the cached key or team expired before the request ended by [@&#8203;etiennechabert](https://github.com/etiennechabert) in [#&#8203;47608](https://github.com/BerriAI/litellm/pull/47608)
- fix(proxy)!: ignore stored general_settings keys no settings API manages by [@&#8203;paveln83](https://github.com/paveln83) in [#&#8203;48967](https://github.com/BerriAI/litellm/pull/48967)
- fix(bedrock): reserve DeepSeek V3.2 output capacity and date GovCloud West Llama 3 by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;49732](https://github.com/BerriAI/litellm/pull/49732)
- test(gemini): assert vertex lists on content chunks by [@&#8203;mateo-berri](https://github.com/mateo-berri) in [#&#8203;49734](https://github.com/BerriAI/litellm/pull/49734)
- fix(model-catalog): declare the thinking_on_by_default key by [@&#8203;tavren27](https://github.com/tavren27) in [#&#8203;49720](https://github.com/BerriAI/litellm/pull/49720)
- fix(ui): make the off state of switches visible in light theme by [@&#8203;shrey-berri](https://github.com/shrey-berri) in [#&#8203;49718](https://github.com/BerriAI/litellm/pull/49718)
- fix(proxy): preserve DB settings during config reload by [@&#8203;mateo-berri](https://github.com/mateo-berri) in [#&#8203;49735](https://github.com/BerriAI/litellm/pull/49735)
- refactor(ui): move MCP text onto i18n by [@&#8203;yuneng-berri](https://github.com/yuneng-berri) in [#&#8203;49473](https://github.com/BerriAI/litellm/pull/49473)
- refactor(ui): move guardrails text onto i18n by [@&#8203;yuneng-berri](https://github.com/yuneng-berri) in [#&#8203;49524](https://github.com/BerriAI/litellm/pull/49524)
- refactor(ui): move agents and knowledge text onto i18n by [@&#8203;yuneng-berri](https://github.com/yuneng-berri) in [#&#8203;49530](https://github.com/BerriAI/litellm/pull/49530)
- fix(proxy): log each endpoint's own call type on failed audio, moderation, image, and rerank spend rows by [@&#8203;paveln83](https://github.com/paveln83) in [#&#8203;49684](https://github.com/BerriAI/litellm/pull/49684)
- refactor(ui): move admin and settings text onto i18n by [@&#8203;yuneng-berri](https://github.com/yuneng-berri) in [#&#8203;49546](https://github.com/BerriAI/litellm/pull/49546)
- fix(mcp): answer bare OPTIONS on MCP routes without running LiteLLM auth by [@&#8203;jesus-berri](https://github.com/jesus-berri) in [#&#8203;49497](https://github.com/BerriAI/litellm/pull/49497)
- fix(managed_files): keep the upload the managed id encodes when two target models share a deployment by [@&#8203;quietjules](https://github.com/quietjules) in [#&#8203;49420](https://github.com/BerriAI/litellm/pull/49420)
- test(integration): look up streamed Responses spend rows by the client-facing id by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;49752](https://github.com/BerriAI/litellm/pull/49752)
- fix(gemini): resend once with the placeholder signature when the other backend rejects a replayed thought signature by [@&#8203;tavren27](https://github.com/tavren27) in [#&#8203;49697](https://github.com/BerriAI/litellm/pull/49697)
- fix(vertex_ai)!: map Anthropic context overflow errors by [@&#8203;mgeorgaklis](https://github.com/mgeorgaklis) in [#&#8203;36963](https://github.com/BerriAI/litellm/pull/36963)
- test(e2e): drive the Codex CLI through LiteLLM, command round trip by [@&#8203;ryan-crabbe-berri](https://github.com/ryan-crabbe-berri) in [#&#8203;49374](https://github.com/BerriAI/litellm/pull/49374)
- test(e2e): add Codex file edit, long session and auto-compaction rows through LiteLLM by [@&#8203;ryan-crabbe-berri](https://github.com/ryan-crabbe-berri) in [#&#8203;49386](https://github.com/BerriAI/litellm/pull/49386)
- fix(anthropic_endpoints)!: return Anthropic error envelopes on /v1/messages auth failures by [@&#8203;albertoperdomo2](https://github.com/albertoperdomo2) in [#&#8203;48466](https://github.com/BerriAI/litellm/pull/48466)
- feat(anthropic): pick the beta allowlist row per deployment and surface input_transformations by [@&#8203;mika-lt](https://github.com/mika-lt) in [#&#8203;49689](https://github.com/BerriAI/litellm/pull/49689)
- fix(bedrock): send native structured output for json_schema on Claude models that cannot force a tool by [@&#8203;tavren27](https://github.com/tavren27) in [#&#8203;49703](https://github.com/BerriAI/litellm/pull/49703)
- test(integration): repair release qualification timing and labels by [@&#8203;yuneng-berri](https://github.com/yuneng-berri) in [#&#8203;49737](https://github.com/BerriAI/litellm/pull/49737)
- fix(tool_choice): accept OpenAI allowed_tools on chat completions and flatten it for the Responses bridge by [@&#8203;ryan-crabbe-berri](https://github.com/ryan-crabbe-berri) in [#&#8203;49043](https://github.com/BerriAI/litellm/pull/49043)
- fix(cost-map): give the bare gpt-4o, gpt-4o-mini, gpt-4.1 and gpt-4.1-mini aliases their 2027-01-14 shutdown date by [@&#8203;zoveki](https://github.com/zoveki) in [#&#8203;49707](https://github.com/BerriAI/litellm/pull/49707)
- fix(responses)!: authorize and decode comparison response IDs by [@&#8203;ryan-crabbe-berri](https://github.com/ryan-crabbe-berri) in [#&#8203;49402](https://github.com/BerriAI/litellm/pull/49402)
- fix(spend): bill web search interception follow-ups once under the outer request by [@&#8203;mateo-berri](https://github.com/mateo-berri) in [#&#8203;49762](https://github.com/BerriAI/litellm/pull/49762)
- fix(vllm): list hosted_vllm wildcard models when the server has no api key by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;40066](https://github.com/BerriAI/litellm/pull/40066)
- feat(decisions): add Parallel AI web-grounded decisions by [@&#8203;devin-gupta](https://github.com/devin-gupta) in [#&#8203;49188](https://github.com/BerriAI/litellm/pull/49188)
- test(messages): add rust vs python messages parity characterization suite by [@&#8203;narmstrong-berri](https://github.com/narmstrong-berri) in [#&#8203;49610](https://github.com/BerriAI/litellm/pull/49610)
- fix(messages): make rust messages copy python messages behaviour by [@&#8203;narmstrong-berri](https://github.com/narmstrong-berri) in [#&#8203;49611](https://github.com/BerriAI/litellm/pull/49611)
- feat(videos): serve custom_provider_map BaseVideoConfig providers on /v1/videos by [@&#8203;kerry-berri](https://github.com/kerry-berri) in [#&#8203;49785](https://github.com/BerriAI/litellm/pull/49785)
- test(bedrock): assert native structured output when the model rejects forced tools by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;49799](https://github.com/BerriAI/litellm/pull/49799)
- test(spend): expect the Anthropic budget envelope on a broken messages stream by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;49800](https://github.com/BerriAI/litellm/pull/49800)
- fix(router)!: scope context fallback precedence to the requested group by [@&#8203;mateo-berri](https://github.com/mateo-berri) in [#&#8203;49779](https://github.com/BerriAI/litellm/pull/49779)
- docs: preserve author review when updating PR summaries by [@&#8203;mateo-berri](https://github.com/mateo-berri) in [#&#8203;49803](https://github.com/BerriAI/litellm/pull/49803)
- fix(embeddings): honor the caller's timeout on Cohere sync and HuggingFace embedding requests by [@&#8203;ryan-crabbe-berri](https://github.com/ryan-crabbe-berri) in [#&#8203;48593](https://github.com/BerriAI/litellm/pull/48593)
- fix(cost-map): price Mistral Large 4 at its current list price by [@&#8203;ryan-crabbe-berri](https://github.com/ryan-crabbe-berri) in [#&#8203;49814](https://github.com/BerriAI/litellm/pull/49814)
- fix(anthropic): send an https PDF image_url to Claude as a document by [@&#8203;tessellark](https://github.com/tessellark) in [#&#8203;49708](https://github.com/BerriAI/litellm/pull/49708)
- feat(realtime)!: support latest OpenAI audio models by [@&#8203;emerzon](https://github.com/emerzon) in [#&#8203;35600](https://github.com/BerriAI/litellm/pull/35600)
- fix(cache_control)!: keep one deployment's prompt-cache opt-in from reaching siblings on the same model by [@&#8203;tessellark](https://github.com/tessellark) in [#&#8203;49685](https://github.com/BerriAI/litellm/pull/49685)
- fix(bedrock)!: fail a Nova Sonic realtime session whose Bedrock stream drops instead of closing 1000 by [@&#8203;norkelbyte](https://github.com/norkelbyte) in [#&#8203;49170](https://github.com/BerriAI/litellm/pull/49170)
- fix(azure_ai): keep azure_ad_token out of the request body by [@&#8203;tavren27](https://github.com/tavren27) in [#&#8203;49769](https://github.com/BerriAI/litellm/pull/49769)
- fix(typesafe): mark jev-latest as answering Box questions now that it points to Jev 1.14 by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;49835](https://github.com/BerriAI/litellm/pull/49835)
- fix(proxy): let a config license unlock enterprise settings and spell "environment" right in license errors by [@&#8203;paveln83](https://github.com/paveln83) in [#&#8203;49745](https://github.com/BerriAI/litellm/pull/49745)
- fix(logging): keep the caller's call_type when chat completions are bridged to the Responses API by [@&#8203;zoveki](https://github.com/zoveki) in [#&#8203;49710](https://github.com/BerriAI/litellm/pull/49710)
- fix(anthropic)!: carry prompt_cache_breakpoint to cache_control on chat completions to Claude by [@&#8203;zoveki](https://github.com/zoveki) in [#&#8203;49783](https://github.com/BerriAI/litellm/pull/49783)
- fix(proxy): list slash-less wildcard groups like claude-\* on /v1/models and /model/info by [@&#8203;tessellark](https://github.com/tessellark) in [#&#8203;49832](https://github.com/BerriAI/litellm/pull/49832)
- fix(gemini): lower the gemini-3.5-flash-lite batch cache price and date the gemini-2.5-pro and 2.5-flash shutdown by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;49871](https://github.com/BerriAI/litellm/pull/49871)
- fix(vertex-ai): drop batch prices from gemini-robotics-er-2-preview by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;49895](https://github.com/BerriAI/litellm/pull/49895)
- fix(spend): read only the newest rows when paging sessions by [@&#8203;shrey-berri](https://github.com/shrey-berri) in [#&#8203;48886](https://github.com/BerriAI/litellm/pull/48886)
- fix(model_prices): consolidate verified provider metadata and pricing by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;49361](https://github.com/BerriAI/litellm/pull/49361)
- feat(model-catalog): read successor_model, the provider's recommended replacement for a deprecating row by [@&#8203;kerry-berri](https://github.com/kerry-berri) in [#&#8203;49791](https://github.com/BerriAI/litellm/pull/49791)
- refactor(ui): move teams, users and orgs text onto i18n by [@&#8203;yuneng-berri](https://github.com/yuneng-berri) in [#&#8203;49484](https://github.com/BerriAI/litellm/pull/49484)
- fix(proxy): defer optional Prisma imports in SSO settings by [@&#8203;yuneng-berri](https://github.com/yuneng-berri) in [#&#8203;49771](https://github.com/BerriAI/litellm/pull/49771)
- fix(e2e): restore main qualification across providers and UI by [@&#8203;yuneng-berri](https://github.com/yuneng-berri) in [#&#8203;49763](https://github.com/BerriAI/litellm/pull/49763)
- fix(proxy): omit cost headers for unpriced responses by [@&#8203;joshua-berri](https://github.com/joshua-berri) in [#&#8203;49467](https://github.com/BerriAI/litellm/pull/49467)
- feat(cost-map): record the provider's recommended replacement as successor_model on deprecating rows and report it from /model/deprecations by [@&#8203;kerry-berri](https://github.com/kerry-berri) in [#&#8203;49789](https://github.com/BerriAI/litellm/pull/49789)
- revert(bedrock): restore STS identity checks before [#&#8203;49763](https://github.com/BerriAI/litellm/issues/49763) by [@&#8203;yuneng-berri](https://github.com/yuneng-berri) in [#&#8203;49939](https://github.com/BerriAI/litellm/pull/49939)
- feat(ui): show user names instead of raw ids on detail pages by [@&#8203;jesus-berri](https://github.com/jesus-berri) in [#&#8203;47181](https://github.com/BerriAI/litellm/pull/47181)
- fix(proxy): cancel /team/spend/by_user in Postgres after 30s by [@&#8203;kerry-berri](https://github.com/kerry-berri) in [#&#8203;49922](https://github.com/BerriAI/litellm/pull/49922)
- fix(rate-limit): estimate embedding image and audio data URIs as media in TPM pre-call checks by [@&#8203;norkelbyte](https://github.com/norkelbyte) in [#&#8203;49831](https://github.com/BerriAI/litellm/pull/49831)
- feat(model-catalog): read deprecation_source, the provider page or feed a row's deprecation_date was read from by [@&#8203;kerry-berri](https://github.com/kerry-berri) in [#&#8203;49955](https://github.com/BerriAI/litellm/pull/49955)
- feat(model-catalog): add fedramp_uplift_multiplier by [@&#8203;kerry-berri](https://github.com/kerry-berri) in [#&#8203;49950](https://github.com/BerriAI/litellm/pull/49950)
- feat(proxy): add general_settings.fips_mode startup gate by [@&#8203;yucheng-berri](https://github.com/yucheng-berri) in [#&#8203;48600](https://github.com/BerriAI/litellm/pull/48600)
- feat(ui): rebuild the command palette on shadcn Command by [@&#8203;yuneng-berri](https://github.com/yuneng-berri) in [#&#8203;49528](https://github.com/BerriAI/litellm/pull/49528)
- test(mcp): hold the progress test's upstream notification acks until they are dispatched by [@&#8203;joshua-berri](https://github.com/joshua-berri) in [#&#8203;49967](https://github.com/BerriAI/litellm/pull/49967)
- feat(cost-map): record deprecation_source on every dated row that has a known provider notice by [@&#8203;kerry-berri](https://github.com/kerry-berri) in [#&#8203;49968](https://github.com/BerriAI/litellm/pull/49968)
- chore(blog): refresh the bundled blog posts backup with the latest 50 posts from the docs RSS feed by [@&#8203;kerry-berri](https://github.com/kerry-berri) in [#&#8203;49971](https://github.com/BerriAI/litellm/pull/49971)
- fix(main)!: carry the full per-call price entry on the logging object instead of writing litellm.model_cost by [@&#8203;kerry-berri](https://github.com/kerry-berri) in [#&#8203;49532](https://github.com/BerriAI/litellm/pull/49532)
- fix(vertex-ai): sync tier prices and retirement floors by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;49964](https://github.com/BerriAI/litellm/pull/49964)
- fix(proxy): cancel the Admin UI's raw spend-log reads in Postgres after 30s by [@&#8203;kerry-berri](https://github.com/kerry-berri) in [#&#8203;49965](https://github.com/BerriAI/litellm/pull/49965)
- feat(proxy): configure the request header buffer size by [@&#8203;mrinal-berri](https://github.com/mrinal-berri) in [#&#8203;49883](https://github.com/BerriAI/litellm/pull/49883)
- fix(router): keep a deployment's token limits off the shared backend cost map key by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;49952](https://github.com/BerriAI/litellm/pull/49952)
- fix(credentials): preserve stored info when patching credentials by [@&#8203;mateo-berri](https://github.com/mateo-berri) in [#&#8203;49919](https://github.com/BerriAI/litellm/pull/49919)
- feat: add Wally as an OpenAI-compatible provider by [@&#8203;adityabatra072](https://github.com/adityabatra072) in [#&#8203;45662](https://github.com/BerriAI/litellm/pull/45662)
- chore(cost-map): remove the 52 rows whose provider retired them before 2026 by [@&#8203;kerry-berri](https://github.com/kerry-berri) in [#&#8203;49974](https://github.com/BerriAI/litellm/pull/49974)
- feat(auth): add link-only JWT mapping and remove route eligibility filtering by [@&#8203;mrinal-berri](https://github.com/mrinal-berri) in [#&#8203;49956](https://github.com/BerriAI/litellm/pull/49956)
- fix(bedrock): map token counting on the alias Claude Sonnet 4.5 and Haiku 4.5 rows to bedrock-runtime by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;49981](https://github.com/BerriAI/litellm/pull/49981)
- fix(ui): send only shown SSO fields when editing, and keep env-row SSO values behind a blank stored value by [@&#8203;jesus-berri](https://github.com/jesus-berri) in [#&#8203;49973](https://github.com/BerriAI/litellm/pull/49973)
- ci: run the OSV scan on rc branches by [@&#8203;yuneng-berri](https://github.com/yuneng-berri) in [#&#8203;49987](https://github.com/BerriAI/litellm/pull/49987)
- fix(anthropic): answer an upstream Anthropic 529 as 529 overloaded_error on /v1/messages by [@&#8203;mateo-berri](https://github.com/mateo-berri) in [#&#8203;46063](https://github.com/BerriAI/litellm/pull/46063)
- fix(agentic)!: surface a failed agentic follow-up call instead of the pre-loop tool call by [@&#8203;tavren27](https://github.com/tavren27) in [#&#8203;49227](https://github.com/BerriAI/litellm/pull/49227)
- feat(ui): rebuild the public AI Hub as a searchable list with a details pane by [@&#8203;yuneng-berri](https://github.com/yuneng-berri) in [#&#8203;49496](https://github.com/BerriAI/litellm/pull/49496)
- feat(mcp): add an opt-in per-server setting to skip MCP tool output validation by [@&#8203;shrey-berri](https://github.com/shrey-berri) in [#&#8203;49961](https://github.com/BerriAI/litellm/pull/49961)
- refactor(cache): remove experimental Redis and v2 caches by [@&#8203;yujonglee-berri](https://github.com/yujonglee-berri) in [#&#8203;50005](https://github.com/BerriAI/litellm/pull/50005)
- test(spend): give the session pages EXPLAIN double the read transaction spend log reads now use by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;49996](https://github.com/BerriAI/litellm/pull/49996)
- test(responses): keep the background status poller out of the cancel wire test by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;50002](https://github.com/BerriAI/litellm/pull/50002)
- fix(cost-map): add successor_model to seven retiring together_ai rows by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;50026](https://github.com/BerriAI/litellm/pull/50026)
- feat(ui): redesign the dashboard top bar and give Aria its own page by [@&#8203;moe-berri](https://github.com/moe-berri) in [#&#8203;50009](https://github.com/BerriAI/litellm/pull/50009)
- feat(skills): upload local skill ZIPs from the dashboard by [@&#8203;tin-berri](https://github.com/tin-berri) in [#&#8203;50008](https://github.com/BerriAI/litellm/pull/50008)
- refactor: clean up fresh tech debt in proxy auth reads, chatgpt credential forwarding, messages drop_params reads, router context signatures and spend log reads by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;46643](https://github.com/BerriAI/litellm/pull/46643)
- chore(azure): cite ada retirement schedule by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;50044](https://github.com/BerriAI/litellm/pull/50044)
- chore(proxy): use neutral example names for baggage tag mappings by [@&#8203;mateo-berri](https://github.com/mateo-berri) in [#&#8203;50011](https://github.com/BerriAI/litellm/pull/50011)
- chore(cost-map): rolling registry sync for xAI, Fireworks, Azure and Gemini by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;50028](https://github.com/BerriAI/litellm/pull/50028)
- fix(gemini): point gemini-2.5-pro and gemini-2.5-flash at the models Google reroutes them to by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;50064](https://github.com/BerriAI/litellm/pull/50064)
- feat(cost-map): add together_ai/moonshotai/Kimi-K3.1-Pro from the Together models API by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;50069](https://github.com/BerriAI/litellm/pull/50069)
- feat(openai): bill gov.api.openai.com FedRAMP endpoint with 1.1x uplift by [@&#8203;kerry-berri](https://github.com/kerry-berri) in [#&#8203;49951](https://github.com/BerriAI/litellm/pull/49951)
- test(e2e): retire the quiet_stack lock and batch the claude_code model registration by [@&#8203;yuneng-berri](https://github.com/yuneng-berri) in [#&#8203;49984](https://github.com/BerriAI/litellm/pull/49984)
- fix(logging): don't leak redacted reasoning via provider_specific_fields by [@&#8203;alchemicjon](https://github.com/alchemicjon) in [#&#8203;47398](https://github.com/BerriAI/litellm/pull/47398)
- refactor: replace accounting event scaffolding with SpendLogs projection by [@&#8203;joshua-berri](https://github.com/joshua-berri) in [#&#8203;49843](https://github.com/BerriAI/litellm/pull/49843)
- test(perf): remove the database_upgrade_5rps e2e case and its harness tests by [@&#8203;kerry-berri](https://github.com/kerry-berri) in [#&#8203;50076](https://github.com/BerriAI/litellm/pull/50076)
- feat(decisions): add EmpirioLabs AI as a decisions provider by [@&#8203;kerry-berri](https://github.com/kerry-berri) in [#&#8203;49977](https://github.com/BerriAI/litellm/pull/49977)
- fix(router): stamp the failed deployment on every endpoint's attempt by [@&#8203;narmstrong-berri](https://github.com/narmstrong-berri) in [#&#8203;49941](https://github.com/BerriAI/litellm/pull/49941)
- refactor(ui): move keys, projects and cost text onto i18n by [@&#8203;yuneng-berri](https://github.com/yuneng-berri) in [#&#8203;49994](https://github.com/BerriAI/litellm/pull/49994)
- refactor(ui): move logs and usage text onto i18n by [@&#8203;yuneng-berri](https://github.com/yuneng-berri) in [#&#8203;49992](https://github.com/BerriAI/litellm/pull/49992)
- refactor(ui): move playground and chat text onto i18n by [@&#8203;yuneng-berri](https://github.com/yuneng-berri) in [#&#8203;49991](https://github.com/BerriAI/litellm/pull/49991)
- test(integration): poll for the cached JWT rejection sentinel instead of a single Redis read by [@&#8203;mrinal-berri](https://github.com/mrinal-berri) in [#&#8203;50014](https://github.com/BerriAI/litellm/pull/50014)
- ci: run the OSV scan and unit tests on stable, rc and lts branches by [@&#8203;yuneng-berri](https://github.com/yuneng-berri) in [#&#8203;50086](https://github.com/BerriAI/litellm/pull/50086)
- feat: update EmpirioLabs models in model_prices_and_context_window\.json by [@&#8203;kerry-berri](https://github.com/kerry-berri) in [#&#8203;49980](https://github.com/BerriAI/litellm/pull/49980)
- fix(proxy): charge a video's provider-reported cost once, on the first poll that sees it completed by [@&#8203;tessellark](https://github.com/tessellark) in [#&#8203;49824](https://github.com/BerriAI/litellm/pull/49824)
- chore(cost-map): add fireworks kimi k3.1 pro serverless pricing by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;50095](https://github.com/BerriAI/litellm/pull/50095)
- fix(guardrails)!: check Anthropic and Responses request tools in tool_permission pre_call by [@&#8203;meryemsakin](https://github.com/meryemsakin) in [#&#8203;41011](https://github.com/BerriAI/litellm/pull/41011)
- fix(azure)!: answer 401 when Entra rejects the deployment's credential by [@&#8203;zoveki](https://github.com/zoveki) in [#&#8203;49863](https://github.com/BerriAI/litellm/pull/49863)
- feat(cost-map): add baseten Kimi-K3.1-Pro by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;50093](https://github.com/BerriAI/litellm/pull/50093)
- test(observability): reserve sink port throughout outage by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;50100](https://github.com/BerriAI/litellm/pull/50100)
- chore(databricks): add retirement successors and kimi-k2-7 retirement date from the Databricks retired models page by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;50094](https://github.com/BerriAI/litellm/pull/50094)
- chore(cost-map): openai context fixes, azure gpt-6 flex pricing, bedrock govcloud and gmi rows by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;50082](https://github.com/BerriAI/litellm/pull/50082)
- fix(responses): keep the system prompt in input for json_object on the chat to responses bridge by [@&#8203;mrinal-berri](https://github.com/mrinal-berri) in [#&#8203;49957](https://github.com/BerriAI/litellm/pull/49957)
- feat(proxy): authenticate billing metrics with a cognito bearer token by [@&#8203;yassin-berriai](https://github.com/yassin-berriai) in [#&#8203;49852](https://github.com/BerriAI/litellm/pull/49852)
- test(skills): drop the archive rejection test whose zip-byte ids differ across xdist workers by [@&#8203;kerry-berri](https://github.com/kerry-berri) in [#&#8203;50118](https://github.com/BerriAI/litellm/pull/50118)
- fix(bedrock): remove GovCloud Kimi K3 bedrock_mantle rows by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;50117](https://github.com/BerriAI/litellm/pull/50117)
- fix(auth): align cloud credential loading and expiry with the Python SDKs by [@&#8203;yujonglee-berri](https://github.com/yujonglee-berri) in [#&#8203;49589](https://github.com/BerriAI/litellm/pull/49589)
- test: make three flaky unit tests deterministic by [@&#8203;yuneng-berri](https://github.com/yuneng-berri) in [#&#8203;50114](https://github.com/BerriAI/litellm/pull/50114)
- ci(unit): stop the full history clone on the db-and-spend shard, fetch the schema merge base by sha by [@&#8203;kerry-berri](https://github.com/kerry-berri) in [#&#8203;50120](https://github.com/BerriAI/litellm/pull/50120)
- fix(bedrock): backfill GovCloud service-tier prices by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;50121](https://github.com/BerriAI/litellm/pull/50121)
- fix(github_copilot): let per-user connections work with a custom GitHub client ID by [@&#8203;ryan-crabbe-berri](https://github.com/ryan-crabbe-berri) in [#&#8203;50116](https://github.com/BerriAI/litellm/pull/50116)
- fix(guardrails): apply guardrail masks to Bedrock InvokeModel Claude requests and replies by [@&#8203;shrey-berri](https://github.com/shrey-berri) in [#&#8203;49947](https://github.com/BerriAI/litellm/pull/49947)
- fix(cost): bill Batch cached tokens at the Standard cache price when a row has no Batch cache price by [@&#8203;kerry-berri](https://github.com/kerry-berri) in [#&#8203;50062](https://github.com/BerriAI/litellm/pull/50062)
- fix(cost_calculator): keep regional and speed multipliers for per-call custom prices and log the billed per-call entry by [@&#8203;kerry-berri](https://github.com/kerry-berri) in [#&#8203;50063](https://github.com/BerriAI/litellm/pull/50063)
- chore(cost-map): add openai gpt-image-2.6-sunburst and gpt-image-2.6-flare from the pricing page by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;50134](https://github.com/BerriAI/litellm/pull/50134)
- fix(least-busy): reserve the picked deployment so a burst of requests spreads out by [@&#8203;tc3oliver](https://github.com/tc3oliver) in [#&#8203;47484](https://github.com/BerriAI/litellm/pull/47484)
- fix(proxy): answer an upstream overload with 503 server_is_overloaded on OpenAI routes by [@&#8203;mateo-berri](https://github.com/mateo-berri) in [#&#8203;49993](https://github.com/BerriAI/litellm/pull/49993)
- fix(bedrock): add GovCloud Kimi, Haiku and Grok prices by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;50128](https://github.com/BerriAI/litellm/pull/50128)
- refactor(ui): move shell, entry and public hub text onto i18n by [@&#8203;yuneng-berri](https://github.com/yuneng-berri) in [#&#8203;50110](https://github.com/BerriAI/litellm/pull/50110)
- refactor(ui): move models text onto i18n by [@&#8203;yuneng-berri](https://github.com/yuneng-berri) in [#&#8203;50112](https://github.com/BerriAI/litellm/pull/50112)
- fix(azure): strip output-only reasoning content from Responses input by [@&#8203;qibinjin](https://github.com/qibinjin) in [#&#8203;50046](https://github.com/BerriAI/litellm/pull/50046)
- chore(cost-map): add openai batch image output prices from the pricing page by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;50138](https://github.com/BerriAI/litellm/pull/50138)
- fix(proxy): treat Postgres restart and shutdown errors as DB unavailable, not poison spend-log rows by [@&#8203;kerry-berri](https://github.com/kerry-berri) in [#&#8203;50132](https://github.com/BerriAI/litellm/pull/50132)
- feat(accounting): add opt-in SpendLogs ledger by [@&#8203;joshua-berri](https://github.com/joshua-berri) in [#&#8203;49856](https://github.com/BerriAI/litellm/pull/49856)
- fix(ui): send a team admin's member key edits on the first save by [@&#8203;yuneng-berri](https://github.com/yuneng-berri) in [#&#8203;50007](https://github.com/BerriAI/litellm/pull/50007)
- fix(nvidia_riva): send the api key exactly once by calling riva over grpc directly by [@&#8203;ryan-crabbe-berri](https://github.com/ryan-crabbe-berri) in [#&#8203;50140](https://github.com/BerriAI/litellm/pull/50140)
- fix(ui): let team admins edit models on team service account keys by [@&#8203;jesus-berri](https://github.com/jesus-berri) in [#&#8203;49970](https://github.com/BerriAI/litellm/pull/49970)
- fix(cost_map): fill missing Claude capability fields from the family baseline by [@&#8203;ryan-crabbe-berri](https://github.com/ryan-crabbe-berri) in [#&#8203;49815](https://github.com/BerriAI/litellm/pull/49815)
- feat(ui): show model deprecation banner on the models page by [@&#8203;krrish-berri-2](https://github.com/krrish-berri-2) in [#&#8203;50080](https://github.com/BerriAI/litellm/pull/50080)
- test(routing): expect 503 server_is_overloaded for an upstream overload by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;50155](https://github.com/BerriAI/litellm/pull/50155)
- test(providers): expect 503 server_is_overloaded for an upstream overload by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;50154](https://github.com/BerriAI/litellm/pull/50154)
- feat(proxy): add model deprecation alerts with daily requests by key by [@&#8203;ishaan-j-berri](https://github.com/ishaan-j-berri) in [#&#8203;50022](https://github.com/BerriAI/litellm/pull/50022)
- fix(bedrock)!: keep Claude's thinking when response_format json_schema is set by [@&#8203;quietjules](https://github.com/quietjules) in [#&#8203;49696](https://github.com/BerriAI/litellm/pull/49696)
- refactor(proxy)!: drop the unused accounting event tables by [@&#8203;joshua-berri](https://github.com/joshua-berri) in [#&#8203;49923](https://github.com/BerriAI/litellm/pull/49923)
- chore(cost-map): add together_ai ricursive-ai/Ripple-65B-Preview from the Together models API by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;50163](https://github.com/BerriAI/litellm/pull/50163)
- feat(ui)!: redesign public AI Hub as a catalog by [@&#8203;tin-berri](https://github.com/tin-berri) in [#&#8203;50153](https://github.com/BerriAI/litellm/pull/50153)
- feat(alerts): show recommended model provenance and provider notices by [@&#8203;ishaan-j-berri](https://github.com/ishaan-j-berri) in [#&#8203;50162](https://github.com/BerriAI/litellm/pull/50162)
- test(providers): expect 503 server_is_overloaded for an upstream overload on the responses bridge by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;50166](https://github.com/BerriAI/litellm/pull/50166)
- refactor(ui): align Chat with dashboard styling by [@&#8203;moe-berri](https://github.com/moe-berri) in [#&#8203;50034](https://github.com/BerriAI/litellm/pull/50034)
- feat(router): add the Rust router core with the host as its only boundary by [@&#8203;narmstrong-berri](https://github.com/narmstrong-berri) in [#&#8203;49513](https://github.com/BerriAI/litellm/pull/49513)
- test(translation): expect thinking usage fields on Bedrock chat by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;50175](https://github.com/BerriAI/litellm/pull/50175)
- test(translation): expect thinking usage fields on Bedrock messages by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;50179](https://github.com/BerriAI/litellm/pull/50179)
- fix(mistral): a named tool_choice is dropped, the model picks any tool by [@&#8203;pasqualtroncone](https://github.com/pasqualtroncone) in [#&#8203;39737](https://github.com/BerriAI/litellm/pull/39737)
- test(translation): expect thinking usage fields on Bedrock responses by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;50181](https://github.com/BerriAI/litellm/pull/50181)
- feat(skills)!: add portable Agent Skills Hub API by [@&#8203;tin-berri](https://github.com/tin-berri) in [#&#8203;50159](https://github.com/BerriAI/litellm/pull/50159)
- feat: email affected owners before model deprecations by [@&#8203;ishaan-j-berri](https://github.com/ishaan-j-berri) in [#&#8203;50172](https://github.com/BerriAI/litellm/pull/50172)
- feat(skills)!: add portable version history by [@&#8203;tin-berri](https://github.com/tin-berri) in [#&#8203;50152](https://github.com/BerriAI/litellm/pull/50152)
- feat(skills)!: add portable submissions and admin review by [@&#8203;tin-berri](https://github.com/tin-berri) in [#&#8203;50160](https://github.com/BerriAI/litellm/pull/50160)
- fix(usage): restore per-user spend breakdown on the user aggregated route by [@&#8203;ishaan-j-berri](https://github.com/ishaan-j-berri) in [#&#8203;49464](https://github.com/BerriAI/litellm/pull/49464)
- feat(skills): add optional manual security scans by [@&#8203;tin-berri](https://github.com/tin-berri) in [#&#8203;50194](https://github.com/BerriAI/litellm/pull/50194)
- feat(skills): show download counts and history by [@&#8203;tin-berri](https://github.com/tin-berri) in [#&#8203;50165](https://github.com/BerriAI/litellm/pull/50165)
- fix(cost-map): add Gemini Flex long prompt prices, Live grounding prices, seven GMI rows and EmpirioLabs page prices by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;50208](https://github.com/BerriAI/litellm/pull/50208)
- feat(accounting)!: make the SpendLogs ledger the default accounting path by [@&#8203;joshua-berri](https://github.com/joshua-berri) in [#&#8203;49872](https://github.com/BerriAI/litellm/pull/49872)
- test(integration): stop the wire peer from dropping requests whose bytes arrive late by [@&#8203;tessellark](https://github.com/tessellark) in [#&#8203;49889](https://github.com/BerriAI/litellm/pull/49889)
- feat(vertex-ai): add published gemini omni 1.2 flash pricing and limits by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;50227](https://github.com/BerriAI/litellm/pull/50227)
- docs(pr-template): drop the make-me-human-readable tags from the handwritten description by [@&#8203;mateo-berri](https://github.com/mateo-berri) in [#&#8203;50183](https://github.com/BerriAI/litellm/pull/50183)
- fix(github-copilot): send the GitHub token directly instead of exchanging it by [@&#8203;mateo-berri](https://github.com/mateo-berri) in [#&#8203;50126](https://github.com/BerriAI/litellm/pull/50126)
- fix(openai): never send OPENAI_ADMIN_KEY as the bearer token for a deployment without an api_key by [@&#8203;kerry-berri](https://github.com/kerry-berri) in [#&#8203;50218](https://github.com/BerriAI/litellm/pull/50218)
- fix(accounting): keep spend commits working when prometheus_client is not installed by [@&#8203;joshua-berri](https://github.com/joshua-berri) in [#&#8203;50230](https://github.com/BerriAI/litellm/pull/50230)
- refactor(router): delete the python router core by [@&#8203;narmstrong-berri](https://github.com/narmstrong-berri) in [#&#8203;50178](https://github.com/BerriAI/litellm/pull/50178)
- feat(gemini): add Omni 1.2 Flash pricing and update video model successors by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;50229](https://github.com/BerriAI/litellm/pull/50229)
- feat(gateway): forward HTTP requests to the Python proxy by [@&#8203;yujonglee-berri](https://github.com/yujonglee-berri) in [#&#8203;49604](https://github.com/BerriAI/litellm/pull/49604)
- chore(cost-map): rolling registry audit, add gpt-6-cyber, Kimi K3.1 Pro rows, Jina rerankers and capability flags by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;50245](https://github.com/BerriAI/litellm/pull/50245)
- test(skills): assert patch publication and serialize preference writes by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;50252](https://github.com/BerriAI/litellm/pull/50252)
- test(usage): assert per-user entity spend and metadata by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;50251](https://github.com/BerriAI/litellm/pull/50251)
- refactor(bedrock): drop the redundant $defs deep copy in tool conversion by [@&#8203;mateo-berri](https://github.com/mateo-berri) in [#&#8203;50240](https://github.com/BerriAI/litellm/pull/50240)
- fix(openai): add gpt-6-cyber max input tokens and the gpt-5.5-cyber-preview shutdown date by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;50254](https://github.com/BerriAI/litellm/pull/50254)
- fix(anthropic): report temperature/top_p as supported only when the model keeps them by [@&#8203;ryan-crabbe-berri](https://github.com/ryan-crabbe-berri) in [#&#8203;50144](https://github.com/BerriAI/litellm/pull/50144)
- refactor(ui): move remaining logs and usage text onto i18n by [@&#8203;yuneng-berri](https://github.com/yuneng-berri) in [#&#8203;50146](https://github.com/BerriAI/litellm/pull/50146)
- refactor(ui): move remaining models text onto i18n by [@&#8203;yuneng-berri](https://github.com/yuneng-berri) in [#&#8203;50147](https://github.com/BerriAI/litellm/pull/50147)
- refactor(ui): move remaining shell and nav text onto i18n by [@&#8203;yuneng-berri](https://github.com/yuneng-berri) in [#&#8203;50148](https://github.com/BerriAI/litellm/pull/50148)
- refactor(ui): move remaining keys, teams and agents text onto i18n by [@&#8203;yuneng-berri](https://github.com/yuneng-berri) in [#&#8203;50238](https://github.com/BerriAI/litellm/pull/50238)
- refactor(ui): move remaining playground, chat and compliance text onto i18n by [@&#8203;yuneng-berri](https://github.com/yuneng-berri) in [#&#8203;50239](https://github.com/BerriAI/litellm/pull/50239)
- refactor(ui): move remaining Aria and admin text onto i18n by [@&#8203;yuneng-berri](https://github.com/yuneng-berri) in [#&#8203;50242](https://github.com/BerriAI/litellm/pull/50242)
- fix(zscaler_ai_guard)!: scan only the last user turn on requests by [@&#8203;yucheng-berri](https://github.com/yucheng-berri) in [#&#8203;50139](https://github.com/BerriAI/litellm/pull/50139)
- docs(pr-template): require rerunnable proof setup and collapsed long output by [@&#8203;mateo-berri](https://github.com/mateo-berri) in [#&#8203;50258](https://github.com/BerriAI/litellm/pull/50258)
- feat(bedrock): add us-gov.xai.grok-4.7 GovCloud pricing by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;50288](https://github.com/BerriAI/litellm/pull/50288)
- fix(bedrock): add GovCloud Grok 4.7 batch prices by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;50291](https://github.com/BerriAI/litellm/pull/50291)
- test(router): expect no fallback errors header for non-bool include_fallback_errors by [@&#8203;narmstrong-berri](https://github.com/narmstrong-berri) in [#&#8203;50259](https://github.com/BerriAI/litellm/pull/50259)
- fix(router): do not cool down a deployment on a 404 from a response id lookup by [@&#8203;narmstrong-berri](https://github.com/narmstrong-berri) in [#&#8203;50262](https://github.com/BerriAI/litellm/pull/50262)
- test(copilot): align login guards with direct access tokens by [@&#8203;mateo-berri](https://github.com/mateo-berri) in [#&#8203;50285](https://github.com/BerriAI/litellm/pull/50285)
- feat(interactions): forward continuation_token and type requires_continuation so callers can resume a long decode by [@&#8203;kerry-berri](https://github.com/kerry-berri) in [#&#8203;50151](https://github.com/BerriAI/litellm/pull/50151)
- fix(router): keep the request's metadata on rust core fallback hop kwargs by [@&#8203;narmstrong-berri](https://github.com/narmstrong-berri) in [#&#8203;50263](https://github.com/BerriAI/litellm/pull/50263)
- fix(router): retry a team wildcard under the provider-prefixed name by [@&#8203;narmstrong-berri](https://github.com/narmstrong-berri) in [#&#8203;50264](https://github.com/BerriAI/litellm/pull/50264)
- fix(responses): preserve native stream spend on guardrail rejection by [@&#8203;mateo-berri](https://github.com/mateo-berri) in [#&#8203;50286](https://github.com/BerriAI/litellm/pull/50286)
- fix(router): give the rust core's priority scheduler the router's redis cache by [@&#8203;narmstrong-berri](https://github.com/narmstrong-berri) in [#&#8203;50265](https://github.com/BerriAI/litellm/pull/50265)
- refactor(ui): move alerts page text onto i18n by [@&#8203;yuneng-berri](https://github.com/yuneng-berri) in [#&#8203;50271](https://github.com/BerriAI/litellm/pull/50271)
- fix(router): write the prompt caching pin when turn_off_message_logging is on by [@&#8203;kerry-berri](https://github.com/kerry-berri) in [#&#8203;50276](https://github.com/BerriAI/litellm/pull/50276)
- test(router): expect a primary stream's stall to cool its deployment by [@&#8203;narmstrong-berri](https://github.com/narmstrong-berri) in [#&#8203;50261](https://github.com/BerriAI/litellm/pull/50261)
- fix(types): define the responses compact call types for during_call guardrails and deployment hooks by [@&#8203;kerry-berri](https://github.com/kerry-berri) in [#&#8203;50274](https://github.com/BerriAI/litellm/pull/50274)
- fix(router-core): read time through the router's clock when routing by [@&#8203;narmstrong-berri](https://github.com/narmstrong-berri) in [#&#8203;50295](https://github.com/BerriAI/litellm/pull/50295)
- feat(databricks): add databricks-kimi-k3-1-pro pricing by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;50303](https://github.com/BerriAI/litellm/pull/50303)
- fix(azure): sync model retirement dates by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;50296](https://github.com/BerriAI/litellm/pull/50296)
- feat(packaging): build litellm-proxy gateway wheels by [@&#8203;yujonglee-berri](https://github.com/yujonglee-berri) in [#&#8203;49605](https://github.com/BerriAI/litellm/pull/49605)
- feat(skills): add authenticated install and share commands by [@&#8203;tin-berri](https://github.com/tin-berri) in [#&#8203;50211](https://github.com/BerriAI/litellm/pull/50211)
- fix(router): let type checkers see the real Router constructor arguments by [@&#8203;mateo-berri](https://github.com/mateo-berri) in [#&#8203;50278](https://github.com/BerriAI/litellm/pull/50278)
- fix(ui): keep chat text sent back to the model in English by [@&#8203;yuneng-berri](https://github.com/yuneng-berri) in [#&#8203;50304](https://github.com/BerriAI/litellm/pull/50304)
- build(deps): bump [@&#8203;azure/msal-node](https://github.com/azure/msal-node) to 7.x in vscode-extension to clear osv-scan by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;50198](https://github.com/BerriAI/litellm/pull/50198)
- feat(skills): add sortable Skills Hub catalog and publication audit by [@&#8203;tin-berri](https://github.com/tin-berri) in [#&#8203;50195](https://github.com/BerriAI/litellm/pull/50195)
- fix(ui): center the deployment health banner icon on its title by [@&#8203;yuneng-berri](https://github.com/yuneng-berri) in [#&#8203;50302](https://github.com/BerriAI/litellm/pull/50302)
- fix(users)!: validate custom IDs and reject concurrent duplicate creation by [@&#8203;mrinal-berri](https://github.com/mrinal-berri) in [#&#8203;49748](https://github.com/BerriAI/litellm/pull/49748)
- feat(ui): allow custom user IDs in user invitations by [@&#8203;mrinal-berri](https://github.com/mrinal-berri) in [#&#8203;49749](https://github.com/BerriAI/litellm/pull/49749)
- feat(bedrock): default to native structured output on Opus 5 and Opus 4.8 by [@&#8203;mateo-berri](https://github.com/mateo-berri) in [#&#8203;50222](https://github.com/BerriAI/litellm/pull/50222)
- refactor(prompt_templates): move JSON schema helpers out of common_utils into json_schema_utils by [@&#8203;mateo-berri](https://github.com/mateo-berri) in [#&#8203;50241](https://github.com/BerriAI/litellm/pull/50241)
- test(copilot): seed direct access tokens in Copilot wire fixtures by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;50307](https://github.com/BerriAI/litellm/pull/50307)
- fix(proxy): probe scrypt instead of MD5 in the fips_mode OpenSSL check by [@&#8203;yucheng-berri](https://github.com/yucheng-berri) in [#&#8203;50305](https://github.com/BerriAI/litellm/pull/50305)
- feat(ui): add a beta language setting to the account menu by [@&#8203;yuneng-berri](https://github.com/yuneng-berri) in [#&#8203;50309](https://github.com/BerriAI/litellm/pull/50309)
- fix(router): drop supports_web_search false deployments for Anthropic web_search\_\* and Gemini googleSearch tools by [@&#8203;kerry-berri](https://github.com/kerry-berri) in [#&#8203;50275](https://github.com/BerriAI/litellm/pull/50275)
- fix(audio-transcription): keep transcripts out of transcription error messages by [@&#8203;qtim0](https://github.com/qtim0) in [#&#8203;50137](https://github.com/BerriAI/litellm/pull/50137)
- feat(proxy)!: only let clients pick S3 buckets the admin allowed by [@&#8203;ryan-crabbe-berri](https://github.com/ryan-crabbe-berri) in [#&#8203;47496](https://github.com/BerriAI/litellm/pull/47496)
- feat(redis): rust Redis foundation with no runtime change by [@&#8203;yujonglee-berri](https://github.com/yujonglee-berri) in [#&#8203;50169](https://github.com/BerriAI/litellm/pull/50169)
- feat(proxy): give Codex accurate model entries for every model in /v1/models by [@&#8203;ryan-crabbe-berri](https://github.com/ryan-crabbe-berri) in [#&#8203;49825](https://github.com/BerriAI/litellm/pull/49825)
- feat(spend-logs): opt-in latest_turn mode that stores only the current turn of stateless requests by [@&#8203;jesus-berri](https://github.com/jesus-berri) in [#&#8203;49544](https://github.com/BerriAI/litellm/pull/49544)
- feat(team): let default_team_params attach access_group_ids to every new team by [@&#8203;jesus-berri](https://github.com/jesus-berri) in [#&#8203;49908](https://github.com/BerriAI/litellm/pull/49908)
- test(e2e): add a Codex row that calls a local MCP tool on a first and a resumed turn by [@&#8203;ryan-crabbe-berri](https://github.com/ryan-crabbe-berri) in [#&#8203;49817](https://github.com/BerriAI/litellm/pull/49817)
- refactor(ui): move remaining outlier text onto i18n by [@&#8203;yuneng-berri](https://github.com/yuneng-berri) in [#&#8203;50312](https://github.com/BerriAI/litellm/pull/50312)
- fix(terraform): drop out-of-band deleted litellm_key from state and treat its 404 on delete as gone by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;47877](https://github.com/BerriAI/litellm/pull/47877)
- chore(cost-map): source fireworks deprecations and replacement models by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;50334](https://github.com/BerriAI/litellm/pull/50334)
- feat(ui): set tpm_limit and rpm_limit on tags from the Admin UI by [@&#8203;kerry-berri](https://github.com/kerry-berri) in [#&#8203;50314](https://github.com/BerriAI/litellm/pull/50314)
- test(bedrock_mantle): expect the generic unsupported-param 400 for temperature on fixed-sampling Claude by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;50344](https://github.com/BerriAI/litellm/pull/50344)
- feat(redis): serve the proxy's common Redis call with Rust stores by [@&#8203;yujonglee-berri](https://github.com/yujonglee-berri) in [#&#8203;50170](https://github.com/BerriAI/litellm/pull/50170)
- fix(bedrock): forward the per-turn-control beta to Bedrock Invoke by [@&#8203;Scott-Wilson-ZocDoc](https://github.com/Scott-Wilson-ZocDoc) in [#&#8203;43086](https://github.com/BerriAI/litellm/pull/43086)
- test(e2e): wait for saved MCP credentials before deleting the server by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;50366](https://github.com/BerriAI/litellm/pull/50366)
- fix(vertex_ai): honor vertex_location for the Cloud Text-to-Speech endpoint by [@&#8203;julienparenti](https://github.com/julienparenti) in [#&#8203;50255](https://github.com/BerriAI/litellm/pull/50255)
- fix(ui): simplify the collapsed workspace dropdown by [@&#8203;moe-berri](https://github.com/moe-berri) in [#&#8203;50369](https://github.com/BerriAI/litellm/pull/50369)
- fix(ui): support custom model provider logos ([#&#8203;50056](https://github.com/BerriAI/litellm/issues/50056)) by [@&#8203;ishaan-j-berri](https://github.com/ishaan-j-berri) in [#&#8203;50371](https://github.com/BerriAI/litellm/pull/50371)
- build(deps): bump oauthlib to 4.0.1 and lock filelock 4.2.4 on 3.11+ and 3.20.3 on 3.10 to clear osv-scan by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;49204](https://github.com/BerriAI/litellm/pull/49204)
- feat(proxy): hash UI passwords with PBKDF2 in FIPS mode by [@&#8203;yucheng-berri](https://github.com/yucheng-berri) in [#&#8203;49874](https://github.com/BerriAI/litellm/pull/49874)
- fix(proxy): discover models for LiteLLM Gateway wildcard providers by [@&#8203;ishaan-j-berri](https://github.com/ishaan-j-berri) in [#&#8203;50374](https://github.com/BerriAI/litellm/pull/50374)
- build(deps): keep Python 3.10 osv-scan suppressions until 2027-02-01 by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;50386](https://github.com/BerriAI/litellm/pull/50386)
- fix(anthropic): default Responses JSON-schema strictness ([#&#8203;50023](https://github.com/BerriAI/litellm/issues/50023)) by [@&#8203;ishaan-j-berri](https://github.com/ishaan-j-berri) in [#&#8203;50375](https://github.com/BerriAI/litellm/pull/50375)
- fix(anthropic): preserve Azure Responses reasoning replay ([#&#8203;50024](https://github.com/BerriAI/litellm/issues/50024)) by [@&#8203;ishaan-j-berri](https://github.com/ishaan-j-berri) in [#&#8203;50381](https://github.com/BerriAI/litellm/pull/50381)
- feat: add OpenRouter-style -latest model aliases for first-party providers by [@&#8203;moe-berri](https://github.com/moe-berri) in [#&#8203;50315](https://github.com/BerriAI/litellm/pull…
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.

[Bug]: Router fallback between vertex_ai and gemini replays endpoint-bound thought signatures -> 400 "Corrupted thought signature" (Gemini 3.x)

2 participants