Enable Web Search
The web search tool can be enabled via thechatModelOptions parameter of the
Agent constructor:
OpenAIServerSideTool.webSearch to turn the tool on for a request. Each
chunk includes the streaming progress events under metadata['web_search'].
Configure Context
contextSizetunes how much context the provider should gather (low/medium/ high/other)followupQuestionsrequests suggested follow-ups in metadata where supportedlocationnudges the search toward a city/region/country/time zone
Metadata Structure
The metadata list contains chronological events streamed by the provider. Each entry includes:type: the event identifier (e.g.response.web_search_call.started)query: text of the query that ranresults: snippets or URLs when the provider shares them

