docs: clarify why is_model_gpt_5_search_model uses substring matching

supports_web_search in model info flags models that can use web search
as a tool, not search-only models with restricted params.
This commit is contained in:
Chesars
2026-03-02 17:41:20 -03:00
parent ec16bd3509
commit bfa611cb45
@@ -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