Skip to content

fix(pricing): apply Azure GPT-5.6 Luna and Terra price cuts - #35841

Closed
shivamrawat1 wants to merge 2 commits into
litellm_internal_stagingfrom
litellm_azure_gpt56_luna_terra_price_cut
Closed

fix(pricing): apply Azure GPT-5.6 Luna and Terra price cuts#35841
shivamrawat1 wants to merge 2 commits into
litellm_internal_stagingfrom
litellm_azure_gpt56_luna_terra_price_cut

Conversation

@shivamrawat1

Copy link
Copy Markdown
Contributor

TLDR

Problem this solves:

  • Azure matched OpenAI's July 30 price decreases for GPT-5.6 Luna (-80%) and Terra (-20%), effective August 1, but litellm still had the launch prices for the azure/ entries, so models.litellm.ai and proxy cost tracking overstated Azure spend by up to 5x on Luna
  • Azure's own pricing page lags the change by roughly two weeks, but the Microsoft Foundry GA blog confirms the new Standard Global prices, including cached input and cache write, and states they reflect the OpenAI 7/30 discounts

How it solves it:

  • Scales every cost field on azure/gpt-5.6-luna and azure/gpt-5.6-terra by the announced cuts (Luna x0.2, Terra x0.8): Luna is now $0.20/M input, $1.20/M output, $0.02/M cached input; Terra is $2.00/M input, $12.00/M output, $0.20/M cached input, matching both the blog and the existing OpenAI entries
  • Adds the newly published cache write prices to the global entries (cache_creation_input_token_cost: $0.25/M Luna, $2.50/M Terra)
  • Applies the same scale factors to the azure/us/ and azure/eu/ data zone entries, preserving the existing 1.1x data zone premium and all tier/priority ratios. Azure has not published data zone or priority prices for these models yet (the blog says to ask your sales rep), so these keep the established ratio convention and can be trued up when the pricing page catches up
  • Updates both model_prices_and_context_window.json and the backup copy

Relevant issues

Linear ticket

Pre-Submission checklist

Please complete all items before asking a LiteLLM maintainer to review your PR

  • I have added meaningful tests (data-only price change; tests/test_litellm/test_model_prices_schema.py passes and value assertions would break on every intentional price update)
  • My PR passes all CI/CD checks (e.g., lint, format, unit tests)
  • 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 (Greptile reviews automatically once the PR is opened; only comment @greptileai to re-request a review after pushing changes)

Delays in PR merge?

If you're seeing a delay in your PR being merged, ping the LiteLLM Team on Slack (#pr-review).

Screenshots / Proof of Fix

No active Azure GPT-5.6 deployment was available for a paid call, so proof is against a live local proxy loading the updated cost map (this is exactly what models.litellm.ai and proxy spend tracking serve)

LITELLM_LOCAL_MODEL_COST_MAP=True python litellm/proxy/proxy_cli.py --config config.yaml --port 4010
curl -sS http://localhost:4010/model/info -H "Authorization: Bearer sk-1234"
azure-gpt-5.6-luna
    input_cost_per_token 2e-07
    output_cost_per_token 1.2e-06
    cache_read_input_token_cost 2e-08
    cache_creation_input_token_cost 2.5e-07
    input_cost_per_token_priority 4e-07
    output_cost_per_token_priority 2.4e-06
azure-gpt-5.6-terra
    input_cost_per_token 2e-06
    output_cost_per_token 1.2e-05
    cache_read_input_token_cost 2e-07
    cache_creation_input_token_cost 2.5e-06
    input_cost_per_token_priority 4e-06
    output_cost_per_token_priority 2.4e-05

Cost calculation for 100k prompt + 10k completion tokens:

for m in azure/gpt-5.6-luna azure/gpt-5.6-terra azure/us/gpt-5.6-luna azure/eu/gpt-5.6-terra; do
  printf "%s: " "$m"
  curl -sS -X POST http://localhost:4010/spend/calculate -H "Authorization: Bearer sk-1234" -H "Content-Type: application/json" \
    -d "{\"completion_response\": {\"model\": \"$m\", \"usage\": {\"prompt_tokens\": 100000, \"completion_tokens\": 10000, \"total_tokens\": 110000}}}"
  echo
done
azure/gpt-5.6-luna: {"cost":0.032}
azure/gpt-5.6-terra: {"cost":0.32}
azure/us/gpt-5.6-luna: {"cost":0.0352}
azure/eu/gpt-5.6-terra: {"cost":0.352}

Luna: 100k x $0.20/M + 10k x $1.20/M = $0.032. Terra: 100k x $2.00/M + 10k x $12.00/M = $0.32. Data zone entries at 1.1x

Type

🐛 Bug Fix

Changes

  • model_prices_and_context_window.json and litellm/model_prices_and_context_window_backup.json: scaled all cost fields (base, above-272k tier, priority, cache read) on azure/gpt-5.6-luna, azure/gpt-5.6-terra and their azure/us/, azure/eu/ variants by x0.2 (Luna) and x0.8 (Terra); added cache_creation_input_token_cost to the two global entries per the Foundry blog

QA runbook

  1. Start the proxy with the local cost map: LITELLM_LOCAL_MODEL_COST_MAP=True python litellm/proxy/proxy_cli.py --config litellm/proxy/dev_config.yaml --detailed_debug
  2. Run the /spend/calculate loop from the proof section above and confirm the four costs match
  3. Optionally, with a real Azure GPT-5.6 Luna deployment, send a chat completion through the proxy and confirm x-litellm-response-cost on a 1k-token request is about 100x cheaper than before for Luna

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 (no new tests: pinning exact price values in a test would fail on every intentional price update; the schema test suite validates the changed entries)

Azure matched OpenAI's 7/30 price decreases for GPT-5.6 Luna (-80%) and
Terra (-20%), confirmed by the Microsoft Foundry GA blog. Scale all cost
fields for azure global and us/eu data zone entries accordingly and add
the now-published cache write prices to the global entries.
@greptile-apps

greptile-apps Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR updates Azure GPT-5.6 Luna and Terra pricing in the canonical and backup cost maps.

  • Applies the announced Luna and Terra reductions to global, US, and EU base, long-context, priority, output, and cache-read rates.
  • Adds published cache-write rates to the global Luna and Terra entries.
  • Keeps the canonical and backup maps synchronized.

Confidence Score: 4/5

The regional cache-write pricing gap should be fixed before merging because cached writes on Azure US/EU Luna and Terra deployments are recorded at zero cost.

The revised base, tier, priority, and cache-read values are consistent and synchronized, but all four changed data-zone records omit the cache-creation field consumed by Azure cost calculation, causing understated spend and budget usage whenever cache-write tokens are reported.

Files Needing Attention: model_prices_and_context_window.json and litellm/model_prices_and_context_window_backup.json

Important Files Changed

Filename Overview
model_prices_and_context_window.json Pricing reductions and tier ratios are internally consistent, but the changed US/EU Luna and Terra entries omit cache-write rates and therefore calculate cache creation at zero cost.
litellm/model_prices_and_context_window_backup.json Accurately mirrors the canonical map, including the same missing cache-write rates on the changed regional variants.

Reviews (1): Last reviewed commit: "fix(pricing): apply Azure GPT-5.6 Luna a..." | Re-trigger Greptile

Comment on lines 6609 to +6614
"azure/us/gpt-5.6-terra": {
"cache_read_input_token_cost": 2.75e-07,
"cache_read_input_token_cost_above_272k_tokens": 5.5e-07,
"cache_read_input_token_cost_priority": 6.875e-07,
"input_cost_per_token": 2.75e-06,
"input_cost_per_token_above_272k_tokens": 5.5e-06,
"input_cost_per_token_priority": 6.875e-06,
"cache_read_input_token_cost": 2.2e-07,
"cache_read_input_token_cost_above_272k_tokens": 4.4e-07,
"cache_read_input_token_cost_priority": 5.5e-07,
"input_cost_per_token": 2.2e-06,
"input_cost_per_token_above_272k_tokens": 4.4e-06,

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 Regional cache writes cost zero

When Azure US/EU GPT-5.6 Luna or Terra responses report cache-creation tokens, these regional entries omit cache_creation_input_token_cost, so Azure cost calculation resolves the rate to 0.0, causing spend tracking and budget enforcement to omit the entire cache-write charge.

Knowledge Base Used: Cost Tracking and Budget Enforcement

@codecov

codecov Bot commented Aug 4, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Foundry blog publishes Sol cached writes at $6.25/M; match OpenAI
long-context and priority cache-creation tiers on azure/gpt-5.6 and
azure/gpt-5.6-sol. Update Azure gpt-5.6 unit expectations for the
Terra/Luna cuts already on this branch
@codspeed-hq

codspeed-hq Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Merging this PR will not alter performance

✅ 31 untouched benchmarks


Comparing litellm_azure_gpt56_luna_terra_price_cut (6e512e0) with litellm_internal_staging (e64536c)1

Open in CodSpeed

Footnotes

  1. No successful run was found on litellm_internal_staging (f453867) during the generation of this report, so c93a336 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

@devin-ai-integration

Copy link
Copy Markdown
Contributor

Superseded by rolling registry audit #37902, which reverified and absorbed the provider-documented metadata changes at field level

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