Skip to content

feat(cost-map): sync azure models, add MAI-Image-2.6, deepseek-v4.1-flash, muse-spark-1.3 - #42970

Merged
litellm-stampbot merged 1 commit into
mainfrom
litellm_sync_azure
Sep 24, 2026
Merged

litellm-stampbot merged 1 commit into
mainfrom
litellm_sync_azure

Conversation

@devin-ai-integration

@devin-ai-integration devin-ai-integration Bot commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

TLDR

Problem this solves:

  • Azure Foundry lists models the cost map has no row for
  • Two Azure rows lack the retirement date Microsoft now publishes

How it solves it:

  • Adds azure_ai/MAI-Image-2.6, MAI-Image-2.6-Flash, deepseek-v4.1-flash, muse-spark-1.3
  • Adds deprecation_date to Cohere-command-a-plus-05-2026 and FW-GPT-OSS-120B
  • Both cost map copies stay identical

User Flow

Before: a proxy admin routing to Azure Foundry's newer models sees zero spend for them

  1. They send POST https://litellm-domain/v1/chat/completions with "model": "azure_ai/deepseek-v4.1-flash" (or azure_ai/muse-spark-1.3)
  2. The response comes back fine, but https://litellm-domain/ui/?page=logs shows the request at $0 spend
  3. POST https://litellm-domain/v1/images/generations with "model": "azure_ai/MAI-Image-2.6" is likewise logged at $0

After: the same requests are priced

  1. They send the same POST https://litellm-domain/v1/chat/completions with "model": "azure_ai/deepseek-v4.1-flash"
  2. https://litellm-domain/ui/?page=logs shows the request at non-zero spend, and GET /model/info reports the model's 1M context, 384K max output and deprecation date
  3. The MAI-Image-2.6 image request is priced from its token meters as well

Evidence per row

Fresh outputs from npm run providers -- list azure (420 ARM models, eastus2) and npm run providers -- prices azure (198 priced records from the Azure Retail Prices API, Foundry Models, eastus). All 190 catalog rows the prices command covers already match, so no existing price changed

azure_ai/MAI-Image-2.6 (kind api). Raw retail meters, per 1M tokens, Global: "Image 2.6 Text Input Glbl 1M Tokens | 5.0", "Image 2.6 Image Input Glbl 1M Tokens | 8.0", "Image 2.6 Image Output Glbl 1M Tokens | 38.0". Divided by 1e6 gives 5e-6, 8e-6, 3.8e-5. Fields follow the existing azure_ai/MAI-Image-2.5-Flash row shape. No per-image flat price is published, so output_cost_per_image is omitted. The Learn model page lists "MAI-Image-2.6 Preview | Image-to-Image and Text-to-Image ... Output: One image ... Context length : 32,000 tokens"

azure_ai/MAI-Image-2.6-Flash (kind api). Raw retail meters, per 1M tokens, Global: "Img 2.6 Flash Text In Glbl 1M Tokens | 1.75", "Image 2.6 Flash Image Input Glbl 1M Tokens | 2.5", "Image 2.6 Flash Image Output Glbl 1M Tokens | 19.0", giving 1.75e-6, 2.5e-6, 1.9e-5

azure_ai/deepseek-v4.1-flash (kind inherited, inherited_from: azure_ai/FW-DeepSeek-V4.1-Flash). ARM lists DeepSeek.DeepSeek-V4.1-Flash.2026-09-10 with lifecycleStatus Preview and inference deprecation 2026-12-15T00:00:00Z, which becomes deprecation_date: 2026-12-15. The retail API only carries the Fireworks-hosted meters for this model ("FW DS-V4.1-Flash Gl Inp | 0.000375 per 1K", "FW DS-V4.1-Flash Gl Opt | 0.0015 per 1K"), so the Azure-direct row inherits the FW sibling's prices and limits. Not published DeepSeek-direct pricing

azure_ai/muse-spark-1.3 (kind inherited, inherited_from: meta/muse-spark-1.3). ARM lists Meta.muse-spark-1.3.1 (Preview, no retirement). The retail API has no meter for it and Meta's pricing page at https://ai.developer.meta.com/docs/pricing-rate-limits renders client side, so no raw quote could be captured; the row inherits the first-party Meta row's prices and limits. Not published Azure pricing

azure_ai/Cohere-command-a-plus-05-2026 deprecation_date 2026-10-16 (kind page). Model retirement schedule row: "Cohere-command-a-plus-05-2026 | 1 | Preview | 2026-10-16"

azure_ai/FW-GPT-OSS-120B deprecation_date 2027-07-01 (kind page). Model retirement schedule row: "FW-GPT-OSS-120B | 1 | GA | 2027-07-01"

Source for the page rows: https://learn.microsoft.com/en-us/azure/foundry/openai/concepts/model-retirement-schedule fetched raw with a cache buster

Priced by the API but deliberately not added

The prices command emits eight keys absent from the catalog: azure_ai/deepseek-r1, deepseek-v3-0324, deepseek-v3.1, grok-3, grok-3-mini, grok-4-fast-non-reasoning, grok-4-fast-reasoning, MAI-Image-2e. The retirement schedule marks every one of them Retired ("DeepSeek-R1 | 1 | Retired | 2026-08-13", "DeepSeek-V3-0324 | 1 | Retired | 2026-07-13", "DeepSeek-V3.1 | 1 | Retired | 2026-07-13", "grok-3 | 1 | Retired | 2026-05-01", "grok-3-mini | 1 | Retired | 2026-05-01", "grok-4-fast-non-reasoning | 1 | Retired | 2026-05-01", "grok-4-fast-reasoning | 1 | Retired | 2026-05-01", "MAI-Image-2e | 2026-04-09 | Retired | 2026-08-15") and #42435 removed them for exactly that reason, so stale meters do not re-add them

Naming mismatches, not delistings

ARM emits Publisher.model.version (for example OpenAI.gpt-4o.2024-08-06, Fireworks.FW-Qwen3.5-27B.1); 174 of the unique ARM models map to existing azure_ai/ rows once the publisher and version suffix are dropped. The remaining Fireworks IDs (FW-GLM-4.7, FW-Kimi-K2-Thinking, FW-Qwen3.x sizes and others) and OpenAI-OSS.gpt-oss-20b, Alibaba.qwen3-32b have no retail token meter in eastus (only hosting or fine-tuning meters, for example "Qwen3 32B FT | 0.3 per hour"), so they stay unpriced until Azure publishes consumption meters. The Learn Claude page changed but publishes no numbers, so no Claude row changed

Pre-Submission checklist

  • The handful of test files covering my change pass locally: uv run pytest tests/test_litellm/test_model_prices_schema.py tests/test_litellm/test_cost_map_guard.py (85 passed)
  • 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
  • I have received a Greptile Confidence Score of at least 4/5 before requesting a maintainer review

Screenshots / Proof of Fix

Cost-map-only change, no provider call needed. Each run loads the local map with LITELLM_LOCAL_MODEL_COST_MAP=True and calls litellm.get_model_info for the three new chat/image keys

Before (e135a19)

  1. LITELLM_LOCAL_MODEL_COST_MAP=True python /tmp/proof.py
  2. Output: azure_ai/deepseek-v4.1-flash ModelNotMappedError This model isn't mapped yet, same for azure_ai/muse-spark-1.3 and azure_ai/MAI-Image-2.6

After (34ba508)

  1. LITELLM_LOCAL_MODEL_COST_MAP=True python /tmp/proof.py
  2. Output: azure_ai/deepseek-v4.1-flash {'input_cost_per_token': 3.75e-07, 'output_cost_per_token': 1.5e-06, 'max_input_tokens': 1000000}, azure_ai/muse-spark-1.3 {'input_cost_per_token': 1.25e-06, 'output_cost_per_token': 4.25e-06, 'max_input_tokens': 1048576}, azure_ai/MAI-Image-2.6 {'input_cost_per_token': 5e-06, ...}

Type

🆕 New Feature

Caveats (if any)

Medium

  • deepseek-v4.1-flash and muse-spark-1.3 prices are inherited, not Azure-published
  • MAI-Image-2.6 rows have no flat per-image price, only token meters

Low

  • Legacy azure/ keys absent from the eastus2 ARM list are left untouched

Final Attestation

  • The schema and guard tests cover the new rows; no test pins vendor prices

Link to Devin session: https://app.devin.ai/sessions/c307d9e25dea4d69a6ef90d367f42953
Open in Devin Desktop: https://app.devin.ai/desktop/session/c307d9e25dea4d69a6ef90d367f42953?variant=devin
Requested by: @kerry-berri


Note

Low Risk
Data-only cost-map JSON updates with no runtime logic changes; main caveat is inherited pricing for two chat models until Azure publishes meters.

Overview
Extends the LiteLLM Azure AI cost map so newer Foundry models get non-zero spend in logs and /model/info, and retirement dates surface for models Microsoft has scheduled.

Adds four azure_ai/ entries in both model_prices_and_context_window.json and the backup copy: chat models deepseek-v4.1-flash (with deprecation_date 2026-12-15) and muse-spark-1.3, plus image-generation MAI-Image-2.6 and MAI-Image-2.6-Flash with token/image-token pricing and image API endpoints. FW-GPT-OSS-120B and Cohere-command-a-plus-05-2026 gain deprecation_date fields (2027-07-01 and 2026-10-16). Existing retail prices for other rows are unchanged; some new rows use inherited or Meta-sourced pricing where Azure meters are missing.

Reviewed by Cursor Bugbot for commit 34ba508. Bugbot is set up for automated code reviews on this repo. Configure here.

…lash, muse-spark-1.3

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

Copy link
Copy Markdown
Contributor Author

I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".

  • Disable automatic comment, CI, and merge conflict monitoring

@CLAassistant

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 sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@litellm-stampbot

Copy link
Copy Markdown
Contributor

@greptileai

@litellm-stampbot

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 34ba508. Configure here.

@greptile-apps

greptile-apps Bot commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 4/5

The PR should not merge until image requests reserve a cost that accounts for output image tokens and the required feature tests are added

Findings

  1. P1 Image costs are under-reserved ▶
  2. P2 Inherited prices lack clear provenance ▶
  3. P2 New image pricing lacks tests ▶

Summary

The PR adds Azure Foundry chat and image price-map entries and retirement dates in both map copies. The new image-token rows leave pre-call budget estimates substantially below their eventual charges. Inherited chat prices also need clearer provenance, and the new behavior lacks focused tests

Reviews (1) · Last reviewed commit: "feat(cost-map): sync azure models, add M..."

"input_cost_per_token": 5e-06,
"litellm_provider": "azure_ai",
"mode": "image_generation",
"output_cost_per_image_token": 3.8e-05,

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.

P1 Image costs are under-reserved For a prompt-based image request, admission estimates the text input but cannot use this output image-token rate. The completed image is charged for output tokens, so concurrent requests can exceed the budget before their actual costs are recorded. The Flash row has the same issue.

Knowledge Base Used: Spend, budgets, and rate limits

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Azure publishes only token meters for MAI-Image-2.6, no per-image price, so a flat output_cost_per_image would be invented rather than sourced

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.

That’s fair. A flat output_cost_per_image would be fabricated here, and the token-meter fields correctly represent Azure’s published pricing. The output image-token rate is still used when the provider returns output-token usage; my earlier concern was limited to speculative pre-admission budgeting, not the correctness of this cost-map row. I’m withdrawing that finding as non-blocking.

"supports_reasoning": true,
"supports_tool_choice": true,
"deprecation_date": "2026-12-15",
"source": "https://prices.azure.com/api/retail/prices?$filter=serviceName%20eq%20'Foundry%20Models'%20and%20armRegionName%20eq%20'eastus'%20and%20priceType%20eq%20'Consumption'"

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.

P2 Inherited prices lack clear provenance These Azure rows use rates inherited from other offerings, but no Azure-direct meter is identified. Mark them as estimates so operators do not mistake the rates used for spend tracking for published Azure prices.

Knowledge Base Used: Spend, budgets, and rate limits

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!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The cost map has no estimate flag; the PR body records inherited_from for both rows and the source URLs point at the sibling meters

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.

That’s fair. Since the cost-map schema has no established estimate field, adding one would be inconsistent with the existing model metadata. The inherited pricing is documented via inherited_from and the referenced sibling-meter sources, so I’m withdrawing this suggestion; no change is needed for this comment.

"supports_tool_choice": true,
"supports_vision": true
},
"azure_ai/MAI-Image-2.6": {

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.

P2 New image pricing lacks tests The new image rows have no tests for billing or budget reservation. Schema checks cannot catch failures in either path. The repository requires meaningful feature tests, so add them before merging.

Context Used: AGENTS.md (source)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Data-only rows: the schema and cost-map guard tests validate them, and pinning vendor prices in tests is disallowed by AGENTS.md

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.

That’s fair. Schema and cost-map guard coverage is appropriate for data-only rows, so I’m withdrawing the request for vendor-price-specific billing tests

@codspeed

codspeed Bot commented Sep 24, 2026

Copy link
Copy Markdown
Contributor

Merging this PR will not alter performance

✅ 31 untouched benchmarks


Comparing litellm_sync_azure (34ba508) with main (e135a19)

Open in CodSpeed

@codecov

codecov Bot commented Sep 24, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@litellm-stampbot litellm-stampbot 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.

LGTM

@litellm-stampbot
litellm-stampbot merged commit 553f0b6 into main Sep 24, 2026
100 checks passed
@litellm-stampbot
litellm-stampbot deleted the litellm_sync_azure branch September 24, 2026 15:27
devin-ai-integration Bot added a commit that referenced this pull request Sep 24, 2026
…lash, muse-spark-1.3 (#42970)

Co-authored-by: kerry <kerry@berri.ai>
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
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.

2 participants