fix(model_prices): rolling registry audit - verified models and rates for Novita, DeepInfra, W&B, Bedrock Sol, Gemini, Fireworks, Azure gpt-5.6, Mistral, Together - #38207
Conversation
… fix claude 3 1h cache writes 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:
|
|
|
|
No action taken on #38207 — author is |
Greptile SummaryThe PR updates model pricing and capability metadata across multiple providers and adds focused regression coverage. The previously reported Claude cache-rate coverage gap is resolved by exact assertions for Haiku 3 and Opus 3 in both registry maps, plus a first-party Anthropic pricing invariant.
Confidence Score: 5/5The PR appears safe to merge because the previously reported regression-coverage gap has been fixed and no blocking failure remains. No blocking failure remains.
|
| Filename | Overview |
|---|---|
| model_prices_and_context_window.json | Updates the primary model registry with provider pricing, capabilities, context limits, routing modes, and deprecation metadata. |
| litellm/model_prices_and_context_window_backup.json | Mirrors the primary registry changes in the runtime backup map. |
| tests/test_litellm/test_anthropic_sonnet_1hr_cache_pricing.py | Fully addresses the prior coverage concern with exact Haiku 3 and Opus 3 assertions against both registry maps and a broader first-party invariant. |
| tests/test_litellm/test_fireworks_serverless_model_costs.py | Adds focused resolution and cost coverage for the new Fireworks DeepSeek model. |
| tests/test_litellm/llms/xai/test_xai_model_registry.py | Adds registry coverage for retired xAI entries and Responses-only multi-agent models. |
| tests/test_litellm/test_together_ai_model_metadata.py | Updates Together serverless and deprecated model expectations to match the registry changes. |
Reviews (5): Last reviewed commit: "fix(model_prices): cap ministral-3-3b at..." | 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>
|
Added focused regression tests pinning the Claude 3 one-hour cache writes to 2x base input, so that gap is closed now. |
|
The failing MCP cost test also fails on four unrelated branches with the same |
|
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 310591f. Configure here.
… and Fireworks registry fixes Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
…itellm_registry_audit_bedrock_sol_anthropic_1hr
…cations, novita gpt-oss-120b vision flag, fireworks deepseek-v4-pro-0813 Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
…catalog Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
… entries, move retired together models to deprecated list Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
…itellm_registry_audit_bedrock_sol_anthropic_1hr
…, together cache reads 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>
…itellm_registry_audit_bedrock_sol_anthropic_1hr
…ogether and Azure deprecation dates Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
|
bugbot run |
| "supports_function_calling": true, | ||
| "supports_response_schema": true, | ||
| "supports_tool_choice": true, | ||
| "supports_vision": true |
There was a problem hiding this comment.
Ministral 3B aliases use wrong context
Medium Severity
New mistral/ministral-3b-2512 and mistral/ministral-3b-latest aliases cap context at 131072, while this same change lifts sibling mistral/ministral-3-3b-2512 to 262144 from the same 3B card those aliases cite. Calls above 128k on the short ids can be rejected even though the model accepts 256k.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 5d26ae0. Configure here.
There was a problem hiding this comment.
Mistral's models API caps ministral-3b-2512 at 131072; only the 3-3b entry was wrong, now lowered to match in a0689f0
| "supports_function_calling": true, | ||
| "supports_parallel_function_calling": true, | ||
| "supports_tool_choice": true, | ||
| "supports_system_messages": true | ||
| "supports_system_messages": true, | ||
| "supports_response_schema": true |
There was a problem hiding this comment.
Novita Llama 3.3 context window slashed
High Severity
novita/meta-llama/llama-3.3-70b-instruct drops max_input_tokens, max_output_tokens, and max_tokens from a 128k-class window to 12288. That is the only Novita correction that shrinks input context, and Llama 3.3 70B is a 128k model. Gateway context checks will refuse ordinary long prompts that Novita still serves.
Reviewed by Cursor Bugbot for commit 5d26ae0. Configure here.
There was a problem hiding this comment.
Novita's own models API reports context_size 12288 for meta-llama/llama-3.3-70b-instruct; the entry mirrors the provider's current serving limit
…ror Anthropic family flags on new DeepInfra Claude rows
|
bugbot run |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
2 issues from previous reviews remain unresolved.
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit a0689f0. Configure here.


TLDR
Problem this solves:
openai.gpt-5.6-solbilled 25% over published ratesopenai.gpt-5.6-cyberon Bedrock had no entrydeprecation_datedeprecation_datesora-2gained an official retirement dateHow it solves it:
User Flow
Before: a developer running new serverless models through the gateway sees $0 spend or spend that disagrees with the provider's invoice
"model": "deepinfra/moonshotai/Kimi-K2.5"and a 10k token prompt"model": "gemini/gemini-flash-latest"with a cached prefix and the log shows cached input billed at $0.0000003 per token, 10x the published rate"model": "bedrock/us.openai.gpt-5.6-sol"and the log shows $5.50 per million input tokens while AWS bills $4.40After: those calls are priced, and the numbers match the provider pages
deepinfra/moonshotai/Kimi-K2.5request is logged at $0.45 in, $2.25 out per million tokens, with cache reads at $0.07gemini/gemini-flash-latestcached input is logged at $0.03 per million tokens, matching Google's pricing tablebedrock/us.openai.gpt-5.6-solis logged at $4.40 in and $22.00 out, and prompts over 272k at $8.80 / $33.00Relevant issues
Registry audit run against provider docs, no issue.
Linear ticket
Changes by provider
Bedrock (mantle) and Anthropic
bedrock_mantle/openai.gpt-5.6-sol,us.openai.gpt-5.6-sol,global.openai.gpt-5.6-sol: https://docs.aws.amazon.com/bedrock/latest/userguide/model-card-openai-gpt-56-sol.html gives In-Region and Geo CRIS $4.40 in, $5.50 30m cache write, $0.44 cache read, $22.00 out at the 272K tier, and $8.80 / $11.00 / $0.88 / $33.00 at the 1M tier. Global CRIS is $4.00 / $5.00 / $0.40 / $20.00 and $8.00 / $10.00 / $0.80 / $30.00. The registry held launch rates, 25% high on every field.bedrock_mantle/openai.gpt-5.6-cyber(new): https://docs.aws.amazon.com/bedrock/latest/userguide/model-card-openai-gpt-56-cyber.html gives $13.75 in, $17.1875 30m cache write, $1.375 cache read, $82.50 out, 272K context, Responses only at/openai/v1/responses, image plus text input, prompt caching and server-side tool calling. Geo and Global are unsupported, so only thebedrock_mantle/key exists.claude-3-haiku-20240307,claude-3-opus-20240229: https://docs.anthropic.com/en/docs/about-claude/pricing documents 1h cache writes at 2x base input, so $0.50 and $30.00 per MTok. Both carried $6.00, the Sonnet rate.Gemini and Vertex cached input
https://ai.google.dev/gemini-api/docs/pricing and https://cloud.google.com/vertex-ai/generative-ai/pricing list context-cache reads at $0.03 per million tokens for Gemini 2.5 Flash and $0.01 for 2.5 Flash-Lite. Corrected on
gemini/gemini-2.5-flash-preview-09-2025,gemini/gemini-flash-latest,gemini/gemini-2.5-flash-lite-preview-06-17,gemini/gemini-flash-lite-latest, and the Vertexgemini-2.5-flash-preview-09-2025andgemini-2.5-flash-lite-preview-06-17entries, which had drifted 10x from the dated models they alias.Novita (50 added, 40 fields corrected)
Source: Novita's own catalog API https://api.novita.ai/v3/openai/models plus https://novita.ai/pricing and https://novita.ai/docs/guides/llm-function-calling. Added the active, priced, slash-namespaced chat models the API returns that had no entry, each with context and output limits, published input/output and cache-read prices, and capability flags taken from the API's own
features(function-calling,structured-outputs,reasoning) andinput_modalities. Corrections includenovita/qwen/qwen3-coder-480b-a35b-instruct($0.38 / $1.55),novita/xiaomimimo/mimo-v2-flash($0.11 / $0.33, $0.024 cache read), cache-read plussupports_prompt_cachingonnovita/zai-org/glm-4.5-airandnovita/moonshotai/kimi-k2-thinking, and output-limit fixes on the Kimi K2, DeepSeek V3 and Qwen entries. Inactive, unpriced and catalog-only rows were skipped.DeepInfra (67 added, 25 fields corrected)
Source: DeepInfra's public model API https://api.deepinfra.com/models/list (pricing page: https://deepinfra.com/pricing), which publishes
cents_per_input_token,cents_per_output_token, the cached-input rate as a fraction of input, context length, tags and a deprecation flag. Added the non-deprecated text-generation models with published token pricing and no entry, among themdeepinfra/deepseek-ai/DeepSeek-V4-Pro,DeepSeek-V4-Flash,moonshotai/Kimi-K3,Kimi-K2.5,Kimi-K2.6,Kimi-K2.7-Code,zai-org/GLM-5,GLM-5.1,GLM-5.2, theQwen/Qwen3.5-*,Qwen3.6-*,Qwen3.8-*andQwen3-VL-*families,ByteDance/Seed-*,google/gemma-4-*,google/gemini-3.x,anthropic/claude-*served by DeepInfra,nvidia/NVIDIA-Nemotron-3-*,MiniMaxAI/MiniMax-M3,XiaomiMiMo/MiMo-V2.5*,thinkingmachines/Inkling*,tencent/Hy3andstepfun-ai/Step-3.7-Flash. Flags come from the API tags:toolssets function calling and tool choice,structured-output/jsonsets response schema,reasoningsets reasoning,multimodalsets vision. Corrections are price-only where the API disagrees with the registry, e.g.deepinfra/openai/gpt-oss-120b($0.037 / $0.17 against $0.05 / $0.45),Qwen/Qwen3-30B-A3B,Qwen/Qwen3-Next-80B-A3B-Instruct,deepseek-ai/DeepSeek-V3.1,meta-llama/Llama-4-Maverick-17B-128E-Instruct-FP8andGryphe/MythoMax-L2-13b, plus cache-read rates the API publishes and the registry lacked. Entries the API marks deprecated were left untouched.Weights & Biases Inference (19 added, 6 corrected)
Source: https://wandb.ai/site/pricing/tokens/ and https://docs.wandb.ai/inference/models, read as raw table rows. Added
wandb/deepseek-ai/DeepSeek-V4-Pro($1.15 / $2.55, $0.20 cache hit),DeepSeek-V4-FlashandDeepSeek-V4-Flash-0731,zai-org/GLM-5.2($0.76 / $2.42),Qwen/Qwen3.8-27B($0.40 / $3.00),Qwen/Qwen3.6-27B,MiniMaxAI/MiniMax-M3,moonshotai/Kimi-K2.7-Code,google/gemma-4-31B-itand the rest of the priced rows with no entry. Correctedwandb/openai/gpt-oss-120b($0.03 / $0.17),gpt-oss-20b($0.03 / $0.13),Qwen/Qwen3-Coder-480B-A35B-Instruct($1.00 / $1.50),meta-llama/Llama-3.1-8B-InstructandLlama-3.3-70B-Instruct, anddeepseek-ai/DeepSeek-V3.1.Fireworks
https://docs.fireworks.ai/serverless/pricing lists DeepSeek V4 Flash (0731) at $0.22 in, $0.007 cached, $0.66 out.
fireworks_ai/accounts/fireworks/models/deepseek-v4-flash-0731carried $0.14 / $0.028 / $0.28, which is Novita's rate for the same model. Every other Fireworks serverless row on that page already matches the registry.Azure and Together deprecation dates (2026-08-26 run)
azure/gpt-4.1-nanoandazure/gpt-4.1-nano-2025-04-14: https://learn.microsoft.com/en-us/azure/foundry/openai/concepts/model-retirement-schedule lists gpt-4.1-nano version 2025-04-14 as Legacy with retirement no earlier than 2027-04-14, matching the gpt-4.1 and gpt-4.1-mini entries already in the registry. Both carried 2026-10-14, which appears nowhere on the current scheduletogether_ai/meta-llama/Llama-Guard-4-12Bandtogether_ai/google/gemma-3n-E4B-it: Together's deprecations page (https://docs.together.ai/docs/deprecations) lists both with a 2026-08-25 removal date, read from the raw table rows. Addeddeprecation_date: 2026-08-25to each and moved them from the serverless list to the deprecated map intests/test_litellm/test_together_ai_model_metadata.py, which encoded the pre-2026-08-25 provider stateThe DeepInfra-served Claude entries added earlier in this PR now carry the model-intrinsic Anthropic flags the family invariant tests enforce (
supports_adaptive_thinking,supports_sampling_params: false,prompt_cache_min_tokens, andthinking_always_onon Fable 5), mirrored from the first-party entries for the same models, including the later-addedclaude-sonnet-4-6andclaude-haiku-4-5rowsFireworks DeepSeek V4 Pro (0813), new entry (2026-08-26 run)
https://docs.fireworks.ai/serverless/pricing now lists DeepSeek V4 Pro (0813) at $1.32 in, $0.044 cached, $3.96 out, and the model page (https://app.fireworks.ai/models/fireworks/deepseek-v4-pro-0813) confirms serverless availability, function calling and 1M context. Added
fireworks_ai/accounts/fireworks/models/deepseek-v4-pro-0813, absorbed from #38218 after re-verifying every field against those pagesAzure gpt-5.6 cache writes and Data Zone priority rates (2026-08-26 run)
The Azure retail price API (https://prices.azure.com/api/retail/prices, cross-checked with https://azure.microsoft.com/en-us/pricing/details/cognitive-services/openai-service/) publishes gpt-5.6 Sol/Terra/Luna cache writes at 1.25x input on every meter: Sol $6.25, Terra $2.50, Luna $0.25 per MTok standard, doubled for the above-272k tier, and matching priority meters. Added
cache_creation_input_token_cost,..._above_272k_tokensand..._priorityto the 12azure/gpt-5.6*entries. The same API prices US/EU Data Zone standard and priority meters at 1.1x Global, so theazure/us/...andazure/eu/...priority input, cached-input and output rates were corrected from 1.25x to 1.1x. #38370 merged these same fields into the base branch mid-run, so this branch now matches staging for the azure gpt-5.6 entries, including the long-context priority cache-write rates. Regression tests intests/test_litellm/test_cost_calculator.pypin the 1.25x cache-write and 1.1x Data Zone invariantsMistral missing models (2026-08-26 run)
Ten ids Mistral's
/v1/modelsserves had no registry entry. Each was added from its official model card:mistral/ministral-14b-2512and-latest($0.20/$0.20, 256k, https://docs.mistral.ai/models/ministral-3-14b-25-12),mistral/ministral-3b-2512and-latest($0.10/$0.10, 128k, https://docs.mistral.ai/models/ministral-3-3b-25-12),mistral/mistral-embed-2312(https://docs.mistral.ai/models/mistral-embed-23-12),mistral/mistral-medium-3(listed as an API name on https://docs.mistral.ai/models/mistral-medium-3-5-26-04, same rates asmistral-medium-3-5),mistral/voxtral-small-2507and-latest($0.004/min audio, $0.10/$0.40 per MTok, 32k, https://docs.mistral.ai/models/voxtral-small-25-07), plus the-latestaliases forvoxtral-mini-transcribe-realtimeandvoxtral-mini-tts. The 3b card advertises 256k, but Mistral's/v1/modelscapsministral-3b-2512at 131072, so the 3b entries and the pre-existingmistral/ministral-3-3b-2512id all carry 131072, matching what the hosted API acceptsTogether cache-read pricing (2026-08-26 run)
https://www.together.ai/pricing publishes cached-input rates, read from the raw rows. Added
cache_read_input_token_costplussupports_prompt_cachingto MiniMax-M3 ($0.06), Qwen3.8-2.4T-A95B ($0.50), Qwen3.5-397B-A17B ($0.35), DeepSeek-V4-Flash-0731 ($0.03), DeepSeek-V4-Pro ($0.20), DeepSeek-V4-Pro-0813 ($0.13), Muse-Glimmer-30B ($0.04), Kimi-K2.7-Code ($0.19), Kimi-K3 ($0.30), nemotron-3-ultra-550b-a55b ($0.20), Inkling ($0.17), Inkling-Small ($0.10) and GLM-5.2 ($0.26). Qwen3.7-Max keeps its $1.25/$3.75 rates, which the pricing page still shows, and gains the page's $0.13 cached rateDatabricks and Z.AI additions (2026-08-27 run)
databricks/databricks-glm-5-2anddatabricks/databricks-kimi-k3: added from https://www.databricks.com/product/pricing/foundation-model-serving, which lists GLM 5.2 at 20.000 DBU in / 62.857 DBU out / 3.714 DBU cache read per MTok and Kimi K3 at 42.857 / 214.286 / 4.286, converted at $0.070 per DBU like the sibling Databricks entries.zai/glm-5.3: added from https://docs.z.ai/guides/overview/pricing, $1.40 in, $0.26 cached, $4.40 out per MTok. Absorbed from #38415 after re-verifying every rate against those pages, including its cost-calculator testxAI retired models and multi-agent endpoint (2026-08-27 run)
https://docs.x.ai/docs/models no longer lists grok-2, grok-2-1212, grok-2-latest, grok-2-vision, grok-2-vision-1212, grok-2-vision-latest, grok-beta or grok-vision-beta, so those entries are removed. https://docs.x.ai/developers/model-capabilities/text/multi-agent documents grok-4.20-ma and grok-4.20-ma-fast as Responses-only, so both entries switch to
mode: responseswithsupported_endpoints: ["/v1/responses"]. Absorbed from #38510 with its registry testTogether and Azure deprecation dates (2026-08-27 run)
https://docs.together.ai/docs/deprecations now lists nvidia/Nemotron-3-ultra-550b-a55b, pearl-ai/gemma-4-31b-it, deepseek-ai/DeepSeek-V4-Pro and moonshotai/Kimi-K2.7-Code with a 2026-08-27 serverless removal date, read from the raw table rows. Each gets
deprecation_date: 2026-08-27and moves to the deprecated map intests/test_litellm/test_together_ai_model_metadata.py. The three successor pointers at DeepSeek-V4-Pro now point at DeepSeek-V4-Pro-0813, the newer snapshot of the same model still on the serverless list.azure/sora-2getsdeprecation_date: 2026-10-15from the sora-2 2025-12-08 row on https://learn.microsoft.com/en-us/azure/foundry/openai/concepts/model-retirement-schedule. Groq, Cohere, Anthropic, Gemini, Vertex and OpenAI deprecation schedules were re-read raw this run; every date already in the registry matches the provider pages, so none changedAbsorbed from other open registry PRs
supports_native_structured_output): both flags it adds are already on this branch, confirmed against https://platform.claude.com/docs/en/build-with-claude/structured-outputs, so it is superseded with no new fields to take.Deliberately not applied
deepseek-v4-pro-0813is absorbed here, its pricing now appears on the Fireworks serverless pricing table and matches the PR.qwen3p8-2p4t-a95bis dropped: neither the pricing table nor the model page publishes a serverless price for it, so its numbers are unverifiable.input_modalities: [text, image]foropenai/gpt-oss-120b, so the provider's own source contradicts settingsupports_vision: false. Not applied.deprecation_dateplus successor metadata, which a separate automation owns. Its Llama 3.3 70B Turbo price change still needs an official Together source, so nothing was taken from it and it stays open.source, on a different base branch, each needing a per-model check against https://docs.empiriolabs.ai/models/. Not verified here, left open.deprecation_dateedits: only the Azure and Together dates above, each read from the provider's raw schedule page, and no entry gained a price or flag that its provider does not publish, so several models the providers list without public per-token pricing are still absent.Pre-Submission checklist
uv run pytest tests/test_litellm/<your_test_file>.py -vTests
tests/test_litellm/test_fireworks_serverless_model_costs.py(adapted from #38218, qwen assertions removed) pins the new Fireworks entry and proves the bareaccounts/fireworks/models/...id resolves to it.tests/test_litellm/test_anthropic_sonnet_1hr_cache_pricing.pypins the Haiku 3 and Opus 3 1h cache writes in both maps, plus an invariant that every first-party Anthropic entry keeps its 1h cache write at 2x base input. Bedrock Sol and Cyber costing stays covered by the updated cross-region and Mantle Responses tests.Link to Devin session: https://app.devin.ai/sessions/e79cabf82dec491aa7b23e502bcf6735
Link to Devin session: https://app.devin.ai/sessions/56ad8758edb14799ae7986746a98af63
Open in Devin Desktop: https://app.devin.ai/desktop/session/56ad8758edb14799ae7986746a98af63?variant=devin
Note
Medium Risk
Data-only changes directly drive cost calculation and budgets; wrong rates affect billing accuracy, though scope is limited to the static registry with no runtime logic in this diff.
Overview
Updates
model_prices_and_context_window_backup.json(kept in sync with the primary cost map) so LiteLLM spend logging matches current provider pricing.Rate and metadata fixes include Bedrock
openai.gpt-5.6-sol(and US/Global mirrors) at published lower tiers, newopenai.gpt-5.6-cyber, Gemini/Vertex 2.5 Flash cached-input rates, Azuregpt-4.1-nanoretirement pushed to 2027-04-14,azure/sora-2deprecation, Fireworks DeepSeek V4 pricing, and large DeepInfra / Novita price realignments plus capability flags (e.g. prompt caching).New catalog entries cover dozens of Novita, DeepInfra, and W&B models, Databricks GLM 5.2 / Kimi K3, Mistral ministral/voxtral/medium/embed ids, Together cache-read fields and
deprecation_dateon retiring serverless models (successors pointed at DeepSeek-V4-Pro-0813), and zai/glm-5.3.Removals / routing: legacy xAI grok-2/beta/vision entries dropped; grok-4.20 multi-agent models switch to
mode: responseswith/v1/responses. W&B token costs are corrected from implausible per-token magnitudes to per-token decimals withsourceURLs.Reviewed by Cursor Bugbot for commit a0689f0. Bugbot is set up for automated code reviews on this repo. Configure here.