diff --git a/src/openai/types/beta/beta_response_function_web_search.py b/src/openai/types/beta/beta_response_function_web_search.py index af57015543..0cfdacb24a 100644 --- a/src/openai/types/beta/beta_response_function_web_search.py +++ b/src/openai/types/beta/beta_response_function_web_search.py @@ -86,10 +86,11 @@ class BetaResponseFunctionWebSearch(BaseModel): id: str """The unique ID of the web search tool call.""" - action: Action + action: Optional[Action] = None """ An object describing the specific action taken in this web search call. Includes - details on how the model used the web (search, open_page, find_in_page). + details on how the model used the web (search, open_page, find_in_page). May be + None when the search completed without a recorded action (e.g. cached results). """ status: Literal["in_progress", "searching", "completed", "failed"] diff --git a/src/openai/types/responses/response_function_web_search.py b/src/openai/types/responses/response_function_web_search.py index 44c6dd7a99..bbcdda03b9 100644 --- a/src/openai/types/responses/response_function_web_search.py +++ b/src/openai/types/responses/response_function_web_search.py @@ -78,10 +78,11 @@ class ResponseFunctionWebSearch(BaseModel): id: str """The unique ID of the web search tool call.""" - action: Action + action: Optional[Action] = None """ An object describing the specific action taken in this web search call. Includes - details on how the model used the web (search, open_page, find_in_page). + details on how the model used the web (search, open_page, find_in_page). May be + None when the search completed without a recorded action (e.g. cached results). """ status: Literal["in_progress", "searching", "completed", "failed"]