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] Day-0, Add gpt-5.1 and gpt-5.1-codex family support (#16598)
Sameer Kankuteea80510f78e2
diff --git a/litellm/model_prices_and_context_window_backup.json b/litellm/model_prices_and_context_window_backup.jsonindex aa7774c43e7..7b8177ed99a 100644--- a/litellm/model_prices_and_context_window_backup.json+++ b/litellm/model_prices_and_context_window_backup.json@@ -13849,6 +13849,113 @@"supports_service_tier": true,"supports_vision": true},+ "gpt-5.1": {+ "cache_read_input_token_cost": 1.25e-07,+ "cache_read_input_token_cost_priority": 2.5e-07,+ "input_cost_per_token": 1.25e-06,+ "input_cost_per_token_priority": 2.5e-06,+ "litellm_provider": "openai",+ "max_input_tokens": 272000,+ "max_output_tokens": 128000,+ "max_tokens": 128000,+ "mode": "chat",+ "output_cost_per_token": 1e-05,+ "output_cost_per_token_priority": 2e-05,+ "supported_endpoints": [+ "/v1/chat/completions",+ "/v1/responses"+ ],+ "supported_modalities": [+ "text",+ "image"+ ],+ "supported_output_modalities": [+ "text",+ "image"+ ],+ "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+ },+ "gpt-5.1-2025-11-13": {+ "cache_read_input_token_cost": 1.25e-07,+ "cache_read_input_token_cost_priority": 2.5e-07,+ "input_cost_per_token": 1.25e-06,+ "input_cost_per_token_priority": 2.5e-06,+ "litellm_provider": "openai",+ "max_input_tokens": 272000,+ "max_output_tokens": 128000,+ "max_tokens": 128000,+ "mode": "chat",+ "output_cost_per_token": 1e-05,+ "output_cost_per_token_priority": 2e-05,+ "supported_endpoints": [+ "/v1/chat/completions",+ "/v1/responses"+ ],+ "supported_modalities": [+ "text",+ "image"+ ],+ "supported_output_modalities": [+ "text",+ "image"+ ],+ "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+ },+ "gpt-5.1-chat-latest": {+ "cache_read_input_token_cost": 1.25e-07,+ "cache_read_input_token_cost_priority": 2.5e-07,+ "input_cost_per_token": 1.25e-06,+ "input_cost_per_token_priority": 2.5e-06,+ "litellm_provider": "openai",+ "max_input_tokens": 128000,+ "max_output_tokens": 16384,+ "max_tokens": 16384,+ "mode": "chat",+ "output_cost_per_token": 1e-05,+ "output_cost_per_token_priority": 2e-05,+ "supported_endpoints": [+ "/v1/chat/completions",+ "/v1/responses"+ ],+ "supported_modalities": [+ "text",+ "image"+ ],+ "supported_output_modalities": [+ "text",+ "image"+ ],+ "supports_function_calling": false,+ "supports_native_streaming": true,+ "supports_parallel_function_calling": false,+ "supports_pdf_input": true,+ "supports_prompt_caching": true,+ "supports_reasoning": true,+ "supports_response_schema": true,+ "supports_system_messages": true,+ "supports_tool_choice": false,+ "supports_vision": true+ },"gpt-5-pro": {"input_cost_per_token": 1.5e-05,"input_cost_per_token_batches": 7.5e-06,@@ -14048,6 +14155,72 @@"supports_tool_choice": true,"supports_vision": true},+ "gpt-5.1-codex": {+ "cache_read_input_token_cost": 1.25e-07,+ "cache_read_input_token_cost_priority": 2.5e-07,+ "input_cost_per_token": 1.25e-06,+ "input_cost_per_token_priority": 2.5e-06,+ "litellm_provider": "openai",+ "max_input_tokens": 272000,+ "max_output_tokens": 128000,+ "max_tokens": 128000,+ "mode": "responses",+ "output_cost_per_token": 1e-05,+ "output_cost_per_token_priority": 2e-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,+ "input_cost_per_token": 2.5e-07,+ "input_cost_per_token_priority": 4.5e-07,+ "litellm_provider": "openai",+ "max_input_tokens": 272000,+ "max_output_tokens": 128000,+ "max_tokens": 128000,+ "mode": "responses",+ "output_cost_per_token": 2e-06,+ "output_cost_per_token_priority": 3.6e-06,+ "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-mini": {"cache_read_input_token_cost": 2.5e-08,"cache_read_input_token_cost_flex": 1.25e-08,diff --git a/model_prices_and_context_window.json b/model_prices_and_context_window.jsonindex 4eac8335e6f..fa36e2d6088 100644--- a/model_prices_and_context_window.json+++ b/model_prices_and_context_window.json@@ -13852,6 +13852,113 @@"supports_service_tier": true,"supports_vision": true},+ "gpt-5.1": {+ "cache_read_input_token_cost": 1.25e-07,+ "cache_read_input_token_cost_priority": 2.5e-07,+ "input_cost_per_token": 1.25e-06,+ "input_cost_per_token_priority": 2.5e-06,+ "litellm_provider": "openai",+ "max_input_tokens": 272000,+ "max_output_tokens": 128000,+ "max_tokens": 128000,+ "mode": "chat",+ "output_cost_per_token": 1e-05,+ "output_cost_per_token_priority": 2e-05,+ "supported_endpoints": [+ "/v1/chat/completions",+ "/v1/responses"+ ],+ "supported_modalities": [+ "text",+ "image"+ ],+ "supported_output_modalities": [+ "text",+ "image"+ ],+ "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+ },+ "gpt-5.1-2025-11-13": {+ "cache_read_input_token_cost": 1.25e-07,+ "cache_read_input_token_cost_priority": 2.5e-07,+ "input_cost_per_token": 1.25e-06,+ "input_cost_per_token_priority": 2.5e-06,+ "litellm_provider": "openai",+ "max_input_tokens": 272000,+ "max_output_tokens": 128000,+ "max_tokens": 128000,+ "mode": "chat",+ "output_cost_per_token": 1e-05,+ "output_cost_per_token_priority": 2e-05,+ "supported_endpoints": [+ "/v1/chat/completions",+ "/v1/responses"+ ],+ "supported_modalities": [+ "text",+ "image"+ ],+ "supported_output_modalities": [+ "text",+ "image"+ ],+ "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+ },+ "gpt-5.1-chat-latest": {+ "cache_read_input_token_cost": 1.25e-07,+ "cache_read_input_token_cost_priority": 2.5e-07,+ "input_cost_per_token": 1.25e-06,+ "input_cost_per_token_priority": 2.5e-06,+ "litellm_provider": "openai",+ "max_input_tokens": 128000,+ "max_output_tokens": 16384,+ "max_tokens": 16384,+ "mode": "chat",+ "output_cost_per_token": 1e-05,+ "output_cost_per_token_priority": 2e-05,+ "supported_endpoints": [+ "/v1/chat/completions",+ "/v1/responses"+ ],+ "supported_modalities": [+ "text",+ "image"+ ],+ "supported_output_modalities": [+ "text",+ "image"+ ],+ "supports_function_calling": false,+ "supports_native_streaming": true,+ "supports_parallel_function_calling": false,+ "supports_pdf_input": true,+ "supports_prompt_caching": true,+ "supports_reasoning": true,+ "supports_response_schema": true,+ "supports_system_messages": true,+ "supports_tool_choice": false,+ "supports_vision": true+ },"gpt-5-pro": {"input_cost_per_token": 1.5e-05,"input_cost_per_token_batches": 7.5e-06,@@ -14051,6 +14158,72 @@"supports_tool_choice": true,"supports_vision": true},+ "gpt-5.1-codex": {+ "cache_read_input_token_cost": 1.25e-07,+ "cache_read_input_token_cost_priority": 2.5e-07,+ "input_cost_per_token": 1.25e-06,+ "input_cost_per_token_priority": 2.5e-06,+ "litellm_provider": "openai",+ "max_input_tokens": 272000,+ "max_output_tokens": 128000,+ "max_tokens": 128000,+ "mode": "responses",+ "output_cost_per_token": 1e-05,+ "output_cost_per_token_priority": 2e-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,+ "input_cost_per_token": 2.5e-07,+ "input_cost_per_token_priority": 4.5e-07,+ "litellm_provider": "openai",+ "max_input_tokens": 272000,+ "max_output_tokens": 128000,+ "max_tokens": 128000,+ "mode": "responses",+ "output_cost_per_token": 2e-06,+ "output_cost_per_token_priority": 3.6e-06,+ "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-mini": {"cache_read_input_token_cost": 2.5e-08,"cache_read_input_token_cost_flex": 1.25e-08,