Repository navigation
chore(cost-map): openai context fixes, azure gpt-6 flex pricing, bedrock govcloud and gmi rows - #50082
Conversation
…to 272K and source the sora-2-pro-high-res deprecation
Merging this PR will not alter performance1 warning
Comparing Footnotes |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Roll the verified registry data and Azure Flex cost coverage into the rolling price sync Co-authored-by: kerry-berri <326648561+kerry-berri@users.noreply.github.com> Co-authored-by: dguthruf <102602010+danielguthruf@users.noreply.github.com> Co-authored-by: hisamotodev <hisamotodev@users.noreply.github.com> Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
| }, | ||
| "gmi/openai/gpt-5.4": { | ||
| "cache_read_input_token_cost": 2.5e-07, | ||
| "input_cost_per_token": 2.5e-06, |
There was a problem hiding this comment.
Medium: Long-context GMI requests are undercounted
This entry permits 409,600 input tokens but defines only base prices, while GMI's referenced registry publishes a 272,000-token tier with doubled input/cache-read rates and 1.5× output rates. (ie-api.gmicloud.ai) Consequently, generic_cost_per_token() prices a 300,000-token uncached GPT-5.4 prompt at $0.75 instead of $1.50, and that lower amount reaches key/team spend counters, allowing authorized callers to consume more upstream spend than their budgets represent.
Preserve the registry's tiers using tiered_pricing or the corresponding *_above_272k_tokens fields in both catalog files; the new gmi/openai/gpt-5.4-pro and gmi/openai/gpt-6-astra entries have the same omission. (ie-api.gmicloud.ai)
PR overviewThe PR updates the model pricing and context-window registry with OpenAI context corrections, Azure GPT-6 Flex pricing, and Bedrock GovCloud and GMI entries. One issue remains open: GMI long-context requests use base rates instead of the provider’s higher long-context rates, undercounting a demonstrated prompt’s input cost by half. The understated costs flow into key and team spend counters, allowing authorized callers to consume more upstream spend than their budgets reflect. Open issues (1)
Fixed/addressed: 0 · PR risk: 5/10 |
…ce-sync-openai # Conflicts: # litellm/model_prices_and_context_window_backup.json # model_prices_and_context_window.json
Summary
Rolling registry PR. It carries the OpenAI fixes below plus three absorbed registry PRs (#50077, #50058, #49949) and new Azure GPT-6 Flex pricing from the 2026-11-04 audit. Absorbed rows were re-checked against official provider sources and merged at field level, so newer fields on main are kept
OpenAI
gpt-5.6-cyber(kind page) getsmax_input_tokens272000, down from 400000. https://developers.openai.com/api/docs/models/gpt-5.6-cyber.md says "400,000 context window", "Maximum input tokens: 272,000" and "128,000 max output tokens".max_output_tokensalready matches. The long context price fields stay because the same page still says "Prompts with >272K input tokens are priced at 2x input and 1.5x output for the full request"gpt-daybreak-red-latestand its aliasdaybreak-red-latest(kind page) getmax_input_tokens272000, down from 400000. https://developers.openai.com/api/docs/models/gpt-daybreak-red-latest.md says "400,000 context window", "Maximum input tokens: 272,000" and "128,000 max output tokens". The Daybreak Blue rows already carry 922000, which matches "Maximum input tokens: 922,000" on its pagesora-2-pro-high-resandopenai/sora-2-pro-high-res(kind page) already carrydeprecation_date2026-09-24 with no source, sodeprecation_sourceis set to https://developers.openai.com/api/docs/deprecations. The "2026-03-24: Sora 2 video generation models and Videos API" table lists| 2026-09-24 | Videos API | --- |and| 2026-09-24 | sora-2-pro | --- |, and no replacement is named, so nosuccessor_modelis setAzure
azure/gpt-6-sol,azure/gpt-6-sol-2026-09-22,azure/gpt-6.1-solandazure/gpt-6.1-sol-2026-09-29get the eight Flex fields (input_cost_per_token_flex,output_cost_per_token_flex,cache_read_input_token_cost_flex,cache_creation_input_token_cost_flexand their_above_272k_tokens_flextwins).azure/gpt-6-astraandazure/gpt-6-astra-2026-09-03already had the four long context Flex fields and now get the four short context ones. Values per 1M come from the Global "Flex Gl" meters (effective 2026-10-01) in the Azure Retail Prices API, https://prices.azure.com/api/retail/prices?$filter=contains(meterName,'6-sol%20') (and the same filter for6.1-sol%20and6-astra%20). 6-sol short is $1 input, $5 output, $0.10 cache read, $1.25 cache write, long is $2, $7.50, $0.20, $2.50. 6.1-sol is the same except cache read $0.05 short and $0.10 long. 6-astra short is $5, $25, $0.50, $6.25. The Standard meters in the same response match the existing non-Flex fields, so those are unchanged. Regionalazure/us,azure/euandazure/apacrows are left alone because no regional Flex meter is listedAbsorbed from #50058:
azure/gpt-6-lunaandazure/gpt-6-luna-2026-09-22get Flex pricing, re-checked against https://prices.azure.com/api/retail/prices?$filter=contains(meterName,'6-luna') ("6-luna ShortCo Inp Flex Gl" $0.05, "Opt Flex Gl" $0.25, "Cd Inp Flex Gl" $0.005, "Cd Wr Flex Gl" $0.0625, LongCo $0.10, $0.375, $0.01, $0.125). Its cost calculation test intests/unit/litellm_core_utils/llm_cost_calc/test_llm_cost_calc_utils.pycomes alongBedrock GovCloud
Absorbed from #50077. Claude 3.5 Sonnet and Claude 3.7 Sonnet rows for
us-gov-east-1andus-gov-west-1,bedrock_mantleGovCloud rows for Kimi K3 and the NVIDIA Nemotron Super 3 120B, Nano 3 30B, Nano 9B v2 and Nano 12B v2 VL models, theus-gov-east-1Titan Embed Text v2 input price fix (0.03 per 1M, down from 0.20), and theus-gov-west-1GPT-5.4, GPT-5.6 Luna and GPT-5.6 Terra price fields. Every price was re-checked against the official AWS offer files https://pricing.us-east-1.amazonaws.com/offers/v1.0/aws/AmazonBedrock/current/us-gov-west-1/index.json and theus-gov-east-1twin, plus the AmazonBedrockFoundationModels offer files for the same regions. For example Claude 3.7 Sonnet is $3.60 input, $18 output, $0.36 cache read, $4.50 cache write per 1M, and Kimi K3 standard is $3.96 input, $19.80 output, $0.396 cache read, $4.95 30 minute cache write per 1M. Context limits and capability flags on the new rows match the same model's commercial region rows, since the offer files carry prices onlyGMI
Absorbed from #49949. 96 new
gmi/*chat rows with input, output and cache read prices andmax_input_tokens, each matching the provider's public catalog https://ie-api.gmicloud.ai/v1/artifact/get_public_artifacts (pricePer1mPromptToken,pricePer1mCompletionToken, tiercacheReadPrice,context_length)Not changed
From #49949, five rows are dropped because the live catalog disagrees with the PR.
gmi/XiaomiMiMo/MiMo-V2.6-Flash,gmi/XiaomiMiMo/MiMo-V2.6-Proandgmi/deepseek-ai/deepseek-v4.1-flash-1017now list lower prices than the PR had,gmi/deepseek-ai/DeepSeek-V4-Prolists a 65536 context against the PR's 1048576, andgmi/deepseek-ai/DeepSeek-V4.1-Flashlists 1048576 against the PR's 1048575. The PR'smax_output_tokensis also dropped from every GMI row, because it was set equal to the context length and the catalog does not publish an output limitThe Batch table on the OpenAI pricing page shows
-for gpt-5.5-pro long context, while the catalog keepsinput_cost_per_token_above_272k_tokens_batches3e-05 andoutput_cost_per_token_above_272k_tokens_batches0.000135. The page does not say whether that means long context batch is unavailable or just unlisted, so the fields are left for a human to decideThese OpenAI ids are gone from /v1/models with no date on the deprecations page, so they are left for a human to decide. daybreak-blue-latest, daybreak-red-latest, gpt-daybreak-blue-latest, gpt-daybreak-red-latest, gpt-5.5-cyber, gpt-5.5-cyber-preview, gpt-5.6, gpt-5.6-cyber, gpt-6-astra-law, gpt-6-rosalind, gpt-rosalind-discovery, gpt-rosalind-research, text-embedding-ada-002-v2. The cyber, Daybreak, Rosalind and law rows are trusted access models that are still priced on the pricing page, and gpt-5.6 is the alias the changelog says "routes requests to gpt-5.6-sol"
Open PRs that change code or behavior and only touch the JSON incidentally are left as they are, for example #49815 (
fill_missing_for_providersneeds its code), #49367 and #48582 (Bedrock transformation flags), #48098 and #48732. #49979 is not absorbed becauseazure_ai/claude-mythos-5-1is already on mainChecks
LITELLM_LOCAL_MODEL_COST_MAP=True uv run --no-sync pytest -q tests/unit/test_model_prices_and_context_window.py tests/unit/test_model_cost_aliases.py tests/unit/litellm_core_utils/llm_cost_calc/test_llm_cost_calc_utils.pypassed, as didpython3 ci_cd/check_files_match.pyand the cost map guard against mainLink to Devin session: https://app.devin.ai/sessions/c0570fdc227d47eead3ef7395a6901f6
Open in Devin Desktop: https://app.devin.ai/desktop/session/c0570fdc227d47eead3ef7395a6901f6?variant=devin