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
fix(registry): drop gpt-image-2 text output price, add openrouter minimax-m3 and qwen3.7-plus
mateo0c29f510bcda
diff --git a/litellm/model_prices_and_context_window_backup.json b/litellm/model_prices_and_context_window_backup.jsonindex 01bb7d434f5..1a92d78b053 100644--- a/litellm/model_prices_and_context_window_backup.json+++ b/litellm/model_prices_and_context_window_backup.json@@ -8296,7 +8296,6 @@"input_cost_per_image_token": 8e-06,"litellm_provider": "azure","mode": "image_generation",- "output_cost_per_token": 1e-05,"output_cost_per_image_token": 3e-05,"supported_endpoints": ["/v1/images/generations",@@ -8312,7 +8311,6 @@"input_cost_per_image_token": 8e-06,"litellm_provider": "azure","mode": "image_generation",- "output_cost_per_token": 1e-05,"output_cost_per_image_token": 3e-05,"supported_endpoints": ["/v1/images/generations",@@ -29225,7 +29223,6 @@"input_cost_per_token": 5e-06,"litellm_provider": "openai","mode": "image_generation",- "output_cost_per_token": 1e-05,"input_cost_per_image_token": 8e-06,"output_cost_per_image_token": 3e-05,"supported_endpoints": [@@ -29240,7 +29237,6 @@"input_cost_per_token": 5e-06,"litellm_provider": "openai","mode": "image_generation",- "output_cost_per_token": 1e-05,"input_cost_per_image_token": 8e-06,"output_cost_per_image_token": 3e-05,"supported_endpoints": [@@ -60797,5 +60793,40 @@"supports_prompt_caching": true,"supports_response_schema": true,"supports_tool_choice": true+ },+ "openrouter/minimax/minimax-m3": {+ "input_cost_per_token": 3e-07,+ "output_cost_per_token": 1.2e-06,+ "litellm_provider": "openrouter",+ "max_input_tokens": 1048576,+ "max_output_tokens": 512000,+ "max_tokens": 512000,+ "mode": "chat",+ "source": "https://openrouter.ai/minimax/minimax-m3",+ "supports_function_calling": true,+ "supports_tool_choice": true,+ "supports_reasoning": true,+ "supports_response_schema": true,+ "supports_vision": true,+ "cache_read_input_token_cost": 6e-08,+ "supports_prompt_caching": true+ },+ "openrouter/qwen/qwen3.7-plus": {+ "input_cost_per_token": 3.2e-07,+ "output_cost_per_token": 1.28e-06,+ "litellm_provider": "openrouter",+ "max_input_tokens": 1000000,+ "max_output_tokens": 131072,+ "max_tokens": 131072,+ "mode": "chat",+ "source": "https://openrouter.ai/qwen/qwen3.7-plus",+ "supports_function_calling": true,+ "supports_tool_choice": true,+ "supports_reasoning": true,+ "supports_response_schema": true,+ "supports_vision": true,+ "cache_read_input_token_cost": 6.4e-08,+ "supports_prompt_caching": true,+ "cache_creation_input_token_cost": 4e-07}}diff --git a/model_prices_and_context_window.json b/model_prices_and_context_window.jsonindex 01bb7d434f5..1a92d78b053 100644--- a/model_prices_and_context_window.json+++ b/model_prices_and_context_window.json@@ -8296,7 +8296,6 @@"input_cost_per_image_token": 8e-06,"litellm_provider": "azure","mode": "image_generation",- "output_cost_per_token": 1e-05,"output_cost_per_image_token": 3e-05,"supported_endpoints": ["/v1/images/generations",@@ -8312,7 +8311,6 @@"input_cost_per_image_token": 8e-06,"litellm_provider": "azure","mode": "image_generation",- "output_cost_per_token": 1e-05,"output_cost_per_image_token": 3e-05,"supported_endpoints": ["/v1/images/generations",@@ -29225,7 +29223,6 @@"input_cost_per_token": 5e-06,"litellm_provider": "openai","mode": "image_generation",- "output_cost_per_token": 1e-05,"input_cost_per_image_token": 8e-06,"output_cost_per_image_token": 3e-05,"supported_endpoints": [@@ -29240,7 +29237,6 @@"input_cost_per_token": 5e-06,"litellm_provider": "openai","mode": "image_generation",- "output_cost_per_token": 1e-05,"input_cost_per_image_token": 8e-06,"output_cost_per_image_token": 3e-05,"supported_endpoints": [@@ -60797,5 +60793,40 @@"supports_prompt_caching": true,"supports_response_schema": true,"supports_tool_choice": true+ },+ "openrouter/minimax/minimax-m3": {+ "input_cost_per_token": 3e-07,+ "output_cost_per_token": 1.2e-06,+ "litellm_provider": "openrouter",+ "max_input_tokens": 1048576,+ "max_output_tokens": 512000,+ "max_tokens": 512000,+ "mode": "chat",+ "source": "https://openrouter.ai/minimax/minimax-m3",+ "supports_function_calling": true,+ "supports_tool_choice": true,+ "supports_reasoning": true,+ "supports_response_schema": true,+ "supports_vision": true,+ "cache_read_input_token_cost": 6e-08,+ "supports_prompt_caching": true+ },+ "openrouter/qwen/qwen3.7-plus": {+ "input_cost_per_token": 3.2e-07,+ "output_cost_per_token": 1.28e-06,+ "litellm_provider": "openrouter",+ "max_input_tokens": 1000000,+ "max_output_tokens": 131072,+ "max_tokens": 131072,+ "mode": "chat",+ "source": "https://openrouter.ai/qwen/qwen3.7-plus",+ "supports_function_calling": true,+ "supports_tool_choice": true,+ "supports_reasoning": true,+ "supports_response_schema": true,+ "supports_vision": true,+ "cache_read_input_token_cost": 6.4e-08,+ "supports_prompt_caching": true,+ "cache_creation_input_token_cost": 4e-07}}diff --git a/tests/test_litellm/test_gpt_image_cost_calculator.py b/tests/test_litellm/test_gpt_image_cost_calculator.pyindex d3ec0673fe3..86a721f8743 100644--- a/tests/test_litellm/test_gpt_image_cost_calculator.py+++ b/tests/test_litellm/test_gpt_image_cost_calculator.py@@ -172,8 +172,7 @@ class TestGPTImageCostCalculator:image_tokens=500,),completion_tokens_details=CompletionTokensDetailsWrapper(- text_tokens=1000,- image_tokens=4000,+ image_tokens=5000,),)@@ -189,12 +188,7 @@ class TestGPTImageCostCalculator:custom_llm_provider="openai",)- # GPT Image 2 pricing:- # Text input: 100 * $5/1M = 0.0005- # Image input: 500 * $8/1M = 0.004- # Text output: 1000 * $10/1M = 0.01- # Image output: 4000 * $30/1M = 0.12- expected_cost = 0.0005 + 0.004 + 0.01 + 0.12+ expected_cost = 100 * 5e-6 + 500 * 8e-6 + 5000 * 3e-5assert abs(cost - expected_cost) < 1e-6, f"Expected {expected_cost}, got {cost}"@@ -429,10 +423,7 @@ class TestGPTImage2OutputImageTokensNoBreakdown:f"are likely being priced at the text output_cost_per_token rate.")- def test_gpt_image_2_chat_usage_without_breakdown_is_costed_not_zero(self):- """A chat ``Usage`` with ``completion_tokens_details=None`` must still be- costed via ``generic_cost_per_token`` (output at the text rate) rather than- erroring or silently returning 0.0."""+ def test_gpt_image_2_chat_usage_without_breakdown_uses_image_rate(self):from litellm.llms.openai.image_generation.cost_calculator import (cost_calculator,)@@ -460,9 +451,7 @@ class TestGPTImage2OutputImageTokensNoBreakdown:custom_llm_provider="openai",)- # No output breakdown -> output priced at the text rate (output_cost_per_token):- # text in 100*$5/1M + image in 500*$8/1M + output 5000*$10/1M- expected_cost = 100 * 5e-6 + 500 * 8e-6 + 5000 * 1e-5+ expected_cost = 100 * 5e-6 + 500 * 8e-6 + 5000 * 3e-5assert abs(cost - expected_cost) < 1e-6, f"Expected {expected_cost}, got {cost}"diff --git a/tests/test_litellm/test_utils.py b/tests/test_litellm/test_utils.pyindex 38a09415ed0..a170bbee8e2 100644--- a/tests/test_litellm/test_utils.py+++ b/tests/test_litellm/test_utils.py@@ -430,7 +430,7 @@ def test_gpt_image_2_provider_and_model_info(local_model_cost_map):assert model_info["mode"] == "image_generation"assert model_info["input_cost_per_token"] == 5e-06assert model_info["input_cost_per_image_token"] == 8e-06- assert model_info["output_cost_per_token"] == 1e-05+ assert model_info["output_cost_per_token"] == 0assert model_info["output_cost_per_image_token"] == 3e-05assert ("/v1/images/generations"@@ -472,7 +472,7 @@ def test_azure_gpt_image_2_model_info(local_model_cost_map):assert model_info["mode"] == "image_generation"assert model_info["input_cost_per_token"] == 5e-06assert model_info["input_cost_per_image_token"] == 8e-06- assert model_info["output_cost_per_token"] == 1e-05+ assert model_info["output_cost_per_token"] == 0assert model_info["output_cost_per_image_token"] == 3e-05