The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]
Python ai-gatewayanthropicazure-openaibedrockgatewaylangchainlitellmllmllm-gatewayllmopsmcp-gatewayopenaiopenai-proxyrustrust-aivertex-ai
[Feat] Add azure/gpt-5.5 + azure/gpt-5.5-pro entries (+ dated variants) (#26361)
Mateo Wang319193604cfc
diff --git a/litellm/model_prices_and_context_window_backup.json b/litellm/model_prices_and_context_window_backup.jsonindex f6de40717d1..5cccd5f00af 100644--- a/litellm/model_prices_and_context_window_backup.json+++ b/litellm/model_prices_and_context_window_backup.json@@ -4645,6 +4645,169 @@"supports_vision": true,"supports_web_search": true},+ "azure/gpt-5.5": {+ "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,+ "supports_none_reasoning_effort": true,+ "supports_xhigh_reasoning_effort": true,+ "supports_minimal_reasoning_effort": false+ },+ "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+ },+ "azure/gpt-5.5-pro": {+ "cache_read_input_token_cost": 6e-06,+ "cache_read_input_token_cost_above_272k_tokens": 1.2e-05,+ "input_cost_per_token": 6e-05,+ "input_cost_per_token_above_272k_tokens": 0.00012,+ "litellm_provider": "azure",+ "max_input_tokens": 1050000,+ "max_output_tokens": 128000,+ "max_tokens": 128000,+ "mode": "responses",+ "output_cost_per_token": 0.00036,+ "output_cost_per_token_above_272k_tokens": 0.00054,+ "supported_endpoints": [+ "/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": false,+ "supports_system_messages": true,+ "supports_tool_choice": true,+ "supports_vision": true,+ "supports_web_search": true,+ "supports_none_reasoning_effort": false,+ "supports_xhigh_reasoning_effort": true,+ "supports_minimal_reasoning_effort": false,+ "supports_low_reasoning_effort": false+ },+ "azure/gpt-5.5-pro-2026-04-23": {+ "cache_read_input_token_cost": 6e-06,+ "cache_read_input_token_cost_above_272k_tokens": 1.2e-05,+ "input_cost_per_token": 6e-05,+ "input_cost_per_token_above_272k_tokens": 0.00012,+ "litellm_provider": "azure",+ "max_input_tokens": 1050000,+ "max_output_tokens": 128000,+ "max_tokens": 128000,+ "mode": "responses",+ "output_cost_per_token": 0.00036,+ "output_cost_per_token_above_272k_tokens": 0.00054,+ "supported_endpoints": [+ "/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": false,+ "supports_system_messages": true,+ "supports_tool_choice": true,+ "supports_vision": true,+ "supports_web_search": true+ },"azure/gpt-5.4-mini": {"cache_read_input_token_cost": 7.5e-08,"input_cost_per_token": 7.5e-07,diff --git a/model_prices_and_context_window.json b/model_prices_and_context_window.jsonindex c8ed58ff3ea..4d8f3a984f7 100644--- a/model_prices_and_context_window.json+++ b/model_prices_and_context_window.json@@ -4659,6 +4659,169 @@"supports_vision": true,"supports_web_search": true},+ "azure/gpt-5.5": {+ "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,+ "supports_none_reasoning_effort": true,+ "supports_xhigh_reasoning_effort": true,+ "supports_minimal_reasoning_effort": false+ },+ "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+ },+ "azure/gpt-5.5-pro": {+ "cache_read_input_token_cost": 6e-06,+ "cache_read_input_token_cost_above_272k_tokens": 1.2e-05,+ "input_cost_per_token": 6e-05,+ "input_cost_per_token_above_272k_tokens": 0.00012,+ "litellm_provider": "azure",+ "max_input_tokens": 1050000,+ "max_output_tokens": 128000,+ "max_tokens": 128000,+ "mode": "responses",+ "output_cost_per_token": 0.00036,+ "output_cost_per_token_above_272k_tokens": 0.00054,+ "supported_endpoints": [+ "/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": false,+ "supports_system_messages": true,+ "supports_tool_choice": true,+ "supports_vision": true,+ "supports_web_search": true,+ "supports_none_reasoning_effort": false,+ "supports_xhigh_reasoning_effort": true,+ "supports_minimal_reasoning_effort": false,+ "supports_low_reasoning_effort": false+ },+ "azure/gpt-5.5-pro-2026-04-23": {+ "cache_read_input_token_cost": 6e-06,+ "cache_read_input_token_cost_above_272k_tokens": 1.2e-05,+ "input_cost_per_token": 6e-05,+ "input_cost_per_token_above_272k_tokens": 0.00012,+ "litellm_provider": "azure",+ "max_input_tokens": 1050000,+ "max_output_tokens": 128000,+ "max_tokens": 128000,+ "mode": "responses",+ "output_cost_per_token": 0.00036,+ "output_cost_per_token_above_272k_tokens": 0.00054,+ "supported_endpoints": [+ "/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": false,+ "supports_system_messages": true,+ "supports_tool_choice": true,+ "supports_vision": true,+ "supports_web_search": true+ },"azure/gpt-5.4-mini": {"cache_read_input_token_cost": 7.5e-08,"input_cost_per_token": 7.5e-07,diff --git a/tests/test_litellm/litellm_core_utils/llm_cost_calc/test_llm_cost_calc_utils.py b/tests/test_litellm/litellm_core_utils/llm_cost_calc/test_llm_cost_calc_utils.pyindex 5e37e2a3424..3016762043c 100644--- a/tests/test_litellm/litellm_core_utils/llm_cost_calc/test_llm_cost_calc_utils.py+++ b/tests/test_litellm/litellm_core_utils/llm_cost_calc/test_llm_cost_calc_utils.py@@ -449,6 +449,63 @@ def test_gpt55_dated_variants_match_base_reasoning_effort_capabilities()+ "model,expected_mode,expected_input,expected_output,expected_cache_read",+ [+ ("azure/gpt-5.5", "chat", 5e-6, 3e-5, 5e-7),+ ("azure/gpt-5.5-2026-04-23", "chat", 5e-6, 3e-5, 5e-7),+ ("azure/gpt-5.5-pro", "responses", 6e-5, 3.6e-4, 6e-6),+ ("azure/gpt-5.5-pro-2026-04-23", "responses", 6e-5, 3.6e-4, 6e-6),+ ],+)+def test_azure_gpt55_entries_present_with_correct_pricing(+ model, expected_mode, expected_input, expected_output, expected_cache_read+):+ """Day-0 Azure entries for GPT-5.5 mirror the OpenAI pricing structure.++ Pricing parity with openai/gpt-5.5* (verified against OpenAI's pricing page+ on 2026-04-24): $5/$30 input/output per 1M for chat, $60/$360 for pro.+ Cache discount is 10% of input.+ """+ os.environ["LITELLM_LOCAL_MODEL_COST_MAP"] = "True"+ litellm.model_cost = litellm.get_model_cost_map(url="")++ m = litellm.model_cost[model]+ assert m["litellm_provider"] == "azure"+ assert m["mode"] == expected_mode+ assert m["input_cost_per_token"] == expected_input+ assert m["output_cost_per_token"] == expected_output+ assert m["cache_read_input_token_cost"] == expected_cache_read+ # Long-context window inherited from gpt-5.4 / openai gpt-5.5.+ assert m["max_input_tokens"] == 1050000+ assert m["max_output_tokens"] == 128000+++ "model,expected_none,expected_minimal,expected_xhigh",+ [+ # Mirror live OpenAI API contract (verified via openai/gpt-5.5* on+ # 2026-04-24): chat accepts {none, low, medium, high, xhigh} but NOT+ # minimal; pro accepts {medium, high, xhigh} only.+ # NOTE: openai/gpt-5.5* entries currently set supports_minimal=true on+ # main (pre #26456). Once that PR lands, OpenAI + Azure flags align.+ ("azure/gpt-5.5", True, False, True),+ ("azure/gpt-5.5-pro", False, False, True),+ ],+)+def test_azure_gpt55_reasoning_effort_flags_match_live_openai_api(+ 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(diff --git a/tests/test_litellm/test_utils.py b/tests/test_litellm/test_utils.pyindex dc344a433bc..93c61e003d9 100644--- a/tests/test_litellm/test_utils.py+++ b/tests/test_litellm/test_utils.py@@ -769,6 +769,7 @@ def test_aaamodel_prices_and_context_window_json_is_valid():"uses_embed_content": {"type": "boolean"},"supports_reasoning": {"type": "boolean"},"supports_minimal_reasoning_effort": {"type": "boolean"},+ "supports_low_reasoning_effort": {"type": "boolean"},"supports_none_reasoning_effort": {"type": "boolean"},"supports_xhigh_reasoning_effort": {"type": "boolean"},"supports_max_reasoning_effort": {"type": "boolean"},