Repository navigation
fix: repair seven regressions caught by CircleCI on main - #42640
Merged
Merged
Conversation
- vertex_ai: stop treating fine-tuned endpoint ids (numeric or vertex_ai/gemini/<id>) and gemma models as Gemini 3+, which injected temperature=1.0 and Gemini 3 thinking config into their requests (#42465) - cost: price Azure DALL-E 3 from its azure/<quality>/<size>/dall-e-3 rows; it only worked through the OpenAI rows that #42435 removed - bedrock: stream bedrock/invoke/moonshot through an OpenAI-shaped chunk decoder; the generic decoder dropped every chunk, which the supports_response_schema flag from #42338 un-skipped in CI - proxy: keep the public model_group on pre-routing rejections so the Usage page groups them under the model name, not the deployment (#41077) - cost map: mirror the base rows' capability flags onto Bedrock regional and cross-region copies (#42254 and later syncs) - whitelist the new regional Bedrock rows from #42543 and #42588 for the converse routing check, following the existing regional-row convention
yuneng-berri
requested review from
kerry-berri,
mateo-berri and
ryan-crabbe-berri
as code owners
September 23, 2026 01:37
yuneng-berri
enabled auto-merge (squash)
September 23, 2026 01:38
…_fixes_0922 # Conflicts: # tests/local_testing/test_completion_cost.py
Contributor
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
shin-berri
approved these changes
Sep 23, 2026
5 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TLDR
Problem this solves:
How it solves it:
gemini/<id>fine-tunes andgemma-azure/<quality>/<size>/dall-e-3keybedrock/invoke/moonshotstreams go through an OpenAI-shaped chunk decodersupports_*flags are mirrored onto regional and cross-region copiesUser Flow
Before: an admin whose users call Azure DALL-E 3 through the proxy sees those calls priced at nothing, and blocked requests show up on the Usage page with no model
"model": "dall-e-3","quality": "hd","size": "1024x1024"x-litellm-response-costheader and spend stays at $0internal-modelis blocked by a guardrail with a 400model_group: "", so the Usage page can't group it underinternal-modelAfter: the same image call is priced and the blocked request is grouped under its public model name
x-litellm-response-cost: 0.07999586304internal-modelis blocked by a guardrail with a 400model_group: "internal-model"Relevant issues
Affected release
Linear ticket
Pre-Submission checklist
Please complete all items before asking a LiteLLM maintainer to review your PR
uv run pytest tests/test_litellm/<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@greptileaito re-request a review after pushing changes)Scope note: this bundles seven separate regressions on purpose, one per CircleCI red on main, so main goes green in one merge. Each one has its own mutation-checked test
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
Shared setup: a proxy started with the config below, master key
sk-proof-1234. The Azure key in our env is currently rejected by Azure, sodall-e-3points at a local stand-in that returns an Azure-shaped image response. The price is computed by the proxy from that response, same as with real Azure.internal-modelis blocked by a guardrail before it's routed, so no upstream call is made either wayBefore (a80379b)
Azure DALL-E 3 cost
curl -s -D - -o /dev/null localhost:4001/v1/images/generations -H "Authorization: Bearer sk-proof-1234" -H 'content-type: application/json' -d '{"model":"dall-e-3","prompt":"a cat","size":"1024x1024","quality":"hd"}' | grep -iE '^HTTP|response-cost'HTTP/1.1 200 OKand nox-litellm-response-costheaderBlocked request model group
curl -s localhost:4001/v1/chat/completions -H "Authorization: Bearer sk-proof-1234" -H 'content-type: application/json' -d '{"model":"internal-model","messages":[{"role":"user","content":"hi"}],"guardrails":["proof-reject"]}'returns 400blocked by proof guardrail, call id22f9cb43-a67f-4f91-a5ea-270bd19c3c61curl -s "localhost:4001/spend/logs?request_id=22f9cb43-a67f-4f91-a5ea-270bd19c3c61" -H "Authorization: Bearer sk-proof-1234"gives(model, model_group, status) = ('openai/gpt-4.1', '', 'failure')After (5073d44)
Azure DALL-E 3 cost
HTTP/1.1 200 OKandx-litellm-response-cost: 0.07999586304Blocked request model group
blocked by proof guardrail, call id61d69fdd-a140-46c2-b2de-98907a8e4a64('openai/gpt-4.1', 'internal-model', 'failure')The tip after 5073d44 only adds a merge of main, which touches none of the files on these two paths
Type
🐛 Bug Fix
Caveats (if any)
Medium
gemini/gemma-4-31b-itcall succeeds before and after; the only difference is the injectedtemperature: 1.0gemini/<id>not starting withgemini-is a fine-tunegemini/learnlmwould now read as pre-Gemini-3, which only affects its default temperatureLow
modelfield is already the public name, so Usage groups them correctly, same as beforedall-e-2now prices at $0 instead of raising, because its Azure row is priced at 0.0<reasoning>tags from content yetjp.anthropic.claude-opus-4-7lackssupports_output_config, which was already missing before this PR; left alonetest_utils.py::test_wrapper_async_does_not_fire_failure_hook_for_post_success_errorfails on main itself; not touched hereFinal Attestation