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: update sonnet 4 configs to reflect million-context-window pricing
Daniel Kleinb8b30775a4c0
diff --git a/litellm/model_prices_and_context_window_backup.json b/litellm/model_prices_and_context_window_backup.jsonindex 5e5bccb81e8..ecb71297690 100644--- a/litellm/model_prices_and_context_window_backup.json+++ b/litellm/model_prices_and_context_window_backup.json@@ -500,10 +500,14 @@"cache_creation_input_token_cost": 3.75e-06,"cache_read_input_token_cost": 3e-07,"input_cost_per_token": 3e-06,+ "input_cost_per_token_above_200k_tokens": 6e-06,+ "output_cost_per_token_above_200k_tokens": 2.25e-05,+ "cache_creation_input_token_cost_above_200k_tokens": 7.5e-06,+ "cache_read_input_token_cost_above_200k_tokens": 6e-07,"litellm_provider": "bedrock_converse",- "max_input_tokens": 200000,- "max_output_tokens": 64000,- "max_tokens": 64000,+ "max_input_tokens": 1000000,+ "max_output_tokens": 1000000,+ "max_tokens": 1000000,"mode": "chat","output_cost_per_token": 1.5e-05,"search_context_cost_per_query": {@@ -764,10 +768,14 @@"cache_creation_input_token_cost": 3.75e-06,"cache_read_input_token_cost": 3e-07,"input_cost_per_token": 3e-06,+ "input_cost_per_token_above_200k_tokens": 6e-06,+ "output_cost_per_token_above_200k_tokens": 2.25e-05,+ "cache_creation_input_token_cost_above_200k_tokens": 7.5e-06,+ "cache_read_input_token_cost_above_200k_tokens": 6e-07,"litellm_provider": "bedrock_converse",- "max_input_tokens": 200000,- "max_output_tokens": 64000,- "max_tokens": 64000,+ "max_input_tokens": 1000000,+ "max_output_tokens": 1000000,+ "max_tokens": 1000000,"mode": "chat","output_cost_per_token": 1.5e-05,"search_context_cost_per_query": {@@ -4727,10 +4735,14 @@"cache_creation_input_token_cost_above_1hr": 6e-06,"cache_read_input_token_cost": 3e-07,"input_cost_per_token": 3e-06,+ "input_cost_per_token_above_200k_tokens": 6e-06,+ "output_cost_per_token_above_200k_tokens": 2.25e-05,+ "cache_creation_input_token_cost_above_200k_tokens": 7.5e-06,+ "cache_read_input_token_cost_above_200k_tokens": 6e-07,"litellm_provider": "anthropic",- "max_input_tokens": 200000,- "max_output_tokens": 64000,- "max_tokens": 64000,+ "max_input_tokens": 1000000,+ "max_output_tokens": 1000000,+ "max_tokens": 1000000,"mode": "chat","output_cost_per_token": 1.5e-05,"search_context_cost_per_query": {@@ -7487,10 +7499,14 @@"cache_creation_input_token_cost": 3.75e-06,"cache_read_input_token_cost": 3e-07,"input_cost_per_token": 3e-06,+ "input_cost_per_token_above_200k_tokens": 6e-06,+ "output_cost_per_token_above_200k_tokens": 2.25e-05,+ "cache_creation_input_token_cost_above_200k_tokens": 7.5e-06,+ "cache_read_input_token_cost_above_200k_tokens": 6e-07,"litellm_provider": "bedrock_converse",- "max_input_tokens": 200000,- "max_output_tokens": 64000,- "max_tokens": 64000,+ "max_input_tokens": 1000000,+ "max_output_tokens": 1000000,+ "max_tokens": 1000000,"mode": "chat","output_cost_per_token": 1.5e-05,"search_context_cost_per_query": {@@ -16036,10 +16052,12 @@"openrouter/anthropic/claude-sonnet-4": {"input_cost_per_image": 0.0048,"input_cost_per_token": 3e-06,+ "input_cost_per_token_above_200k_tokens": 6e-06,+ "output_cost_per_token_above_200k_tokens": 2.25e-05,"litellm_provider": "openrouter",- "max_input_tokens": 200000,- "max_output_tokens": 64000,- "max_tokens": 64000,+ "max_input_tokens": 1000000,+ "max_output_tokens": 1000000,+ "max_tokens": 1000000,"mode": "chat","output_cost_per_token": 1.5e-05,"supports_assistant_prefill": true,@@ -18885,10 +18903,14 @@"cache_creation_input_token_cost": 3.75e-06,"cache_read_input_token_cost": 3e-07,"input_cost_per_token": 3e-06,+ "input_cost_per_token_above_200k_tokens": 6e-06,+ "output_cost_per_token_above_200k_tokens": 2.25e-05,+ "cache_creation_input_token_cost_above_200k_tokens": 7.5e-06,+ "cache_read_input_token_cost_above_200k_tokens": 6e-07,"litellm_provider": "bedrock_converse",- "max_input_tokens": 200000,- "max_output_tokens": 64000,- "max_tokens": 64000,+ "max_input_tokens": 1000000,+ "max_output_tokens": 1000000,+ "max_tokens": 1000000,"mode": "chat","output_cost_per_token": 1.5e-05,"search_context_cost_per_query": {@@ -20221,10 +20243,14 @@"cache_creation_input_token_cost": 3.75e-06,"cache_read_input_token_cost": 3e-07,"input_cost_per_token": 3e-06,+ "input_cost_per_token_above_200k_tokens": 6e-06,+ "output_cost_per_token_above_200k_tokens": 2.25e-05,+ "cache_creation_input_token_cost_above_200k_tokens": 7.5e-06,+ "cache_read_input_token_cost_above_200k_tokens": 6e-07,"litellm_provider": "vertex_ai-anthropic_models",- "max_input_tokens": 200000,- "max_output_tokens": 64000,- "max_tokens": 64000,+ "max_input_tokens": 1000000,+ "max_output_tokens": 1000000,+ "max_tokens": 1000000,"mode": "chat","output_cost_per_token": 1.5e-05,"search_context_cost_per_query": {@@ -20247,10 +20273,14 @@"cache_creation_input_token_cost": 3.75e-06,"cache_read_input_token_cost": 3e-07,"input_cost_per_token": 3e-06,+ "input_cost_per_token_above_200k_tokens": 6e-06,+ "output_cost_per_token_above_200k_tokens": 2.25e-05,+ "cache_creation_input_token_cost_above_200k_tokens": 7.5e-06,+ "cache_read_input_token_cost_above_200k_tokens": 6e-07,"litellm_provider": "vertex_ai-anthropic_models",- "max_input_tokens": 200000,- "max_output_tokens": 64000,- "max_tokens": 64000,+ "max_input_tokens": 1000000,+ "max_output_tokens": 1000000,+ "max_tokens": 1000000,"mode": "chat","output_cost_per_token": 1.5e-05,"search_context_cost_per_query": {diff --git a/model_prices_and_context_window.json b/model_prices_and_context_window.jsonindex 5e5bccb81e8..ecb71297690 100644--- a/model_prices_and_context_window.json+++ b/model_prices_and_context_window.json@@ -500,10 +500,14 @@"cache_creation_input_token_cost": 3.75e-06,"cache_read_input_token_cost": 3e-07,"input_cost_per_token": 3e-06,+ "input_cost_per_token_above_200k_tokens": 6e-06,+ "output_cost_per_token_above_200k_tokens": 2.25e-05,+ "cache_creation_input_token_cost_above_200k_tokens": 7.5e-06,+ "cache_read_input_token_cost_above_200k_tokens": 6e-07,"litellm_provider": "bedrock_converse",- "max_input_tokens": 200000,- "max_output_tokens": 64000,- "max_tokens": 64000,+ "max_input_tokens": 1000000,+ "max_output_tokens": 1000000,+ "max_tokens": 1000000,"mode": "chat","output_cost_per_token": 1.5e-05,"search_context_cost_per_query": {@@ -764,10 +768,14 @@"cache_creation_input_token_cost": 3.75e-06,"cache_read_input_token_cost": 3e-07,"input_cost_per_token": 3e-06,+ "input_cost_per_token_above_200k_tokens": 6e-06,+ "output_cost_per_token_above_200k_tokens": 2.25e-05,+ "cache_creation_input_token_cost_above_200k_tokens": 7.5e-06,+ "cache_read_input_token_cost_above_200k_tokens": 6e-07,"litellm_provider": "bedrock_converse",- "max_input_tokens": 200000,- "max_output_tokens": 64000,- "max_tokens": 64000,+ "max_input_tokens": 1000000,+ "max_output_tokens": 1000000,+ "max_tokens": 1000000,"mode": "chat","output_cost_per_token": 1.5e-05,"search_context_cost_per_query": {@@ -4727,10 +4735,14 @@"cache_creation_input_token_cost_above_1hr": 6e-06,"cache_read_input_token_cost": 3e-07,"input_cost_per_token": 3e-06,+ "input_cost_per_token_above_200k_tokens": 6e-06,+ "output_cost_per_token_above_200k_tokens": 2.25e-05,+ "cache_creation_input_token_cost_above_200k_tokens": 7.5e-06,+ "cache_read_input_token_cost_above_200k_tokens": 6e-07,"litellm_provider": "anthropic",- "max_input_tokens": 200000,- "max_output_tokens": 64000,- "max_tokens": 64000,+ "max_input_tokens": 1000000,+ "max_output_tokens": 1000000,+ "max_tokens": 1000000,"mode": "chat","output_cost_per_token": 1.5e-05,"search_context_cost_per_query": {@@ -7487,10 +7499,14 @@"cache_creation_input_token_cost": 3.75e-06,"cache_read_input_token_cost": 3e-07,"input_cost_per_token": 3e-06,+ "input_cost_per_token_above_200k_tokens": 6e-06,+ "output_cost_per_token_above_200k_tokens": 2.25e-05,+ "cache_creation_input_token_cost_above_200k_tokens": 7.5e-06,+ "cache_read_input_token_cost_above_200k_tokens": 6e-07,"litellm_provider": "bedrock_converse",- "max_input_tokens": 200000,- "max_output_tokens": 64000,- "max_tokens": 64000,+ "max_input_tokens": 1000000,+ "max_output_tokens": 1000000,+ "max_tokens": 1000000,"mode": "chat","output_cost_per_token": 1.5e-05,"search_context_cost_per_query": {@@ -16036,10 +16052,12 @@"openrouter/anthropic/claude-sonnet-4": {"input_cost_per_image": 0.0048,"input_cost_per_token": 3e-06,+ "input_cost_per_token_above_200k_tokens": 6e-06,+ "output_cost_per_token_above_200k_tokens": 2.25e-05,"litellm_provider": "openrouter",- "max_input_tokens": 200000,- "max_output_tokens": 64000,- "max_tokens": 64000,+ "max_input_tokens": 1000000,+ "max_output_tokens": 1000000,+ "max_tokens": 1000000,"mode": "chat","output_cost_per_token": 1.5e-05,"supports_assistant_prefill": true,@@ -18885,10 +18903,14 @@"cache_creation_input_token_cost": 3.75e-06,"cache_read_input_token_cost": 3e-07,"input_cost_per_token": 3e-06,+ "input_cost_per_token_above_200k_tokens": 6e-06,+ "output_cost_per_token_above_200k_tokens": 2.25e-05,+ "cache_creation_input_token_cost_above_200k_tokens": 7.5e-06,+ "cache_read_input_token_cost_above_200k_tokens": 6e-07,"litellm_provider": "bedrock_converse",- "max_input_tokens": 200000,- "max_output_tokens": 64000,- "max_tokens": 64000,+ "max_input_tokens": 1000000,+ "max_output_tokens": 1000000,+ "max_tokens": 1000000,"mode": "chat","output_cost_per_token": 1.5e-05,"search_context_cost_per_query": {@@ -20221,10 +20243,14 @@"cache_creation_input_token_cost": 3.75e-06,"cache_read_input_token_cost": 3e-07,"input_cost_per_token": 3e-06,+ "input_cost_per_token_above_200k_tokens": 6e-06,+ "output_cost_per_token_above_200k_tokens": 2.25e-05,+ "cache_creation_input_token_cost_above_200k_tokens": 7.5e-06,+ "cache_read_input_token_cost_above_200k_tokens": 6e-07,"litellm_provider": "vertex_ai-anthropic_models",- "max_input_tokens": 200000,- "max_output_tokens": 64000,- "max_tokens": 64000,+ "max_input_tokens": 1000000,+ "max_output_tokens": 1000000,+ "max_tokens": 1000000,"mode": "chat","output_cost_per_token": 1.5e-05,"search_context_cost_per_query": {@@ -20247,10 +20273,14 @@"cache_creation_input_token_cost": 3.75e-06,"cache_read_input_token_cost": 3e-07,"input_cost_per_token": 3e-06,+ "input_cost_per_token_above_200k_tokens": 6e-06,+ "output_cost_per_token_above_200k_tokens": 2.25e-05,+ "cache_creation_input_token_cost_above_200k_tokens": 7.5e-06,+ "cache_read_input_token_cost_above_200k_tokens": 6e-07,"litellm_provider": "vertex_ai-anthropic_models",- "max_input_tokens": 200000,- "max_output_tokens": 64000,- "max_tokens": 64000,+ "max_input_tokens": 1000000,+ "max_output_tokens": 1000000,+ "max_tokens": 1000000,"mode": "chat","output_cost_per_token": 1.5e-05,"search_context_cost_per_query": {