Repository navigation
fix(model_prices): gemini deep research input limits, vertex flash retirement dates, azure data zone gpt-6.1-sol pricing - #44633
Conversation
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
|
|
|
| "input_cost_per_token_batches": 1e-06, | ||
| "litellm_provider": "gemini", | ||
| "max_input_tokens": 131072, | ||
| "max_input_tokens": 1048576, |
There was a problem hiding this comment.
Missing regression test Both Deep Research limits are corrected in the registry and backup, but no test catches their old values. The repository requires regression coverage for bug fixes. Please add a focused test before merging
Context Used: AGENTS.md (source)
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
There was a problem hiding this comment.
Added in 7c88e55: test_gemini_deep_research_previews_accept_the_documented_input_window pins 1,048,576 input and 65,536 output for both Deep Research entries, and fails on the old 131,072 value
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
…nd Azure data zone gpt-6.1-sol pricing Co-authored-by: ceng <christianpetersen98@gmail.com> Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
…flash retirement dates Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
TLDR
Problem this solves:
gemini-3.6-flashandgemini-3.7-flashhave announced retirement dates but nodeprecation_datein the registrygpt-6.1-solhas no US, EU or APAC Data Zone rows, so Data Zone deployments fall back to Global pricing and undercharge by 10% to 20%How it solves it:
max_input_tokensto 1048576 on both Deep Research entriesdeprecation_dateto the bare andvertex_ai/keys for both flash models (absorbed from fix(vertex-ai): add deprecation_date to gemini-3.6-flash and gemini-3.7-flash #44828)azure/us/gpt-6.1-sol,azure/eu/gpt-6.1-sol,azure/apac/gpt-6.1-solwith short and*_above_272k_tokenslong-context rates, plus the regional premium tests (absorbed from feat(model_prices): add azure us/eu/apac data zone pricing for gpt-6.1-sol #44816)User Flow
Before:
litellm.get_model_info("gemini/deep-research-preview-04-2026")reportsmax_input_tokens131072, so pre-call checks reject prompts the model acceptslitellm.get_model_info("vertex_ai/gemini-3.6-flash")has nodeprecation_dateazure/eu/gpt-6.1-solis costed at Global rates ($2.00 input, $10.00 output per 1M)After:
gemini/deep-research-max-preview-04-2026vertex_ai/gemini-3.6-flashreportsdeprecation_date2026-11-19,vertex_ai/gemini-3.7-flashreports2027-01-28azure/eu/gpt-6.1-solis costed at $2.40 input and $12.00 output per 1M, 1.2x GlobalChanges by provider
Gemini (Google AI Studio)
gemini/deep-research-preview-04-2026max_input_tokens131072 to 1048576, source https://ai.google.dev/gemini-api/docs/models/deep-research-preview-04-2026 (Token limits row: "Input context window 1,048,576, Output token limit 65,536")gemini/deep-research-max-preview-04-2026max_input_tokens131072 to 1048576, source https://ai.google.dev/gemini-api/docs/models/deep-research-max-preview-04-2026 (same Token limits row)Vertex AI (absorbed from #44828)
gemini-3.6-flashandvertex_ai/gemini-3.6-flashdeprecation_date2026-11-19,gemini-3.7-flashandvertex_ai/gemini-3.7-flashdeprecation_date2027-01-28. Source https://cloud.google.com/vertex-ai/generative-ai/docs/learn/model-versions, raw HTML rows['gemini-3.6-flash', 'July 21, 2026', 'November 19, 2026', 'gemini-3.8-flash']and['gemini-3.7-flash', 'August 13, 2026', 'January 28, 2027', 'gemini-3.8-flash']. Thegemini/(AI Studio) keys are not changed, that page covers Vertex onlyAzure (absorbed from #44816)
New rows
azure/us/gpt-6.1-sol,azure/eu/gpt-6.1-sol,azure/apac/gpt-6.1-sol, per 1M tokens:Source: Microsoft's GPT-6.1 Sol launch post https://techcommunity.microsoft.com/blog/azure-ai-foundry-blog/introducing-gpt-6-1-sol-in-microsoft-foundry-advanced-intelligence-optimized-for/4560811, raw HTML pricing table ("the US Data Zone is priced at a 10% premium to Global, and the EU and APAC Data Zones are priced at a 20% premium to Global"). https://azure.microsoft.com/en-us/pricing/details/azure-openai/ lists the Data Zone rows but renders the prices client-side (
$-in raw HTML), so the launch post is the readable official source. Other fields (limits, capabilities,deprecation_date2028-03-11, web search price) copy the existingazure/gpt-6.1-solrow. Tests added intests/unit/test_model_prices_schema.pyassert each Data Zone row costs exactly 1.1x or 1.2x GlobalChecked and deliberately not changed
Azure: https://learn.microsoft.com/en-us/azure/foundry/openai/concepts/model-retirement-schedule (updated 2026-09-23) lists
gpt-4.1-nano2025-04-14 retiring 2026-10-14, while the registry carries 2027-04-14 from the Models API rows restored in #44072. This value has flipped six times since August, so it is left alone for a maintainer call. The same page has two conflictinggpt-realtime-mini2025-10-06 rows (2027-04-06 and 2026-09-21) under the same heading, soazure/gpt-realtime-mini-2025-10-06is unchangedGemini:
ListModelslimits disagree with the model pages for several image models (gemini-3-pro-image, gemini-3.1-flash-image, gemini-2.5-flash-image). The docs pages match the current registry, so nothing changed.antigravity-preview-09-2026andgemini-robotics-er-1.6-previewhave model pages but no per-token rows on https://ai.google.dev/gemini-api/docs/pricing, so they were not added.gemini-3-pro-image-previewandgemini-3.1-flash-image-previewhave no model page (404), so theirsupports_reasoningflags were not touchedMistral: the models API reports 256000 context for
codestral-2508, but https://docs.mistral.ai/models/codestral-25-08 shows 128k, matching the registryTogether AI: the models API lists different prices for Kimi K3, Qwen3.8 Flash and Qwen3.7-Max than https://www.together.ai/pricing. The pricing page matches the registry
DeepSeek: https://api-docs.deepseek.com/quick_start/pricing matches the registry (peak rates)
Fireworks:
accounts/fireworks/models/qwen3p8-2p4t-a95bis on-demand only on https://fireworks.ai/models/fireworks/qwen3p8-2p4t-a95b with no per-token price, so not added.glm-5p3-flash,inklingandqwen3p8-maxserverless prices from https://api.fireworks.ai/v1/serverless/models match the registryCohere:
north-small-translate-1-0,north-mini-code-1-0, thetiny-aya-*models,c4ai-aya-vision-32bandcohere-transcribe-03-2026are on https://docs.cohere.com/docs/models but have no published per-token price, so not addedGroq:
allam-2-7bis returned by the models API but is not on https://console.groq.com/docs/models or https://groq.com/pricing, so not addedBedrock: newer inference-profile IDs (for example
luma.ray-v2:0,jp.amazon.nova-2-lite-v1:0,eu.cohere.embed-v4:0) could not be matched to a per-region price on https://aws.amazon.com/bedrock/pricing/, so not addedOpenAI, Anthropic, xAI, OpenRouter: newest models from the provider model APIs are already in the registry
Capability pins: no capability flag is lowered in this PR
Other open registry PRs reviewed
Absorbed and closed as superseded: #44828 (all four Vertex dates), #44816 (all three Azure rows and its tests, co-authored by its author)
#43879 (bare
kimi-k2.5): dropped. https://platform.kimi.ai/docs/pricing/chat listskimi-k2.5as Deprecated, and the PR's 8192 output limit contradicts the existingmoonshot/kimi-k2.5record#43753 (bare
deepseek-v3): dropped. The current DeepSeek pricing page no longer lists DeepSeek-V3, so its $0.27 / $1.10 rates and 65,536 window cannot be verified#43859 (Tinker) and #44167 (ScaleDown): left open. Both add a
litellm_providerthat is not registered in LiteLLM, so they need provider code, not just registry dataScreenshots / Proof of Fix
Before (origin/main 10444df)
gemini/deep-research-preview-04-2026max_input_tokensis 131072,gemini-3.6-flashandvertex_ai/gemini-3.7-flashhave nodeprecation_date, andazure/us/gpt-6.1-solis absent. The new tests intests/unit/test_model_prices_schema.pyfail against these valuesAfter (7c88e55)
python3 ci_cd/check_files_match.pypassesLITELLM_LOCAL_MODEL_COST_MAP=True uv run --no-sync pytest -q tests/unit/test_model_prices_schema.py tests/unit/test_model_cost_aliases.pygives 86 passeduv run --no-sync python ci_cd/generate_model_prices_schema.pyproduces no schema diffruff checkandruff format --checkpass on the test fileType
🐛 Bug Fix
Link to Devin session: https://app.devin.ai/sessions/4392b60bac8042c0b0a14b7c6d435612
Open in Devin Desktop: https://app.devin.ai/desktop/session/4392b60bac8042c0b0a14b7c6d435612?variant=devin