Skip to content

[Feat] Add azure/gpt-5.5 + azure/gpt-5.5-pro entries (+ dated variants) - #26458

Closed
mateo-berri wants to merge 2 commits into
mainfrom
litellm_hotfix_gpt-5.5-azure
Closed

[Feat] Add azure/gpt-5.5 + azure/gpt-5.5-pro entries (+ dated variants)#26458
mateo-berri wants to merge 2 commits into
mainfrom
litellm_hotfix_gpt-5.5-azure

Conversation

@mateo-berri

Copy link
Copy Markdown
Contributor

Relevant issues

Day-0 Azure entries for OpenAI's GPT-5.5 family. Microsoft hasn't shipped GPT-5.5 on Azure OpenAI yet (latest GA on the Foundry models page is the GPT-5.4 series as of 2026-04-24), but the existing precedent — azure/gpt-5.4* was in the cost map before its Azure rollout — means we should land these entries now so cost tracking + capability flags Just Work the moment customers deploy.

Pre-Submission checklist

  • I have Added testing in the tests/test_litellm/ directory, Adding at least 1 test is a hard requirement - see details
  • My PR passes all unit tests on make test-unit
  • My PR's scope is as isolated as possible, it only solves 1 specific problem
  • I have requested a Greptile review by commenting @greptileai and received a Confidence Score of at least 4/5 before requesting a maintainer review

Delays in PR merge?

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

CI (LiteLLM team)

CI status guideline:

  • 50-55 passing tests: main is stable with minor issues.
  • 45-49 passing tests: acceptable but needs attention
  • <= 40 passing tests: unstable; be careful with your merges and assess the risk.
  • Branch creation CI run
    Link:

  • CI run for the last commit
    Link:

  • Merge / cherry-pick CI run
    Links:

Screenshots / Proof of Fix

$ uv run pytest tests/test_litellm/litellm_core_utils/llm_cost_calc/test_llm_cost_calc_utils.py \
                -vv -k "azure_gpt55"
test_azure_gpt55_entries_present_with_correct_pricing[azure/gpt-5.5-chat-...] PASSED
test_azure_gpt55_entries_present_with_correct_pricing[azure/gpt-5.5-2026-04-23-chat-...] PASSED
test_azure_gpt55_entries_present_with_correct_pricing[azure/gpt-5.5-pro-responses-...] PASSED
test_azure_gpt55_entries_present_with_correct_pricing[azure/gpt-5.5-pro-2026-04-23-responses-...] PASSED
test_azure_gpt55_reasoning_effort_flags_match_live_openai_api[azure/gpt-5.5-...] PASSED
test_azure_gpt55_reasoning_effort_flags_match_live_openai_api[azure/gpt-5.5-pro-...] PASSED

Type

🆕 New Feature

Changes

Adds four entries to both model_prices_and_context_window.json and litellm/model_prices_and_context_window_backup.json:

Model mode input output cached context
azure/gpt-5.5 chat $5.00 $30.00 $0.50 1.05M
azure/gpt-5.5-2026-04-23 chat $5.00 $30.00 $0.50 1.05M
azure/gpt-5.5-pro responses $60.00 $360.00 $6.00 1.05M
azure/gpt-5.5-pro-2026-04-23 responses $60.00 $360.00 $6.00 1.05M

Pricing per-1M-tokens. Schema follows the existing azure/gpt-5.4* shape:

  • Same base + long-context pricing as the openai/gpt-5.5* counterparts
  • Azure-style: priority tier present (2x base), no flex / batches keys
  • mode: chat for thinking, mode: responses for pro

reasoning_effort capability flags mirror the OpenAI variants exactly since Azure proxies the same API contract — minimal rejected on both chat and pro, low and none rejected on pro.

Dependency note

supports_low_reasoning_effort is set on azure/gpt-5.5-pro* here, but the flag itself is introduced in #26456 (along with the gpt-5.5-pro low-rejection logic in OpenAIGPT5Config.map_openai_params). Until #26456 lands, the flag on the Azure entries is inert (no effect — low continues to pass through). After #26456 merges, both OpenAI and Azure pro variants will reject low consistently.

Tests

tests/test_litellm/litellm_core_utils/llm_cost_calc/test_llm_cost_calc_utils.py:

  • test_azure_gpt55_entries_present_with_correct_pricing — parametrized over all four entries; verifies provider, mode, base + long-context pricing, context window
  • test_azure_gpt55_reasoning_effort_flags_match_live_openai_api — pins the live-API-derived supports_{none, minimal, xhigh}_reasoning_effort profile

…ariants)

Azure variants of OpenAI's GPT-5.5 family. Microsoft has not yet
shipped GPT-5.5 on Azure OpenAI (latest GA on the Foundry models page
is GPT-5.4 as of 2026-04-24), but adding the entries day-0 mirrors the
established precedent for azure/gpt-5.4* (which were in the cost map
before the Azure rollout) so cost tracking and capability flags work
the moment customers deploy.

Schema follows the existing azure/gpt-5.4* shape:
- Same base/long-context pricing as openai/gpt-5.5*: $5/$30 chat,
  $60/$360 pro per 1M, with priority tier 2x base
- Azure variants drop the flex/batches keys (Azure has no flex tier)
  but keep priority pricing, matching gpt-5.4* precedent
- mode=chat for the thinking model, mode=responses for pro

reasoning_effort capability flags mirror the OpenAI variants exactly
since Azure proxies the same API contract: minimal rejection on both
chat and pro, low/none rejection on pro. Once #26456 (which sets
supports_low_reasoning_effort + minimal=false on openai/gpt-5.5*)
lands, OpenAI and Azure flag profiles align.

Tests pin entry presence + pricing for all four Azure variants and
verify the live-API-derived reasoning_effort flags.
@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.

@veria-ai

veria-ai Bot commented Apr 24, 2026

Copy link
Copy Markdown
Contributor

Low: No security issues found

This PR adds static model pricing and capability metadata entries for Azure GPT-5.5 variants to two JSON configuration files, along with corresponding tests. No code logic, authentication, authorization, or input handling is changed.


Status: 0 open
Risk: 1/10

Posted by Veria AI · 2026-04-24T22:36:41.893Z

@codspeed-hq

codspeed-hq Bot commented Apr 24, 2026

Copy link
Copy Markdown
Contributor

Merging this PR will not alter performance

✅ 16 untouched benchmarks


Comparing litellm_hotfix_gpt-5.5-azure (0edb687) with main (d21e90f)

Open in CodSpeed

@greptile-apps

greptile-apps Bot commented Apr 24, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR adds day-0 Azure entries for the GPT-5.5 family (azure/gpt-5.5, azure/gpt-5.5-2026-04-23, azure/gpt-5.5-pro, azure/gpt-5.5-pro-2026-04-23) to both cost-map JSON files and their backup, following the existing azure/gpt-5.4* schema (priority-tier pricing on chat-only, responses-mode pro without priority fields, supports_service_tier on chat only). The accompanying tests verify pricing values and reasoning-effort flags for the base aliases, but the dated variants are only covered by the pricing test.

Confidence Score: 4/5

Safe to merge once previous open feedback (missing reasoning-effort flags on dated variants) is resolved; pricing and schema structure are correct.

The P1 issues flagged in earlier review threads — missing reasoning-effort capability flags on azure/gpt-5.5-2026-04-23 and azure/gpt-5.5-pro-2026-04-23, and no test coverage for those dated variants — remain unresolved in the current HEAD. No new P0/P1 issues were found beyond those. The pricing values, JSON schema, and existing test logic are all correct.

model_prices_and_context_window.json and litellm/model_prices_and_context_window_backup.json — both dated-variant entries need reasoning-effort flags added to match their base aliases.

Important Files Changed

Filename Overview
model_prices_and_context_window.json Adds 4 new azure/gpt-5.5* entries; base aliases have full reasoning-effort flags but both dated variants are missing them (flagged in previous review threads)
litellm/model_prices_and_context_window_backup.json Mirror of main JSON; same 4 entries added with the same missing reasoning-effort flags on dated variants
tests/test_litellm/litellm_core_utils/llm_cost_calc/test_llm_cost_calc_utils.py Adds pricing tests for all 4 entries and reasoning-effort flag tests for base aliases only; dated variants not covered by the flag test (flagged in previous review threads)
tests/test_litellm/test_utils.py Adds supports_low_reasoning_effort to the JSON schema validator — minimal, correct change

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[litellm.completion call\nwith azure/gpt-5.5*] --> B{model_cost lookup\nget_model_info}
    B --> C{Dated variant?\ne.g. azure/gpt-5.5-2026-04-23}
    C -->|No - base alias| D[Full entry:\ncost + capability flags\ne.g. supports_none_reasoning_effort]
    C -->|Yes - dated variant| E[Partial entry:\ncost fields only\nmissing reasoning-effort flags]
    D --> F[Cost calc + capability\nchecks work correctly]
    E --> G[Cost calc works ✓\nCapability flags return None/falsy ✗]
    G --> H[supports_xhigh_reasoning_effort\nsilently returns None]
    G --> I[supports_low_reasoning_effort\nnot enforced after #26456 merges]
Loading

Reviews (2): Last reviewed commit: "test: register supports_low_reasoning_ef..." | Re-trigger Greptile

Comment on lines +4708 to +4750
"azure/gpt-5.5-2026-04-23": {
"cache_read_input_token_cost": 5e-07,
"cache_read_input_token_cost_above_272k_tokens": 1e-06,
"cache_read_input_token_cost_priority": 1e-06,
"cache_read_input_token_cost_above_272k_tokens_priority": 2e-06,
"input_cost_per_token": 5e-06,
"input_cost_per_token_above_272k_tokens": 1e-05,
"input_cost_per_token_priority": 1e-05,
"input_cost_per_token_above_272k_tokens_priority": 2e-05,
"litellm_provider": "azure",
"max_input_tokens": 1050000,
"max_output_tokens": 128000,
"max_tokens": 128000,
"mode": "chat",
"output_cost_per_token": 3e-05,
"output_cost_per_token_above_272k_tokens": 4.5e-05,
"output_cost_per_token_priority": 6e-05,
"output_cost_per_token_above_272k_tokens_priority": 9e-05,
"supported_endpoints": [
"/v1/chat/completions",
"/v1/batch",
"/v1/responses"
],
"supported_modalities": [
"text",
"image"
],
"supported_output_modalities": [
"text"
],
"supports_function_calling": true,
"supports_native_streaming": true,
"supports_parallel_function_calling": true,
"supports_pdf_input": true,
"supports_prompt_caching": true,
"supports_reasoning": true,
"supports_response_schema": true,
"supports_system_messages": true,
"supports_tool_choice": true,
"supports_service_tier": true,
"supports_vision": true,
"supports_web_search": true
},

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 Dated variants are missing reasoning-effort capability flags

azure/gpt-5.5-2026-04-23 is missing supports_none_reasoning_effort, supports_xhigh_reasoning_effort, and supports_minimal_reasoning_effort flags that are explicitly set on azure/gpt-5.5. azure/gpt-5.5-pro-2026-04-23 (lines 4790-4824) has the same problem and additionally drops supports_low_reasoning_effort: false — the flag the PR explicitly depends on for the rejection logic landing in #26456.

When users pin to a dated deployment variant (the common production pattern), get_model_info returns None for every one of these flags, making them all falsy. A user on azure/gpt-5.5-2026-04-23 will silently lose advertised xhigh support, and a user on azure/gpt-5.5-pro-2026-04-23 will have low pass through even after #26456 merges. The existing test_gpt55_dated_variants_match_base_reasoning_effort_capabilities test enforces this invariant for the OpenAI provider — the same pattern should apply here. The same omission exists in litellm/model_prices_and_context_window_backup.json for both dated variants.

Add the missing flags to both dated variant entries so they mirror their base models exactly.

Comment on lines +497 to 511
model, expected_none, expected_minimal, expected_xhigh
):
"""Azure entries pin reasoning_effort flags to OpenAI's actual API contract."""
os.environ["LITELLM_LOCAL_MODEL_COST_MAP"] = "True"
litellm.model_cost = litellm.get_model_cost_map(url="")

m = litellm.model_cost[model]
assert m.get("supports_none_reasoning_effort") is expected_none
assert m.get("supports_minimal_reasoning_effort") is expected_minimal
assert m.get("supports_xhigh_reasoning_effort") is expected_xhigh


def test_generic_cost_per_token_anthropic_prompt_caching():
model = "claude-sonnet-4@20250514"
usage = Usage(

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 Dated Azure variants not covered by reasoning-effort flag test

test_azure_gpt55_reasoning_effort_flags_match_live_openai_api only parametrizes azure/gpt-5.5 and azure/gpt-5.5-pro, so the missing flags on azure/gpt-5.5-2026-04-23 and azure/gpt-5.5-pro-2026-04-23 go undetected. The analogous OpenAI test (test_gpt55_dated_variants_match_base_reasoning_effort_capabilities) explicitly guards that dated variants inherit the same capability profile as their base alias. Without an equivalent guard for Azure, the two dated variants could silently diverge. Adding them to the parametrize list (or adding an Azure-specific dated-variant parity test) would catch the current gap and prevent regressions.

azure/gpt-5.5-pro and azure/gpt-5.5-pro-2026-04-23 added in this branch
carry supports_low_reasoning_effort=false. The strict
'additionalProperties: false' schema in
test_aaamodel_prices_and_context_window_json_is_valid rejected the new
key. Register it alongside the other supports_*_reasoning_effort
entries.

Note: the runtime side of this flag (code that reads it) lands in
#26456. Until that PR merges the flag is inert for both Azure and
OpenAI pro entries, but having the schema accept it lets cost-map
tests pass on either merge order.
@mateo-berri

Copy link
Copy Markdown
Contributor Author

Superseded by #26361 (force-pushed to include this PR's full scope: 4 entries, long-context pricing, tests, supports_low_reasoning_effort schema fix). Closing this duplicate.

@mateo-berri
mateo-berri deleted the litellm_hotfix_gpt-5.5-azure branch April 24, 2026 22:41
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