@@ -158,7 +158,7 @@ export interface ComputerTool {
158
158
/**
159
159
* The type of computer environment to control.
160
160
*/
161
- environment : 'mac' | 'windows ' | 'ubuntu' | 'browser' ;
161
+ environment : 'windows' | ' mac' | 'linux ' | 'ubuntu' | 'browser' ;
162
162
163
163
/**
164
164
* The type of the computer use tool. Always `computer_use_preview`.
@@ -209,9 +209,9 @@ export interface FileSearchTool {
209
209
vector_store_ids : Array < string > ;
210
210
211
211
/**
212
- * A filter to apply based on file attributes .
212
+ * A filter to apply.
213
213
*/
214
- filters ?: Shared . ComparisonFilter | Shared . CompoundFilter ;
214
+ filters ?: Shared . ComparisonFilter | Shared . CompoundFilter | null ;
215
215
216
216
/**
217
217
* The maximum number of results to return. This number should be between 1 and 50
@@ -258,12 +258,12 @@ export interface FunctionTool {
258
258
/**
259
259
* A JSON schema object describing the parameters of the function.
260
260
*/
261
- parameters : Record < string , unknown > ;
261
+ parameters : Record < string , unknown > | null ;
262
262
263
263
/**
264
264
* Whether to enforce strict parameter validation. Default `true`.
265
265
*/
266
- strict : boolean ;
266
+ strict : boolean | null ;
267
267
268
268
/**
269
269
* The type of the function tool. Always `function`.
@@ -1581,11 +1581,17 @@ export interface ResponseInProgressEvent {
1581
1581
* - `message.input_image.image_url`: Include image urls from the input message.
1582
1582
* - `computer_call_output.output.image_url`: Include image urls from the computer
1583
1583
* call output.
1584
+ * - `reasoning.encrypted_content`: Includes an encrypted version of reasoning
1585
+ * tokens in reasoning item outputs. This enables reasoning items to be used in
1586
+ * multi-turn conversations when using the Responses API statelessly (like when
1587
+ * the `store` parameter is set to `false`, or when an organization is enrolled
1588
+ * in the zero data retention program).
1584
1589
*/
1585
1590
export type ResponseIncludable =
1586
1591
| 'file_search_call.results'
1587
1592
| 'message.input_image.image_url'
1588
- | 'computer_call_output.output.image_url' ;
1593
+ | 'computer_call_output.output.image_url'
1594
+ | 'reasoning.encrypted_content' ;
1589
1595
1590
1596
/**
1591
1597
* An event that is emitted when a response finishes as incomplete.
@@ -1650,7 +1656,7 @@ export interface ResponseInputFile {
1650
1656
/**
1651
1657
* The ID of the file to be sent to the model.
1652
1658
*/
1653
- file_id ?: string ;
1659
+ file_id ?: string | null ;
1654
1660
1655
1661
/**
1656
1662
* The name of the file to be sent to the model.
@@ -1667,7 +1673,7 @@ export interface ResponseInputImage {
1667
1673
* The detail level of the image to be sent to the model. One of `high`, `low`, or
1668
1674
* `auto`. Defaults to `auto`.
1669
1675
*/
1670
- detail : 'high ' | 'low ' | 'auto' ;
1676
+ detail : 'low ' | 'high ' | 'auto' ;
1671
1677
1672
1678
/**
1673
1679
* The type of the input item. Always `input_image`.
@@ -1758,19 +1764,19 @@ export namespace ResponseInputItem {
1758
1764
/**
1759
1765
* The ID of the computer tool call output.
1760
1766
*/
1761
- id ?: string ;
1767
+ id ?: string | null ;
1762
1768
1763
1769
/**
1764
1770
* The safety checks reported by the API that have been acknowledged by the
1765
1771
* developer.
1766
1772
*/
1767
- acknowledged_safety_checks ?: Array < ComputerCallOutput . AcknowledgedSafetyCheck > ;
1773
+ acknowledged_safety_checks ?: Array < ComputerCallOutput . AcknowledgedSafetyCheck > | null ;
1768
1774
1769
1775
/**
1770
1776
* The status of the message input. One of `in_progress`, `completed`, or
1771
1777
* `incomplete`. Populated when input items are returned via API.
1772
1778
*/
1773
- status ?: 'in_progress' | 'completed' | 'incomplete' ;
1779
+ status ?: 'in_progress' | 'completed' | 'incomplete' | null ;
1774
1780
}
1775
1781
1776
1782
export namespace ComputerCallOutput {
@@ -1786,12 +1792,12 @@ export namespace ResponseInputItem {
1786
1792
/**
1787
1793
* The type of the pending safety check.
1788
1794
*/
1789
- code : string ;
1795
+ code ? : string | null ;
1790
1796
1791
1797
/**
1792
1798
* Details about the pending safety check.
1793
1799
*/
1794
- message : string ;
1800
+ message ? : string | null ;
1795
1801
}
1796
1802
}
1797
1803
@@ -1818,13 +1824,13 @@ export namespace ResponseInputItem {
1818
1824
* The unique ID of the function tool call output. Populated when this item is
1819
1825
* returned via API.
1820
1826
*/
1821
- id ?: string ;
1827
+ id ?: string | null ;
1822
1828
1823
1829
/**
1824
1830
* The status of the item. One of `in_progress`, `completed`, or `incomplete`.
1825
1831
* Populated when items are returned via API.
1826
1832
*/
1827
- status ?: 'in_progress' | 'completed' | 'incomplete' ;
1833
+ status ?: 'in_progress' | 'completed' | 'incomplete' | null ;
1828
1834
}
1829
1835
1830
1836
/**
@@ -1839,7 +1845,7 @@ export namespace ResponseInputItem {
1839
1845
/**
1840
1846
* The type of item to reference. Always `item_reference`.
1841
1847
*/
1842
- type : 'item_reference' ;
1848
+ type ? : 'item_reference' | null ;
1843
1849
}
1844
1850
}
1845
1851
@@ -2119,7 +2125,9 @@ export namespace ResponseOutputText {
2119
2125
2120
2126
/**
2121
2127
* A description of the chain of thought used by a reasoning model while generating
2122
- * a response.
2128
+ * a response. Be sure to include these items in your `input` to the Responses API
2129
+ * for subsequent turns of a conversation if you are manually
2130
+ * [managing context](https://platform.openai.com/docs/guides/conversation-state).
2123
2131
*/
2124
2132
export interface ResponseReasoningItem {
2125
2133
/**
@@ -2137,6 +2145,12 @@ export interface ResponseReasoningItem {
2137
2145
*/
2138
2146
type : 'reasoning' ;
2139
2147
2148
+ /**
2149
+ * The encrypted content of the reasoning item - populated when a response is
2150
+ * generated with `reasoning.encrypted_content` in the `include` parameter.
2151
+ */
2152
+ encrypted_content ?: string | null ;
2153
+
2140
2154
/**
2141
2155
* The status of the item. One of `in_progress`, `completed`, or `incomplete`.
2142
2156
* Populated when items are returned via API.
@@ -2730,11 +2744,9 @@ export interface ResponseWebSearchCallSearchingEvent {
2730
2744
}
2731
2745
2732
2746
/**
2733
- * A tool that searches for relevant content from uploaded files. Learn more about
2734
- * the
2735
- * [file search tool](https://platform.openai.com/docs/guides/tools-file-search).
2747
+ * A tool that can be used to generate a response.
2736
2748
*/
2737
- export type Tool = FileSearchTool | FunctionTool | ComputerTool | WebSearchTool ;
2749
+ export type Tool = FileSearchTool | FunctionTool | WebSearchTool | ComputerTool ;
2738
2750
2739
2751
/**
2740
2752
* Use this option to force the model to call a specific function.
@@ -2788,10 +2800,8 @@ export interface ToolChoiceTypes {
2788
2800
*/
2789
2801
export interface WebSearchTool {
2790
2802
/**
2791
- * The type of the web search tool. One of:
2792
- *
2793
- * - `web_search_preview`
2794
- * - `web_search_preview_2025_03_11`
2803
+ * The type of the web search tool. One of `web_search_preview` or
2804
+ * `web_search_preview_2025_03_11`.
2795
2805
*/
2796
2806
type : 'web_search_preview' | 'web_search_preview_2025_03_11' ;
2797
2807
@@ -2801,10 +2811,16 @@ export interface WebSearchTool {
2801
2811
*/
2802
2812
search_context_size ?: 'low' | 'medium' | 'high' ;
2803
2813
2814
+ /**
2815
+ * The user's location.
2816
+ */
2804
2817
user_location ?: WebSearchTool . UserLocation | null ;
2805
2818
}
2806
2819
2807
2820
export namespace WebSearchTool {
2821
+ /**
2822
+ * The user's location.
2823
+ */
2808
2824
export interface UserLocation {
2809
2825
/**
2810
2826
* The type of location approximation. Always `approximate`.
@@ -2814,24 +2830,24 @@ export namespace WebSearchTool {
2814
2830
/**
2815
2831
* Free text input for the city of the user, e.g. `San Francisco`.
2816
2832
*/
2817
- city ?: string ;
2833
+ city ?: string | null ;
2818
2834
2819
2835
/**
2820
2836
* The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of
2821
2837
* the user, e.g. `US`.
2822
2838
*/
2823
- country ?: string ;
2839
+ country ?: string | null ;
2824
2840
2825
2841
/**
2826
2842
* Free text input for the region of the user, e.g. `California`.
2827
2843
*/
2828
- region ?: string ;
2844
+ region ?: string | null ;
2829
2845
2830
2846
/**
2831
2847
* The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the
2832
2848
* user, e.g. `America/Los_Angeles`.
2833
2849
*/
2834
- timezone ?: string ;
2850
+ timezone ?: string | null ;
2835
2851
}
2836
2852
}
2837
2853
@@ -2869,6 +2885,11 @@ export interface ResponseCreateParamsBase {
2869
2885
* - `message.input_image.image_url`: Include image urls from the input message.
2870
2886
* - `computer_call_output.output.image_url`: Include image urls from the computer
2871
2887
* call output.
2888
+ * - `reasoning.encrypted_content`: Includes an encrypted version of reasoning
2889
+ * tokens in reasoning item outputs. This enables reasoning items to be used in
2890
+ * multi-turn conversations when using the Responses API statelessly (like when
2891
+ * the `store` parameter is set to `false`, or when an organization is enrolled
2892
+ * in the zero data retention program).
2872
2893
*/
2873
2894
include ?: Array < ResponseIncludable > | null ;
2874
2895
0 commit comments