Repository navigation
fix(registry): add MAI-Image-2.5-Pro pricing, fix Fireworks/Together entries, absorb verified open registry PRs, add Groq deprecation and Bedrock regional Qwen3 Next pricing - #34941
Conversation
🤖 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:
|
|
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>
1d9090c to
d268c8b
Compare
|
|
|
@greptileai rebased onto main as d268c8b, please review the current diff |
…7064 Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
…t-image-2 Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
…LMParams denylist Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
…image_2_5_pro Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
|
Two keys from #28853 aren't in this diff: If you do add them, don't copy my old values straight across — I derived them from the direct
|
…qwen3-next regional pricing Groq lists qwen/qwen3.6-27b for shutdown on 2026-09-14. Adds the six regional Bedrock qwen.qwen3-next-80b-a3b entries priced per AWS's published regional rates (absorbs #42191) with a regression test that the regional entry is used instead of the US rate Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
|
bugbot run |
… check Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
|
bugbot run |
There was a problem hiding this comment.
✅ 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 2888b4f. Configure here.
|
Correction to my comment above — it was wrong, and there's no gap to fix. I checked Worth flagging for anyone else diffing the registry: |
) * test: point CircleCI-only suites at models still in the cost map #42435 removed cost map entries past their deprecation date and #42437 added litellm_uisettings to the config-synced tables, but both only updated tests/test_litellm. The CircleCI-only suites (local_testing, llm_translation, logging_callback_tests, litellm_utils_tests, unit) kept using the removed models or the old table list and went red on main. Each test keeps its assertions and swaps the removed model for a current one with the same provider and capabilities. The fireworks tests pick a vision model from the cost map because #34941 set supports_vision false on minimax-m3, and the vertex image provider test injects the image model set because #42435 removed every vertex_ai-image-models entry. * test(vertex_ai): register the image model through add_known_models in the provider test
TLDR
Problem this solves:
azure_ai/MAI-Image-2.5-Prohad no cost map entry, so every call logged $0 spendgroq/qwen/qwen3.6-27bhad nodeprecation_datealthough Groq shuts it down 2026-09-14qwen.qwen3-next-80b-a3bbilled every region at the US rateHow it solves it:
Changes by provider
Every value below was checked against the linked official source.
Azure AI
azure_ai/MAI-Image-2.5-Pro(image_generation): text input $5/M, image input $8/M, image output $106/M, $0.1085 per flat image. Source: https://techcommunity.microsoft.com/blog/azure-ai-foundry-blog/introducing-mai-image-2-5-pro-and-mai-voice-2-flash-in-microsoft-foundry/4539446azure_ai/gpt-image-2(absorbed from feat(cost): add pricing for azure_ai/gpt-image-2 and gpt-image-to-image #27064): input text $5/M, cached input text $1.25/M, input image $8/M, cached input image $2/M, output image $30/M. Source: https://azure.microsoft.com/en-us/pricing/details/cognitive-services/openai-service/ (row "GPT-Image-2 Global"). Dropped from feat(cost): add pricing for azure_ai/gpt-image-2 and gpt-image-to-image #27064:output_cost_per_token(Azure lists Output Text as N/A),supports_pdf_input(not documented), and theazure_ai/gpt-image-to-imagekey (no such Azure model).Fireworks
Source: official APIs
https://api.fireworks.ai/v1/serverless/models(pricing, standard tier) andhttps://api.fireworks.ai/inference/v1/models(capabilities). The fireworks.ai HTML pages return no rows via curl; the API path worked, so no browser fallback was needed.fireworks_ai/minimax-m3andfireworks_ai/accounts/fireworks/models/minimax-m3:supports_visiontrue → false (API:supports_image_input: false,input_modalities: ["text"])fireworks_ai/glm-5p3,fireworks_ai/glm-5p3-flash,fireworks_ai/deepseek-v4-pro-0813— exact copies of the existingaccounts/fireworks/models/...entries (which match the API standard tier), following the existingfireworks_ai/glm-5p3-fastalias conventionTogether AI
Source:
https://api.together.ai/v1/modelstogether_ai/zai-org/GLM-4.6,together_ai/zai-org/GLM-4.7:max_input_tokens/max_tokens200000 → 202752 (APIcontext_length)DeepSeek / OpenRouter (absorbed from #28853)
cache_read_input_token_costequal to each entry's existinginput_cost_per_token_cache_hitondeepseek/deepseek-coder,deepseek/deepseek-r1,deepseek/deepseek-v3.2,openrouter/deepseek/deepseek-v3.2-exp,openrouter/deepseek/deepseek-r1(internal consistency: cost tracking readscache_read_input_token_cost). Skipped the 3 keys from fix(pricing): add cache_read_input_token_cost to 8 deepseek models #28853 that already had the field onmain.openrouter/deepseek/deepseek-v4-flashalready matches the OpenRouter API onmain(4.032e-08 / 8.064e-08 / 8.064e-09) — no change needed.Schema / new pricing field
cache_read_input_image_token_costis a new field (introduced byazure_ai/gpt-image-2), so it is registered wherever the cost map schema is enforced:model_prices_and_context_window.schema.json(regenerated withci_cd/generate_model_prices_schema.py)ModelInfoBaseand theCustomPricingLiteLLMParamsdenylist inlitellm/types/utils.pytests/test_litellm/test_utils.pyui/litellm-dashboard/src/lib/http/schema.d.ts(regenerated vianpm run gen:api)No cost-calculation code reads the field yet; it is data-only until image cache-read billing is wired up.
Groq (2026-09-21 audit)
Source: https://console.groq.com/docs/deprecations (raw HTML table row
qwen/qwen3.6-27b | 09/14/26 | qwen/qwen3.8-27b, cross-checked with r.jina.ai)groq/qwen/qwen3.6-27b: addeddeprecation_date: "2026-09-14". Supports feat(proxy): proactive model deprecation alerts and/model/deprecationsendpoint #26900 (deprecation alerts readdeprecation_date)groq/compoundandgroq/compound-miniare also listed (09/21/26) but have no registry key onmain; they are added by the code PR fix(groq): register and correctly route compound systems #32470, which is left aloneBedrock (2026-09-21 audit, absorbed from #42191)
Source: https://aws.amazon.com/bedrock/pricing/ (raw HTML, "Qwen 3 Next, VL, Coder Next" On-Demand tables per region group)
bedrock/<region>/qwen.qwen3-next-80b-a3bfor six regions, copying the limits and capability flags of the existingqwen.qwen3-next-80b-a3bentry and usinglitellm_provider: bedrocklike every otherbedrock/<region>/key. Prices per 1M input/output tokens:ap-northeast-1$0.18/$1.45 (Tokyo),sa-east-1$0.18/$1.45 (Sao Paulo),ap-south-1$0.18/$1.41 (Mumbai),eu-west-1$0.18/$1.41 (Ireland),eu-west-2$0.23/$1.86 (London),ap-southeast-2$0.1545/$1.2360 (Sydney)test_cost_per_token_bedrock_qwen3_next_uses_regional_entry_not_us_rateintests/test_litellm/test_cost_calculator.pyasserts the regional key is used and differs from the US rate, reading the expected rates from the cost map rather than pinning vendor prices. Removing any regional entry makes it failwhitelisted_bedrock_models.txt(root andtests/local_testing/) like the sibling regionalqwen.qwen3-coder-nextrows, sotest_model_info_bedrock_conversekeeps passingDeprecation sweep (2026-09-21)
OpenAI, Anthropic, Gemini, Vertex, Bedrock, Azure, Groq, Together, Fireworks, Cohere deprecation pages were re-fetched as raw HTML and diffed against the 2026-09-19 fetch: the only new rows are the Groq ones above. Anthropic "Not sooner than" floors stay out of
deprecation_date(see #41964). Azuregpt-realtime-minihas two conflicting retirement rows for the same version (2027-04-06 and 2026-09-21) andgpt-4o-mini-transcribe/gpt-4o-mini-ttshave one date per version with no version in the registry key, so those stay undated. Pricing spot-checks (Bedrock, Gemini, OpenAI, Anthropic, Mistral, DeepSeek, Groq, Fireworks, Cohere raw tables) show no new mismatchesNot changed (checked, deliberately left alone)
Open registry PRs reviewed against official sources and not absorbed:
bedrock_mantle/us-gov-west-1/openai.gpt-5.6-sol: no gpt-5.6-sol SKU in the AWS us-gov-west-1 price list export; GovCloudlist_foundation_modelsnot accessible with available credentials — unverifiable.mainalready matches Anthropic's published $0.025/M read, $0.3125/M write — PR values contradicted.supports_web_searchon 16 Anthropic keys: Anthropic's web-search docs no longer publish a per-model support table — unverifiable per key.bedrock_conversexai.grok-4.3/us.xai.grok-4.3: prices match the AWS price list, but the model ID is absent fromlist_foundation_models(us-east-1/us-west-2) and the token limits are unsourced — unverifiable.gemini-live-2.5-flashlimits sourced from a different model ID (gemini-2.5-flash-native-audio-latest); Azure realtime cache field semantics ambiguous — unverifiable.openai/z-ai/glm-5.2(provideropenai): not an OpenAI model ID;zai/glm-5.2already exists with the same verified prices.zai/*keys already onmain.gemini-2.5-flash-lite-maxout, feat: add qwen3.7-max model (Alibaba/Qwen via Anthropic protocol) #29920qwen3.7-max, feat(bedrock): add bedrock_mantle google.gemma-4-e4b #33930gemma-4-e4bon Bedrock, docs: add Phoenix Grove (pgsgrove) model pricing entries #40755 pgsgrove, feat: update EmpirioLabs models in model_prices_and_context_window.json #37972 empirio, feat(github_copilot): add gpt-5.6 luna, terra, sol #33966/feat(github_copilot): add missing models to registry and unit tests #29679 Copilot values: model IDs or per-token prices not found in any official source.cohere/embed-multilingual-light-v3.0: main's 1e-4 is very likely wrong, but the light-model per-token price is not on the current Cohere pricing page — left for a follow-up with a source.main; itsmax_output_tokens1048576 is unsourced.mainon its own; feat(router): native compact-to-fit across conversation APIs #42074, feat(search): add Serply as a search provider #42150, fix(deepseek): promote reasoning_content on multi-turn default thinking models #42158 are code/behavior PRs; feat(fal_ai): add gpt-image-2.5 flare/sunburst, flux/dev and image edits #42095 (fal_ai) and feat(providers): add Prism provider (internal copy of #40914) #41961 (Prism), feat(providers): add TopxAI as a JSON-configured OpenAI-compatible provider #41919 (TopxAI) add new providers with code, left alone; chore(prices): sync OpenRouter prices: 172 models, 2 new #41833 OpenRouter, feat(model_prices): add bedrock_mantle/us-gov-west-1/openai.gpt-5.6-sol to model registry (#40102) #41841 Bedrock Mantle, fix(cost): bill DeepSeek V4.1 Flash and V4 Pro at off-peak rates outside peak hours #41960 DeepSeek off-peak: not verifiable from a first-party raw tableOther audit notes: Fireworks
qwen3-embedding-8b/qwen3-reranker-8bdirect aliases not added (existing account-prefixed entries cover them; unit semantics for rerank not confirmed). Together models withrunning: false/ zero prices not added. DeepSeek legacydeepseek-v4-flash*aliases left in place (still accepted by DeepSeek, retirement handling is deprecation scope).Relevant issues
Affected release
Linear ticket
Resolves LIT-4881
Pre-Submission checklist
LITELLM_LOCAL_MODEL_COST_MAP=True uv run --no-sync pytest -q tests/test_litellm/test_model_prices_schema.py tests/test_litellm/test_cost_map_guard.py(76 passed) andtests/test_litellm/test_cost_calculator.py -k qwen3_next(6 passed);python3 ci_cd/check_files_match.pyandci_cd/generate_model_prices_schema.py --checkpassScreenshots / Proof of Fix
MAI-Image-2.5-Pro live proof (unchanged from the original revision of this PR): both
/v1/images/generationsand/v1/images/editsagainst a real Azure AI Foundry deployment went fromresponse_cost=0.0at the merge base to0.108584/0.109056on this branch; mutation check viatests/test_litellm/llms/azure_ai/image_generation/test_mai_image_generation.py(fails with the entry removed).The remaining changes are registry data corrections validated by the schema/alias tests and
check_files_match.pyabove.Type
🆕 New Feature / 🐛 Bug Fix (registry data)
Caveats (if any)
Low
Link to Devin session: https://app.devin.ai/sessions/fc30029e9d3e478d86b829800d83f5a4
Open in Devin Desktop: https://app.devin.ai/desktop/session/fc30029e9d3e478d86b829800d83f5a4?variant=devin
Note
Low Risk
Registry and schema metadata only; behavior changes are more accurate cost attribution for affected models, with tests guarding Bedrock regional lookup and Azure image pricing.
Overview
This PR refreshes the model cost registry so spend tracking and routing metadata match current provider pricing and capabilities.
Azure AI image models: Adds
azure_ai/MAI-Image-2.5-Pro(fixes $0 spend) andazure_ai/gpt-image-2, including per-image/text token rates and a newcache_read_input_image_token_costfield registered in the JSON schema,litellm/types/utils.py, dashboard types, and test allowlists (data-only until cache-read billing is implemented).Bedrock: Adds six regional
bedrock/<region>/qwen.qwen3-next-80b-a3bentries with region-specific on-demand rates so non-US regions are not billed at the US price; whitelists and a parametrizedcost_per_tokenregression test cover this.Other registry fixes: Fireworks
supports_visioncorrected for MiniMax M3; short aliases forglm-5p3,glm-5p3-flash,deepseek-v4-pro-0813; Together GLM-4.6/4.7 context 202752; DeepSeek/OpenRoutercache_read_input_token_costaligned with cache-hit fields;groq/qwen/qwen3.6-27bdeprecation_date. Root and backup cost maps stay in sync.Tests: MAI-Image-2.5-Pro edit cost splits text vs image input tokens.
Reviewed by Cursor Bugbot for commit 2888b4f. Bugbot is set up for automated code reviews on this repo. Configure here.