@@ -1949,6 +1949,28 @@ export namespace ResponseFunctionWebSearch {
1949
1949
* The action type.
1950
1950
*/
1951
1951
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
+ }
1952
1974
}
1953
1975
1954
1976
/**
@@ -2124,6 +2146,12 @@ export interface ResponseInProgressEvent {
2124
2146
* Specify additional output data to include in the model response. Currently
2125
2147
* supported values are:
2126
2148
*
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.
2127
2155
* - `file_search_call.results`: Include the search results of the file search tool
2128
2156
* call.
2129
2157
* - `message.input_image.image_url`: Include image urls from the input message.
@@ -4625,15 +4653,90 @@ export interface ResponseWebSearchCallSearchingEvent {
4625
4653
export type Tool =
4626
4654
| FunctionTool
4627
4655
| FileSearchTool
4628
- | WebSearchTool
4629
4656
| ComputerTool
4657
+ | Tool . WebSearchTool
4630
4658
| Tool . Mcp
4631
4659
| Tool . CodeInterpreter
4632
4660
| Tool . ImageGeneration
4633
4661
| Tool . LocalShell
4634
- | CustomTool ;
4662
+ | CustomTool
4663
+ | WebSearchTool ;
4635
4664
4636
4665
export 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
+
4637
4740
/**
4638
4741
* Give the model access to additional tools via remote Model Context Protocol
4639
4742
* (MCP) servers.
@@ -5122,6 +5225,12 @@ export interface ResponseCreateParamsBase {
5122
5225
* Specify additional output data to include in the model response. Currently
5123
5226
* supported values are:
5124
5227
*
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.
5125
5234
* - `file_search_call.results`: Include the search results of the file search tool
5126
5235
* call.
5127
5236
* - `message.input_image.image_url`: Include image urls from the input message.
0 commit comments