fix(pricing): restore Azure gpt-5.6 terra/luna rates to Azure's published prices - #36274
Open
olifarhaan wants to merge 2 commits into
Open
fix(pricing): restore Azure gpt-5.6 terra/luna rates to Azure's published prices#36274olifarhaan wants to merge 2 commits into
olifarhaan wants to merge 2 commits into
Conversation
…shed prices OpenAI cut terra 20% and luna 80% on 2026-07-30. 4d43080 mirrored that cut onto the azure/ rows on the assumption that Azure follows OpenAI's list price. Azure has not adopted the cut: Microsoft still publishes $1.00/1M input and $6.00/1M output for luna global, and $1.10/$6.60 for the us/eu data zones. That made LiteLLM report 5x less than Azure actually bills for luna and 20% less for terra, on every azure/ gpt-5.6 deployment. Restore the 60 affected fields across the six azure global/us/eu terra and luna rows to their pre-4d43080a7 values, in both cost maps. Input, output, cache-read, priority, and above-272k variants all scale together. sol is untouched, as are the openai/ and bedrock_mantle rows, whose cut is correct. The regression test parametrization already covered the global and eu rows; add the two us rows so azure/us/gpt-5.6-luna, the deployment named in the report, is pinned too. Fixes BerriAI#36094
Contributor
Greptile SummaryThe PR restores Azure GPT-5.6 terra and luna pricing across global, US, and EU entries while keeping the canonical and packaged backup maps synchronized.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains.
|
| Filename | Overview |
|---|---|
| model_prices_and_context_window.json | Restores the canonical Azure GPT-5.6 terra/luna rates and preserves the documented regional uplift relationships. |
| litellm/model_prices_and_context_window_backup.json | Mirrors the canonical pricing changes exactly for packaged and offline lookup paths. |
| tests/test_litellm/litellm_core_utils/llm_cost_calc/test_llm_cost_calc_utils.py | Adds representative regression cases for base, priority, and long-context cost selection. |
Reviews (2): Last reviewed commit: "test(pricing): cover the azure gpt-5.6 p..." | Re-trigger Greptile
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Author
|
@greptileai tier-rate coverage added in 925c669, please take another look |
The existing parametrization only exercises base input/output/cache-read, so 40 of the 60 restored fields were unpinned: a typo in a priority or above-272k rate, or a key the calculator never reads, would fall back to base rates and misreport spend for those tiers without failing anything. Drive generic_cost_per_token across both tiers and both context bands for the global terra/luna rows, plus one us and one eu row. All nine cases fail against the pre-fix cost map.
olifarhaan
force-pushed
the
litellm_azure_gpt56_pricing
branch
from
August 8, 2026 10:10
925c669 to
506adb3
Compare
6 tasks
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:
azure/gpt-5.6 deployment under-reports spendHow it solves it:
azure/us/rows in the existing regression testRelevant issues
Fixes #36094
Linear ticket
Pre-Submission checklist
Please complete all items before asking a LiteLLM maintainer to review your PR
@greptileaito re-request a review after pushing changes)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
There are no Azure credentials in this environment, so the live run below is the exact command list rather than captured output. Add a luna deployment to
dev_config.yamlfirst:python litellm/proxy/proxy_cli.py --config litellm/proxy/dev_config.yaml --detailed_debug --reload 2>&1 | tee litellm.logBefore this PR the reported cost is 1/5 of the Azure rate for luna. After, they match. The same holds for
azure/gpt-5.6-terraat 1.25x, and for theazure/us/andazure/eu/data-zone variants at their 10% upliftThe spend log at http://localhost:4000/ui/?page=logs shows the same number if you prefer reading it there
Type
🐛 Bug Fix
Changes
OpenAI cut gpt-5.6 terra 20% and luna 80% on 2026-07-30. Commit 4d43080 mirrored that cut onto the
azure/rows, reasoning that "openai and bedrock_mantle entries already match". Azure did not follow. Microsoft still publishes $1.00/1M input and $6.00/1M output for luna global and $1.10/$6.60 for the us/eu data zones, and there are open Microsoft Q&A threads asking why the Azure prices were never updated (one, two). So LiteLLM has been reporting 5x less than Azure bills for luna, and 20% less for terra, on everyazure/gpt-5.6 deployment since 2026-08-01This restores the 60 fields that commit changed, across the six global/us/eu terra and luna rows, in both cost maps. Input, output, cache-read, priority, and above-272k variants all move together.
solis untouched, and so are theopenai/andbedrock_mantlerows, whose cut is correctTwo corrections to the issue as filed, both worth a reviewer's attention. It blames PR #35258, but that PR left the azure rows alone: at its merge commit
azure/gpt-5.6-lunawas still1e-06, and only the openai keys moved. The actual change was 4d43080 two days later, which was deliberate rather than collateral. The issue also reports luna only, while terra regressed identically and is included hereBecause this reverses a considered decision rather than an obvious slip, it is worth a maintainer confirming the pricing call before merge. Happy to drop the terra half if you would rather keep the scope to what was reported
The parametrized cost test already pinned the global and eu rows, so it fails without this change. It had no coverage for the
azure/us/rows, which is where the report actually pointed, so those two are addedFinal Attestation