diff --git a/src/openai/types/responses/response_function_web_search.py b/src/openai/types/responses/response_function_web_search.py index f3e80e6a8f..b77c7bd28f 100644 --- a/src/openai/types/responses/response_function_web_search.py +++ b/src/openai/types/responses/response_function_web_search.py @@ -10,11 +10,14 @@ class ActionSearchSource(BaseModel): - type: Literal["url"] - """The type of source. Always `url`.""" + type: Literal["url", "api"] + """The type of source. Can be 'url' for web sources or 'api' for specialized OpenAI APIs.""" - url: str - """The URL of the source.""" + url: Optional[str] = None + """The URL of the source (present when type='url').""" + + name: Optional[str] = None + """The name/identifier of the specialized API (e.g., 'oai-weather', 'oai-sports', 'oai-finance').""" class ActionSearch(BaseModel): diff --git a/src/openai/types/responses/response_function_web_search_param.py b/src/openai/types/responses/response_function_web_search_param.py index fc019d3eb7..317bc8bc17 100644 --- a/src/openai/types/responses/response_function_web_search_param.py +++ b/src/openai/types/responses/response_function_web_search_param.py @@ -16,11 +16,14 @@ class ActionSearchSource(TypedDict, total=False): - type: Required[Literal["url"]] - """The type of source. Always `url`.""" + type: Required[Literal["url", "api"]] + """The type of source. Can be 'url' for web sources or 'api' for specialized OpenAI APIs.""" - url: Required[str] - """The URL of the source.""" + url: str + """The URL of the source (present when type='url').""" + + name: str + """The name/identifier of the specialized API (e.g., 'oai-weather', 'oai-sports', 'oai-finance').""" class ActionSearch(TypedDict, total=False):