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
Add gpt-5.1-codex-max model pricing and configuration (#17541)
Cesar Garcia4eb9f8036f16
diff --git a/litellm/model_prices_and_context_window_backup.json b/litellm/model_prices_and_context_window_backup.jsonindex d02a01e3a67..634ea6dc48a 100644--- a/litellm/model_prices_and_context_window_backup.json+++ b/litellm/model_prices_and_context_window_backup.json@@ -3316,6 +3316,36 @@"supports_tool_choice": true,"supports_vision": true},+ "azure/gpt-5.1-codex-max": {+ "cache_read_input_token_cost": 1.25e-07,+ "input_cost_per_token": 1.25e-06,+ "litellm_provider": "azure",+ "max_input_tokens": 400000,+ "max_output_tokens": 128000,+ "max_tokens": 128000,+ "mode": "responses",+ "output_cost_per_token": 1e-05,+ "supported_endpoints": [+ "/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": false,+ "supports_tool_choice": true,+ "supports_vision": true+ },"azure/gpt-5.1-codex-mini": {"cache_read_input_token_cost": 2.5e-08,"input_cost_per_token": 2.5e-07,@@ -16345,6 +16375,36 @@"supports_tool_choice": true,"supports_vision": true},+ "gpt-5.1-codex-max": {+ "cache_read_input_token_cost": 1.25e-07,+ "input_cost_per_token": 1.25e-06,+ "litellm_provider": "openai",+ "max_input_tokens": 400000,+ "max_output_tokens": 128000,+ "max_tokens": 128000,+ "mode": "responses",+ "output_cost_per_token": 1e-05,+ "supported_endpoints": [+ "/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": false,+ "supports_tool_choice": true,+ "supports_vision": true+ },"gpt-5.1-codex-mini": {"cache_read_input_token_cost": 2.5e-08,"cache_read_input_token_cost_priority": 4.5e-08,diff --git a/model_prices_and_context_window.json b/model_prices_and_context_window.jsonindex d02a01e3a67..634ea6dc48a 100644--- a/model_prices_and_context_window.json+++ b/model_prices_and_context_window.json@@ -3316,6 +3316,36 @@"supports_tool_choice": true,"supports_vision": true},+ "azure/gpt-5.1-codex-max": {+ "cache_read_input_token_cost": 1.25e-07,+ "input_cost_per_token": 1.25e-06,+ "litellm_provider": "azure",+ "max_input_tokens": 400000,+ "max_output_tokens": 128000,+ "max_tokens": 128000,+ "mode": "responses",+ "output_cost_per_token": 1e-05,+ "supported_endpoints": [+ "/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": false,+ "supports_tool_choice": true,+ "supports_vision": true+ },"azure/gpt-5.1-codex-mini": {"cache_read_input_token_cost": 2.5e-08,"input_cost_per_token": 2.5e-07,@@ -16345,6 +16375,36 @@"supports_tool_choice": true,"supports_vision": true},+ "gpt-5.1-codex-max": {+ "cache_read_input_token_cost": 1.25e-07,+ "input_cost_per_token": 1.25e-06,+ "litellm_provider": "openai",+ "max_input_tokens": 400000,+ "max_output_tokens": 128000,+ "max_tokens": 128000,+ "mode": "responses",+ "output_cost_per_token": 1e-05,+ "supported_endpoints": [+ "/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": false,+ "supports_tool_choice": true,+ "supports_vision": true+ },"gpt-5.1-codex-mini": {"cache_read_input_token_cost": 2.5e-08,"cache_read_input_token_cost_priority": 4.5e-08,diff --git a/tests/test_litellm/llms/openai/test_gpt5_transformation.py b/tests/test_litellm/llms/openai/test_gpt5_transformation.pyindex 5080a7a7c59..98d4ba9c10f 100644--- a/tests/test_litellm/llms/openai/test_gpt5_transformation.py+++ b/tests/test_litellm/llms/openai/test_gpt5_transformation.py@@ -216,6 +216,7 @@ def test_gpt5_1_model_detection(gpt5_config: OpenAIGPT5Config):"""Test that GPT-5.1 models are correctly detected."""assert gpt5_config.is_model_gpt_5_1_model("gpt-5.1")assert gpt5_config.is_model_gpt_5_1_model("gpt-5.1-codex")+ assert gpt5_config.is_model_gpt_5_1_model("gpt-5.1-codex-max")assert gpt5_config.is_model_gpt_5_1_model("gpt-5.1-chat")assert not gpt5_config.is_model_gpt_5_1_model("gpt-5")assert not gpt5_config.is_model_gpt_5_1_model("gpt-5-mini")