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]

refactor(xai): trim transform_request docstring that restated the code

yassin2ec59eebf6aa
diff --git a/litellm/llms/xai/chat/transformation.py b/litellm/llms/xai/chat/transformation.py
index c6462f10cc9..f9140601101 100644
--- a/litellm/llms/xai/chat/transformation.py
+++ b/litellm/llms/xai/chat/transformation.py
@@ -211,13 +211,7 @@ class XAIChatConfig(OpenAIGPTConfig):
litellm_params: dict,
headers: dict,
) -> dict:
- """
- Handle https://github.com/BerriAI/litellm/issues/9720
-
- Filter out 'name' from messages, and drop 'web_search_options': xAI retired Live Search on
- /v1/chat/completions and now answers those requests with a 410. xAI web search lives on the
- Responses API, where completion() bridges it to a native 'web_search' tool
- """
+ """Handle https://github.com/BerriAI/litellm/issues/9720"""
if "web_search_options" in optional_params:
verbose_logger.warning(
"XAI no longer supports web search on /chat/completions (Live Search is deprecated). "