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
Added compatibility guidance, etc. for xAI Grok model (#8282)
Zhaohan Dong88e7046165f9
diff --git a/docs/my-website/docs/completion/function_call.md b/docs/my-website/docs/completion/function_call.mdindex 514e8cda1a2..f10df68bf6f 100644--- a/docs/my-website/docs/completion/function_call.md+++ b/docs/my-website/docs/completion/function_call.md@@ -8,6 +8,7 @@ Use `litellm.supports_function_calling(model="")` -> returns `True` if model supassert litellm.supports_function_calling(model="gpt-3.5-turbo") == Trueassert litellm.supports_function_calling(model="azure/gpt-4-1106-preview") == Trueassert litellm.supports_function_calling(model="palm/chat-bison") == False+assert litellm.supports_function_calling(model="xai/grok-2-latest") == Trueassert litellm.supports_function_calling(model="ollama/llama2") == False```diff --git a/docs/my-website/docs/completion/input.md b/docs/my-website/docs/completion/input.mdindex 67738a7f1cc..a8aa79b8cba 100644--- a/docs/my-website/docs/completion/input.md+++ b/docs/my-website/docs/completion/input.md@@ -44,6 +44,7 @@ Use `litellm.get_supported_openai_params()` for an updated list of params for ea|Anthropic| ✅ | ✅ | ✅ |✅ | ✅ | ✅ | ✅ | | | | | | |✅ | ✅ | | ✅ | ✅ | | | ✅ ||OpenAI| ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |✅ | ✅ | ✅ | ✅ |✅ | ✅ | ✅ | ✅ | ✅ ||Azure OpenAI| ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |✅ | ✅ | ✅ | ✅ |✅ | ✅ | | | ✅ |+|xAI| ✅ | | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | | | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ||Replicate | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | | | | | ||Anyscale | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ ||Cohere| ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | | |diff --git a/docs/my-website/docs/providers/xai.md b/docs/my-website/docs/providers/xai.mdindex 00a7197af4f..3faf7d10521 100644--- a/docs/my-website/docs/providers/xai.md+++ b/docs/my-website/docs/providers/xai.md@@ -1,13 +1,13 @@import Tabs from '@theme/Tabs';import TabItem from '@theme/TabItem';-# XAI+# xAIhttps://docs.x.ai/docs:::tip-**We support ALL XAI models, just set `model=xai/<any-model-on-xai>` as a prefix when sending litellm requests**+**We support ALL xAI models, just set `model=xai/<any-model-on-xai>` as a prefix when sending litellm requests**:::diff --git a/docs/my-website/docs/set_keys.md b/docs/my-website/docs/set_keys.mdindex 7e63b5a888b..3a5ff08d634 100644--- a/docs/my-website/docs/set_keys.md+++ b/docs/my-website/docs/set_keys.md@@ -30,6 +30,7 @@ import os# Set OpenAI API keyos.environ["OPENAI_API_KEY"] = "Your API Key"os.environ["ANTHROPIC_API_KEY"] = "Your API Key"+os.environ["XAI_API_KEY"] = "Your API Key"os.environ["REPLICATE_API_KEY"] = "Your API Key"os.environ["TOGETHERAI_API_KEY"] = "Your API Key"```