fix(pricing): apply the GPT-5.6 Luna and Terra price cuts across OpenAI and Bedrock Mantle - #35316
Conversation
…AI and Bedrock Mantle Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
Greptile SummaryUpdates GPT-5.6 Luna and Terra pricing while preserving provider-specific behavior.
Confidence Score: 5/5The PR appears safe to merge with pricing maps and focused tests consistently reflecting the intended provider-specific rates. The canonical and bundled maps remain synchronized, OpenAI and Mantle rates are updated consistently, Azure remains deliberately unchanged, and no concrete changed-code failure remains.
|
| Filename | Overview |
|---|---|
| model_prices_and_context_window.json | Updates canonical OpenAI and Bedrock Mantle Luna/Terra rates consistently across the applicable pricing dimensions. |
| litellm/model_prices_and_context_window_backup.json | Keeps the bundled fallback pricing map synchronized with the canonical map. |
| tests/test_litellm/litellm_core_utils/llm_cost_calc/test_llm_cost_calc_utils.py | Updates generic cost-calculation expectations for the new OpenAI standard and cache rates. |
| tests/test_litellm/llms/bedrock_mantle/test_bedrock_mantle_responses_transformation.py | Updates Bedrock Mantle pricing expectations for Luna and Terra. |
| tests/test_litellm/test_gpt_5_6_model_metadata.py | Separates OpenAI and Azure pricing contracts and adds Mantle metadata, uplift, and backup synchronization coverage. |
Reviews (1): Last reviewed commit: "fix(pricing): apply the GPT-5.6 Luna and..." | Re-trigger Greptile
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
|
Superseded by #35270, which landed the same Luna/Terra cuts on the openai entries and the same 1.1x Bedrock Mantle numbers, plus the flex long-context keys. Verified staging now bills Luna at 7.4e-06 and Mantle Luna at 1.0065e-05 for the same requests I proved out here, so there is nothing left in this branch. Fast mode is still open in #35320 |
TLDR
Problem this solves:
How it solves it:
Relevant issues
Linear ticket
Resolves LIT-5011
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
Real calls against a local proxy, hitting the OpenAI API and AWS Bedrock Mantle for real. Config used:
Steps, run once on the base commit and once on this branch:
LITELLM_LOCAL_MODEL_COST_MAP=True uv run --no-sync python litellm/proxy/proxy_cli.py --config proof_config.yamlgpt-5.6-lunaandgpt-5.6-terra, read the billed cost off the response headers/v1/responsesBefore, at
81ff7cb38f(base):After, at
854bb239f3(this branch):Luna drops 5x and Terra drops 20%, matching the announcement. The three Mantle numbers reconcile by hand as
2 * 2.2e-07 + 11 * 2.75e-07 + 5 * 1.32e-06 = 1.0065e-05against the new rates, versus13 * 1.1e-06 + 5 * 6.6e-06 = 4.73e-05on the old onesType
🐛 Bug Fix
Changes
OpenAI cut Luna by 80% and Terra by 20% on 2026-07-30; Luna is now
$0.20/Minput and$1.20/Moutput, Terra is$2/Mand$12/M. Sol is unchanged. Our cost map still carried the launch rates, so every Luna request was billed at 5x and every Terra request at 1.25x, which lands in SpendLogs and in customer budgetsRather than hand-editing the eighteen cost keys per model, each
*cost*key inside thegpt-5.6-terraandgpt-5.6-lunaentries is multiplied by the announced cut (0.8 and 0.2). That keeps every derived tier internally consistent with the base rate without re-deriving them by hand:The announcement says the cuts roll out on AWS the same day, so
bedrock_mantle/openai.gpt-5.6-terraandbedrock_mantle/openai.gpt-5.6-lunaget the same treatment; they stay at exactly 1.1x the OpenAI rate, which a new test now asserts instead of leaving it as folkloreAzure is deliberately left alone. Microsoft has not announced a matching cut, so
test_gpt_5_6_model_metadata.pysplits the sharedSTANDARD_PRICINGfixture intoOPENAI_STANDARD_PRICINGandAZURE_STANDARD_PRICING; Azure keeps the old numbers and will diverge until Microsoft movesOverlaps with #35258, which makes the same OpenAI-side change; that one does not cover Bedrock Mantle, so whichever lands first, the other needs a rebase
Fast mode, which replaces Priority Processing in the same announcement, is handled separately in #35320
Final Attestation
Link to Devin session: https://app.devin.ai/sessions/bdd531a0c9ce49679c29fa6a3d40fb27