@@ -1949,6 +1949,28 @@ export namespace ResponseFunctionWebSearch {
19491949 * The action type.
19501950 */
19511951 type : 'search' ;
1952+
1953+ /**
1954+ * The sources used in the search.
1955+ */
1956+ sources ?: Array < Search . Source > ;
1957+ }
1958+
1959+ export namespace Search {
1960+ /**
1961+ * A source used in the search.
1962+ */
1963+ export interface Source {
1964+ /**
1965+ * The type of source. Always `url`.
1966+ */
1967+ type : 'url' ;
1968+
1969+ /**
1970+ * The URL of the source.
1971+ */
1972+ url : string ;
1973+ }
19521974 }
19531975
19541976 /**
@@ -2124,6 +2146,12 @@ export interface ResponseInProgressEvent {
21242146 * Specify additional output data to include in the model response. Currently
21252147 * supported values are:
21262148 *
2149+ * - `web_search_call.action.sources`: Include the sources of the web search tool
2150+ * call.
2151+ * - `code_interpreter_call.outputs`: Includes the outputs of python code execution
2152+ * in code interpreter tool call items.
2153+ * - `computer_call_output.output.image_url`: Include image urls from the computer
2154+ * call output.
21272155 * - `file_search_call.results`: Include the search results of the file search tool
21282156 * call.
21292157 * - `message.input_image.image_url`: Include image urls from the input message.
@@ -4625,15 +4653,90 @@ export interface ResponseWebSearchCallSearchingEvent {
46254653export type Tool =
46264654 | FunctionTool
46274655 | FileSearchTool
4628- | WebSearchTool
46294656 | ComputerTool
4657+ | Tool . WebSearchTool
46304658 | Tool . Mcp
46314659 | Tool . CodeInterpreter
46324660 | Tool . ImageGeneration
46334661 | Tool . LocalShell
4634- | CustomTool ;
4662+ | CustomTool
4663+ | WebSearchTool ;
46354664
46364665export namespace Tool {
4666+ /**
4667+ * Search the Internet for sources related to the prompt. Learn more about the
4668+ * [web search tool](https://platform.openai.com/docs/guides/tools-web-search).
4669+ */
4670+ export interface WebSearchTool {
4671+ /**
4672+ * The type of the web search tool. One of `web_search` or `web_search_2025_08_26`.
4673+ */
4674+ type : 'web_search' | 'web_search_2025_08_26' ;
4675+
4676+ /**
4677+ * Filters for the search.
4678+ */
4679+ filters ?: WebSearchTool . Filters | null ;
4680+
4681+ /**
4682+ * High level guidance for the amount of context window space to use for the
4683+ * search. One of `low`, `medium`, or `high`. `medium` is the default.
4684+ */
4685+ search_context_size ?: 'low' | 'medium' | 'high' ;
4686+
4687+ /**
4688+ * The approximate location of the user.
4689+ */
4690+ user_location ?: WebSearchTool . UserLocation | null ;
4691+ }
4692+
4693+ export namespace WebSearchTool {
4694+ /**
4695+ * Filters for the search.
4696+ */
4697+ export interface Filters {
4698+ /**
4699+ * Allowed domains for the search. If not provided, all domains are allowed.
4700+ * Subdomains of the provided domains are allowed as well.
4701+ *
4702+ * Example: `["pubmed.ncbi.nlm.nih.gov"]`
4703+ */
4704+ allowed_domains ?: Array < string > | null ;
4705+ }
4706+
4707+ /**
4708+ * The approximate location of the user.
4709+ */
4710+ export interface UserLocation {
4711+ /**
4712+ * Free text input for the city of the user, e.g. `San Francisco`.
4713+ */
4714+ city ?: string | null ;
4715+
4716+ /**
4717+ * The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of
4718+ * the user, e.g. `US`.
4719+ */
4720+ country ?: string | null ;
4721+
4722+ /**
4723+ * Free text input for the region of the user, e.g. `California`.
4724+ */
4725+ region ?: string | null ;
4726+
4727+ /**
4728+ * The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the
4729+ * user, e.g. `America/Los_Angeles`.
4730+ */
4731+ timezone ?: string | null ;
4732+
4733+ /**
4734+ * The type of location approximation. Always `approximate`.
4735+ */
4736+ type ?: 'approximate' ;
4737+ }
4738+ }
4739+
46374740 /**
46384741 * Give the model access to additional tools via remote Model Context Protocol
46394742 * (MCP) servers.
@@ -5122,6 +5225,12 @@ export interface ResponseCreateParamsBase {
51225225 * Specify additional output data to include in the model response. Currently
51235226 * supported values are:
51245227 *
5228+ * - `web_search_call.action.sources`: Include the sources of the web search tool
5229+ * call.
5230+ * - `code_interpreter_call.outputs`: Includes the outputs of python code execution
5231+ * in code interpreter tool call items.
5232+ * - `computer_call_output.output.image_url`: Include image urls from the computer
5233+ * call output.
51255234 * - `file_search_call.results`: Include the search results of the file search tool
51265235 * call.
51275236 * - `message.input_image.image_url`: Include image urls from the input message.
0 commit comments