Skip to content

feat(models): add Azure Foundry model pricing - #38976

Closed
yujonglee-berri wants to merge 1 commit into
litellm_internal_stagingfrom
litellm_azure_foundry_price_sync
Closed

feat(models): add Azure Foundry model pricing#38976
yujonglee-berri wants to merge 1 commit into
litellm_internal_stagingfrom
litellm_azure_foundry_price_sync

Conversation

@yujonglee-berri

@yujonglee-berri yujonglee-berri commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

TLDR

Basically I scrape https://azure.microsoft.com/en-us/pricing/details/ai-foundry-models/kimi and sync our json.

Problem this solves:

  • Azure direct model entries were missing
  • Current cached-token prices were absent

How it solves it:

  • Adds two verified Azure model entries
  • Refreshes Kimi and DeepSeek pricing metadata

User Flow

Before: a developer cannot verify exact pricing for supported Azure model IDs

  1. They search the LiteLLM model registry for azure_ai/DeepSeek-V4-Flash-0731
  2. No exact entry appears, so its Azure pricing is unavailable
  3. They search for azure_ai/kimi-k2.7-code with the same result

After: the same supported Azure model IDs have pricing metadata

  1. They search the LiteLLM model registry for azure_ai/DeepSeek-V4-Flash-0731
  2. The entry shows input, cached-input, and output pricing
  3. azure_ai/kimi-k2.7-code also shows verified Azure pricing

Relevant issues

Pylon #8009

Linear ticket

Resolves LIT-6555

Pre-Submission checklist

  • I have added meaningful tests
  • The handful of test files covering my change pass locally
  • My PR passes all required CI/CD checks
  • My PR's scope is as isolated as possible
  • I have received a Greptile Confidence Score of at least 4/5

Screenshots / Proof of Fix

Before (d6cce13)

  1. Run git show d6cce13308:model_prices_and_context_window.json | jq '{deepseek: has("azure_ai/DeepSeek-V4-Flash-0731"), kimi: has("azure_ai/kimi-k2.7-code"), deepseek_cache: .["azure_ai/deepseek-v4-flash"].cache_read_input_token_cost, kimi_cache: .["azure_ai/kimi-k2.6"].cache_read_input_token_cost}'
  2. Observe {"deepseek":false,"kimi":false,"deepseek_cache":null,"kimi_cache":null}

After (701ddd9)

  1. Run jq '{deepseek: has("azure_ai/DeepSeek-V4-Flash-0731"), kimi: has("azure_ai/kimi-k2.7-code"), deepseek_cache: .["azure_ai/deepseek-v4-flash"].cache_read_input_token_cost, kimi_cache: .["azure_ai/kimi-k2.6"].cache_read_input_token_cost}' model_prices_and_context_window.json
  2. Observe {"deepseek":true,"kimi":true,"deepseek_cache":2.8e-08,"kimi_cache":1.6e-07}

Type

New Feature

Caveats (if any)

Low

  • Direct Azure Kimi-K3 is not currently available
  • Kimi-K3 remains available through Fireworks on Foundry

Final Attestation

  • The tests check the right things, including the edge cases, and regressions in the respective real-world customer use-cases are not possible after this PR

@greptile-apps

greptile-apps Bot commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

Adds exact Azure Foundry pricing records for DeepSeek V4 Flash and Kimi K2.7 Code.

  • Adds cached-input pricing and prompt-caching metadata to existing DeepSeek and Kimi records.
  • Updates pricing-source URLs for related Azure models.
  • Keeps the primary and backup pricing registries synchronized.

Confidence Score: 5/5

The PR appears safe to merge with no actionable defects identified.

The new pricing entries conform to the registry schema, cached-token fields use existing metadata conventions, model lookup is case-insensitive, and the primary and backup registries remain synchronized.

Important Files Changed

Filename Overview
model_prices_and_context_window.json Adds and refreshes Azure Foundry model pricing and caching metadata without an identified correctness issue.
litellm/model_prices_and_context_window_backup.json Mirrors the primary pricing registry changes byte-for-byte, preserving the repository synchronization invariant.

Reviews (1): Last reviewed commit: "feat(models): add Azure Foundry model pr..." | Re-trigger Greptile

@codspeed-hq

codspeed-hq Bot commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Merging this PR will not alter performance

✅ 31 untouched benchmarks


Comparing litellm_azure_foundry_price_sync (701ddd9) with litellm_internal_staging (c03a38d)

Open in CodSpeed

@yujonglee-berri
yujonglee-berri marked this pull request as draft August 31, 2026 17:12
@yujonglee-berri
yujonglee-berri force-pushed the litellm_azure_foundry_price_sync branch from 504ba63 to 6f239b5 Compare August 31, 2026 17:14
@codecov

codecov Bot commented Aug 31, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@yujonglee-berri
yujonglee-berri force-pushed the litellm_azure_foundry_price_sync branch from 6f239b5 to 701ddd9 Compare August 31, 2026 17:19
"azure_ai/DeepSeek-V4-Flash-0731": {
"cache_read_input_token_cost": 2.8e-08,
"deprecation_date": "2028-02-20",
"input_cost_per_token": 1.9e-07,

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.

Medium: Budget bypass from incorrect model pricing

Azure prices the dated V4 Flash 0731 SKU separately from generic V4 Flash: its global input and output rates are $0.44 and $1.32 per million tokens, rather than the $0.19 and $0.51 recorded here. An authenticated caller can select DeepSeek-V4-Flash-0731 and have both budget reservation and final spend charged at less than half the upstream cost. Update this entry and its mirrored backup entry with the dated SKU's input, output, and cached-input rates.

@veria-ai

veria-ai Bot commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

PR overview

This pull request adds Azure Foundry model pricing metadata, including token rates for dated DeepSeek model SKUs, to the model pricing catalog and its backup.

One pricing issue remains open: the dated DeepSeek V4 Flash SKU is recorded at substantially lower rates than Azure charges. An authenticated caller can select it to bypass accurate budget enforcement and have usage charged at less than half the upstream cost, creating direct but model-specific financial exposure.

Open issues (1)

Fixed/addressed: 0 · PR risk: 6/10

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.

1 participant