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 openrouter grok4 (#13018)
Jugal D. Bhatt83526803639e
diff --git a/litellm/model_prices_and_context_window_backup.json b/litellm/model_prices_and_context_window_backup.jsonindex 40a07a74189..ef4891c2686 100644--- a/litellm/model_prices_and_context_window_backup.json+++ b/litellm/model_prices_and_context_window_backup.json@@ -10480,6 +10480,20 @@"supports_tool_choice": true,"supports_prompt_caching": true},+ "openrouter/x-ai/grok-4":{+ "max_tokens": 256000,+ "max_input_tokens": 256000,+ "max_output_tokens": 256000,+ "input_cost_per_token": 3e-06,+ "output_cost_per_token": 1.5e-05,+ "litellm_provider": "openrouter",+ "mode": "chat",+ "supports_function_calling": true,+ "supports_tool_choice": true,+ "supports_reasoning": true,+ "source": "https://openrouter.ai/x-ai/grok-4",+ "supports_web_search": true+ },"openrouter/bytedance/ui-tars-1.5-7b":{"max_tokens": 2048,"max_input_tokens": 131072,diff --git a/model_prices_and_context_window.json b/model_prices_and_context_window.jsonindex 40a07a74189..ef4891c2686 100644--- a/model_prices_and_context_window.json+++ b/model_prices_and_context_window.json@@ -10480,6 +10480,20 @@"supports_tool_choice": true,"supports_prompt_caching": true},+ "openrouter/x-ai/grok-4":{+ "max_tokens": 256000,+ "max_input_tokens": 256000,+ "max_output_tokens": 256000,+ "input_cost_per_token": 3e-06,+ "output_cost_per_token": 1.5e-05,+ "litellm_provider": "openrouter",+ "mode": "chat",+ "supports_function_calling": true,+ "supports_tool_choice": true,+ "supports_reasoning": true,+ "source": "https://openrouter.ai/x-ai/grok-4",+ "supports_web_search": true+ },"openrouter/bytedance/ui-tars-1.5-7b":{"max_tokens": 2048,"max_input_tokens": 131072,