Skip to content

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]

add xai/grok-code-fast (#14054)

Ishaan Jaff81db36c06c40
diff --git a/litellm/model_prices_and_context_window_backup.json b/litellm/model_prices_and_context_window_backup.json
index b33e3d9d9eb..122c87553f1 100644
--- a/litellm/model_prices_and_context_window_backup.json
+++ b/litellm/model_prices_and_context_window_backup.json
@@ -5598,6 +5598,48 @@
"supports_tool_choice": true,
"supports_web_search": true
},
+ "xai/grok-code-fast-1": {
+ "max_tokens": 256000,
+ "max_input_tokens": 256000,
+ "max_output_tokens": 256000,
+ "input_cost_per_token": 0.2e-06,
+ "output_cost_per_token": 1.5e-06,
+ "cache_read_input_token_cost": 0.02e-06,
+ "litellm_provider": "xai",
+ "mode": "chat",
+ "supports_function_calling": true,
+ "supports_tool_choice": true,
+ "supports_reasoning": true,
+ "source": "https://docs.x.ai/docs/models"
+ },
+ "xai/grok-code-fast": {
+ "max_tokens": 256000,
+ "max_input_tokens": 256000,
+ "max_output_tokens": 256000,
+ "input_cost_per_token": 0.2e-06,
+ "output_cost_per_token": 1.5e-06,
+ "cache_read_input_token_cost": 0.02e-06,
+ "litellm_provider": "xai",
+ "mode": "chat",
+ "supports_function_calling": true,
+ "supports_tool_choice": true,
+ "supports_reasoning": true,
+ "source": "https://docs.x.ai/docs/models"
+ },
+ "xai/grok-code-fast-1-0825": {
+ "max_tokens": 256000,
+ "max_input_tokens": 256000,
+ "max_output_tokens": 256000,
+ "input_cost_per_token": 0.2e-06,
+ "output_cost_per_token": 1.5e-06,
+ "cache_read_input_token_cost": 0.02e-06,
+ "litellm_provider": "xai",
+ "mode": "chat",
+ "supports_function_calling": true,
+ "supports_tool_choice": true,
+ "supports_reasoning": true,
+ "source": "https://docs.x.ai/docs/models"
+ },
"xai/grok-4": {
"max_tokens": 256000,
"max_input_tokens": 256000,
diff --git a/model_prices_and_context_window.json b/model_prices_and_context_window.json
index b33e3d9d9eb..122c87553f1 100644
--- a/model_prices_and_context_window.json
+++ b/model_prices_and_context_window.json
@@ -5598,6 +5598,48 @@
"supports_tool_choice": true,
"supports_web_search": true
},
+ "xai/grok-code-fast-1": {
+ "max_tokens": 256000,
+ "max_input_tokens": 256000,
+ "max_output_tokens": 256000,
+ "input_cost_per_token": 0.2e-06,
+ "output_cost_per_token": 1.5e-06,
+ "cache_read_input_token_cost": 0.02e-06,
+ "litellm_provider": "xai",
+ "mode": "chat",
+ "supports_function_calling": true,
+ "supports_tool_choice": true,
+ "supports_reasoning": true,
+ "source": "https://docs.x.ai/docs/models"
+ },
+ "xai/grok-code-fast": {
+ "max_tokens": 256000,
+ "max_input_tokens": 256000,
+ "max_output_tokens": 256000,
+ "input_cost_per_token": 0.2e-06,
+ "output_cost_per_token": 1.5e-06,
+ "cache_read_input_token_cost": 0.02e-06,
+ "litellm_provider": "xai",
+ "mode": "chat",
+ "supports_function_calling": true,
+ "supports_tool_choice": true,
+ "supports_reasoning": true,
+ "source": "https://docs.x.ai/docs/models"
+ },
+ "xai/grok-code-fast-1-0825": {
+ "max_tokens": 256000,
+ "max_input_tokens": 256000,
+ "max_output_tokens": 256000,
+ "input_cost_per_token": 0.2e-06,
+ "output_cost_per_token": 1.5e-06,
+ "cache_read_input_token_cost": 0.02e-06,
+ "litellm_provider": "xai",
+ "mode": "chat",
+ "supports_function_calling": true,
+ "supports_tool_choice": true,
+ "supports_reasoning": true,
+ "source": "https://docs.x.ai/docs/models"
+ },
"xai/grok-4": {
"max_tokens": 256000,
"max_input_tokens": 256000,