Skip to content

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

Merged
kerry-berri merged 10 commits into
mainfrom
litellm_azure_ai_mai_image_2_5_pro
Sep 21, 2026

Conversation

@devin-ai-integration

@devin-ai-integration devin-ai-integration Bot commented Jul 28, 2026 •

Copy link
Copy Markdown
Contributor

TLDR

Problem this solves:

How it solves it:

Changes by provider

Every value below was checked against the linked official source.

Azure AI

Fireworks

Source: official APIs https://api.fireworks.ai/v1/serverless/models (pricing, standard tier) and https://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-m3 and fireworks_ai/accounts/fireworks/models/minimax-m3: supports_vision true → false (API: supports_image_input: false, input_modalities: ["text"])
  • Added direct aliases fireworks_ai/glm-5p3, fireworks_ai/glm-5p3-flash, fireworks_ai/deepseek-v4-pro-0813 — exact copies of the existing accounts/fireworks/models/... entries (which match the API standard tier), following the existing fireworks_ai/glm-5p3-fast alias convention

Together AI

Source: https://api.together.ai/v1/models

  • together_ai/zai-org/GLM-4.6, together_ai/zai-org/GLM-4.7: max_input_tokens/max_tokens 200000 → 202752 (API context_length)

DeepSeek / OpenRouter (absorbed from #28853)

  • Added cache_read_input_token_cost equal to each entry's existing input_cost_per_token_cache_hit on deepseek/deepseek-coder, deepseek/deepseek-r1, deepseek/deepseek-v3.2, openrouter/deepseek/deepseek-v3.2-exp, openrouter/deepseek/deepseek-r1 (internal consistency: cost tracking reads cache_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 on main.
  • openrouter/deepseek/deepseek-v4-flash already matches the OpenRouter API on main (4.032e-08 / 8.064e-08 / 8.064e-09) — no change needed.

Schema / new pricing field

cache_read_input_image_token_cost is a new field (introduced by azure_ai/gpt-image-2), so it is registered wherever the cost map schema is enforced:

  • model_prices_and_context_window.schema.json (regenerated with ci_cd/generate_model_prices_schema.py)
  • ModelInfoBase and the CustomPricingLiteLLMParams denylist in litellm/types/utils.py
  • inline schema + cost-field list in tests/test_litellm/test_utils.py
  • ui/litellm-dashboard/src/lib/http/schema.d.ts (regenerated via npm 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)

Bedrock (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)

  • Added bedrock/<region>/qwen.qwen3-next-80b-a3b for six regions, copying the limits and capability flags of the existing qwen.qwen3-next-80b-a3b entry and using litellm_provider: bedrock like every other bedrock/<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)
  • Regression test test_cost_per_token_bedrock_qwen3_next_uses_regional_entry_not_us_rate in tests/test_litellm/test_cost_calculator.py asserts 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 fail
  • The six keys are added to whitelisted_bedrock_models.txt (root and tests/local_testing/) like the sibling regional qwen.qwen3-coder-next rows, so test_model_info_bedrock_converse keeps passing

Deprecation 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). Azure gpt-realtime-mini has two conflicting retirement rows for the same version (2027-04-06 and 2026-09-21) and gpt-4o-mini-transcribe/gpt-4o-mini-tts have 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 mismatches

Not changed (checked, deliberately left alone)

Open registry PRs reviewed against official sources and not absorbed:

Other audit notes: Fireworks qwen3-embedding-8b / qwen3-reranker-8b direct aliases not added (existing account-prefixed entries cover them; unit semantics for rerank not confirmed). Together models with running: false / zero prices not added. DeepSeek legacy deepseek-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

  • I have added meaningful tests
  • The handful of test files covering my change pass locally: 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) and tests/test_litellm/test_cost_calculator.py -k qwen3_next (6 passed); python3 ci_cd/check_files_match.py and ci_cd/generate_model_prices_schema.py --check pass
  • My PR passes all required CI/CD checks (e.g., lint, schema.d.ts sync check, etc.)
  • My PR's scope is as isolated as possible; it only solves 1 specific problem (registry data only)
  • I have received a Greptile Confidence Score of at least 4/5 before requesting a maintainer review

Screenshots / Proof of Fix

MAI-Image-2.5-Pro live proof (unchanged from the original revision of this PR): both /v1/images/generations and /v1/images/edits against a real Azure AI Foundry deployment went from response_cost=0.0 at the merge base to 0.108584 / 0.109056 on this branch; mutation check via tests/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.py above.

Type

🆕 New Feature / 🐛 Bug Fix (registry data)

Caveats (if any)

Low

  • Pricing is hand-copied from official pages/APIs at audit time; provider price changes need a follow-up
  • Bedrock regional Qwen3 Next prices are copied from the AWS pricing page at audit time; Milan (eu-south-1) shares the Mumbai/Ireland rate but has no registry key yet
  • Fireworks direct aliases duplicate the account-prefixed entries; if Fireworks changes standard-tier prices both forms need updating

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) and azure_ai/gpt-image-2, including per-image/text token rates and a new cache_read_input_image_token_cost field 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-a3b entries with region-specific on-demand rates so non-US regions are not billed at the US price; whitelists and a parametrized cost_per_token regression test cover this.

Other registry fixes: Fireworks supports_vision corrected for MiniMax M3; short aliases for glm-5p3, glm-5p3-flash, deepseek-v4-pro-0813; Together GLM-4.6/4.7 context 202752; DeepSeek/OpenRouter cache_read_input_token_cost aligned with cache-hit fields; groq/qwen/qwen3.6-27b deprecation_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.

@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment, CI, and merge conflict monitoring

@greptile-apps

greptile-apps Bot commented Jul 28, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

The PR appears safe to merge because the synchronized pricing entries and focused regression test introduce no actionable issue

Summary

Adds Azure AI MAI-Image-2.5-Pro pricing metadata to both synchronized model cost maps and adds a regression test verifying separate text-input, image-input, and image-output token rates

Reviews (4) · Last reviewed commit: "feat(azure_ai): add MAI-Image-2.5-Pro im..."

@codecov

codecov Bot commented Jul 28, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@codspeed

codspeed Bot commented Jul 28, 2026 •

Copy link
Copy Markdown
Contributor

Merging this PR will not alter performance

✅ 31 untouched benchmarks


Comparing litellm_azure_ai_mai_image_2_5_pro (2888b4f) with main (0c01d29)

Open in CodSpeed

@mateo-berri

Copy link
Copy Markdown
Contributor

@greptileai

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@CLAassistant

CLAassistant commented Sep 19, 2026 •

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ kerry-berri
❌ devin-ai-integration[bot]
You have signed the CLA already but the status is still pending? Let us recheck it.

@devin-ai-integration
devin-ai-integration Bot changed the base branch from litellm_internal_staging to main September 19, 2026 18:35
@devin-ai-integration
devin-ai-integration Bot requested a review from a team September 19, 2026 18:35
@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

@greptileai rebased onto main as d268c8b, please review the current diff

@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

@greptileai

…7064

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@devin-ai-integration devin-ai-integration Bot changed the title feat(azure_ai): add MAI-Image-2.5-Pro image generation pricing [Registry] Rolling model-pricing update: MAI-Image-2.5-Pro, Fireworks/Together fixes, absorb #28853 #27064 Sep 19, 2026
@devin-ai-integration devin-ai-integration Bot changed the title [Registry] Rolling model-pricing update: MAI-Image-2.5-Pro, Fireworks/Together fixes, absorb #28853 #27064 fix(registry): add MAI-Image-2.5-Pro pricing, fix Fireworks/Together entries, absorb #28853 #27064 Sep 19, 2026
…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>
@hclsys

hclsys commented Sep 20, 2026

Copy link
Copy Markdown
Contributor

Two keys from #28853 aren't in this diff: openrouter/deepseek/deepseek-r1-0528 and openrouter/deepseek/deepseek-v3.2. Both still have supports_prompt_caching: true and no cache_read_input_token_cost on litellm_internal_staging, so cached reads on them bill at the full input rate.

If you do add them, don't copy my old values straight across — I derived them from the direct deepseek/* entries, and the OpenRouter ones have different inputs (openrouter/deepseek/deepseek-v3.2 is 2.69e-07 vs 2.8e-07 direct). Worth taking them off the openrouter listing itself.

openrouter/deepseek/deepseek-chat-v3.1 is already covered on staging at 1.3e-07, so that one's fine.

…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>
@devin-ai-integration devin-ai-integration Bot changed the title fix(registry): add MAI-Image-2.5-Pro pricing, fix Fireworks/Together entries, absorb #28853 #27064 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 Sep 21, 2026
@mateo-berri

Copy link
Copy Markdown
Contributor

bugbot run

@cursor cursor Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

Comment thread model_prices_and_context_window.json Resolved
… check

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@mateo-berri

Copy link
Copy Markdown
Contributor

bugbot run

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ 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.

@kerry-berri
kerry-berri merged commit 701c2b7 into main Sep 21, 2026
93 of 94 checks passed
@kerry-berri
kerry-berri deleted the litellm_azure_ai_mai_image_2_5_pro branch September 21, 2026 15:07
@hclsys

hclsys commented Sep 21, 2026

Copy link
Copy Markdown
Contributor

Correction to my comment above — it was wrong, and there's no gap to fix.

I checked litellm_internal_staging, but this PR bases on main. On main both keys already carry cache_read_input_token_cost — openrouter/deepseek/deepseek-r1-0528 at 3.5e-07 and openrouter/deepseek/deepseek-v3.2 at 1.345e-07 — and they already did when I posted. Nothing was billing at the full input rate.

Worth flagging for anyone else diffing the registry: litellm_internal_staging is a long way behind main at the moment (its head is from 09-15), so it's a misleading baseline.

mateo-berri pushed a commit that referenced this pull request Sep 23, 2026
)

* 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants