Repository navigation
feat(cost-map): add azure/gpt-6-astra and azure/us/gpt-6-astra Foundry pricing - #39827
Conversation
Greptile SummaryAdds Microsoft Foundry pricing and capability metadata for global and US Data Zone GPT-6 Astra deployments.
Confidence Score: 5/5The PR appears safe to merge, with no outstanding actionable findings. The cost-map entries are synchronized and covered for standard, cached, US Data Zone, and long-context billing, while the Azure Responses change reuses existing Azure capability lookup behavior. The prior reservation finding was manually resolved after Greptile agreed that it was a pre-existing platform-wide limitation rather than a regression from this PR.
|
| Filename | Overview |
|---|---|
| litellm/llms/azure/responses/transformation.py | Delegates reasoning-effort capability checks to the existing Azure GPT-5-family configuration. |
| model_prices_and_context_window.json | Adds global and US Data Zone GPT-6 Astra pricing, context limits, endpoints, modalities, and capability flags. |
| litellm/model_prices_and_context_window_backup.json | Keeps the backup cost map synchronized with the primary GPT-6 Astra entries. |
| tests/test_litellm/litellm_core_utils/llm_cost_calc/test_llm_cost_calc_utils.py | Verifies standard and long-context cost calculations for both Foundry pricing zones. |
| tests/test_litellm/llms/azure/chat/test_azure_gpt5_transformation.py | Verifies Azure Astra accepts none reasoning with temperature and rejects minimal effort. |
| tests/test_litellm/llms/azure/response/test_azure_transformation.py | Verifies Azure Responses temperature gating for none and active reasoning. |
| tests/test_litellm/router_utils/test_reasoning_effort_capability.py | Verifies both Foundry model entries advertise the intended reasoning-effort levels. |
Reviews (3): Last reviewed commit: "fix(azure): responses none-effort temper..." | Re-trigger Greptile
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|
bugbot run |
There was a problem hiding this comment.
✅ 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 c02f198. Configure here.
2f90a26
into
litellm_internal_staging
TLDR
Problem this solves:
gpt-6-astraGA on 2026-09-03azure/gpt-6-astraentry, so every Foundry call bills $0How it solves it:
azure/gpt-6-astraat the Foundry Standard Global ratesazure/us/gpt-6-astraat the 10% US Data Zone upliftminimalreasoning_effort: none(unlike OpenAI), which unlocks temperatureazure/entry for thatnonegate instead of OpenAI's, so/v1/responseswithreasoning.effort: noneand a temperature stops 400ingSources: Foundry GA announcement (rates), the Foundry models page (context window, capabilities), and the Foundry API itself for the effort levels: a direct call with
reasoning_effort: minimalanswersSupported values are: 'none', 'low', 'medium', 'high', 'xhigh', 'max', and 'disabled',nonereturns 200 with zero reasoning tokens and acceptstemperature: 0.2, while OpenAI's own API rejectsnonefor gpt-6-astra (Supported values are: 'low', 'medium', 'high', and 'xhigh'). The default effort is notnone(a call withoutreasoning_effortspends 67 reasoning tokens and rejectstemperature: 0.2), so nodefault_reasoning_effortis declaredUser Flow
Before: a proxy admin who deployed gpt-6-astra on Microsoft Foundry routes it through LiteLLM and every request bills $0, so spend tracking and budgets never see it
azure/gpt-6-astrato their config as model groupgpt-6-astraand restart the proxyinput_cost_per_token: 0,output_cost_per_token: 0,max_input_tokens: null,supports_reasoning: null"model": "gpt-6-astra"and get a 200 with the answer, but the response headers sayx-litellm-response-cost-input: 0.0andx-litellm-response-cost-output: 0.0{"cost": 0.0}"reasoning_effort": "none"and"temperature": 0.2, which Foundry itself accepts, and get a 400Azure OpenAI does not support reasoning_effort='none' for this model"reasoning": {"effort": "none"}and"temperature": 0.2and get a 400gpt-6-astra doesn't support temperature=0.2 while reasoning is active; POST https://litellm-domain/v1/messages with"thinking": {"type": "disabled"}and the same temperature gets the step 7 400After: the same deployment bills at the Foundry rates on every endpoint
azure/gpt-6-astrato their config as model groupgpt-6-astraand restart the proxyinput_cost_per_token: 0.00001,output_cost_per_token: 0.00005,max_input_tokens: 922000,supports_reasoning: true"model": "gpt-6-astra"and get a 200 whose headers sayx-litellm-response-cost: 0.00033for 13 input and 4 output tokens{"cost": 6.075}, the doubled long-context input rate plus 1.5x output"reasoning_effort": "none"and"temperature": 0.2and get a 200 with zero reasoning tokens andx-litellm-response-cost: 0.00033"reasoning": {"effort": "none"}and"temperature": 0.2and get a 200 with zero reasoning tokens andx-litellm-response-cost: 0.00038; POST https://litellm-domain/v1/messages with"thinking": {"type": "disabled"}and the same temperature gets a 200 tooRelevant issues
Linear ticket
Resolves LIT-6997
Pre-Submission checklist
Please complete all items before asking a LiteLLM maintainer to review your PR
uv run pytest tests/test_litellm/<your_test_file>.py -v. Leave the suites (make test-unit-*,make test-unit) to CI: it finishes in ~15 minutes where a laptop takes an hour or more@greptileaito 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
Both legs boot the proxy from their own worktree and
.venvwith--num_workers 2on a random free port, no database, reading the local cost map (LITELLM_LOCAL_MODEL_COST_MAP=True). The LLM calls go to a realgpt-6-astraGlobalStandard deployment on Microsoft Foundry. Same config, same commands, same order on both sidesConfig:
Boot:
LITELLM_LOCAL_MODEL_COST_MAP=True python litellm/proxy/proxy_cli.py --config lit6997_config.yaml --port $PORT --num_workers 2 --use_v2_migration_resolverBefore (d23bec8)
/v1/model/info
curl -s http://localhost:20710/v1/model/info -H 'Authorization: Bearer sk-lit6997' | jq -c '.data[] | {model_name, litellm_model: .litellm_params.model, input_cost_per_token: .model_info.input_cost_per_token, input_above_272k: .model_info.input_cost_per_token_above_272k_tokens, output_cost_per_token: .model_info.output_cost_per_token, cache_read: .model_info.cache_read_input_token_cost, cache_creation: .model_info.cache_creation_input_token_cost, max_input_tokens: .model_info.max_input_tokens, supports_reasoning: .model_info.supports_reasoning}'{"model_name":"gpt-6-astra","litellm_model":"azure/gpt-6-astra","input_cost_per_token":0,"input_above_272k":null,"output_cost_per_token":0,"cache_read":0.000001,"cache_creation":0.0000125,"max_input_tokens":null,"supports_reasoning":null} {"model_name":"gpt-6-astra-us","litellm_model":"azure/us/gpt-6-astra","input_cost_per_token":0,"input_above_272k":null,"output_cost_per_token":0,"cache_read":null,"cache_creation":null,"max_input_tokens":null,"supports_reasoning":null}/model_group/info
curl -s http://localhost:20710/model_group/info -H 'Authorization: Bearer sk-lit6997' | jq -c '.data[] | {model_group, supports_reasoning, supported_reasoning_efforts, max_input_tokens, input_cost_per_token, output_cost_per_token}'{"model_group":"gpt-6-astra","supports_reasoning":false,"supported_reasoning_efforts":["low","medium","high","xhigh","max"],"max_input_tokens":null,"input_cost_per_token":0.0,"output_cost_per_token":0.0} {"model_group":"gpt-6-astra-us","supports_reasoning":false,"supported_reasoning_efforts":null,"max_input_tokens":null,"input_cost_per_token":0.0,"output_cost_per_token":0.0}/spend/calculate
curl -s -X POST http://localhost:20710/spend/calculate -H 'Authorization: Bearer sk-lit6997' -H 'Content-Type: application/json' -d '{"completion_response":{"id":"chatcmpl-azure-astra-1","object":"chat.completion","created":1788500000,"model":"azure/gpt-6-astra","choices":[{"index":0,"message":{"role":"assistant","content":"hi"},"finish_reason":"stop"}],"usage":{"prompt_tokens":1000,"completion_tokens":100,"total_tokens":1100,"prompt_tokens_details":{"cached_tokens":200}}}}'{"cost":0.00019999999999999998}(only the 200 cached tokens bill, through a generic cache fallback; the 800 text tokens and 100 output tokens are free)curl -s -X POST http://localhost:20710/spend/calculate -H 'Authorization: Bearer sk-lit6997' -H 'Content-Type: application/json' -d '{"completion_response":{"id":"chatcmpl-azure-astra-2","object":"chat.completion","created":1788500000,"model":"azure/gpt-6-astra","choices":[{"index":0,"message":{"role":"assistant","content":"hi"},"finish_reason":"stop"}],"usage":{"prompt_tokens":300000,"completion_tokens":1000,"total_tokens":301000}}}'{"cost":0.0}curl -s -X POST http://localhost:20710/spend/calculate -H 'Authorization: Bearer sk-lit6997' -H 'Content-Type: application/json' -d '{"completion_response":{"id":"chatcmpl-azure-astra-3","object":"chat.completion","created":1788500000,"model":"azure/us/gpt-6-astra","choices":[{"index":0,"message":{"role":"assistant","content":"hi"},"finish_reason":"stop"}],"usage":{"prompt_tokens":1000,"completion_tokens":100,"total_tokens":1100}}}'{"cost":0.0}POST /v1/chat/completions (real Foundry call)
curl -s -D - http://localhost:20710/v1/chat/completions -H 'Authorization: Bearer sk-lit6997' -H 'Content-Type: application/json' -d '{"model":"gpt-6-astra","messages":[{"role":"user","content":"Reply with the single word astra"}],"reasoning_effort":"low"}'POST /v1/responses (real Foundry call)
curl -s -D - http://localhost:20710/v1/responses -H 'Authorization: Bearer sk-lit6997' -H 'Content-Type: application/json' -d '{"model":"gpt-6-astra","input":"Reply with the single word astra","reasoning":{"effort":"low"}}'POST /v1/messages (real Foundry call)
curl -s -D - http://localhost:20710/v1/messages -H 'Authorization: Bearer sk-lit6997' -H 'Content-Type: application/json' -d '{"model":"gpt-6-astra","max_tokens":256,"messages":[{"role":"user","content":"Reply with the single word astra"}]}'POST /v1/chat/completions with reasoning_effort none and temperature 0.2 (real Foundry call)
curl -s -D - http://localhost:20710/v1/chat/completions -H 'Authorization: Bearer sk-lit6997' -H 'Content-Type: application/json' -d '{"model":"gpt-6-astra","messages":[{"role":"user","content":"Reply with the single word astra"}],"reasoning_effort":"none","temperature":0.2}'"model":"gpt-6-astra-us":HTTP/1.1 400 Bad Requestwith the same errorPOST /v1/responses with reasoning.effort none and temperature 0.2 (real Foundry call)
curl -s -D - http://localhost:20710/v1/responses -H 'Authorization: Bearer sk-lit6997' -H 'Content-Type: application/json' -d '{"model":"gpt-6-astra","input":"Reply with the single word astra","reasoning":{"effort":"none"},"temperature":0.2}'curl -s -D - http://localhost:20710/v1/messages -H 'Authorization: Bearer sk-lit6997' -H 'Content-Type: application/json' -d '{"model":"gpt-6-astra","max_tokens":64,"messages":[{"role":"user","content":"Reply with the single word astra"}],"thinking":{"type":"disabled"},"temperature":0.2}'After (c02f198)
/v1/model/info
curl -s http://localhost:27368/v1/model/info -H 'Authorization: Bearer sk-lit6997' | jq -c '.data[] | {model_name, litellm_model: .litellm_params.model, input_cost_per_token: .model_info.input_cost_per_token, input_above_272k: .model_info.input_cost_per_token_above_272k_tokens, output_cost_per_token: .model_info.output_cost_per_token, cache_read: .model_info.cache_read_input_token_cost, cache_creation: .model_info.cache_creation_input_token_cost, max_input_tokens: .model_info.max_input_tokens, supports_reasoning: .model_info.supports_reasoning}'{"model_name":"gpt-6-astra","litellm_model":"azure/gpt-6-astra","input_cost_per_token":0.00001,"input_above_272k":0.00002,"output_cost_per_token":0.00005,"cache_read":0.000001,"cache_creation":0.0000125,"max_input_tokens":922000,"supports_reasoning":true} {"model_name":"gpt-6-astra-us","litellm_model":"azure/us/gpt-6-astra","input_cost_per_token":0.000011,"input_above_272k":0.000022,"output_cost_per_token":0.000055,"cache_read":0.0000011,"cache_creation":0.00001375,"max_input_tokens":922000,"supports_reasoning":true}/model_group/info
curl -s http://localhost:27368/model_group/info -H 'Authorization: Bearer sk-lit6997' | jq -c '.data[] | {model_group, supports_reasoning, supported_reasoning_efforts, max_input_tokens, input_cost_per_token, output_cost_per_token}'{"model_group":"gpt-6-astra","supports_reasoning":true,"supported_reasoning_efforts":["none","low","medium","high","xhigh","max"],"max_input_tokens":922000.0,"input_cost_per_token":0.00001,"output_cost_per_token":0.00005} {"model_group":"gpt-6-astra-us","supports_reasoning":true,"supported_reasoning_efforts":["none","low","medium","high","xhigh","max"],"max_input_tokens":922000.0,"input_cost_per_token":0.000011,"output_cost_per_token":0.000055}/spend/calculate
curl -s -X POST http://localhost:27368/spend/calculate -H 'Authorization: Bearer sk-lit6997' -H 'Content-Type: application/json' -d '{"completion_response":{"id":"chatcmpl-azure-astra-1","object":"chat.completion","created":1788500000,"model":"azure/gpt-6-astra","choices":[{"index":0,"message":{"role":"assistant","content":"hi"},"finish_reason":"stop"}],"usage":{"prompt_tokens":1000,"completion_tokens":100,"total_tokens":1100,"prompt_tokens_details":{"cached_tokens":200}}}}'{"cost":0.0132}= 800 x $10/M + 200 x $1/M + 100 x $50/Mcurl -s -X POST http://localhost:27368/spend/calculate -H 'Authorization: Bearer sk-lit6997' -H 'Content-Type: application/json' -d '{"completion_response":{"id":"chatcmpl-azure-astra-2","object":"chat.completion","created":1788500000,"model":"azure/gpt-6-astra","choices":[{"index":0,"message":{"role":"assistant","content":"hi"},"finish_reason":"stop"}],"usage":{"prompt_tokens":300000,"completion_tokens":1000,"total_tokens":301000}}}'{"cost":6.075000000000001}= 300000 x $20/M + 1000 x $75/Mcurl -s -X POST http://localhost:27368/spend/calculate -H 'Authorization: Bearer sk-lit6997' -H 'Content-Type: application/json' -d '{"completion_response":{"id":"chatcmpl-azure-astra-3","object":"chat.completion","created":1788500000,"model":"azure/us/gpt-6-astra","choices":[{"index":0,"message":{"role":"assistant","content":"hi"},"finish_reason":"stop"}],"usage":{"prompt_tokens":1000,"completion_tokens":100,"total_tokens":1100}}}'{"cost":0.0165}= 1000 x $11/M + 100 x $55/MPOST /v1/chat/completions (real Foundry call)
curl -s -D - http://localhost:27368/v1/chat/completions -H 'Authorization: Bearer sk-lit6997' -H 'Content-Type: application/json' -d '{"model":"gpt-6-astra","messages":[{"role":"user","content":"Reply with the single word astra"}],"reasoning_effort":"low"}'POST /v1/responses (real Foundry call)
curl -s -D - http://localhost:27368/v1/responses -H 'Authorization: Bearer sk-lit6997' -H 'Content-Type: application/json' -d '{"model":"gpt-6-astra","input":"Reply with the single word astra","reasoning":{"effort":"low"}}'POST /v1/messages (real Foundry call)
curl -s -D - http://localhost:27368/v1/messages -H 'Authorization: Bearer sk-lit6997' -H 'Content-Type: application/json' -d '{"model":"gpt-6-astra","max_tokens":256,"messages":[{"role":"user","content":"Reply with the single word astra"}]}'POST /v1/chat/completions with reasoning_effort none and temperature 0.2 (real Foundry call)
curl -s -D - http://localhost:27368/v1/chat/completions -H 'Authorization: Bearer sk-lit6997' -H 'Content-Type: application/json' -d '{"model":"gpt-6-astra","messages":[{"role":"user","content":"Reply with the single word astra"}],"reasoning_effort":"none","temperature":0.2}'"model":"gpt-6-astra-us"(the 404 is Foundry's:azure/us/gpt-6-astrais a cost-tracking entry, not a deployment name, see the caveats):POST /v1/responses with reasoning.effort none and temperature 0.2 (real Foundry call)
curl -s -D - http://localhost:27368/v1/responses -H 'Authorization: Bearer sk-lit6997' -H 'Content-Type: application/json' -d '{"model":"gpt-6-astra","input":"Reply with the single word astra","reasoning":{"effort":"none"},"temperature":0.2}'curl -s -D - http://localhost:27368/v1/messages -H 'Authorization: Bearer sk-lit6997' -H 'Content-Type: application/json' -d '{"model":"gpt-6-astra","max_tokens":64,"messages":[{"role":"user","content":"Reply with the single word astra"}],"thinking":{"type":"disabled"},"temperature":0.2}'Type
🆕 New Feature
Caveats (if any)
Low
_priorityrates: Microsoft has not published a fast-mode price for Astra on Foundryservice_tier: priorityrequest bills at the standard rate until they doazure/eu/gpt-6-astraand no batch rates: Foundry sells Astra as Standard Global and Standard US Data Zone only, with no batch SKUreasoning_effort: disabled, which Foundry also lists, has no cost-map flag in LiteLLM and passes through untouchedazure/us/gpt-6-astrais a cost-tracking entry (model_info.base_model), not a deployment name: alitellm_params.modelofazure/us/gpt-6-astrahits Foundry with the deploymentus/gpt-6-astraand 404s, same as every otherazure/us/entryazure/gpt-5-series deployment names in the cost map: theazure/lookup already falls back to the bare OpenAI entry when the Azure entry says nothing ([Bug]:supports_response_schemareturns incorrect metadata for DeepSeek models due to unreachable complete configuration #20885), so the only other deployments whose gate moves aregpt-5.1-chatandgpt-5.1-chat-2025-11-13, and they move the right waygpt-5.1-chatentry (it isgpt-5.1-chat-latest), so Azure Responses used to refuse or drop temperature for those deployments while the Azure chat surface already forwarded it; now both surfaces read the sameazure/gpt-5.1-chatentry (none supported, none default) and keep itci/circleci: proxy_store_model_in_db_testsfailstest_chat_completion_bad_model_with_spend_logs(spend logmodel_groupcomes back empty on a nonexistent model), red on every staging scheduled pipeline since 89084 and tracked in LIT-6949; nothing in that test reads the cost mapproxy-infra / Run tests (Python 3.10)is the known staging red tracked in LIT-6947Vertex AI / Run tests (Python 3.13)died before running a test (Failed to resolve action download info, a GitHub Actions download timeout); green on the rerun from failedFinal Attestation
Note
Low Risk
Mostly cost-map and parameter-validation wiring; the Responses override affects Azure GPT-5-series temperature gates broadly but is aligned with existing Azure chat behavior.
Overview
Adds
azure/gpt-6-astraandazure/us/gpt-6-astrato the bundled cost maps so Microsoft Foundry deployments bill at the published rates (global vs 10% US Data Zone), including long-context (272K+) and cache token pricing, plus capability flags for reasoning (nonethroughmax, notminimal).AzureOpenAIResponsesAPIConfignow delegates_supports_reasoning_effort_noneand_effort_resolves_to_nonetoAzureOpenAIGPT5Config, so/v1/responsestemperature gating follows theazure/cost-map entry for bare deployment names likegpt-6-astrainstead of OpenAI’s map—allowingreasoning.effort: "none"with non-default temperature on Foundry where OpenAI rejectsnone.Regression tests cover Foundry price-sheet math, chat/responses param mapping, and advertised reasoning efforts for both model keys.
Reviewed by Cursor Bugbot for commit c02f198. Bugbot is set up for automated code reviews on this repo. Configure here.