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]

docs: clarify why is_model_gpt_5_search_model uses substring matching

Chesarsbfa611cb45ca
diff --git a/litellm/llms/openai/chat/gpt_5_transformation.py b/litellm/llms/openai/chat/gpt_5_transformation.py
index dcf876435f6..014e80f0a3a 100644
--- a/litellm/llms/openai/chat/gpt_5_transformation.py
+++ b/litellm/llms/openai/chat/gpt_5_transformation.py
@@ -25,7 +25,14 @@ class OpenAIGPT5Config(OpenAIGPTConfig):
@classmethod
def is_model_gpt_5_search_model(cls, model: str) -> bool:
- """Check if the model is a GPT-5 search variant (e.g. gpt-5-search-api)."""
+ """Check if the model is a GPT-5 search variant (e.g. gpt-5-search-api).
+
+ Search-only models have a severely restricted parameter set compared to
+ regular GPT-5 models. They are identified by name convention (contain
+ both ``gpt-5`` and ``search``). Note: ``supports_web_search`` in model
+ info is a *different* concept — it indicates a model can *use* web
+ search as a tool, which many non-search-only models also support.
+ """
return "gpt-5" in model and "search" in model
@classmethod