Skip to content

fix(azure): add flex prices to azure/gpt-6-luna - #50058

Closed
danielguthruf wants to merge 3 commits into
BerriAI:mainfrom
danielguthruf:price/azure-gpt-6-luna-flex
Closed

danielguthruf wants to merge 3 commits into
BerriAI:mainfrom
danielguthruf:price/azure-gpt-6-luna-flex

Conversation

@danielguthruf

@danielguthruf danielguthruf commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

What

Adds the eight *_flex price fields to azure/gpt-6-luna and azure/gpt-6-luna-2026-09-22, in model_prices_and_context_window.json and litellm/model_prices_and_context_window_backup.json.

Why

Azure serves GPT-6 Luna on the Flex tier (it is on the list of Flex-capable models in the Azure flex processing guide), and the response carries service_tier: "flex". Both entries have no *_flex fields, so the tier key lookup falls back to the standard key and the call is priced at the standard price, twice the real one, without any warning.

Seen on a proxy running 1.106.4: a request to an Azure Global Standard deployment of gpt-6-luna with x-ms-service-tier: flex came back with service_tier: "flex", and x-litellm-response-cost had the same cost per token as the same call on the standard tier. azure/gpt-5.6-luna and the OpenAI gpt-6-luna entry already carry these fields.

Source

Azure Retail Prices API (https://prices.azure.com/api/retail/prices, filter contains(meterName,'6-luna')), meters effective 2026-10-01, USD per 1M tokens. Every Flex meter is exactly half of its Standard Global meter.

Meter (6-luna ... Gl 1M Tokens) Standard Flex Field
ShortCo Inp 0.10 0.05 input_cost_per_token_flex
ShortCo Opt 0.50 0.25 output_cost_per_token_flex
ShortCo Cd Inp 0.01 0.005 cache_read_input_token_cost_flex
ShortCo Cd Wr 0.125 0.0625 cache_creation_input_token_cost_flex
LongCo Inp 0.20 0.10 input_cost_per_token_above_272k_tokens_flex
LongCo Opt 0.75 0.375 output_cost_per_token_above_272k_tokens_flex
LongCo Cd Inp 0.02 0.01 cache_read_input_token_cost_above_272k_tokens_flex
LongCo Cd Wr 0.25 0.125 cache_creation_input_token_cost_above_272k_tokens_flex

The new values are the same as the flex fields of the gpt-6-luna entry.

Tests

test_generic_cost_per_token_azure_gpt_6_luna_flex_tiers in tests/unit/litellm_core_utils/llm_cost_calc/test_llm_cost_calc_utils.py, next to the GPT-6 Astra tier test. It prices a flex call through generic_cost_per_token for both entries, below and above 272K tokens, with cached tokens. Without the new fields the call falls back to the standard rate and the test fails. I checked the lookup path by reading the cost code and did not run the suite locally, so CI is its first run.

Not in this PR

azure/gpt-6-sol, azure/gpt-6-astra and azure/gpt-6.1-sol have the same gap. I only checked the Luna meters, so those are left for a follow-up.

The Azure retail price meters for 6-luna Flex Gl are half of the Std Gl meters. Without these fields a call served on the flex tier is priced at the standard price.
@CLAassistant

CLAassistant commented Nov 4, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

Replaces the test that pinned the json values with a flex cost test next to the GPT-6 Astra tier test. Without the flex fields the call falls back to the standard rate and the test fails.
@devin-ai-integration

Copy link
Copy Markdown
Contributor

Rolled into #50082 after re-checking each value against the official provider source. Closing this one as superseded, thanks for the work

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