openai 7.8.0 → 7.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (175) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/auth/x509-transport.js +1 -1
  3. package/client.d.mts +3 -0
  4. package/client.d.mts.map +1 -1
  5. package/client.d.ts +3 -0
  6. package/client.d.ts.map +1 -1
  7. package/client.js +4 -1
  8. package/client.js.map +1 -1
  9. package/client.mjs +3 -0
  10. package/client.mjs.map +1 -1
  11. package/internal/auth/x509-credential-options.js +1 -1
  12. package/internal/auth/x509-token-exchange.js +1 -1
  13. package/internal/auth/x509-transport-capability.js +1 -1
  14. package/internal/auth/x509-transport-registry.js +1 -1
  15. package/internal/auth/x509-workload-identity-auth.js +1 -1
  16. package/lib/responses/ResponseInputItems.d.mts.map +1 -1
  17. package/lib/responses/ResponseInputItems.d.ts.map +1 -1
  18. package/lib/responses/ResponseInputItems.js +1 -0
  19. package/lib/responses/ResponseInputItems.js.map +1 -1
  20. package/lib/responses/ResponseInputItems.mjs +1 -0
  21. package/lib/responses/ResponseInputItems.mjs.map +1 -1
  22. package/package.json +7 -3
  23. package/resources/admin/organization/usage.d.mts +5 -0
  24. package/resources/admin/organization/usage.d.mts.map +1 -1
  25. package/resources/admin/organization/usage.d.ts +5 -0
  26. package/resources/admin/organization/usage.d.ts.map +1 -1
  27. package/resources/batches.d.mts +3 -3
  28. package/resources/batches.d.ts +3 -3
  29. package/resources/beta/beta.d.mts +2 -2
  30. package/resources/beta/beta.d.mts.map +1 -1
  31. package/resources/beta/beta.d.ts +2 -2
  32. package/resources/beta/beta.d.ts.map +1 -1
  33. package/resources/beta/beta.js.map +1 -1
  34. package/resources/beta/beta.mjs.map +1 -1
  35. package/resources/beta/index.d.mts +1 -1
  36. package/resources/beta/index.d.mts.map +1 -1
  37. package/resources/beta/index.d.ts +1 -1
  38. package/resources/beta/index.d.ts.map +1 -1
  39. package/resources/beta/index.js.map +1 -1
  40. package/resources/beta/index.mjs.map +1 -1
  41. package/resources/beta/responses/index.d.mts +1 -1
  42. package/resources/beta/responses/index.d.mts.map +1 -1
  43. package/resources/beta/responses/index.d.ts +1 -1
  44. package/resources/beta/responses/index.d.ts.map +1 -1
  45. package/resources/beta/responses/index.js.map +1 -1
  46. package/resources/beta/responses/index.mjs.map +1 -1
  47. package/resources/beta/responses/responses.d.mts +666 -39
  48. package/resources/beta/responses/responses.d.mts.map +1 -1
  49. package/resources/beta/responses/responses.d.ts +666 -39
  50. package/resources/beta/responses/responses.d.ts.map +1 -1
  51. package/resources/beta/responses/responses.js +1 -1
  52. package/resources/beta/responses/responses.js.map +1 -1
  53. package/resources/beta/responses/responses.mjs +1 -1
  54. package/resources/beta/responses/responses.mjs.map +1 -1
  55. package/resources/beta/responses/ws.d.mts.map +1 -1
  56. package/resources/beta/responses/ws.d.ts.map +1 -1
  57. package/resources/beta/responses/ws.js +1 -0
  58. package/resources/beta/responses/ws.js.map +1 -1
  59. package/resources/beta/responses/ws.mjs +1 -0
  60. package/resources/beta/responses/ws.mjs.map +1 -1
  61. package/resources/chat/completions/completions.d.mts +4 -4
  62. package/resources/chat/completions/completions.d.ts +4 -4
  63. package/resources/completions.d.mts +0 -4
  64. package/resources/completions.d.mts.map +1 -1
  65. package/resources/completions.d.ts +0 -4
  66. package/resources/completions.d.ts.map +1 -1
  67. package/resources/conversations/items.d.mts +1 -1
  68. package/resources/conversations/items.d.mts.map +1 -1
  69. package/resources/conversations/items.d.ts +1 -1
  70. package/resources/conversations/items.d.ts.map +1 -1
  71. package/resources/evals/evals.d.mts +4 -4
  72. package/resources/evals/evals.d.ts +4 -4
  73. package/resources/evals/runs/runs.d.mts +1 -1
  74. package/resources/evals/runs/runs.d.ts +1 -1
  75. package/resources/index.d.mts +1 -0
  76. package/resources/index.d.mts.map +1 -1
  77. package/resources/index.d.ts +1 -0
  78. package/resources/index.d.ts.map +1 -1
  79. package/resources/index.js +3 -1
  80. package/resources/index.js.map +1 -1
  81. package/resources/index.mjs +1 -0
  82. package/resources/index.mjs.map +1 -1
  83. package/resources/responses/responses.d.mts +1103 -495
  84. package/resources/responses/responses.d.mts.map +1 -1
  85. package/resources/responses/responses.d.ts +1103 -495
  86. package/resources/responses/responses.d.ts.map +1 -1
  87. package/resources/responses/responses.js +1 -1
  88. package/resources/responses/responses.js.map +1 -1
  89. package/resources/responses/responses.mjs +1 -1
  90. package/resources/responses/responses.mjs.map +1 -1
  91. package/resources/responses/ws.d.mts.map +1 -1
  92. package/resources/responses/ws.d.ts.map +1 -1
  93. package/resources/responses/ws.js +1 -0
  94. package/resources/responses/ws.js.map +1 -1
  95. package/resources/responses/ws.mjs +1 -0
  96. package/resources/responses/ws.mjs.map +1 -1
  97. package/resources/safety/alerts.d.mts +32 -0
  98. package/resources/safety/alerts.d.mts.map +1 -0
  99. package/resources/safety/alerts.d.ts +32 -0
  100. package/resources/safety/alerts.d.ts.map +1 -0
  101. package/resources/safety/alerts.js +16 -0
  102. package/resources/safety/alerts.js.map +1 -0
  103. package/resources/safety/alerts.mjs +12 -0
  104. package/resources/safety/alerts.mjs.map +1 -0
  105. package/resources/safety/index.d.mts +3 -0
  106. package/resources/safety/index.d.mts.map +1 -0
  107. package/resources/safety/index.d.ts +3 -0
  108. package/resources/safety/index.d.ts.map +1 -0
  109. package/resources/safety/index.js +9 -0
  110. package/resources/safety/index.js.map +1 -0
  111. package/resources/safety/index.mjs +4 -0
  112. package/resources/safety/index.mjs.map +1 -0
  113. package/resources/safety/safety.d.mts +10 -0
  114. package/resources/safety/safety.d.mts.map +1 -0
  115. package/resources/safety/safety.d.ts +10 -0
  116. package/resources/safety/safety.d.ts.map +1 -0
  117. package/resources/safety/safety.js +17 -0
  118. package/resources/safety/safety.js.map +1 -0
  119. package/resources/safety/safety.mjs +12 -0
  120. package/resources/safety/safety.mjs.map +1 -0
  121. package/resources/safety.d.mts +2 -0
  122. package/resources/safety.d.mts.map +1 -0
  123. package/resources/safety.d.ts +2 -0
  124. package/resources/safety.d.ts.map +1 -0
  125. package/resources/safety.js +6 -0
  126. package/resources/safety.js.map +1 -0
  127. package/resources/safety.mjs +3 -0
  128. package/resources/safety.mjs.map +1 -0
  129. package/resources/shared.d.mts +29 -3
  130. package/resources/shared.d.mts.map +1 -1
  131. package/resources/shared.d.ts +29 -3
  132. package/resources/shared.d.ts.map +1 -1
  133. package/resources/videos.d.mts +28 -0
  134. package/resources/videos.d.mts.map +1 -1
  135. package/resources/videos.d.ts +28 -0
  136. package/resources/videos.d.ts.map +1 -1
  137. package/resources/webhooks/webhooks.d.mts +62 -2
  138. package/resources/webhooks/webhooks.d.mts.map +1 -1
  139. package/resources/webhooks/webhooks.d.ts +62 -2
  140. package/resources/webhooks/webhooks.d.ts.map +1 -1
  141. package/src/client.ts +5 -0
  142. package/src/lib/responses/ResponseInputItems.ts +1 -0
  143. package/src/resources/admin/organization/usage.ts +6 -0
  144. package/src/resources/batches.ts +3 -3
  145. package/src/resources/beta/beta.ts +22 -0
  146. package/src/resources/beta/index.ts +11 -0
  147. package/src/resources/beta/responses/index.ts +11 -0
  148. package/src/resources/beta/responses/responses.ts +807 -31
  149. package/src/resources/beta/responses/ws.ts +1 -0
  150. package/src/resources/chat/completions/completions.ts +4 -4
  151. package/src/resources/completions.ts +0 -5
  152. package/src/resources/conversations/items.ts +1 -0
  153. package/src/resources/evals/evals.ts +4 -4
  154. package/src/resources/evals/runs/runs.ts +1 -1
  155. package/src/resources/index.ts +1 -0
  156. package/src/resources/responses/api.md +11 -0
  157. package/src/resources/responses/responses.ts +1284 -533
  158. package/src/resources/responses/ws.ts +1 -0
  159. package/src/resources/safety/alerts.ts +51 -0
  160. package/src/resources/safety/index.ts +4 -0
  161. package/src/resources/safety/safety.ts +15 -0
  162. package/src/resources/safety.ts +3 -0
  163. package/src/resources/shared.ts +39 -2
  164. package/src/resources/videos.ts +38 -0
  165. package/src/resources/webhooks/api.md +2 -0
  166. package/src/resources/webhooks/webhooks.ts +77 -1
  167. package/src/version.ts +1 -1
  168. package/version.d.mts +1 -1
  169. package/version.d.mts.map +1 -1
  170. package/version.d.ts +1 -1
  171. package/version.d.ts.map +1 -1
  172. package/version.js +1 -1
  173. package/version.js.map +1 -1
  174. package/version.mjs +1 -1
  175. package/version.mjs.map +1 -1
@@ -104,7 +104,7 @@ export declare class Responses extends APIResource {
104
104
  * @example
105
105
  * ```ts
106
106
  * const compactedResponse = await client.responses.compact({
107
- * model: 'gpt-5.6-sol',
107
+ * model: 'gpt-6-astra',
108
108
  * });
109
109
  * ```
110
110
  */
@@ -464,6 +464,11 @@ export interface CustomTool {
464
464
  * The tool invocation context(s).
465
465
  */
466
466
  allowed_callers?: Array<'direct' | 'programmatic'> | null;
467
+ /**
468
+ * Whether the tool response can be returned asynchronously versus immediately
469
+ * returned on next response creation.
470
+ */
471
+ async?: boolean;
467
472
  /**
468
473
  * Whether this tool should be deferred and discovered via tool search.
469
474
  */
@@ -615,6 +620,7 @@ export interface FunctionTool {
615
620
  * The tool invocation context(s).
616
621
  */
617
622
  allowed_callers?: Array<'direct' | 'programmatic'> | null;
623
+ async?: boolean;
618
624
  /**
619
625
  * Whether this function is deferred and loaded via tool search.
620
626
  */
@@ -738,6 +744,11 @@ export declare namespace NamespaceTool {
738
744
  * The tool invocation context(s).
739
745
  */
740
746
  allowed_callers?: Array<'direct' | 'programmatic'> | null;
747
+ /**
748
+ * Whether the tool response can be returned asynchronously versus immediately
749
+ * returned on next response creation.
750
+ */
751
+ async?: boolean;
741
752
  /**
742
753
  * Whether this function should be deferred and discovered via tool search.
743
754
  */
@@ -795,9 +806,9 @@ export interface Response {
795
806
  */
796
807
  metadata: Shared.Metadata | null;
797
808
  /**
798
- * Model ID used to generate the response, like `gpt-4o` or `o3`. OpenAI offers a
799
- * wide range of models with different capabilities, performance characteristics,
800
- * and price points. Refer to the
809
+ * Model ID used to generate the response, like `gpt-6-astra`. OpenAI offers a wide
810
+ * range of models with different capabilities, performance characteristics, and
811
+ * price points. Refer to the
801
812
  * [model guide](https://platform.openai.com/docs/models) to browse and compare
802
813
  * available models.
803
814
  */
@@ -933,8 +944,6 @@ export interface Response {
933
944
  */
934
945
  prompt_cache_retention?: 'in_memory' | '24h' | null;
935
946
  /**
936
- * **gpt-5 and o-series models only**
937
- *
938
947
  * Configuration options for
939
948
  * [reasoning models](https://platform.openai.com/docs/guides/reasoning).
940
949
  */
@@ -1024,9 +1033,11 @@ export declare namespace Response {
1024
1033
  */
1025
1034
  interface IncompleteDetails {
1026
1035
  /**
1027
- * The reason why the response is incomplete.
1036
+ * The reason why the response is incomplete. `steered` means the response stopped
1037
+ * at a safe output boundary after a WebSocket `response.steer` event. The server
1038
+ * can then create a successor response automatically with the queued input.
1028
1039
  */
1029
- reason?: 'max_output_tokens' | 'content_filter';
1040
+ reason?: 'max_output_tokens' | 'max_messages' | 'content_filter' | 'steered';
1030
1041
  }
1031
1042
  interface SpecificProgrammaticToolCallingParam {
1032
1043
  /**
@@ -1931,6 +1942,67 @@ export interface ResponseComputerToolCallOutputScreenshot {
1931
1942
  */
1932
1943
  image_url?: string;
1933
1944
  }
1945
+ /**
1946
+ * A configuration update that applies to subsequent responses until it is replaced
1947
+ * by another configuration update.
1948
+ */
1949
+ export interface ResponseConfigurationUpdateItem {
1950
+ /**
1951
+ * The unique ID of the configuration update item.
1952
+ */
1953
+ id: string;
1954
+ /**
1955
+ * The item type. Always `configuration_update`.
1956
+ */
1957
+ type: 'configuration_update';
1958
+ /**
1959
+ * The reasoning configuration applied by this update.
1960
+ */
1961
+ reasoning?: ResponseConfigurationUpdateItem.Reasoning;
1962
+ }
1963
+ export declare namespace ResponseConfigurationUpdateItem {
1964
+ /**
1965
+ * The reasoning configuration applied by this update.
1966
+ */
1967
+ interface Reasoning {
1968
+ /**
1969
+ * The reasoning effort used for subsequent responses until another configuration
1970
+ * update replaces it.
1971
+ */
1972
+ effort?: Shared.ReasoningEffort | null;
1973
+ }
1974
+ }
1975
+ /**
1976
+ * An update to the conversation's response configuration. The configuration
1977
+ * remains in effect for subsequent responses until it is replaced by another
1978
+ * configuration update.
1979
+ */
1980
+ export interface ResponseConfigurationUpdateItemParam {
1981
+ /**
1982
+ * The item type. Always `configuration_update`.
1983
+ */
1984
+ type: 'configuration_update';
1985
+ /**
1986
+ * The unique ID of the configuration update item.
1987
+ */
1988
+ id?: string | null;
1989
+ /**
1990
+ * Updates to reasoning configuration. Only effort is supported.
1991
+ */
1992
+ reasoning?: ResponseConfigurationUpdateItemParam.Reasoning;
1993
+ }
1994
+ export declare namespace ResponseConfigurationUpdateItemParam {
1995
+ /**
1996
+ * Updates to reasoning configuration. Only effort is supported.
1997
+ */
1998
+ interface Reasoning {
1999
+ /**
2000
+ * The reasoning effort to use for subsequent responses until another configuration
2001
+ * update replaces it.
2002
+ */
2003
+ effort?: Shared.ReasoningEffort | null;
2004
+ }
2005
+ }
1934
2006
  /**
1935
2007
  * Represents a container created with /v1/containers.
1936
2008
  */
@@ -2098,6 +2170,10 @@ export interface ResponseCustomToolCall {
2098
2170
  * The unique ID of the custom tool call in the OpenAI platform.
2099
2171
  */
2100
2172
  id?: string;
2173
+ /**
2174
+ * Whether the custom tool call runs asynchronously.
2175
+ */
2176
+ async?: boolean;
2101
2177
  /**
2102
2178
  * The execution context that produced this tool call.
2103
2179
  */
@@ -2256,11 +2332,39 @@ export interface ResponseError {
2256
2332
  /**
2257
2333
  * The error code for the response.
2258
2334
  */
2259
- code: 'server_error' | 'rate_limit_exceeded' | 'invalid_prompt' | 'data_residency_mismatch' | 'bio_policy' | 'vector_store_timeout' | 'invalid_image' | 'invalid_image_format' | 'invalid_base64_image' | 'invalid_image_url' | 'image_too_large' | 'image_too_small' | 'image_parse_error' | 'image_content_policy_violation' | 'invalid_image_mode' | 'image_file_too_large' | 'unsupported_image_media_type' | 'empty_image_file' | 'failed_to_download_image' | 'image_file_not_found';
2335
+ code: 'server_error' | 'rate_limit_exceeded' | 'invalid_prompt' | 'data_residency_mismatch' | 'bio_policy' | 'misalignment_policy_violation' | 'vector_store_timeout' | 'invalid_image' | 'invalid_image_format' | 'invalid_base64_image' | 'invalid_image_url' | 'image_too_large' | 'image_too_small' | 'image_parse_error' | 'image_content_policy_violation' | 'invalid_image_mode' | 'image_file_too_large' | 'unsupported_image_media_type' | 'empty_image_file' | 'failed_to_download_image' | 'image_file_not_found';
2260
2336
  /**
2261
2337
  * A human-readable description of the error.
2262
2338
  */
2263
2339
  message: string;
2340
+ misalignment?: ResponseError.Misalignment;
2341
+ }
2342
+ export declare namespace ResponseError {
2343
+ interface Misalignment {
2344
+ /**
2345
+ * The public explanation for this block.
2346
+ */
2347
+ detailed_explanation?: string;
2348
+ /**
2349
+ * An optional classification; clients must accept additional values.
2350
+ */
2351
+ error_type?: (string & {}) | 'potentially_unintended_data_transfer' | 'potentially_unintended_data_access' | 'potentially_unintended_destructive_activity' | 'other';
2352
+ /**
2353
+ * An optional public continuation instruction.
2354
+ */
2355
+ steer?: Misalignment.Steer;
2356
+ }
2357
+ namespace Misalignment {
2358
+ /**
2359
+ * An optional public continuation instruction.
2360
+ */
2361
+ interface Steer {
2362
+ /**
2363
+ * The public continuation instruction.
2364
+ */
2365
+ message: string;
2366
+ }
2367
+ }
2264
2368
  }
2265
2369
  /**
2266
2370
  * Emitted when an error occurs.
@@ -2766,6 +2870,10 @@ export interface ResponseFunctionToolCall {
2766
2870
  * The unique ID of the function tool call.
2767
2871
  */
2768
2872
  id?: string;
2873
+ /**
2874
+ * Whether the function tool call runs asynchronously.
2875
+ */
2876
+ async?: boolean;
2769
2877
  /**
2770
2878
  * The execution context that produced this tool call.
2771
2879
  */
@@ -3118,6 +3226,10 @@ export interface ResponseInProgressEvent {
3118
3226
  export type ResponseIncludable = 'file_search_call.results' | 'web_search_call.results' | 'web_search_call.action.sources' | 'message.input_image.image_url' | 'computer_call_output.output.image_url' | 'code_interpreter_call.outputs' | 'reasoning.encrypted_content' | 'message.output_text.logprobs';
3119
3227
  /**
3120
3228
  * An event that is emitted when a response finishes as incomplete.
3229
+ *
3230
+ * Over WebSocket, steering can finish a response with
3231
+ * `response.incomplete_details.reason` set to `steered`, followed automatically by
3232
+ * a successor `response.created` that commits the queued steering input.
3121
3233
  */
3122
3234
  export interface ResponseIncompleteEvent {
3123
3235
  /**
@@ -3361,7 +3473,7 @@ export declare namespace ResponseInputImageContent {
3361
3473
  * `assistant` role are presumed to have been generated by the model in previous
3362
3474
  * interactions.
3363
3475
  */
3364
- export type ResponseInputItem = EasyInputMessage | ResponseInputItem.Message | ResponseOutputMessage | ResponseFileSearchToolCall | ResponseComputerToolCall | ResponseInputItem.ComputerCallOutput | ResponseFunctionWebSearch | ResponseFunctionToolCall | ResponseInputItem.FunctionCallOutput | ResponseInputItem.ToolSearchCall | ResponseToolSearchOutputItemParam | ResponseInputItem.AdditionalTools | ResponseReasoningItem | ResponseCompactionItemParam | ResponseInputItem.ImageGenerationCall | ResponseCodeInterpreterToolCall | ResponseInputItem.LocalShellCall | ResponseInputItem.LocalShellCallOutput | ResponseInputItem.ShellCall | ResponseInputItem.ShellCallOutput | ResponseInputItem.ApplyPatchCall | ResponseInputItem.ApplyPatchCallOutput | ResponseInputItem.McpListTools | ResponseInputItem.McpApprovalRequest | ResponseInputItem.McpApprovalResponse | ResponseInputItem.McpCall | ResponseCustomToolCallOutput | ResponseCustomToolCall | ResponseInputItem.CompactionTrigger | ResponseInputItem.ItemReference | ResponseInputItem.Program | ResponseInputItem.ProgramOutput;
3476
+ export type ResponseInputItem = EasyInputMessage | ResponseInputItem.Message | ResponseOutputMessage | ResponseFileSearchToolCall | ResponseComputerToolCall | ResponseInputItem.ComputerCallOutput | ResponseFunctionWebSearch | ResponseFunctionToolCall | ResponseInputItem.FunctionCallOutput | ResponseInputItem.ToolSearchCall | ResponseToolSearchOutputItemParam | ResponseInputItem.AdditionalTools | ResponseConfigurationUpdateItemParam | ResponseReasoningItem | ResponseCompactionItemParam | ResponseInputItem.ImageGenerationCall | ResponseCodeInterpreterToolCall | ResponseInputItem.LocalShellCall | ResponseInputItem.LocalShellCallOutput | ResponseInputItem.ShellCall | ResponseInputItem.ShellCallOutput | ResponseInputItem.ApplyPatchCall | ResponseInputItem.ApplyPatchCallOutput | ResponseInputItem.McpListTools | ResponseInputItem.McpApprovalRequest | ResponseInputItem.McpApprovalResponse | ResponseInputItem.McpCall | ResponseCustomToolCallOutput | ResponseCustomToolCall | ResponseInputItem.CompactionTrigger | ResponseInputItem.ItemReference | ResponseInputItem.Program | ResponseInputItem.ProgramOutput;
3365
3477
  export declare namespace ResponseInputItem {
3366
3478
  /**
3367
3479
  * A message input to the model with a role indicating instruction following
@@ -4215,7 +4327,7 @@ export declare namespace ResponseInputTextContent {
4215
4327
  /**
4216
4328
  * Content item used to generate a response.
4217
4329
  */
4218
- export type ResponseItem = ResponseInputMessageItem | ResponseOutputMessage | ResponseFileSearchToolCall | ResponseComputerToolCall | ResponseComputerToolCallOutputItem | ResponseFunctionWebSearch | ResponseFunctionToolCallItem | ResponseFunctionToolCallOutputItem | ResponseToolSearchCall | ResponseToolSearchOutputItem | ResponseItem.AdditionalTools | ResponseReasoningItem | ResponseItem.Program | ResponseItem.ProgramOutput | ResponseCompactionItem | ResponseItem.ImageGenerationCall | ResponseCodeInterpreterToolCall | ResponseItem.LocalShellCall | ResponseItem.LocalShellCallOutput | ResponseFunctionShellToolCall | ResponseFunctionShellToolCallOutput | ResponseApplyPatchToolCall | ResponseApplyPatchToolCallOutput | ResponseItem.McpListTools | ResponseItem.McpApprovalRequest | ResponseItem.McpApprovalResponse | ResponseItem.McpCall | ResponseCustomToolCallItem | ResponseCustomToolCallOutputItem;
4330
+ export type ResponseItem = ResponseInputMessageItem | ResponseOutputMessage | ResponseFileSearchToolCall | ResponseComputerToolCall | ResponseComputerToolCallOutputItem | ResponseFunctionWebSearch | ResponseFunctionToolCallItem | ResponseFunctionToolCallOutputItem | ResponseToolSearchCall | ResponseToolSearchOutputItem | ResponseItem.AdditionalTools | ResponseConfigurationUpdateItem | ResponseReasoningItem | ResponseItem.Program | ResponseItem.ProgramOutput | ResponseCompactionItem | ResponseItem.ImageGenerationCall | ResponseCodeInterpreterToolCall | ResponseItem.LocalShellCall | ResponseItem.LocalShellCallOutput | ResponseFunctionShellToolCall | ResponseFunctionShellToolCallOutput | ResponseApplyPatchToolCall | ResponseApplyPatchToolCallOutput | ResponseItem.McpListTools | ResponseItem.McpApprovalRequest | ResponseItem.McpApprovalResponse | ResponseItem.McpCall | ResponseCustomToolCallItem | ResponseCustomToolCallOutputItem;
4219
4331
  export declare namespace ResponseItem {
4220
4332
  interface AdditionalTools {
4221
4333
  /**
@@ -5966,151 +6078,594 @@ export declare namespace ResponseShellCallOutputContentDoneEvent {
5966
6078
  */
5967
6079
  export type ResponseStatus = 'completed' | 'failed' | 'in_progress' | 'cancelled' | 'queued' | 'incomplete';
5968
6080
  /**
5969
- * Event emitted while a response is streamed.
6081
+ * Emitted when steering input has been validated and queued. Acceptance means the
6082
+ * server owns the input, not that it has been applied. The successor's
6083
+ * `response.created` event is the commit point. If accepted input cannot be
6084
+ * committed, `response.steer.failed` returns it with the same steering ID.
6085
+ *
6086
+ * When the response stops for client-owned tool output or approval, the input
6087
+ * remains queued and `response.steer.pending` is emitted after
6088
+ * `response.completed`. Fill the pending event's `required_input` stubs with saved
6089
+ * results and send one matching explicit `response.create` per parent. Do not
6090
+ * resend accepted input while it is still queued.
5970
6091
  */
5971
- export type ResponseStreamEvent = ResponseAudioDeltaEvent | ResponseAudioDoneEvent | ResponseAudioTranscriptDeltaEvent | ResponseAudioTranscriptDoneEvent | ResponseCodeInterpreterCallCodeDeltaEvent | ResponseCodeInterpreterCallCodeDoneEvent | ResponseCodeInterpreterCallCompletedEvent | ResponseCodeInterpreterCallInProgressEvent | ResponseCodeInterpreterCallInterpretingEvent | ResponseCompletedEvent | ResponseContentPartAddedEvent | ResponseContentPartDoneEvent | ResponseCreatedEvent | ResponseErrorEvent | ResponseFileSearchCallCompletedEvent | ResponseFileSearchCallInProgressEvent | ResponseFileSearchCallSearchingEvent | ResponseFunctionCallArgumentsDeltaEvent | ResponseFunctionCallArgumentsDoneEvent | ResponseShellCallCommandAddedEvent | ResponseShellCallCommandDeltaEvent | ResponseShellCallCommandDoneEvent | ResponseShellCallOutputContentDeltaEvent | ResponseShellCallOutputContentDoneEvent | ResponseInProgressEvent | ResponseFailedEvent | ResponseIncompleteEvent | ResponseOutputItemAddedEvent | ResponseOutputItemDoneEvent | ResponseReasoningSummaryPartAddedEvent | ResponseReasoningSummaryPartDoneEvent | ResponseReasoningSummaryTextDeltaEvent | ResponseReasoningSummaryTextDoneEvent | ResponseReasoningTextDeltaEvent | ResponseReasoningTextDoneEvent | ResponseRefusalDeltaEvent | ResponseRefusalDoneEvent | ResponseTextDeltaEvent | ResponseTextDoneEvent | ResponseWebSearchCallCompletedEvent | ResponseWebSearchCallInProgressEvent | ResponseWebSearchCallSearchingEvent | ResponseImageGenCallCompletedEvent | ResponseImageGenCallGeneratingEvent | ResponseImageGenCallInProgressEvent | ResponseImageGenCallPartialImageEvent | ResponseMcpCallArgumentsDeltaEvent | ResponseMcpCallArgumentsDoneEvent | ResponseMcpCallCompletedEvent | ResponseMcpCallFailedEvent | ResponseMcpCallInProgressEvent | ResponseMcpListToolsCompletedEvent | ResponseMcpListToolsFailedEvent | ResponseMcpListToolsInProgressEvent | ResponseOutputTextAnnotationAddedEvent | ResponseQueuedEvent | ResponseCustomToolCallInputDeltaEvent | ResponseCustomToolCallInputDoneEvent;
6092
+ export interface ResponseSteerAcceptedEvent {
6093
+ /**
6094
+ * The sequence number for this event.
6095
+ */
6096
+ sequence_number: number;
6097
+ /**
6098
+ * The accepted steering submission.
6099
+ */
6100
+ steer: ResponseSteerAcceptedEvent.Steer;
6101
+ /**
6102
+ * The event discriminator. Always `response.steer.accepted`.
6103
+ */
6104
+ type: 'response.steer.accepted';
6105
+ /**
6106
+ * The WebSocket lane that emitted this event. This field is present when the
6107
+ * target response's `response.create` event supplied a `stream_id`.
6108
+ */
6109
+ stream_id?: string;
6110
+ }
6111
+ export declare namespace ResponseSteerAcceptedEvent {
6112
+ /**
6113
+ * The accepted steering submission.
6114
+ */
6115
+ interface Steer {
6116
+ /**
6117
+ * The ID assigned to the steering submission.
6118
+ */
6119
+ id: string;
6120
+ /**
6121
+ * The ID of the response being steered.
6122
+ */
6123
+ previous_response_id: string;
6124
+ }
6125
+ }
5972
6126
  /**
5973
- * Configuration options for a text response from the model. Can be plain text or
5974
- * structured JSON data. Learn more:
6127
+ * A machine-readable steering error code. Clients should handle unknown values
6128
+ * because additional codes may be introduced. Known values include:
5975
6129
  *
5976
- * - [Text inputs and outputs](https://platform.openai.com/docs/guides/text)
5977
- * - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs)
6130
+ * - `response_not_found`: The target response is not available on this connection.
6131
+ * - `invalid_input`: The event or input failed validation.
6132
+ * - `steering_not_supported`: The model or response execution mode does not
6133
+ * support steering.
6134
+ * - `too_many_pending_steers`: Too much steering input is pending for the
6135
+ * response.
6136
+ * - `response_already_completed`: The response completed and is no longer
6137
+ * accepting steering input.
6138
+ * - `response_not_active`: The response is no longer accepting steering input.
6139
+ * - `successor_creation_failed`: The successor response could not be created.
6140
+ */
6141
+ export type ResponseSteerErrorCode = 'response_not_found' | 'invalid_input' | 'steering_not_supported' | 'too_many_pending_steers' | 'response_already_completed' | 'response_not_active' | 'successor_creation_failed' | (string & {});
6142
+ /**
6143
+ * Queues user input to steer a response on this WebSocket connection. Input can
6144
+ * contain text, images, and files. Steering is supported only for single-agent
6145
+ * responses on models and execution modes that support steering. Responses bound
6146
+ * to a conversation or using automatic compaction do not support steering.
6147
+ *
6148
+ * A `response.steer.accepted` event acknowledges that the server owns the queued
6149
+ * input, not that it has been applied. The successor's `response.created` event is
6150
+ * the commit point. Input that cannot be committed is returned in
6151
+ * `response.steer.failed`.
6152
+ *
6153
+ * Steering may cause the active response to finish at a safe output boundary with
6154
+ * `response.incomplete` and `incomplete_details.reason` set to `steered`, followed
6155
+ * automatically by a successor `response.created`. Normal completion can also be
6156
+ * followed by an automatic successor. Automatic successors inherit the previous
6157
+ * response's settings and continue from it with the queued input.
6158
+ *
6159
+ * If the response stops for client-owned tool output or approval, accepted
6160
+ * steering input remains queued and `response.steer.pending` is emitted after
6161
+ * `response.completed`. Fill the `required_input` stubs from that event with saved
6162
+ * tool results or approval decisions, and send one explicit `response.create` per
6163
+ * parent with the same `previous_response_id` and WebSocket lane. Do not rerun
6164
+ * tools or resend accepted steering input. The queued input is prepended in
6165
+ * submission order to that request's input, and the explicit request retains its
6166
+ * own settings.
6167
+ *
6168
+ * This event accepts only `type`, `previous_response_id`, and `input`. Do not send
6169
+ * `stream_id`; the target response determines the WebSocket lane.
5978
6170
  */
5979
- export interface ResponseTextConfig {
6171
+ export interface ResponseSteerEvent {
5980
6172
  /**
5981
- * An object specifying the format that the model must output.
5982
- *
5983
- * Configuring `{ "type": "json_schema" }` enables Structured Outputs, which
5984
- * ensures the model will match your supplied JSON schema. Learn more in the
5985
- * [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs).
5986
- *
5987
- * The default format is `{ "type": "text" }` with no additional options.
5988
- *
5989
- * **Not recommended for gpt-4o and newer models:**
6173
+ * Input to queue for a continuation of the response. Uses the same string or
6174
+ * input-item shape as `response.create.input`, with a non-empty array when
6175
+ * supplying input items.
5990
6176
  *
5991
- * Setting to `{ "type": "json_object" }` enables the older JSON mode, which
5992
- * ensures the message the model generates is valid JSON. Using `json_schema` is
5993
- * preferred for models that support it.
6177
+ * Steering accepts only messages with the `user` role. Each message may contain
6178
+ * only `type`, `role`, and `content`, with `content` as a string or an array of
6179
+ * `input_text`, `input_image`, and `input_file` parts. The optional `type` must be
6180
+ * `message`. Other roles, tool outputs, and item types are not supported for
6181
+ * steering.
5994
6182
  */
5995
- format?: ResponseFormatTextConfig;
6183
+ input: ResponseSteerInput;
5996
6184
  /**
5997
- * Constrains the verbosity of the model's response. Lower values will result in
5998
- * more concise responses, while higher values will result in more verbose
5999
- * responses. Currently supported values are `low`, `medium`, and `high`. The
6000
- * default is `medium`.
6185
+ * The ID of the response to steer on this WebSocket connection.
6001
6186
  */
6002
- verbosity?: 'low' | 'medium' | 'high' | null;
6187
+ previous_response_id: string;
6188
+ /**
6189
+ * The event discriminator. Always `response.steer`.
6190
+ */
6191
+ type: 'response.steer';
6003
6192
  }
6004
6193
  /**
6005
- * Emitted when there is an additional text delta.
6194
+ * Emitted when steering input is rejected or cannot be committed to a successor
6195
+ * response. Returns the original, uncommitted input so the client can carry it
6196
+ * into `response.create` when appropriate. Invalid input must be corrected before
6197
+ * retrying.
6198
+ *
6199
+ * Failures after acceptance include the same steering ID. Failures before an ID is
6200
+ * allocated omit `steer.id`. A lost connection or missing acknowledgement leaves
6201
+ * the outcome unknown; it is not proof that the input was rejected.
6006
6202
  */
6007
- export interface ResponseTextDeltaEvent {
6203
+ export interface ResponseSteerFailedEvent {
6008
6204
  /**
6009
- * The index of the content part that the text delta was added to.
6205
+ * Information about why the input could not be committed.
6010
6206
  */
6011
- content_index: number;
6207
+ error: ResponseSteerFailedEvent.Error;
6012
6208
  /**
6013
- * The text delta that was added.
6209
+ * The sequence number for this event.
6014
6210
  */
6015
- delta: string;
6211
+ sequence_number: number;
6016
6212
  /**
6017
- * The ID of the output item that the text delta was added to.
6213
+ * The steering submission that could not be committed.
6018
6214
  */
6019
- item_id: string;
6215
+ steer: ResponseSteerFailedEvent.Steer;
6020
6216
  /**
6021
- * The log probabilities of the tokens in the delta.
6217
+ * The event discriminator. Always `response.steer.failed`.
6022
6218
  */
6023
- logprobs: Array<ResponseTextDeltaEvent.Logprob>;
6219
+ type: 'response.steer.failed';
6024
6220
  /**
6025
- * The index of the output item that the text delta was added to.
6221
+ * The WebSocket lane that emitted this event, when the target response is
6222
+ * available and its `response.create` event supplied a `stream_id`.
6026
6223
  */
6027
- output_index: number;
6224
+ stream_id?: string;
6225
+ }
6226
+ export declare namespace ResponseSteerFailedEvent {
6028
6227
  /**
6029
- * The sequence number for this event.
6228
+ * Information about why the input could not be committed.
6030
6229
  */
6031
- sequence_number: number;
6230
+ interface Error {
6231
+ /**
6232
+ * A machine-readable steering error code. Clients should handle unknown values
6233
+ * because additional codes may be introduced. Known values include:
6234
+ *
6235
+ * - `response_not_found`: The target response is not available on this connection.
6236
+ * - `invalid_input`: The event or input failed validation.
6237
+ * - `steering_not_supported`: The model or response execution mode does not
6238
+ * support steering.
6239
+ * - `too_many_pending_steers`: Too much steering input is pending for the
6240
+ * response.
6241
+ * - `response_already_completed`: The response completed and is no longer
6242
+ * accepting steering input.
6243
+ * - `response_not_active`: The response is no longer accepting steering input.
6244
+ * - `successor_creation_failed`: The successor response could not be created.
6245
+ */
6246
+ code: ResponsesAPI.ResponseSteerErrorCode;
6247
+ /**
6248
+ * A human-readable description of the error.
6249
+ */
6250
+ message: string;
6251
+ /**
6252
+ * The error type. Always `invalid_request_error`.
6253
+ */
6254
+ type: 'invalid_request_error';
6255
+ }
6032
6256
  /**
6033
- * The type of the event. Always `response.output_text.delta`.
6257
+ * The steering submission that could not be committed.
6034
6258
  */
6035
- type: 'response.output_text.delta';
6259
+ interface Steer {
6260
+ /**
6261
+ * Input to queue for a continuation of the response. Uses the same string or
6262
+ * input-item shape as `response.create.input`, with a non-empty array when
6263
+ * supplying input items.
6264
+ *
6265
+ * Steering accepts only messages with the `user` role. Each message may contain
6266
+ * only `type`, `role`, and `content`, with `content` as a string or an array of
6267
+ * `input_text`, `input_image`, and `input_file` parts. The optional `type` must be
6268
+ * `message`. Other roles, tool outputs, and item types are not supported for
6269
+ * steering.
6270
+ */
6271
+ input: ResponsesAPI.ResponseSteerInput;
6272
+ /**
6273
+ * The ID of the response that was targeted for steering.
6274
+ */
6275
+ previous_response_id: string;
6276
+ /**
6277
+ * The ID assigned to the steering submission, if one was allocated.
6278
+ */
6279
+ id?: string;
6280
+ }
6036
6281
  }
6037
- export declare namespace ResponseTextDeltaEvent {
6282
+ /**
6283
+ * Input to queue for a continuation of the response. Uses the same string or
6284
+ * input-item shape as `response.create.input`, with a non-empty array when
6285
+ * supplying input items.
6286
+ *
6287
+ * Steering accepts only messages with the `user` role. Each message may contain
6288
+ * only `type`, `role`, and `content`, with `content` as a string or an array of
6289
+ * `input_text`, `input_image`, and `input_file` parts. The optional `type` must be
6290
+ * `message`. Other roles, tool outputs, and item types are not supported for
6291
+ * steering.
6292
+ */
6293
+ export type ResponseSteerInput = string | Array<ResponseSteerInputItemList.Message | ResponseSteerInputItemList.FunctionCallOutput>;
6294
+ export declare namespace ResponseSteerInputItemList {
6295
+ interface Message {
6296
+ /**
6297
+ * The message content, as an array of content parts.
6298
+ */
6299
+ content: Array<ResponsesAPI.ResponseSteerInputContent> | string;
6300
+ /**
6301
+ * The message role. Always `user`.
6302
+ */
6303
+ role: 'user';
6304
+ /**
6305
+ * The item type. Always `message`.
6306
+ */
6307
+ type: 'message';
6308
+ /**
6309
+ * The unique ID of this message item.
6310
+ */
6311
+ id?: string | null;
6312
+ /**
6313
+ * The status of the message item.
6314
+ */
6315
+ status?: string | null;
6316
+ }
6038
6317
  /**
6039
- * A logprob is the logarithmic probability that the model assigns to producing a
6040
- * particular token at a given position in the sequence. Less-negative (higher)
6041
- * logprob values indicate greater model confidence in that token choice.
6318
+ * The output of a function tool call.
6042
6319
  */
6043
- interface Logprob {
6320
+ interface FunctionCallOutput {
6044
6321
  /**
6045
- * A possible text token.
6322
+ * Text, image, or file output of the function tool call.
6046
6323
  */
6047
- token: string;
6324
+ output: string | ResponsesAPI.ResponseFunctionCallOutputItemList;
6048
6325
  /**
6049
- * The log probability of this token.
6326
+ * The type of the function tool call output. Always `function_call_output`.
6050
6327
  */
6051
- logprob: number;
6328
+ type: 'function_call_output';
6052
6329
  /**
6053
- * The log probabilities of up to 20 of the most likely tokens.
6330
+ * The unique ID of the function tool call output. Populated when this item is
6331
+ * returned via API.
6054
6332
  */
6055
- top_logprobs?: Array<Logprob.TopLogprob>;
6333
+ id?: string | null;
6334
+ /**
6335
+ * The unique ID of the function tool call generated by the model.
6336
+ */
6337
+ call_id?: string | null;
6338
+ /**
6339
+ * The execution context that produced this tool call.
6340
+ */
6341
+ caller?: FunctionCallOutput.Direct | FunctionCallOutput.Program | null;
6342
+ /**
6343
+ * The name of the tool that produced the output.
6344
+ */
6345
+ name?: string | null;
6346
+ /**
6347
+ * The namespace of the tool that produced the output.
6348
+ */
6349
+ namespace?: string | null;
6350
+ /**
6351
+ * The status of the item. One of `in_progress`, `completed`, or `incomplete`.
6352
+ * Populated when items are returned via API.
6353
+ */
6354
+ status?: 'in_progress' | 'completed' | 'incomplete' | null;
6056
6355
  }
6057
- namespace Logprob {
6058
- interface TopLogprob {
6356
+ namespace FunctionCallOutput {
6357
+ interface Direct {
6059
6358
  /**
6060
- * A possible text token.
6359
+ * The caller type. Always `direct`.
6061
6360
  */
6062
- token?: string;
6361
+ type: 'direct';
6362
+ }
6363
+ interface Program {
6063
6364
  /**
6064
- * The log probability of this token.
6365
+ * The call ID of the program item that produced this tool call.
6065
6366
  */
6066
- logprob?: number;
6367
+ caller_id: string;
6368
+ /**
6369
+ * The caller type. Always `program`.
6370
+ */
6371
+ type: 'program';
6067
6372
  }
6068
6373
  }
6069
6374
  }
6070
6375
  /**
6071
- * Emitted when text content is finalized.
6376
+ * A piece of message content, such as text, an image, or a file.
6072
6377
  */
6073
- export interface ResponseTextDoneEvent {
6074
- /**
6075
- * The index of the content part that the text content is finalized.
6076
- */
6077
- content_index: number;
6078
- /**
6079
- * The ID of the output item that the text content is finalized.
6080
- */
6081
- item_id: string;
6378
+ export type ResponseSteerInputContent = ResponseInputTextContent | ResponseInputImageContent | ResponseInputFileContent;
6379
+ /**
6380
+ * Emitted when accepted steering input remains queued after the target response
6381
+ * completes. The server still owns the input. Do not resend it. The successor's
6382
+ * `response.created` event is the commit point.
6383
+ *
6384
+ * When `reason` is `waiting_for_required_input`, this event follows
6385
+ * `response.completed` while the response waits for the tool results or approval
6386
+ * decisions identified by `required_input`. Copy those stubs, fill their result
6387
+ * fields using the ordinary `response.create` input schemas, and submit one
6388
+ * continuation per parent with the same `previous_response_id` and WebSocket lane.
6389
+ * Use saved results without rerunning tools. The queued steering input is
6390
+ * prepended in submission order to the continuation's input. That explicit request
6391
+ * retains its own settings.
6392
+ *
6393
+ * This notification is emitted at most once per steering submission. Multiple
6394
+ * submissions for the same parent can report the same required inputs; they do not
6395
+ * each require a separate continuation.
6396
+ */
6397
+ export interface ResponseSteerPendingEvent {
6082
6398
  /**
6083
- * The log probabilities of the tokens in the delta.
6399
+ * An extensible enum describing why accepted steering input is still queued.
6400
+ * Clients should handle unknown values because additional reasons may be
6401
+ * introduced. Known values include:
6402
+ *
6403
+ * - `waiting_for_required_input`: The response is waiting for the tool results or
6404
+ * approval decisions identified by `required_input`.
6084
6405
  */
6085
- logprobs: Array<ResponseTextDoneEvent.Logprob>;
6406
+ reason: ResponseSteerPendingReason;
6086
6407
  /**
6087
- * The index of the output item that the text content is finalized.
6408
+ * Input stubs identifying outstanding client-owned tool results or approval
6409
+ * decisions. Each stub contains identifying fields only; the client supplies the
6410
+ * result before including it in `response.create`.
6088
6411
  */
6089
- output_index: number;
6412
+ required_input: Array<ResponseSteerRequiredInput>;
6090
6413
  /**
6091
6414
  * The sequence number for this event.
6092
6415
  */
6093
6416
  sequence_number: number;
6094
6417
  /**
6095
- * The text content that is finalized.
6418
+ * The steering submission that remains queued.
6096
6419
  */
6097
- text: string;
6420
+ steer: ResponseSteerPendingEvent.Steer;
6098
6421
  /**
6099
- * The type of the event. Always `response.output_text.done`.
6422
+ * The event discriminator. Always `response.steer.pending`.
6100
6423
  */
6101
- type: 'response.output_text.done';
6424
+ type: 'response.steer.pending';
6425
+ /**
6426
+ * The WebSocket lane that emitted this event. This field is present when the
6427
+ * target response's `response.create` event supplied a `stream_id`.
6428
+ */
6429
+ stream_id?: string;
6102
6430
  }
6103
- export declare namespace ResponseTextDoneEvent {
6431
+ export declare namespace ResponseSteerPendingEvent {
6104
6432
  /**
6105
- * A logprob is the logarithmic probability that the model assigns to producing a
6106
- * particular token at a given position in the sequence. Less-negative (higher)
6107
- * logprob values indicate greater model confidence in that token choice.
6433
+ * The steering submission that remains queued.
6108
6434
  */
6109
- interface Logprob {
6435
+ interface Steer {
6110
6436
  /**
6111
- * A possible text token.
6437
+ * The ID assigned to the steering submission.
6112
6438
  */
6113
- token: string;
6439
+ id: string;
6440
+ /**
6441
+ * The ID of the response being steered.
6442
+ */
6443
+ previous_response_id: string;
6444
+ }
6445
+ }
6446
+ /**
6447
+ * An extensible enum describing why accepted steering input is still queued.
6448
+ * Clients should handle unknown values because additional reasons may be
6449
+ * introduced. Known values include:
6450
+ *
6451
+ * - `waiting_for_required_input`: The response is waiting for the tool results or
6452
+ * approval decisions identified by `required_input`.
6453
+ */
6454
+ export type ResponseSteerPendingReason = 'waiting_for_required_input' | (string & {});
6455
+ /**
6456
+ * An input stub identifying an outstanding client-owned tool result or approval
6457
+ * decision. Copy the stub and fill the result fields using the corresponding
6458
+ * `response.create` input schema. Use saved results without rerunning the tool.
6459
+ * The server does not supply results, approval decisions, or safety
6460
+ * acknowledgements in these stubs.
6461
+ */
6462
+ export type ResponseSteerRequiredInput = ResponseSteerRequiredInput.FunctionCallOutput | ResponseSteerRequiredInput.CustomToolCallOutput | ResponseSteerRequiredInput.ComputerCallOutput | ResponseSteerRequiredInput.ShellCallOutput | ResponseSteerRequiredInput.ApplyPatchCallOutput | ResponseSteerRequiredInput.ToolSearchOutput | ResponseSteerRequiredInput.McpApprovalResponse;
6463
+ export declare namespace ResponseSteerRequiredInput {
6464
+ /**
6465
+ * Supply `output` using the function tool call output input schema.
6466
+ */
6467
+ interface FunctionCallOutput {
6468
+ call_id: string;
6469
+ name: string;
6470
+ type: 'function_call_output';
6471
+ }
6472
+ /**
6473
+ * Supply `output` using the custom tool call output input schema. The original
6474
+ * custom tool call supplies the tool's name.
6475
+ */
6476
+ interface CustomToolCallOutput {
6477
+ call_id: string;
6478
+ type: 'custom_tool_call_output';
6479
+ }
6480
+ /**
6481
+ * Supply `output` using the computer tool call output input schema, including any
6482
+ * required `acknowledged_safety_checks`.
6483
+ */
6484
+ interface ComputerCallOutput {
6485
+ call_id: string;
6486
+ type: 'computer_call_output';
6487
+ }
6488
+ /**
6489
+ * Supply `output` using the shell tool call output input schema. Each output entry
6490
+ * includes `stdout`, `stderr`, and `outcome`.
6491
+ */
6492
+ interface ShellCallOutput {
6493
+ call_id: string;
6494
+ type: 'shell_call_output';
6495
+ }
6496
+ /**
6497
+ * Supply `status` and optional `output` using the apply patch tool call output
6498
+ * input schema.
6499
+ */
6500
+ interface ApplyPatchCallOutput {
6501
+ call_id: string;
6502
+ type: 'apply_patch_call_output';
6503
+ }
6504
+ /**
6505
+ * Supply `tools` using the tool search output input schema, retaining
6506
+ * `execution: "client"`.
6507
+ */
6508
+ interface ToolSearchOutput {
6509
+ call_id: string;
6510
+ execution: 'client';
6511
+ type: 'tool_search_output';
6512
+ }
6513
+ /**
6514
+ * Supply `approve` using the MCP approval response input schema. An optional
6515
+ * `reason` can be supplied when denying the request. The original approval request
6516
+ * identifies the tool and server.
6517
+ */
6518
+ interface McpApprovalResponse {
6519
+ approval_request_id: string;
6520
+ type: 'mcp_approval_response';
6521
+ }
6522
+ }
6523
+ /**
6524
+ * Event emitted while a response is streamed.
6525
+ */
6526
+ export type ResponseStreamEvent = ResponseAudioDeltaEvent | ResponseAudioDoneEvent | ResponseAudioTranscriptDeltaEvent | ResponseAudioTranscriptDoneEvent | ResponseCodeInterpreterCallCodeDeltaEvent | ResponseCodeInterpreterCallCodeDoneEvent | ResponseCodeInterpreterCallCompletedEvent | ResponseCodeInterpreterCallInProgressEvent | ResponseCodeInterpreterCallInterpretingEvent | ResponseCompletedEvent | ResponseContentPartAddedEvent | ResponseContentPartDoneEvent | ResponseCreatedEvent | ResponseErrorEvent | ResponseFileSearchCallCompletedEvent | ResponseFileSearchCallInProgressEvent | ResponseFileSearchCallSearchingEvent | ResponseFunctionCallArgumentsDeltaEvent | ResponseFunctionCallArgumentsDoneEvent | ResponseShellCallCommandAddedEvent | ResponseShellCallCommandDeltaEvent | ResponseShellCallCommandDoneEvent | ResponseShellCallOutputContentDeltaEvent | ResponseShellCallOutputContentDoneEvent | ResponseInProgressEvent | ResponseFailedEvent | ResponseIncompleteEvent | ResponseOutputItemAddedEvent | ResponseOutputItemDoneEvent | ResponseReasoningSummaryPartAddedEvent | ResponseReasoningSummaryPartDoneEvent | ResponseReasoningSummaryTextDeltaEvent | ResponseReasoningSummaryTextDoneEvent | ResponseReasoningTextDeltaEvent | ResponseReasoningTextDoneEvent | ResponseRefusalDeltaEvent | ResponseRefusalDoneEvent | ResponseTextDeltaEvent | ResponseTextDoneEvent | ResponseWebSearchCallCompletedEvent | ResponseWebSearchCallInProgressEvent | ResponseWebSearchCallSearchingEvent | ResponseImageGenCallCompletedEvent | ResponseImageGenCallGeneratingEvent | ResponseImageGenCallInProgressEvent | ResponseImageGenCallPartialImageEvent | ResponseMcpCallArgumentsDeltaEvent | ResponseMcpCallArgumentsDoneEvent | ResponseMcpCallCompletedEvent | ResponseMcpCallFailedEvent | ResponseMcpCallInProgressEvent | ResponseMcpListToolsCompletedEvent | ResponseMcpListToolsFailedEvent | ResponseMcpListToolsInProgressEvent | ResponseOutputTextAnnotationAddedEvent | ResponseQueuedEvent | ResponseCustomToolCallInputDeltaEvent | ResponseCustomToolCallInputDoneEvent;
6527
+ /**
6528
+ * Configuration options for a text response from the model. Can be plain text or
6529
+ * structured JSON data. Learn more:
6530
+ *
6531
+ * - [Text inputs and outputs](https://platform.openai.com/docs/guides/text)
6532
+ * - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs)
6533
+ */
6534
+ export interface ResponseTextConfig {
6535
+ /**
6536
+ * An object specifying the format that the model must output.
6537
+ *
6538
+ * Configuring `{ "type": "json_schema" }` enables Structured Outputs, which
6539
+ * ensures the model will match your supplied JSON schema. Learn more in the
6540
+ * [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs).
6541
+ *
6542
+ * The default format is `{ "type": "text" }` with no additional options.
6543
+ *
6544
+ * **Not recommended for gpt-4o and newer models:**
6545
+ *
6546
+ * Setting to `{ "type": "json_object" }` enables the older JSON mode, which
6547
+ * ensures the message the model generates is valid JSON. Using `json_schema` is
6548
+ * preferred for models that support it.
6549
+ */
6550
+ format?: ResponseFormatTextConfig;
6551
+ /**
6552
+ * Constrains the verbosity of the model's response. Lower values will result in
6553
+ * more concise responses, while higher values will result in more verbose
6554
+ * responses. Currently supported values are `low`, `medium`, and `high`. The
6555
+ * default is `medium`.
6556
+ */
6557
+ verbosity?: 'low' | 'medium' | 'high' | null;
6558
+ }
6559
+ /**
6560
+ * Emitted when there is an additional text delta.
6561
+ */
6562
+ export interface ResponseTextDeltaEvent {
6563
+ /**
6564
+ * The index of the content part that the text delta was added to.
6565
+ */
6566
+ content_index: number;
6567
+ /**
6568
+ * The text delta that was added.
6569
+ */
6570
+ delta: string;
6571
+ /**
6572
+ * The ID of the output item that the text delta was added to.
6573
+ */
6574
+ item_id: string;
6575
+ /**
6576
+ * The log probabilities of the tokens in the delta.
6577
+ */
6578
+ logprobs: Array<ResponseTextDeltaEvent.Logprob>;
6579
+ /**
6580
+ * The index of the output item that the text delta was added to.
6581
+ */
6582
+ output_index: number;
6583
+ /**
6584
+ * The sequence number for this event.
6585
+ */
6586
+ sequence_number: number;
6587
+ /**
6588
+ * The type of the event. Always `response.output_text.delta`.
6589
+ */
6590
+ type: 'response.output_text.delta';
6591
+ }
6592
+ export declare namespace ResponseTextDeltaEvent {
6593
+ /**
6594
+ * A logprob is the logarithmic probability that the model assigns to producing a
6595
+ * particular token at a given position in the sequence. Less-negative (higher)
6596
+ * logprob values indicate greater model confidence in that token choice.
6597
+ */
6598
+ interface Logprob {
6599
+ /**
6600
+ * A possible text token.
6601
+ */
6602
+ token: string;
6603
+ /**
6604
+ * The log probability of this token.
6605
+ */
6606
+ logprob: number;
6607
+ /**
6608
+ * The log probabilities of up to 20 of the most likely tokens.
6609
+ */
6610
+ top_logprobs?: Array<Logprob.TopLogprob>;
6611
+ }
6612
+ namespace Logprob {
6613
+ interface TopLogprob {
6614
+ /**
6615
+ * A possible text token.
6616
+ */
6617
+ token?: string;
6618
+ /**
6619
+ * The log probability of this token.
6620
+ */
6621
+ logprob?: number;
6622
+ }
6623
+ }
6624
+ }
6625
+ /**
6626
+ * Emitted when text content is finalized.
6627
+ */
6628
+ export interface ResponseTextDoneEvent {
6629
+ /**
6630
+ * The index of the content part that the text content is finalized.
6631
+ */
6632
+ content_index: number;
6633
+ /**
6634
+ * The ID of the output item that the text content is finalized.
6635
+ */
6636
+ item_id: string;
6637
+ /**
6638
+ * The log probabilities of the tokens in the delta.
6639
+ */
6640
+ logprobs: Array<ResponseTextDoneEvent.Logprob>;
6641
+ /**
6642
+ * The index of the output item that the text content is finalized.
6643
+ */
6644
+ output_index: number;
6645
+ /**
6646
+ * The sequence number for this event.
6647
+ */
6648
+ sequence_number: number;
6649
+ /**
6650
+ * The text content that is finalized.
6651
+ */
6652
+ text: string;
6653
+ /**
6654
+ * The type of the event. Always `response.output_text.done`.
6655
+ */
6656
+ type: 'response.output_text.done';
6657
+ }
6658
+ export declare namespace ResponseTextDoneEvent {
6659
+ /**
6660
+ * A logprob is the logarithmic probability that the model assigns to producing a
6661
+ * particular token at a given position in the sequence. Less-negative (higher)
6662
+ * logprob values indicate greater model confidence in that token choice.
6663
+ */
6664
+ interface Logprob {
6665
+ /**
6666
+ * A possible text token.
6667
+ */
6668
+ token: string;
6114
6669
  /**
6115
6670
  * The log probability of this token.
6116
6671
  */
@@ -6244,10 +6799,6 @@ export interface ResponseUsage {
6244
6799
  * The total number of tokens used.
6245
6800
  */
6246
6801
  total_tokens: number;
6247
- /**
6248
- * Compute units for the request. Currently null when available.
6249
- */
6250
- compute_units?: number | null;
6251
6802
  }
6252
6803
  export declare namespace ResponseUsage {
6253
6804
  /**
@@ -6312,433 +6863,460 @@ export interface ResponseWebSearchCallInProgressEvent {
6312
6863
  */
6313
6864
  sequence_number: number;
6314
6865
  /**
6315
- * The type of the event. Always `response.web_search_call.in_progress`.
6316
- */
6317
- type: 'response.web_search_call.in_progress';
6318
- }
6319
- /**
6320
- * Emitted when a web search call is executing.
6321
- */
6322
- export interface ResponseWebSearchCallSearchingEvent {
6323
- /**
6324
- * Unique ID for the output item associated with the web search call.
6325
- */
6326
- item_id: string;
6327
- /**
6328
- * The index of the output item that the web search call is associated with.
6329
- */
6330
- output_index: number;
6331
- /**
6332
- * The sequence number of the web search call being processed.
6333
- */
6334
- sequence_number: number;
6335
- /**
6336
- * The type of the event. Always `response.web_search_call.searching`.
6337
- */
6338
- type: 'response.web_search_call.searching';
6339
- }
6340
- export interface ResponsesClientEvent {
6341
- /**
6342
- * The type of the client event. Always `response.create`.
6343
- */
6344
- type: 'response.create';
6345
- /**
6346
- * Whether to run the model response in the background.
6347
- * [Learn more](https://platform.openai.com/docs/guides/background).
6348
- */
6349
- background?: boolean | null;
6350
- /**
6351
- * Context management configuration for this request.
6352
- */
6353
- context_management?: Array<ResponsesClientEvent.ContextManagement> | null;
6354
- /**
6355
- * The conversation that this response belongs to. Items from this conversation are
6356
- * prepended to `input_items` for this response request. Input items and output
6357
- * items from this response are automatically added to this conversation after this
6358
- * response completes.
6359
- */
6360
- conversation?: string | ResponseConversationParam | null;
6361
- /**
6362
- * Specify additional output data to include in the model response. Currently
6363
- * supported values are:
6364
- *
6365
- * - `web_search_call.action.sources`: Include the sources of the web search tool
6366
- * call.
6367
- * - `code_interpreter_call.outputs`: Includes the outputs of python code execution
6368
- * in code interpreter tool call items.
6369
- * - `computer_call_output.output.image_url`: Include image urls from the computer
6370
- * call output.
6371
- * - `file_search_call.results`: Include the search results of the file search tool
6372
- * call.
6373
- * - `message.input_image.image_url`: Include image urls from the input message.
6374
- * - `message.output_text.logprobs`: Include logprobs with assistant messages.
6375
- * - `reasoning.encrypted_content`: Includes an encrypted version of reasoning
6376
- * tokens in reasoning item outputs. This enables reasoning items to be used in
6377
- * multi-turn conversations when using the Responses API statelessly (like when
6378
- * the `store` parameter is set to `false`, or when an organization is enrolled
6379
- * in the zero data retention program).
6380
- */
6381
- include?: Array<ResponseIncludable> | null;
6382
- /**
6383
- * Text, image, or file inputs to the model, used to generate a response.
6384
- *
6385
- * Learn more:
6386
- *
6387
- * - [Text inputs and outputs](https://platform.openai.com/docs/guides/text)
6388
- * - [Image inputs](https://platform.openai.com/docs/guides/images)
6389
- * - [File inputs](https://platform.openai.com/docs/guides/pdf-files)
6390
- * - [Conversation state](https://platform.openai.com/docs/guides/conversation-state)
6391
- * - [Function calling](https://platform.openai.com/docs/guides/function-calling)
6392
- */
6393
- input?: string | ResponseInput;
6394
- /**
6395
- * A system (or developer) message inserted into the model's context.
6396
- *
6397
- * When using along with `previous_response_id`, the instructions from a previous
6398
- * response will not be carried over to the next response. This makes it simple to
6399
- * swap out system (or developer) messages in new responses.
6400
- */
6401
- instructions?: string | null;
6402
- /**
6403
- * An upper bound for the number of tokens that can be generated for a response,
6404
- * including visible output tokens and
6405
- * [reasoning tokens](https://platform.openai.com/docs/guides/reasoning).
6406
- */
6407
- max_output_tokens?: number | null;
6408
- /**
6409
- * The maximum number of total calls to built-in tools that can be processed in a
6410
- * response. This maximum number applies across all built-in tool calls, not per
6411
- * individual tool. Any further attempts to call a tool by the model will be
6412
- * ignored.
6413
- */
6414
- max_tool_calls?: number | null;
6415
- /**
6416
- * Set of 16 key-value pairs that can be attached to an object. This can be useful
6417
- * for storing additional information about the object in a structured format, and
6418
- * querying for objects via API or the dashboard.
6419
- *
6420
- * Keys are strings with a maximum length of 64 characters. Values are strings with
6421
- * a maximum length of 512 characters.
6422
- */
6423
- metadata?: Shared.Metadata | null;
6424
- /**
6425
- * Model ID used to generate the response, like `gpt-4o` or `o3`. OpenAI offers a
6426
- * wide range of models with different capabilities, performance characteristics,
6427
- * and price points. Refer to the
6428
- * [model guide](https://platform.openai.com/docs/models) to browse and compare
6429
- * available models.
6430
- */
6431
- model?: Shared.ResponsesModel;
6432
- /**
6433
- * Configuration for running moderation on the input and output of this response.
6434
- */
6435
- moderation?: ResponsesClientEvent.Moderation | null;
6436
- /**
6437
- * Whether to allow the model to run tool calls in parallel.
6438
- */
6439
- parallel_tool_calls?: boolean | null;
6440
- /**
6441
- * The unique ID of the previous response to the model. Use this to create
6442
- * multi-turn conversations. Learn more about
6443
- * [conversation state](https://platform.openai.com/docs/guides/conversation-state).
6444
- * Cannot be used in conjunction with `conversation`.
6445
- */
6446
- previous_response_id?: string | null;
6447
- /**
6448
- * Reference to a prompt template and its variables.
6449
- * [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts).
6450
- */
6451
- prompt?: ResponsePrompt | null;
6452
- /**
6453
- * Used by OpenAI to cache responses for similar requests to optimize your cache
6454
- * hit rates. Replaces the `user` field.
6455
- * [Learn more](https://platform.openai.com/docs/guides/prompt-caching).
6456
- */
6457
- prompt_cache_key?: string | null;
6458
- /**
6459
- * Options for prompt caching. Supported for `gpt-5.6` and later models. By
6460
- * default, OpenAI automatically chooses one implicit cache breakpoint. You can add
6461
- * explicit breakpoints to content blocks with `prompt_cache_breakpoint`. Each
6462
- * request can write up to four breakpoints. For cache matching, OpenAI considers
6463
- * up to the latest 80 breakpoints in the conversation, without a content-block
6464
- * lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The
6465
- * `ttl` defaults to `30m`, which is currently the only supported value. See the
6466
- * [prompt caching guide](https://platform.openai.com/docs/guides/prompt-caching)
6467
- * for current details.
6468
- */
6469
- prompt_cache_options?: ResponsesClientEvent.PromptCacheOptions;
6470
- /**
6471
- * @deprecated Deprecated. Use `prompt_cache_options.ttl` instead.
6472
- *
6473
- * The retention policy for the prompt cache. Set to `24h` to enable extended
6474
- * prompt caching, which keeps cached prefixes active for longer, up to a maximum
6475
- * of 24 hours.
6476
- * [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention).
6477
- * This field expresses a maximum retention policy, while
6478
- * `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two fields
6479
- * are independent and do not interact. For `gpt-5.5`, `gpt-5.5-pro`, and future
6480
- * models, only `24h` is supported.
6481
- *
6482
- * For older models that support both `in_memory` and `24h`, the default depends on
6483
- * your organization's data retention policy:
6484
- *
6485
- * - Organizations without ZDR enabled default to `24h`.
6486
- * - Organizations with ZDR enabled default to `in_memory` when
6487
- * `prompt_cache_retention` is not specified.
6488
- */
6489
- prompt_cache_retention?: 'in_memory' | '24h' | null;
6490
- /**
6491
- * **gpt-5 and o-series models only**
6492
- *
6493
- * Configuration options for
6494
- * [reasoning models](https://platform.openai.com/docs/guides/reasoning).
6495
- */
6496
- reasoning?: Shared.Reasoning | null;
6497
- /**
6498
- * A stable identifier used to help detect users of your application that may be
6499
- * violating OpenAI's usage policies. The IDs should be a string that uniquely
6500
- * identifies each user, with a maximum length of 64 characters. We recommend
6501
- * hashing their username or email address, in order to avoid sending us any
6502
- * identifying information.
6503
- * [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers).
6504
- */
6505
- safety_identifier?: string | null;
6506
- /**
6507
- * Specifies the processing type used for serving the request.
6508
- *
6509
- * - If set to 'auto', then the request will be processed with the service tier
6510
- * configured in the Project settings. Unless otherwise configured, the Project
6511
- * will use 'default'.
6512
- * - If set to 'default', then the request will be processed with the standard
6513
- * pricing and performance for the selected model.
6514
- * - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)',
6515
- * then the request will be processed with the Flex Processing service tier.
6516
- * - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level,
6517
- * include the `service_tier=fast` or `service_tier=priority` parameter for
6518
- * Responses or Chat Completions. The response will show `service_tier=priority`
6519
- * regardless of if you specify `service_tier=fast` or `priority` in your
6520
- * request.
6521
- * - If set to 'ultrafast', then the request will be processed with the
6522
- * access-controlled Ultrafast Processing service tier. This tier is currently
6523
- * available for `gpt-5.6-sol`; a response served through it will show
6524
- * `service_tier=ultrafast`.
6525
- * - When not set, the default behavior is 'auto'.
6526
- *
6527
- * When the `service_tier` parameter is set, the response body will include the
6528
- * `service_tier` value based on the processing mode actually used to serve the
6529
- * request. This response value may be different from the value set in the
6530
- * parameter.
6531
- */
6532
- service_tier?: ServiceTier | null;
6533
- /**
6534
- * Whether to store the generated model response for later retrieval via API.
6535
- */
6536
- store?: boolean | null;
6537
- /**
6538
- * If set to true, the model response data will be streamed to the client as it is
6539
- * generated using
6540
- * [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format).
6541
- * See the
6542
- * [Streaming section below](https://platform.openai.com/docs/api-reference/responses-streaming)
6543
- * for more information.
6544
- */
6545
- stream?: boolean | null;
6546
- /**
6547
- * The WebSocket lane for this response. Requests with the same `stream_id` are
6548
- * processed FIFO, and events for the response echo the same `stream_id`.
6549
- *
6550
- * `stream_id` controls routing; `previous_response_id` controls conversation
6551
- * lineage, so a new lane can fork from a response created on another lane.
6552
- */
6553
- stream_id?: string;
6554
- /**
6555
- * Options for streaming responses. Only set this when you set `stream: true`.
6556
- */
6557
- stream_options?: ResponsesClientEvent.StreamOptions | null;
6558
- /**
6559
- * What sampling temperature to use, between 0 and 2. Higher values like 0.8 will
6560
- * make the output more random, while lower values like 0.2 will make it more
6561
- * focused and deterministic. We generally recommend altering this or `top_p` but
6562
- * not both.
6563
- */
6564
- temperature?: number | null;
6565
- /**
6566
- * Configuration options for a text response from the model. Can be plain text or
6567
- * structured JSON data. Learn more:
6568
- *
6569
- * - [Text inputs and outputs](https://platform.openai.com/docs/guides/text)
6570
- * - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs)
6571
- */
6572
- text?: ResponseTextConfig;
6573
- /**
6574
- * How the model should select which tool (or tools) to use when generating a
6575
- * response. See the `tools` parameter to see how to specify which tools the model
6576
- * can call.
6577
- */
6578
- tool_choice?: ToolChoiceOptions | ToolChoiceAllowed | ToolChoiceTypes | ToolChoiceFunction | ToolChoiceMcp | ToolChoiceCustom | ResponsesClientEvent.SpecificProgrammaticToolCallingParam | ToolChoiceApplyPatch | ToolChoiceShell;
6579
- /**
6580
- * An array of tools the model may call while generating a response. You can
6581
- * specify which tool to use by setting the `tool_choice` parameter.
6582
- *
6583
- * We support the following categories of tools:
6584
- *
6585
- * - **Built-in tools**: Tools that are provided by OpenAI that extend the model's
6586
- * capabilities, like
6587
- * [web search](https://platform.openai.com/docs/guides/tools-web-search) or
6588
- * [file search](https://platform.openai.com/docs/guides/tools-file-search).
6589
- * Learn more about
6590
- * [built-in tools](https://platform.openai.com/docs/guides/tools).
6591
- * - **MCP Tools**: Integrations with third-party systems via custom MCP servers or
6592
- * predefined connectors such as Google Drive and SharePoint. Learn more about
6593
- * [MCP Tools](https://platform.openai.com/docs/guides/tools-connectors-mcp).
6594
- * - **Function calls (custom tools)**: Functions that are defined by you, enabling
6595
- * the model to call your own code with strongly typed arguments and outputs.
6596
- * Learn more about
6597
- * [function calling](https://platform.openai.com/docs/guides/function-calling).
6598
- * You can also use custom tools to call your own code.
6866
+ * The type of the event. Always `response.web_search_call.in_progress`.
6599
6867
  */
6600
- tools?: Array<Tool>;
6868
+ type: 'response.web_search_call.in_progress';
6869
+ }
6870
+ /**
6871
+ * Emitted when a web search call is executing.
6872
+ */
6873
+ export interface ResponseWebSearchCallSearchingEvent {
6601
6874
  /**
6602
- * An integer between 0 and 20 specifying the maximum number of most likely tokens
6603
- * to return at each token position, each with an associated log probability. In
6604
- * some cases, the number of returned tokens may be fewer than requested.
6875
+ * Unique ID for the output item associated with the web search call.
6605
6876
  */
6606
- top_logprobs?: number | null;
6877
+ item_id: string;
6607
6878
  /**
6608
- * An alternative to sampling with temperature, called nucleus sampling, where the
6609
- * model considers the results of the tokens with top_p probability mass. So 0.1
6610
- * means only the tokens comprising the top 10% probability mass are considered.
6611
- *
6612
- * We generally recommend altering this or `temperature` but not both.
6879
+ * The index of the output item that the web search call is associated with.
6613
6880
  */
6614
- top_p?: number | null;
6881
+ output_index: number;
6615
6882
  /**
6616
- * @deprecated The truncation strategy to use for the model response.
6617
- *
6618
- * - `auto`: If the input to this Response exceeds the model's context window size,
6619
- * the model will truncate the response to fit the context window by dropping
6620
- * items from the beginning of the conversation.
6621
- * - `disabled` (default): If the input size will exceed the context window size
6622
- * for a model, the request will fail with a 400 error.
6883
+ * The sequence number of the web search call being processed.
6623
6884
  */
6624
- truncation?: 'auto' | 'disabled' | null;
6885
+ sequence_number: number;
6625
6886
  /**
6626
- * @deprecated This field is being replaced by `safety_identifier` and
6627
- * `prompt_cache_key`. Use `prompt_cache_key` instead to maintain caching
6628
- * optimizations. A stable identifier for your end-users. Used to boost cache hit
6629
- * rates by better bucketing similar requests and to help OpenAI detect and prevent
6630
- * abuse.
6631
- * [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers).
6887
+ * The type of the event. Always `response.web_search_call.searching`.
6632
6888
  */
6633
- user?: string;
6889
+ type: 'response.web_search_call.searching';
6634
6890
  }
6891
+ /**
6892
+ * Client events accepted by the Responses WebSocket server.
6893
+ */
6894
+ export type ResponsesClientEvent = ResponsesClientEvent.ResponseCreate | ResponseSteerEvent;
6635
6895
  export declare namespace ResponsesClientEvent {
6636
- interface ContextManagement {
6896
+ type ContextManagement = ResponseCreate.ContextManagement;
6897
+ type Moderation = ResponseCreate.Moderation;
6898
+ namespace Moderation {
6899
+ type Policy = ResponseCreate.Moderation.Policy;
6900
+ namespace Policy {
6901
+ type Input = ResponseCreate.Moderation.Policy.Input;
6902
+ type Output = ResponseCreate.Moderation.Policy.Output;
6903
+ }
6904
+ }
6905
+ type PromptCacheOptions = ResponseCreate.PromptCacheOptions;
6906
+ type StreamOptions = ResponseCreate.StreamOptions;
6907
+ type SpecificProgrammaticToolCallingParam = ResponseCreate.SpecificProgrammaticToolCallingParam;
6908
+ /**
6909
+ * Client event for creating a response over a persistent WebSocket connection.
6910
+ * This payload uses the same top-level fields as `POST /v1/responses`, plus
6911
+ * WebSocket-only envelope metadata.
6912
+ *
6913
+ * Notes:
6914
+ *
6915
+ * - `stream` is implicit over WebSocket and should not be sent.
6916
+ * - `background` is not supported over WebSocket.
6917
+ * - `stream_id` is WebSocket-only and is not part of `POST /v1/responses`.
6918
+ */
6919
+ interface ResponseCreate {
6637
6920
  /**
6638
- * The context management entry type. Currently only 'compaction' is supported.
6921
+ * The type of the client event. Always `response.create`.
6639
6922
  */
6640
- type: string;
6923
+ type: 'response.create';
6641
6924
  /**
6642
- * Token threshold at which compaction should be triggered for this entry.
6925
+ * Whether to run the model response in the background.
6926
+ * [Learn more](https://platform.openai.com/docs/guides/background).
6643
6927
  */
6644
- compact_threshold?: number | null;
6645
- }
6646
- /**
6647
- * Configuration for running moderation on the input and output of this response.
6648
- */
6649
- interface Moderation {
6928
+ background?: boolean | null;
6650
6929
  /**
6651
- * The moderation model to use for moderated completions, e.g.
6652
- * 'omni-moderation-latest'.
6930
+ * Context management configuration for this request.
6653
6931
  */
6654
- model: string;
6932
+ context_management?: Array<ResponseCreate.ContextManagement> | null;
6655
6933
  /**
6656
- * The policy to apply to moderated response input and output.
6934
+ * The conversation that this response belongs to. Items from this conversation are
6935
+ * prepended to `input_items` for this response request. Input items and output
6936
+ * items from this response are automatically added to this conversation after this
6937
+ * response completes.
6657
6938
  */
6658
- policy?: Moderation.Policy | null;
6659
- }
6660
- namespace Moderation {
6939
+ conversation?: string | ResponsesAPI.ResponseConversationParam | null;
6661
6940
  /**
6662
- * The policy to apply to moderated response input and output.
6941
+ * Specify additional output data to include in the model response. Currently
6942
+ * supported values are:
6943
+ *
6944
+ * - `web_search_call.action.sources`: Include the sources of the web search tool
6945
+ * call.
6946
+ * - `code_interpreter_call.outputs`: Includes the outputs of python code execution
6947
+ * in code interpreter tool call items.
6948
+ * - `computer_call_output.output.image_url`: Include image urls from the computer
6949
+ * call output.
6950
+ * - `file_search_call.results`: Include the search results of the file search tool
6951
+ * call.
6952
+ * - `message.input_image.image_url`: Include image urls from the input message.
6953
+ * - `message.output_text.logprobs`: Include logprobs with assistant messages.
6954
+ * - `reasoning.encrypted_content`: Includes an encrypted version of reasoning
6955
+ * tokens in reasoning item outputs. This enables reasoning items to be used in
6956
+ * multi-turn conversations when using the Responses API statelessly (like when
6957
+ * the `store` parameter is set to `false`, or when an organization is enrolled
6958
+ * in the zero data retention program).
6959
+ */
6960
+ include?: Array<ResponsesAPI.ResponseIncludable> | null;
6961
+ /**
6962
+ * Text, image, or file inputs to the model, used to generate a response.
6963
+ *
6964
+ * Learn more:
6965
+ *
6966
+ * - [Text inputs and outputs](https://platform.openai.com/docs/guides/text)
6967
+ * - [Image inputs](https://platform.openai.com/docs/guides/images)
6968
+ * - [File inputs](https://platform.openai.com/docs/guides/pdf-files)
6969
+ * - [Conversation state](https://platform.openai.com/docs/guides/conversation-state)
6970
+ * - [Function calling](https://platform.openai.com/docs/guides/function-calling)
6663
6971
  */
6664
- interface Policy {
6972
+ input?: string | ResponsesAPI.ResponseInput;
6973
+ /**
6974
+ * A system (or developer) message inserted into the model's context.
6975
+ *
6976
+ * When using along with `previous_response_id`, the instructions from a previous
6977
+ * response will not be carried over to the next response. This makes it simple to
6978
+ * swap out system (or developer) messages in new responses.
6979
+ */
6980
+ instructions?: string | null;
6981
+ /**
6982
+ * An upper bound for the number of tokens that can be generated for a response,
6983
+ * including visible output tokens and
6984
+ * [reasoning tokens](https://platform.openai.com/docs/guides/reasoning).
6985
+ */
6986
+ max_output_tokens?: number | null;
6987
+ /**
6988
+ * The maximum number of total calls to built-in tools that can be processed in a
6989
+ * response. This maximum number applies across all built-in tool calls, not per
6990
+ * individual tool. Any further attempts to call a tool by the model will be
6991
+ * ignored.
6992
+ */
6993
+ max_tool_calls?: number | null;
6994
+ /**
6995
+ * Set of 16 key-value pairs that can be attached to an object. This can be useful
6996
+ * for storing additional information about the object in a structured format, and
6997
+ * querying for objects via API or the dashboard.
6998
+ *
6999
+ * Keys are strings with a maximum length of 64 characters. Values are strings with
7000
+ * a maximum length of 512 characters.
7001
+ */
7002
+ metadata?: Shared.Metadata | null;
7003
+ /**
7004
+ * Model ID used to generate the response, like `gpt-6-astra`. OpenAI offers a wide
7005
+ * range of models with different capabilities, performance characteristics, and
7006
+ * price points. Refer to the
7007
+ * [model guide](https://platform.openai.com/docs/models) to browse and compare
7008
+ * available models.
7009
+ */
7010
+ model?: Shared.ResponsesModel;
7011
+ /**
7012
+ * Configuration for running moderation on the input and output of this response.
7013
+ */
7014
+ moderation?: ResponseCreate.Moderation | null;
7015
+ /**
7016
+ * Whether to allow the model to run tool calls in parallel.
7017
+ */
7018
+ parallel_tool_calls?: boolean | null;
7019
+ /**
7020
+ * The unique ID of the previous response to the model. Use this to create
7021
+ * multi-turn conversations. Learn more about
7022
+ * [conversation state](https://platform.openai.com/docs/guides/conversation-state).
7023
+ * Cannot be used in conjunction with `conversation`.
7024
+ */
7025
+ previous_response_id?: string | null;
7026
+ /**
7027
+ * Reference to a prompt template and its variables.
7028
+ * [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts).
7029
+ */
7030
+ prompt?: ResponsesAPI.ResponsePrompt | null;
7031
+ /**
7032
+ * Used by OpenAI to cache responses for similar requests to optimize your cache
7033
+ * hit rates. Replaces the `user` field.
7034
+ * [Learn more](https://platform.openai.com/docs/guides/prompt-caching).
7035
+ */
7036
+ prompt_cache_key?: string | null;
7037
+ /**
7038
+ * Options for prompt caching. Supported for `gpt-5.6` and later models. By
7039
+ * default, OpenAI automatically chooses one implicit cache breakpoint. You can add
7040
+ * explicit breakpoints to content blocks with `prompt_cache_breakpoint`. Each
7041
+ * request can write up to four breakpoints. For cache matching, OpenAI considers
7042
+ * up to the latest 80 breakpoints in the conversation, without a content-block
7043
+ * lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The
7044
+ * `ttl` defaults to `30m`, which is currently the only supported value. See the
7045
+ * [prompt caching guide](https://platform.openai.com/docs/guides/prompt-caching)
7046
+ * for current details.
7047
+ */
7048
+ prompt_cache_options?: ResponseCreate.PromptCacheOptions;
7049
+ /**
7050
+ * @deprecated Deprecated. Use `prompt_cache_options.ttl` instead.
7051
+ *
7052
+ * The retention policy for the prompt cache. Set to `24h` to enable extended
7053
+ * prompt caching, which keeps cached prefixes active for longer, up to a maximum
7054
+ * of 24 hours.
7055
+ * [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention).
7056
+ * This field expresses a maximum retention policy, while
7057
+ * `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two fields
7058
+ * are independent and do not interact. For `gpt-5.5`, `gpt-5.5-pro`, and future
7059
+ * models, only `24h` is supported.
7060
+ *
7061
+ * For older models that support both `in_memory` and `24h`, the default depends on
7062
+ * your organization's data retention policy:
7063
+ *
7064
+ * - Organizations without ZDR enabled default to `24h`.
7065
+ * - Organizations with ZDR enabled default to `in_memory` when
7066
+ * `prompt_cache_retention` is not specified.
7067
+ */
7068
+ prompt_cache_retention?: 'in_memory' | '24h' | null;
7069
+ /**
7070
+ * Configuration options for
7071
+ * [reasoning models](https://platform.openai.com/docs/guides/reasoning).
7072
+ */
7073
+ reasoning?: Shared.Reasoning | null;
7074
+ /**
7075
+ * A stable identifier used to help detect users of your application that may be
7076
+ * violating OpenAI's usage policies. The IDs should be a string that uniquely
7077
+ * identifies each user, with a maximum length of 64 characters. We recommend
7078
+ * hashing their username or email address, in order to avoid sending us any
7079
+ * identifying information.
7080
+ * [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers).
7081
+ */
7082
+ safety_identifier?: string | null;
7083
+ /**
7084
+ * Specifies the processing type used for serving the request.
7085
+ *
7086
+ * - If set to 'auto', then the request will be processed with the service tier
7087
+ * configured in the Project settings. Unless otherwise configured, the Project
7088
+ * will use 'default'.
7089
+ * - If set to 'default', then the request will be processed with the standard
7090
+ * pricing and performance for the selected model.
7091
+ * - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)',
7092
+ * then the request will be processed with the Flex Processing service tier.
7093
+ * - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level,
7094
+ * include the `service_tier=fast` or `service_tier=priority` parameter for
7095
+ * Responses or Chat Completions. The response will show `service_tier=priority`
7096
+ * regardless of if you specify `service_tier=fast` or `priority` in your
7097
+ * request.
7098
+ * - If set to 'ultrafast', then the request will be processed with the
7099
+ * access-controlled Ultrafast Processing service tier. This tier is currently
7100
+ * available for `gpt-5.6-sol`; a response served through it will show
7101
+ * `service_tier=ultrafast`.
7102
+ * - When not set, the default behavior is 'auto'.
7103
+ *
7104
+ * When the `service_tier` parameter is set, the response body will include the
7105
+ * `service_tier` value based on the processing mode actually used to serve the
7106
+ * request. This response value may be different from the value set in the
7107
+ * parameter.
7108
+ */
7109
+ service_tier?: ResponsesAPI.ServiceTier | null;
7110
+ /**
7111
+ * Whether to store the generated model response for later retrieval via API.
7112
+ */
7113
+ store?: boolean | null;
7114
+ /**
7115
+ * If set to true, the model response data will be streamed to the client as it is
7116
+ * generated using
7117
+ * [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format).
7118
+ * See the
7119
+ * [Streaming section below](https://platform.openai.com/docs/api-reference/responses-streaming)
7120
+ * for more information.
7121
+ */
7122
+ stream?: boolean | null;
7123
+ /**
7124
+ * The WebSocket lane for this response. Requests with the same `stream_id` are
7125
+ * processed FIFO, and events for the response echo the same `stream_id`.
7126
+ *
7127
+ * `stream_id` controls routing; `previous_response_id` controls conversation
7128
+ * lineage, so a new lane can fork from a response created on another lane.
7129
+ */
7130
+ stream_id?: string;
7131
+ /**
7132
+ * Options for streaming responses. Only set this when you set `stream: true`.
7133
+ */
7134
+ stream_options?: ResponseCreate.StreamOptions | null;
7135
+ /**
7136
+ * What sampling temperature to use, between 0 and 2. Higher values like 0.8 will
7137
+ * make the output more random, while lower values like 0.2 will make it more
7138
+ * focused and deterministic. We generally recommend altering this or `top_p` but
7139
+ * not both.
7140
+ */
7141
+ temperature?: number | null;
7142
+ /**
7143
+ * Configuration options for a text response from the model. Can be plain text or
7144
+ * structured JSON data. Learn more:
7145
+ *
7146
+ * - [Text inputs and outputs](https://platform.openai.com/docs/guides/text)
7147
+ * - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs)
7148
+ */
7149
+ text?: ResponsesAPI.ResponseTextConfig;
7150
+ /**
7151
+ * How the model should select which tool (or tools) to use when generating a
7152
+ * response. See the `tools` parameter to see how to specify which tools the model
7153
+ * can call.
7154
+ */
7155
+ tool_choice?: ResponsesAPI.ToolChoiceOptions | ResponsesAPI.ToolChoiceAllowed | ResponsesAPI.ToolChoiceTypes | ResponsesAPI.ToolChoiceFunction | ResponsesAPI.ToolChoiceMcp | ResponsesAPI.ToolChoiceCustom | ResponseCreate.SpecificProgrammaticToolCallingParam | ResponsesAPI.ToolChoiceApplyPatch | ResponsesAPI.ToolChoiceShell;
7156
+ /**
7157
+ * An array of tools the model may call while generating a response. You can
7158
+ * specify which tool to use by setting the `tool_choice` parameter.
7159
+ *
7160
+ * We support the following categories of tools:
7161
+ *
7162
+ * - **Built-in tools**: Tools that are provided by OpenAI that extend the model's
7163
+ * capabilities, like
7164
+ * [web search](https://platform.openai.com/docs/guides/tools-web-search) or
7165
+ * [file search](https://platform.openai.com/docs/guides/tools-file-search).
7166
+ * Learn more about
7167
+ * [built-in tools](https://platform.openai.com/docs/guides/tools).
7168
+ * - **MCP Tools**: Integrations with third-party systems via custom MCP servers or
7169
+ * predefined connectors such as Google Drive and SharePoint. Learn more about
7170
+ * [MCP Tools](https://platform.openai.com/docs/guides/tools-connectors-mcp).
7171
+ * - **Function calls (custom tools)**: Functions that are defined by you, enabling
7172
+ * the model to call your own code with strongly typed arguments and outputs.
7173
+ * Learn more about
7174
+ * [function calling](https://platform.openai.com/docs/guides/function-calling).
7175
+ * You can also use custom tools to call your own code.
7176
+ */
7177
+ tools?: Array<ResponsesAPI.Tool>;
7178
+ /**
7179
+ * An integer between 0 and 20 specifying the maximum number of most likely tokens
7180
+ * to return at each token position, each with an associated log probability. In
7181
+ * some cases, the number of returned tokens may be fewer than requested.
7182
+ */
7183
+ top_logprobs?: number | null;
7184
+ /**
7185
+ * An alternative to sampling with temperature, called nucleus sampling, where the
7186
+ * model considers the results of the tokens with top_p probability mass. So 0.1
7187
+ * means only the tokens comprising the top 10% probability mass are considered.
7188
+ *
7189
+ * We generally recommend altering this or `temperature` but not both.
7190
+ */
7191
+ top_p?: number | null;
7192
+ /**
7193
+ * @deprecated The truncation strategy to use for the model response.
7194
+ *
7195
+ * - `auto`: If the input to this Response exceeds the model's context window size,
7196
+ * the model will truncate the response to fit the context window by dropping
7197
+ * items from the beginning of the conversation.
7198
+ * - `disabled` (default): If the input size will exceed the context window size
7199
+ * for a model, the request will fail with a 400 error.
7200
+ */
7201
+ truncation?: 'auto' | 'disabled' | null;
7202
+ /**
7203
+ * @deprecated This field is being replaced by `safety_identifier` and
7204
+ * `prompt_cache_key`. Use `prompt_cache_key` instead to maintain caching
7205
+ * optimizations. A stable identifier for your end-users. Used to boost cache hit
7206
+ * rates by better bucketing similar requests and to help OpenAI detect and prevent
7207
+ * abuse.
7208
+ * [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers).
7209
+ */
7210
+ user?: string;
7211
+ }
7212
+ namespace ResponseCreate {
7213
+ interface ContextManagement {
6665
7214
  /**
6666
- * The moderation policy for the response input.
7215
+ * The context management entry type. Currently only 'compaction' is supported.
6667
7216
  */
6668
- input?: Policy.Input | null;
7217
+ type: string;
6669
7218
  /**
6670
- * The moderation policy for the response output.
7219
+ * Token threshold at which compaction should be triggered for this entry.
6671
7220
  */
6672
- output?: Policy.Output | null;
7221
+ compact_threshold?: number | null;
6673
7222
  }
6674
- namespace Policy {
7223
+ /**
7224
+ * Configuration for running moderation on the input and output of this response.
7225
+ */
7226
+ interface Moderation {
6675
7227
  /**
6676
- * The moderation policy for the response input.
7228
+ * The moderation model to use for moderated completions, e.g.
7229
+ * 'omni-moderation-latest'.
6677
7230
  */
6678
- interface Input {
6679
- mode: 'score' | 'block';
6680
- }
7231
+ model: string;
6681
7232
  /**
6682
- * The moderation policy for the response output.
7233
+ * The policy to apply to moderated response input and output.
6683
7234
  */
6684
- interface Output {
6685
- mode: 'score' | 'block';
7235
+ policy?: Moderation.Policy | null;
7236
+ }
7237
+ namespace Moderation {
7238
+ /**
7239
+ * The policy to apply to moderated response input and output.
7240
+ */
7241
+ interface Policy {
7242
+ /**
7243
+ * The moderation policy for the response input.
7244
+ */
7245
+ input?: Policy.Input | null;
7246
+ /**
7247
+ * The moderation policy for the response output.
7248
+ */
7249
+ output?: Policy.Output | null;
7250
+ }
7251
+ namespace Policy {
7252
+ /**
7253
+ * The moderation policy for the response input.
7254
+ */
7255
+ interface Input {
7256
+ mode: 'score' | 'block';
7257
+ }
7258
+ /**
7259
+ * The moderation policy for the response output.
7260
+ */
7261
+ interface Output {
7262
+ mode: 'score' | 'block';
7263
+ }
6686
7264
  }
6687
7265
  }
6688
- }
6689
- /**
6690
- * Options for prompt caching. Supported for `gpt-5.6` and later models. By
6691
- * default, OpenAI automatically chooses one implicit cache breakpoint. You can add
6692
- * explicit breakpoints to content blocks with `prompt_cache_breakpoint`. Each
6693
- * request can write up to four breakpoints. For cache matching, OpenAI considers
6694
- * up to the latest 80 breakpoints in the conversation, without a content-block
6695
- * lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The
6696
- * `ttl` defaults to `30m`, which is currently the only supported value. See the
6697
- * [prompt caching guide](https://platform.openai.com/docs/guides/prompt-caching)
6698
- * for current details.
6699
- */
6700
- interface PromptCacheOptions {
6701
- /**
6702
- * Controls whether OpenAI automatically creates an implicit cache breakpoint.
6703
- * Defaults to `implicit`. With `implicit`, OpenAI creates one implicit breakpoint
6704
- * and writes up to the latest three explicit breakpoints in the request. With
6705
- * `explicit`, OpenAI does not create an implicit breakpoint and writes up to the
6706
- * latest four explicit breakpoints. If there are no explicit breakpoints, the
6707
- * request does not use prompt caching.
6708
- */
6709
- mode?: 'implicit' | 'explicit';
6710
- /**
6711
- * The minimum lifetime applied to every implicit and explicit cache breakpoint
6712
- * written by the request. Defaults to `30m`, which is currently the only supported
6713
- * value. The backend may retain cache entries for longer.
6714
- */
6715
- ttl?: '30m';
6716
- }
6717
- /**
6718
- * Options for streaming responses. Only set this when you set `stream: true`.
6719
- */
6720
- interface StreamOptions {
6721
7266
  /**
6722
- * When true, stream obfuscation will be enabled. Stream obfuscation adds random
6723
- * characters to an `obfuscation` field on streaming delta events to normalize
6724
- * payload sizes as a mitigation to certain side-channel attacks. These obfuscation
6725
- * fields are included by default, but add a small amount of overhead to the data
6726
- * stream. You can set `include_obfuscation` to false to optimize for bandwidth if
6727
- * you trust the network links between your application and the OpenAI API.
6728
- */
6729
- include_obfuscation?: boolean;
6730
- }
6731
- interface SpecificProgrammaticToolCallingParam {
7267
+ * Options for prompt caching. Supported for `gpt-5.6` and later models. By
7268
+ * default, OpenAI automatically chooses one implicit cache breakpoint. You can add
7269
+ * explicit breakpoints to content blocks with `prompt_cache_breakpoint`. Each
7270
+ * request can write up to four breakpoints. For cache matching, OpenAI considers
7271
+ * up to the latest 80 breakpoints in the conversation, without a content-block
7272
+ * lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The
7273
+ * `ttl` defaults to `30m`, which is currently the only supported value. See the
7274
+ * [prompt caching guide](https://platform.openai.com/docs/guides/prompt-caching)
7275
+ * for current details.
7276
+ */
7277
+ interface PromptCacheOptions {
7278
+ /**
7279
+ * Controls whether OpenAI automatically creates an implicit cache breakpoint.
7280
+ * Defaults to `implicit`. With `implicit`, OpenAI creates one implicit breakpoint
7281
+ * and writes up to the latest three explicit breakpoints in the request. With
7282
+ * `explicit`, OpenAI does not create an implicit breakpoint and writes up to the
7283
+ * latest four explicit breakpoints. If there are no explicit breakpoints, the
7284
+ * request does not use prompt caching.
7285
+ */
7286
+ mode?: 'implicit' | 'explicit';
7287
+ /**
7288
+ * The minimum lifetime applied to every implicit and explicit cache breakpoint
7289
+ * written by the request. Defaults to `30m`, which is currently the only supported
7290
+ * value. The backend may retain cache entries for longer.
7291
+ */
7292
+ ttl?: '30m';
7293
+ }
6732
7294
  /**
6733
- * The tool to call. Always `programmatic_tool_calling`.
7295
+ * Options for streaming responses. Only set this when you set `stream: true`.
6734
7296
  */
6735
- type: 'programmatic_tool_calling';
7297
+ interface StreamOptions {
7298
+ /**
7299
+ * When true, stream obfuscation will be enabled. Stream obfuscation adds random
7300
+ * characters to an `obfuscation` field on streaming delta events to normalize
7301
+ * payload sizes as a mitigation to certain side-channel attacks. These obfuscation
7302
+ * fields are included by default, but add a small amount of overhead to the data
7303
+ * stream. You can set `include_obfuscation` to false to optimize for bandwidth if
7304
+ * you trust the network links between your application and the OpenAI API.
7305
+ */
7306
+ include_obfuscation?: boolean;
7307
+ }
7308
+ interface SpecificProgrammaticToolCallingParam {
7309
+ /**
7310
+ * The tool to call. Always `programmatic_tool_calling`.
7311
+ */
7312
+ type: 'programmatic_tool_calling';
7313
+ }
6736
7314
  }
6737
7315
  }
6738
7316
  /**
6739
7317
  * Server events emitted by the Responses WebSocket server.
6740
7318
  */
6741
- export type ResponsesServerEvent = ResponsesServerEvent.ResponseAudioWsDelta | ResponsesServerEvent.ResponseAudioWsDone | ResponsesServerEvent.ResponseAudioTranscriptWsDelta | ResponsesServerEvent.ResponseAudioTranscriptWsDone | ResponsesServerEvent.ResponseCodeInterpreterCallCodeWsDelta | ResponsesServerEvent.ResponseCodeInterpreterCallCodeWsDone | ResponsesServerEvent.ResponseCodeInterpreterCallWsCompleted | ResponsesServerEvent.ResponseCodeInterpreterCallInWsProgress | ResponsesServerEvent.ResponseCodeInterpreterCallWsInterpreting | ResponsesServerEvent.ResponseWsCompleted | ResponsesServerEvent.ResponseContentPartWsAdded | ResponsesServerEvent.ResponseContentPartWsDone | ResponsesServerEvent.ResponseWsCreated | ResponsesServerEvent.ResponseFileSearchCallWsCompleted | ResponsesServerEvent.ResponseFileSearchCallInWsProgress | ResponsesServerEvent.ResponseFileSearchCallWsSearching | ResponsesServerEvent.ResponseFunctionCallArgumentsWsDelta | ResponsesServerEvent.ResponseFunctionCallArgumentsWsDone | ResponsesServerEvent.ResponseShellCallCommandWsAdded | ResponsesServerEvent.ResponseShellCallCommandWsDelta | ResponsesServerEvent.ResponseShellCallCommandWsDone | ResponsesServerEvent.ResponseShellCallOutputContentWsDelta | ResponsesServerEvent.ResponseShellCallOutputContentWsDone | ResponsesServerEvent.ResponseInWsProgress | ResponsesServerEvent.ResponseWsFailed | ResponsesServerEvent.ResponseWsIncomplete | ResponsesServerEvent.ResponseOutputItemWsAdded | ResponsesServerEvent.ResponseOutputItemWsDone | ResponsesServerEvent.ResponseReasoningSummaryPartWsAdded | ResponsesServerEvent.ResponseReasoningSummaryPartWsDone | ResponsesServerEvent.ResponseReasoningSummaryTextWsDelta | ResponsesServerEvent.ResponseReasoningSummaryTextWsDone | ResponsesServerEvent.ResponseReasoningTextWsDelta | ResponsesServerEvent.ResponseReasoningTextWsDone | ResponsesServerEvent.ResponseRefusalWsDelta | ResponsesServerEvent.ResponseRefusalWsDone | ResponsesServerEvent.ResponseTextWsDelta | ResponsesServerEvent.ResponseTextWsDone | ResponsesServerEvent.ResponseWebSearchCallWsCompleted | ResponsesServerEvent.ResponseWebSearchCallInWsProgress | ResponsesServerEvent.ResponseWebSearchCallWsSearching | ResponsesServerEvent.ResponseImageGenCallWsCompleted | ResponsesServerEvent.ResponseImageGenCallWsGenerating | ResponsesServerEvent.ResponseImageGenCallInWsProgress | ResponsesServerEvent.ResponseImageGenCallPartialWsImage | ResponsesServerEvent.ResponseMcpCallArgumentsWsDelta | ResponsesServerEvent.ResponseMcpCallArgumentsWsDone | ResponsesServerEvent.ResponseMcpCallWsCompleted | ResponsesServerEvent.ResponseMcpCallWsFailed | ResponsesServerEvent.ResponseMcpCallInWsProgress | ResponsesServerEvent.ResponseMcpListToolsWsCompleted | ResponsesServerEvent.ResponseMcpListToolsWsFailed | ResponsesServerEvent.ResponseMcpListToolsInWsProgress | ResponsesServerEvent.ResponseOutputTextAnnotationWsAdded | ResponsesServerEvent.ResponseWsQueued | ResponsesServerEvent.ResponseCustomToolCallInputWsDelta | ResponsesServerEvent.ResponseCustomToolCallInputWsDone | ResponsesServerEvent.ResponseWsStreamingError | ResponsesServerEvent.ResponseWsError;
7319
+ export type ResponsesServerEvent = ResponsesServerEvent.ResponseAudioWsDelta | ResponsesServerEvent.ResponseAudioWsDone | ResponsesServerEvent.ResponseAudioTranscriptWsDelta | ResponsesServerEvent.ResponseAudioTranscriptWsDone | ResponsesServerEvent.ResponseCodeInterpreterCallCodeWsDelta | ResponsesServerEvent.ResponseCodeInterpreterCallCodeWsDone | ResponsesServerEvent.ResponseCodeInterpreterCallWsCompleted | ResponsesServerEvent.ResponseCodeInterpreterCallInWsProgress | ResponsesServerEvent.ResponseCodeInterpreterCallWsInterpreting | ResponsesServerEvent.ResponseWsCompleted | ResponsesServerEvent.ResponseContentPartWsAdded | ResponsesServerEvent.ResponseContentPartWsDone | ResponsesServerEvent.ResponseWsCreated | ResponsesServerEvent.ResponseFileSearchCallWsCompleted | ResponsesServerEvent.ResponseFileSearchCallInWsProgress | ResponsesServerEvent.ResponseFileSearchCallWsSearching | ResponsesServerEvent.ResponseFunctionCallArgumentsWsDelta | ResponsesServerEvent.ResponseFunctionCallArgumentsWsDone | ResponsesServerEvent.ResponseShellCallCommandWsAdded | ResponsesServerEvent.ResponseShellCallCommandWsDelta | ResponsesServerEvent.ResponseShellCallCommandWsDone | ResponsesServerEvent.ResponseShellCallOutputContentWsDelta | ResponsesServerEvent.ResponseShellCallOutputContentWsDone | ResponsesServerEvent.ResponseInWsProgress | ResponsesServerEvent.ResponseWsFailed | ResponsesServerEvent.ResponseWsIncomplete | ResponsesServerEvent.ResponseOutputItemWsAdded | ResponsesServerEvent.ResponseOutputItemWsDone | ResponsesServerEvent.ResponseReasoningSummaryPartWsAdded | ResponsesServerEvent.ResponseReasoningSummaryPartWsDone | ResponsesServerEvent.ResponseReasoningSummaryTextWsDelta | ResponsesServerEvent.ResponseReasoningSummaryTextWsDone | ResponsesServerEvent.ResponseReasoningTextWsDelta | ResponsesServerEvent.ResponseReasoningTextWsDone | ResponsesServerEvent.ResponseRefusalWsDelta | ResponsesServerEvent.ResponseRefusalWsDone | ResponsesServerEvent.ResponseTextWsDelta | ResponsesServerEvent.ResponseTextWsDone | ResponsesServerEvent.ResponseWebSearchCallWsCompleted | ResponsesServerEvent.ResponseWebSearchCallInWsProgress | ResponsesServerEvent.ResponseWebSearchCallWsSearching | ResponsesServerEvent.ResponseImageGenCallWsCompleted | ResponsesServerEvent.ResponseImageGenCallWsGenerating | ResponsesServerEvent.ResponseImageGenCallInWsProgress | ResponsesServerEvent.ResponseImageGenCallPartialWsImage | ResponsesServerEvent.ResponseMcpCallArgumentsWsDelta | ResponsesServerEvent.ResponseMcpCallArgumentsWsDone | ResponsesServerEvent.ResponseMcpCallWsCompleted | ResponsesServerEvent.ResponseMcpCallWsFailed | ResponsesServerEvent.ResponseMcpCallInWsProgress | ResponsesServerEvent.ResponseMcpListToolsWsCompleted | ResponsesServerEvent.ResponseMcpListToolsWsFailed | ResponsesServerEvent.ResponseMcpListToolsInWsProgress | ResponsesServerEvent.ResponseOutputTextAnnotationWsAdded | ResponsesServerEvent.ResponseWsQueued | ResponsesServerEvent.ResponseCustomToolCallInputWsDelta | ResponsesServerEvent.ResponseCustomToolCallInputWsDone | ResponsesServerEvent.ResponseWsStreamingError | ResponsesServerEvent.ResponseWsError | ResponseSteerAcceptedEvent | ResponseSteerPendingEvent | ResponseSteerFailedEvent;
6742
7320
  export declare namespace ResponsesServerEvent {
6743
7321
  /**
6744
7322
  * Emitted when there is a partial audio response.
@@ -6992,6 +7570,10 @@ export declare namespace ResponsesServerEvent {
6992
7570
  }
6993
7571
  /**
6994
7572
  * An event that is emitted when a response finishes as incomplete.
7573
+ *
7574
+ * Over WebSocket, steering can finish a response with
7575
+ * `response.incomplete_details.reason` set to `steered`, followed automatically by
7576
+ * a successor `response.created` that commits the queued steering input.
6995
7577
  */
6996
7578
  interface ResponseWsIncomplete extends ResponseIncompleteEvent {
6997
7579
  /**
@@ -7377,6 +7959,34 @@ export declare namespace ResponsesServerEvent {
7377
7959
  headers?: {
7378
7960
  [key: string]: string;
7379
7961
  };
7962
+ misalignment?: Error.Misalignment;
7963
+ }
7964
+ namespace Error {
7965
+ interface Misalignment {
7966
+ /**
7967
+ * The public explanation for this block.
7968
+ */
7969
+ detailed_explanation?: string;
7970
+ /**
7971
+ * An optional classification; clients must accept additional values.
7972
+ */
7973
+ error_type?: (string & {}) | 'potentially_unintended_data_transfer' | 'potentially_unintended_data_access' | 'potentially_unintended_destructive_activity' | 'other';
7974
+ /**
7975
+ * An optional public continuation instruction.
7976
+ */
7977
+ steer?: Misalignment.Steer;
7978
+ }
7979
+ namespace Misalignment {
7980
+ /**
7981
+ * An optional public continuation instruction.
7982
+ */
7983
+ interface Steer {
7984
+ /**
7985
+ * The public continuation instruction.
7986
+ */
7987
+ message: string;
7988
+ }
7989
+ }
7380
7990
  }
7381
7991
  }
7382
7992
  }
@@ -8070,9 +8680,9 @@ export interface ResponseCreateParamsBase {
8070
8680
  */
8071
8681
  metadata?: Shared.Metadata | null;
8072
8682
  /**
8073
- * Model ID used to generate the response, like `gpt-4o` or `o3`. OpenAI offers a
8074
- * wide range of models with different capabilities, performance characteristics,
8075
- * and price points. Refer to the
8683
+ * Model ID used to generate the response, like `gpt-6-astra`. OpenAI offers a wide
8684
+ * range of models with different capabilities, performance characteristics, and
8685
+ * price points. Refer to the
8076
8686
  * [model guide](https://platform.openai.com/docs/models) to browse and compare
8077
8687
  * available models.
8078
8688
  */
@@ -8136,8 +8746,6 @@ export interface ResponseCreateParamsBase {
8136
8746
  */
8137
8747
  prompt_cache_retention?: 'in_memory' | '24h' | null;
8138
8748
  /**
8139
- * **gpt-5 and o-series models only**
8140
- *
8141
8749
  * Configuration options for
8142
8750
  * [reasoning models](https://platform.openai.com/docs/guides/reasoning).
8143
8751
  */
@@ -8456,13 +9064,13 @@ export interface ResponseRetrieveParamsStreaming extends ResponseRetrieveParamsB
8456
9064
  }
8457
9065
  export interface ResponseCompactParams {
8458
9066
  /**
8459
- * Model ID used to generate the response, like `gpt-5` or `o3`. OpenAI offers a
8460
- * wide range of models with different capabilities, performance characteristics,
8461
- * and price points. Refer to the
9067
+ * Model ID used to generate the response, like `gpt-6-astra`. OpenAI offers a wide
9068
+ * range of models with different capabilities, performance characteristics, and
9069
+ * price points. Refer to the
8462
9070
  * [model guide](https://platform.openai.com/docs/models) to browse and compare
8463
9071
  * available models.
8464
9072
  */
8465
- model: 'gpt-5.6-sol' | 'gpt-5.6-terra' | 'gpt-5.6-luna' | 'gpt-5.5' | 'gpt-5.5-2026-04-23' | 'gpt-5.4' | 'gpt-5.4-mini' | 'gpt-5.4-nano' | 'gpt-5.4-mini-2026-03-17' | 'gpt-5.4-nano-2026-03-17' | 'gpt-5.3-chat-latest' | 'gpt-5.2' | 'gpt-5.2-2025-12-11' | 'gpt-5.2-chat-latest' | 'gpt-5.2-pro' | 'gpt-5.2-pro-2025-12-11' | 'gpt-5.1' | 'gpt-5.1-2025-11-13' | 'gpt-5.1-codex' | 'gpt-5.1-mini' | 'gpt-5.1-chat-latest' | 'gpt-5' | 'gpt-5-mini' | 'gpt-5-nano' | 'gpt-5-2025-08-07' | 'gpt-5-mini-2025-08-07' | 'gpt-5-nano-2025-08-07' | 'gpt-5-chat-latest' | 'gpt-4.1' | 'gpt-4.1-mini' | 'gpt-4.1-nano' | 'gpt-4.1-2025-04-14' | 'gpt-4.1-mini-2025-04-14' | 'gpt-4.1-nano-2025-04-14' | 'o4-mini' | 'o4-mini-2025-04-16' | 'o3' | 'o3-2025-04-16' | 'o3-mini' | 'o3-mini-2025-01-31' | 'o1' | 'o1-2024-12-17' | 'o1-preview' | 'o1-preview-2024-09-12' | 'o1-mini' | 'o1-mini-2024-09-12' | 'gpt-4o' | 'gpt-4o-2024-11-20' | 'gpt-4o-2024-08-06' | 'gpt-4o-2024-05-13' | 'gpt-4o-audio-preview' | 'gpt-4o-audio-preview-2024-10-01' | 'gpt-4o-audio-preview-2024-12-17' | 'gpt-4o-audio-preview-2025-06-03' | 'gpt-4o-mini-audio-preview' | 'gpt-4o-mini-audio-preview-2024-12-17' | 'gpt-4o-search-preview' | 'gpt-4o-mini-search-preview' | 'gpt-4o-search-preview-2025-03-11' | 'gpt-4o-mini-search-preview-2025-03-11' | 'chatgpt-4o-latest' | 'codex-mini-latest' | 'gpt-4o-mini' | 'gpt-4o-mini-2024-07-18' | 'gpt-4-turbo' | 'gpt-4-turbo-2024-04-09' | 'gpt-4-0125-preview' | 'gpt-4-turbo-preview' | 'gpt-4-1106-preview' | 'gpt-4-vision-preview' | 'gpt-4' | 'gpt-4-0314' | 'gpt-4-0613' | 'gpt-4-32k' | 'gpt-4-32k-0314' | 'gpt-4-32k-0613' | 'gpt-3.5-turbo' | 'gpt-3.5-turbo-16k' | 'gpt-3.5-turbo-0301' | 'gpt-3.5-turbo-0613' | 'gpt-3.5-turbo-1106' | 'gpt-3.5-turbo-0125' | 'gpt-3.5-turbo-16k-0613' | 'o1-pro' | 'o1-pro-2025-03-19' | 'o3-pro' | 'o3-pro-2025-06-10' | 'o3-deep-research' | 'o3-deep-research-2025-06-26' | 'o4-mini-deep-research' | 'o4-mini-deep-research-2025-06-26' | 'computer-use-preview' | 'computer-use-preview-2025-03-11' | 'gpt-5.5-pro' | 'gpt-5.5-pro-2026-04-23' | 'gpt-5-codex' | 'gpt-5-pro' | 'gpt-5-pro-2025-10-06' | 'gpt-5.1-codex-max' | 'gpt-daybreak-blue-latest' | 'gpt-daybreak-red-latest' | 'gpt-5.6-cyber' | (string & {}) | null;
9073
+ model: 'gpt-6-astra' | 'gpt-5.6-sol' | 'gpt-5.6-terra' | 'gpt-5.6-luna' | 'gpt-5.5' | 'gpt-5.5-2026-04-23' | 'gpt-5.4' | 'gpt-5.4-mini' | 'gpt-5.4-nano' | 'gpt-5.4-mini-2026-03-17' | 'gpt-5.4-nano-2026-03-17' | 'gpt-5.3-chat-latest' | 'gpt-5.2' | 'gpt-5.2-2025-12-11' | 'gpt-5.2-chat-latest' | 'gpt-5.2-pro' | 'gpt-5.2-pro-2025-12-11' | 'gpt-5.1' | 'gpt-5.1-2025-11-13' | 'gpt-5.1-codex' | 'gpt-5.1-mini' | 'gpt-5.1-chat-latest' | 'gpt-5' | 'gpt-5-mini' | 'gpt-5-nano' | 'gpt-5-2025-08-07' | 'gpt-5-mini-2025-08-07' | 'gpt-5-nano-2025-08-07' | 'gpt-5-chat-latest' | 'gpt-4.1' | 'gpt-4.1-mini' | 'gpt-4.1-nano' | 'gpt-4.1-2025-04-14' | 'gpt-4.1-mini-2025-04-14' | 'gpt-4.1-nano-2025-04-14' | 'o4-mini' | 'o4-mini-2025-04-16' | 'o3' | 'o3-2025-04-16' | 'o3-mini' | 'o3-mini-2025-01-31' | 'o1' | 'o1-2024-12-17' | 'o1-preview' | 'o1-preview-2024-09-12' | 'o1-mini' | 'o1-mini-2024-09-12' | 'gpt-4o' | 'gpt-4o-2024-11-20' | 'gpt-4o-2024-08-06' | 'gpt-4o-2024-05-13' | 'gpt-4o-audio-preview' | 'gpt-4o-audio-preview-2024-10-01' | 'gpt-4o-audio-preview-2024-12-17' | 'gpt-4o-audio-preview-2025-06-03' | 'gpt-4o-mini-audio-preview' | 'gpt-4o-mini-audio-preview-2024-12-17' | 'gpt-4o-search-preview' | 'gpt-4o-mini-search-preview' | 'gpt-4o-search-preview-2025-03-11' | 'gpt-4o-mini-search-preview-2025-03-11' | 'chatgpt-4o-latest' | 'codex-mini-latest' | 'gpt-4o-mini' | 'gpt-4o-mini-2024-07-18' | 'gpt-4-turbo' | 'gpt-4-turbo-2024-04-09' | 'gpt-4-0125-preview' | 'gpt-4-turbo-preview' | 'gpt-4-1106-preview' | 'gpt-4-vision-preview' | 'gpt-4' | 'gpt-4-0314' | 'gpt-4-0613' | 'gpt-4-32k' | 'gpt-4-32k-0314' | 'gpt-4-32k-0613' | 'gpt-3.5-turbo' | 'gpt-3.5-turbo-16k' | 'gpt-3.5-turbo-0301' | 'gpt-3.5-turbo-0613' | 'gpt-3.5-turbo-1106' | 'gpt-3.5-turbo-0125' | 'gpt-3.5-turbo-16k-0613' | 'o1-pro' | 'o1-pro-2025-03-19' | 'o3-pro' | 'o3-pro-2025-06-10' | 'o3-deep-research' | 'o3-deep-research-2025-06-26' | 'o4-mini-deep-research' | 'o4-mini-deep-research-2025-06-26' | 'computer-use-preview' | 'computer-use-preview-2025-03-11' | 'gpt-5.5-pro' | 'gpt-5.5-pro-2026-04-23' | 'gpt-5-codex' | 'gpt-5-pro' | 'gpt-5-pro-2025-10-06' | 'gpt-5.1-codex-max' | 'gpt-daybreak-blue-latest' | 'gpt-daybreak-red-latest' | 'gpt-5.6-cyber' | (string & {}) | null;
8466
9074
  /**
8467
9075
  * Text, image, or file inputs to the model, used to generate a response
8468
9076
  */
@@ -8551,7 +9159,7 @@ export declare namespace ResponseCompactParams {
8551
9159
  }
8552
9160
  }
8553
9161
  export declare namespace Responses {
8554
- export { type ApplyPatchTool as ApplyPatchTool, type CompactedResponse as CompactedResponse, type ComputerAction as ComputerAction, type ComputerActionList as ComputerActionList, type ComputerTool as ComputerTool, type ComputerUsePreviewTool as ComputerUsePreviewTool, type ContainerAuto as ContainerAuto, type ContainerNetworkPolicyAllowlist as ContainerNetworkPolicyAllowlist, type ContainerNetworkPolicyDisabled as ContainerNetworkPolicyDisabled, type ContainerNetworkPolicyDomainSecret as ContainerNetworkPolicyDomainSecret, type ContainerReference as ContainerReference, type CustomTool as CustomTool, type EasyInputMessage as EasyInputMessage, type FileSearchTool as FileSearchTool, type FunctionShellTool as FunctionShellTool, type FunctionTool as FunctionTool, type ImageDetail as ImageDetail, type InlineSkill as InlineSkill, type InlineSkillSource as InlineSkillSource, type LocalEnvironment as LocalEnvironment, type LocalSkill as LocalSkill, type McpToolCallError as McpToolCallError, type NamespaceTool as NamespaceTool, type Response as Response, type ResponseApplyPatchToolCall as ResponseApplyPatchToolCall, type ResponseApplyPatchToolCallOutput as ResponseApplyPatchToolCallOutput, type ResponseAudioDeltaEvent as ResponseAudioDeltaEvent, type ResponseAudioDoneEvent as ResponseAudioDoneEvent, type ResponseAudioTranscriptDeltaEvent as ResponseAudioTranscriptDeltaEvent, type ResponseAudioTranscriptDoneEvent as ResponseAudioTranscriptDoneEvent, type ResponseCodeInterpreterCallCodeDeltaEvent as ResponseCodeInterpreterCallCodeDeltaEvent, type ResponseCodeInterpreterCallCodeDoneEvent as ResponseCodeInterpreterCallCodeDoneEvent, type ResponseCodeInterpreterCallCompletedEvent as ResponseCodeInterpreterCallCompletedEvent, type ResponseCodeInterpreterCallInProgressEvent as ResponseCodeInterpreterCallInProgressEvent, type ResponseCodeInterpreterCallInterpretingEvent as ResponseCodeInterpreterCallInterpretingEvent, type ResponseCodeInterpreterToolCall as ResponseCodeInterpreterToolCall, type ResponseCompactionItem as ResponseCompactionItem, type ResponseCompactionItemParam as ResponseCompactionItemParam, type ResponseCompletedEvent as ResponseCompletedEvent, type ResponseComputerToolCall as ResponseComputerToolCall, type ResponseComputerToolCallOutputItem as ResponseComputerToolCallOutputItem, type ResponseComputerToolCallOutputScreenshot as ResponseComputerToolCallOutputScreenshot, type ResponseContainerReference as ResponseContainerReference, type ResponseContent as ResponseContent, type ResponseContentPartAddedEvent as ResponseContentPartAddedEvent, type ResponseContentPartDoneEvent as ResponseContentPartDoneEvent, type ResponseConversationParam as ResponseConversationParam, type ResponseCreatedEvent as ResponseCreatedEvent, type ResponseCustomToolCall as ResponseCustomToolCall, type ResponseCustomToolCallInputDeltaEvent as ResponseCustomToolCallInputDeltaEvent, type ResponseCustomToolCallInputDoneEvent as ResponseCustomToolCallInputDoneEvent, type ResponseCustomToolCallItem as ResponseCustomToolCallItem, type ResponseCustomToolCallOutput as ResponseCustomToolCallOutput, type ResponseCustomToolCallOutputItem as ResponseCustomToolCallOutputItem, type ResponseError as ResponseError, type ResponseErrorEvent as ResponseErrorEvent, type ResponseFailedEvent as ResponseFailedEvent, type ResponseFileSearchCallCompletedEvent as ResponseFileSearchCallCompletedEvent, type ResponseFileSearchCallInProgressEvent as ResponseFileSearchCallInProgressEvent, type ResponseFileSearchCallSearchingEvent as ResponseFileSearchCallSearchingEvent, type ResponseFileSearchToolCall as ResponseFileSearchToolCall, type ResponseFormatTextConfig as ResponseFormatTextConfig, type ResponseFormatTextJSONSchemaConfig as ResponseFormatTextJSONSchemaConfig, type ResponseFunctionCallArgumentsDeltaEvent as ResponseFunctionCallArgumentsDeltaEvent, type ResponseFunctionCallArgumentsDoneEvent as ResponseFunctionCallArgumentsDoneEvent, type ResponseFunctionCallOutputItem as ResponseFunctionCallOutputItem, type ResponseFunctionCallOutputItemList as ResponseFunctionCallOutputItemList, type ResponseFunctionShellCallOutputContent as ResponseFunctionShellCallOutputContent, type ResponseFunctionShellToolCall as ResponseFunctionShellToolCall, type ResponseFunctionShellToolCallOutput as ResponseFunctionShellToolCallOutput, type ResponseFunctionToolCall as ResponseFunctionToolCall, type ResponseFunctionToolCallItem as ResponseFunctionToolCallItem, type ResponseFunctionToolCallOutputItem as ResponseFunctionToolCallOutputItem, type ResponseFunctionWebSearch as ResponseFunctionWebSearch, type ResponseImageGenCallCompletedEvent as ResponseImageGenCallCompletedEvent, type ResponseImageGenCallGeneratingEvent as ResponseImageGenCallGeneratingEvent, type ResponseImageGenCallInProgressEvent as ResponseImageGenCallInProgressEvent, type ResponseImageGenCallPartialImageEvent as ResponseImageGenCallPartialImageEvent, type ResponseInProgressEvent as ResponseInProgressEvent, type ResponseIncludable as ResponseIncludable, type ResponseIncompleteEvent as ResponseIncompleteEvent, type ResponseInput as ResponseInput, type ResponseInputAudio as ResponseInputAudio, type ResponseInputContent as ResponseInputContent, type ResponseInputFile as ResponseInputFile, type ResponseInputFileContent as ResponseInputFileContent, type ResponseInputImage as ResponseInputImage, type ResponseInputImageContent as ResponseInputImageContent, type ResponseInputItem as ResponseInputItem, type ResponseInputMessageContentList as ResponseInputMessageContentList, type ResponseInputMessageItem as ResponseInputMessageItem, type ResponseInputText as ResponseInputText, type ResponseInputTextContent as ResponseInputTextContent, type ResponseItem as ResponseItem, type ResponseLocalEnvironment as ResponseLocalEnvironment, type ResponseMcpCallArgumentsDeltaEvent as ResponseMcpCallArgumentsDeltaEvent, type ResponseMcpCallArgumentsDoneEvent as ResponseMcpCallArgumentsDoneEvent, type ResponseMcpCallCompletedEvent as ResponseMcpCallCompletedEvent, type ResponseMcpCallFailedEvent as ResponseMcpCallFailedEvent, type ResponseMcpCallInProgressEvent as ResponseMcpCallInProgressEvent, type ResponseMcpListToolsCompletedEvent as ResponseMcpListToolsCompletedEvent, type ResponseMcpListToolsFailedEvent as ResponseMcpListToolsFailedEvent, type ResponseMcpListToolsInProgressEvent as ResponseMcpListToolsInProgressEvent, type ResponseOutputAudio as ResponseOutputAudio, type ResponseOutputItem as ResponseOutputItem, type ResponseOutputItemAddedEvent as ResponseOutputItemAddedEvent, type ResponseOutputItemDoneEvent as ResponseOutputItemDoneEvent, type ResponseOutputMessage as ResponseOutputMessage, type ResponseOutputRefusal as ResponseOutputRefusal, type ResponseOutputText as ResponseOutputText, type ResponseOutputTextAnnotationAddedEvent as ResponseOutputTextAnnotationAddedEvent, type ResponsePrompt as ResponsePrompt, type ResponseQueuedEvent as ResponseQueuedEvent, type ResponseReasoningItem as ResponseReasoningItem, type ResponseReasoningSummaryPartAddedEvent as ResponseReasoningSummaryPartAddedEvent, type ResponseReasoningSummaryPartDoneEvent as ResponseReasoningSummaryPartDoneEvent, type ResponseReasoningSummaryTextDeltaEvent as ResponseReasoningSummaryTextDeltaEvent, type ResponseReasoningSummaryTextDoneEvent as ResponseReasoningSummaryTextDoneEvent, type ResponseReasoningTextDeltaEvent as ResponseReasoningTextDeltaEvent, type ResponseReasoningTextDoneEvent as ResponseReasoningTextDoneEvent, type ResponseRefusalDeltaEvent as ResponseRefusalDeltaEvent, type ResponseRefusalDoneEvent as ResponseRefusalDoneEvent, type ResponseShellCallCommandAddedEvent as ResponseShellCallCommandAddedEvent, type ResponseShellCallCommandDeltaEvent as ResponseShellCallCommandDeltaEvent, type ResponseShellCallCommandDoneEvent as ResponseShellCallCommandDoneEvent, type ResponseShellCallOutputContentDeltaEvent as ResponseShellCallOutputContentDeltaEvent, type ResponseShellCallOutputContentDoneEvent as ResponseShellCallOutputContentDoneEvent, type ResponseStatus as ResponseStatus, type ResponseStreamEvent as ResponseStreamEvent, type ResponseTextConfig as ResponseTextConfig, type ResponseTextDeltaEvent as ResponseTextDeltaEvent, type ResponseTextDoneEvent as ResponseTextDoneEvent, type ResponseToolSearchCall as ResponseToolSearchCall, type ResponseToolSearchOutputItem as ResponseToolSearchOutputItem, type ResponseToolSearchOutputItemParam as ResponseToolSearchOutputItemParam, type ResponseUsage as ResponseUsage, type ResponseWebSearchCallCompletedEvent as ResponseWebSearchCallCompletedEvent, type ResponseWebSearchCallInProgressEvent as ResponseWebSearchCallInProgressEvent, type ResponseWebSearchCallSearchingEvent as ResponseWebSearchCallSearchingEvent, type ResponsesClientEvent as ResponsesClientEvent, type ResponsesServerEvent as ResponsesServerEvent, type ServiceTier as ServiceTier, type SkillReference as SkillReference, type Tool as Tool, type ToolChoiceAllowed as ToolChoiceAllowed, type ToolChoiceApplyPatch as ToolChoiceApplyPatch, type ToolChoiceCustom as ToolChoiceCustom, type ToolChoiceFunction as ToolChoiceFunction, type ToolChoiceMcp as ToolChoiceMcp, type ToolChoiceOptions as ToolChoiceOptions, type ToolChoiceShell as ToolChoiceShell, type ToolChoiceTypes as ToolChoiceTypes, type ToolSearchTool as ToolSearchTool, type WebSearchPreviewTool as WebSearchPreviewTool, type WebSearchTool as WebSearchTool, type ResponseCreateParams as ResponseCreateParams, type ResponseCreateParamsNonStreaming as ResponseCreateParamsNonStreaming, type ResponseCreateParamsStreaming as ResponseCreateParamsStreaming, type ResponseRetrieveParams as ResponseRetrieveParams, type ResponseRetrieveParamsNonStreaming as ResponseRetrieveParamsNonStreaming, type ResponseRetrieveParamsStreaming as ResponseRetrieveParamsStreaming, type ResponseCompactParams as ResponseCompactParams, };
9162
+ export { type ApplyPatchTool as ApplyPatchTool, type CompactedResponse as CompactedResponse, type ComputerAction as ComputerAction, type ComputerActionList as ComputerActionList, type ComputerTool as ComputerTool, type ComputerUsePreviewTool as ComputerUsePreviewTool, type ContainerAuto as ContainerAuto, type ContainerNetworkPolicyAllowlist as ContainerNetworkPolicyAllowlist, type ContainerNetworkPolicyDisabled as ContainerNetworkPolicyDisabled, type ContainerNetworkPolicyDomainSecret as ContainerNetworkPolicyDomainSecret, type ContainerReference as ContainerReference, type CustomTool as CustomTool, type EasyInputMessage as EasyInputMessage, type FileSearchTool as FileSearchTool, type FunctionShellTool as FunctionShellTool, type FunctionTool as FunctionTool, type ImageDetail as ImageDetail, type InlineSkill as InlineSkill, type InlineSkillSource as InlineSkillSource, type LocalEnvironment as LocalEnvironment, type LocalSkill as LocalSkill, type McpToolCallError as McpToolCallError, type NamespaceTool as NamespaceTool, type Response as Response, type ResponseApplyPatchToolCall as ResponseApplyPatchToolCall, type ResponseApplyPatchToolCallOutput as ResponseApplyPatchToolCallOutput, type ResponseAudioDeltaEvent as ResponseAudioDeltaEvent, type ResponseAudioDoneEvent as ResponseAudioDoneEvent, type ResponseAudioTranscriptDeltaEvent as ResponseAudioTranscriptDeltaEvent, type ResponseAudioTranscriptDoneEvent as ResponseAudioTranscriptDoneEvent, type ResponseCodeInterpreterCallCodeDeltaEvent as ResponseCodeInterpreterCallCodeDeltaEvent, type ResponseCodeInterpreterCallCodeDoneEvent as ResponseCodeInterpreterCallCodeDoneEvent, type ResponseCodeInterpreterCallCompletedEvent as ResponseCodeInterpreterCallCompletedEvent, type ResponseCodeInterpreterCallInProgressEvent as ResponseCodeInterpreterCallInProgressEvent, type ResponseCodeInterpreterCallInterpretingEvent as ResponseCodeInterpreterCallInterpretingEvent, type ResponseCodeInterpreterToolCall as ResponseCodeInterpreterToolCall, type ResponseCompactionItem as ResponseCompactionItem, type ResponseCompactionItemParam as ResponseCompactionItemParam, type ResponseCompletedEvent as ResponseCompletedEvent, type ResponseComputerToolCall as ResponseComputerToolCall, type ResponseComputerToolCallOutputItem as ResponseComputerToolCallOutputItem, type ResponseComputerToolCallOutputScreenshot as ResponseComputerToolCallOutputScreenshot, type ResponseConfigurationUpdateItem as ResponseConfigurationUpdateItem, type ResponseConfigurationUpdateItemParam as ResponseConfigurationUpdateItemParam, type ResponseContainerReference as ResponseContainerReference, type ResponseContent as ResponseContent, type ResponseContentPartAddedEvent as ResponseContentPartAddedEvent, type ResponseContentPartDoneEvent as ResponseContentPartDoneEvent, type ResponseConversationParam as ResponseConversationParam, type ResponseCreatedEvent as ResponseCreatedEvent, type ResponseCustomToolCall as ResponseCustomToolCall, type ResponseCustomToolCallInputDeltaEvent as ResponseCustomToolCallInputDeltaEvent, type ResponseCustomToolCallInputDoneEvent as ResponseCustomToolCallInputDoneEvent, type ResponseCustomToolCallItem as ResponseCustomToolCallItem, type ResponseCustomToolCallOutput as ResponseCustomToolCallOutput, type ResponseCustomToolCallOutputItem as ResponseCustomToolCallOutputItem, type ResponseError as ResponseError, type ResponseErrorEvent as ResponseErrorEvent, type ResponseFailedEvent as ResponseFailedEvent, type ResponseFileSearchCallCompletedEvent as ResponseFileSearchCallCompletedEvent, type ResponseFileSearchCallInProgressEvent as ResponseFileSearchCallInProgressEvent, type ResponseFileSearchCallSearchingEvent as ResponseFileSearchCallSearchingEvent, type ResponseFileSearchToolCall as ResponseFileSearchToolCall, type ResponseFormatTextConfig as ResponseFormatTextConfig, type ResponseFormatTextJSONSchemaConfig as ResponseFormatTextJSONSchemaConfig, type ResponseFunctionCallArgumentsDeltaEvent as ResponseFunctionCallArgumentsDeltaEvent, type ResponseFunctionCallArgumentsDoneEvent as ResponseFunctionCallArgumentsDoneEvent, type ResponseFunctionCallOutputItem as ResponseFunctionCallOutputItem, type ResponseFunctionCallOutputItemList as ResponseFunctionCallOutputItemList, type ResponseFunctionShellCallOutputContent as ResponseFunctionShellCallOutputContent, type ResponseFunctionShellToolCall as ResponseFunctionShellToolCall, type ResponseFunctionShellToolCallOutput as ResponseFunctionShellToolCallOutput, type ResponseFunctionToolCall as ResponseFunctionToolCall, type ResponseFunctionToolCallItem as ResponseFunctionToolCallItem, type ResponseFunctionToolCallOutputItem as ResponseFunctionToolCallOutputItem, type ResponseFunctionWebSearch as ResponseFunctionWebSearch, type ResponseImageGenCallCompletedEvent as ResponseImageGenCallCompletedEvent, type ResponseImageGenCallGeneratingEvent as ResponseImageGenCallGeneratingEvent, type ResponseImageGenCallInProgressEvent as ResponseImageGenCallInProgressEvent, type ResponseImageGenCallPartialImageEvent as ResponseImageGenCallPartialImageEvent, type ResponseInProgressEvent as ResponseInProgressEvent, type ResponseIncludable as ResponseIncludable, type ResponseIncompleteEvent as ResponseIncompleteEvent, type ResponseInput as ResponseInput, type ResponseInputAudio as ResponseInputAudio, type ResponseInputContent as ResponseInputContent, type ResponseInputFile as ResponseInputFile, type ResponseInputFileContent as ResponseInputFileContent, type ResponseInputImage as ResponseInputImage, type ResponseInputImageContent as ResponseInputImageContent, type ResponseInputItem as ResponseInputItem, type ResponseInputMessageContentList as ResponseInputMessageContentList, type ResponseInputMessageItem as ResponseInputMessageItem, type ResponseInputText as ResponseInputText, type ResponseInputTextContent as ResponseInputTextContent, type ResponseItem as ResponseItem, type ResponseLocalEnvironment as ResponseLocalEnvironment, type ResponseMcpCallArgumentsDeltaEvent as ResponseMcpCallArgumentsDeltaEvent, type ResponseMcpCallArgumentsDoneEvent as ResponseMcpCallArgumentsDoneEvent, type ResponseMcpCallCompletedEvent as ResponseMcpCallCompletedEvent, type ResponseMcpCallFailedEvent as ResponseMcpCallFailedEvent, type ResponseMcpCallInProgressEvent as ResponseMcpCallInProgressEvent, type ResponseMcpListToolsCompletedEvent as ResponseMcpListToolsCompletedEvent, type ResponseMcpListToolsFailedEvent as ResponseMcpListToolsFailedEvent, type ResponseMcpListToolsInProgressEvent as ResponseMcpListToolsInProgressEvent, type ResponseOutputAudio as ResponseOutputAudio, type ResponseOutputItem as ResponseOutputItem, type ResponseOutputItemAddedEvent as ResponseOutputItemAddedEvent, type ResponseOutputItemDoneEvent as ResponseOutputItemDoneEvent, type ResponseOutputMessage as ResponseOutputMessage, type ResponseOutputRefusal as ResponseOutputRefusal, type ResponseOutputText as ResponseOutputText, type ResponseOutputTextAnnotationAddedEvent as ResponseOutputTextAnnotationAddedEvent, type ResponsePrompt as ResponsePrompt, type ResponseQueuedEvent as ResponseQueuedEvent, type ResponseReasoningItem as ResponseReasoningItem, type ResponseReasoningSummaryPartAddedEvent as ResponseReasoningSummaryPartAddedEvent, type ResponseReasoningSummaryPartDoneEvent as ResponseReasoningSummaryPartDoneEvent, type ResponseReasoningSummaryTextDeltaEvent as ResponseReasoningSummaryTextDeltaEvent, type ResponseReasoningSummaryTextDoneEvent as ResponseReasoningSummaryTextDoneEvent, type ResponseReasoningTextDeltaEvent as ResponseReasoningTextDeltaEvent, type ResponseReasoningTextDoneEvent as ResponseReasoningTextDoneEvent, type ResponseRefusalDeltaEvent as ResponseRefusalDeltaEvent, type ResponseRefusalDoneEvent as ResponseRefusalDoneEvent, type ResponseShellCallCommandAddedEvent as ResponseShellCallCommandAddedEvent, type ResponseShellCallCommandDeltaEvent as ResponseShellCallCommandDeltaEvent, type ResponseShellCallCommandDoneEvent as ResponseShellCallCommandDoneEvent, type ResponseShellCallOutputContentDeltaEvent as ResponseShellCallOutputContentDeltaEvent, type ResponseShellCallOutputContentDoneEvent as ResponseShellCallOutputContentDoneEvent, type ResponseStatus as ResponseStatus, type ResponseSteerAcceptedEvent as ResponseSteerAcceptedEvent, type ResponseSteerErrorCode as ResponseSteerErrorCode, type ResponseSteerEvent as ResponseSteerEvent, type ResponseSteerFailedEvent as ResponseSteerFailedEvent, type ResponseSteerInput as ResponseSteerInput, type ResponseSteerInputContent as ResponseSteerInputContent, type ResponseSteerPendingEvent as ResponseSteerPendingEvent, type ResponseSteerPendingReason as ResponseSteerPendingReason, type ResponseSteerRequiredInput as ResponseSteerRequiredInput, type ResponseStreamEvent as ResponseStreamEvent, type ResponseTextConfig as ResponseTextConfig, type ResponseTextDeltaEvent as ResponseTextDeltaEvent, type ResponseTextDoneEvent as ResponseTextDoneEvent, type ResponseToolSearchCall as ResponseToolSearchCall, type ResponseToolSearchOutputItem as ResponseToolSearchOutputItem, type ResponseToolSearchOutputItemParam as ResponseToolSearchOutputItemParam, type ResponseUsage as ResponseUsage, type ResponseWebSearchCallCompletedEvent as ResponseWebSearchCallCompletedEvent, type ResponseWebSearchCallInProgressEvent as ResponseWebSearchCallInProgressEvent, type ResponseWebSearchCallSearchingEvent as ResponseWebSearchCallSearchingEvent, type ResponsesClientEvent as ResponsesClientEvent, type ResponsesServerEvent as ResponsesServerEvent, type ServiceTier as ServiceTier, type SkillReference as SkillReference, type Tool as Tool, type ToolChoiceAllowed as ToolChoiceAllowed, type ToolChoiceApplyPatch as ToolChoiceApplyPatch, type ToolChoiceCustom as ToolChoiceCustom, type ToolChoiceFunction as ToolChoiceFunction, type ToolChoiceMcp as ToolChoiceMcp, type ToolChoiceOptions as ToolChoiceOptions, type ToolChoiceShell as ToolChoiceShell, type ToolChoiceTypes as ToolChoiceTypes, type ToolSearchTool as ToolSearchTool, type WebSearchPreviewTool as WebSearchPreviewTool, type WebSearchTool as WebSearchTool, type ResponseCreateParams as ResponseCreateParams, type ResponseCreateParamsNonStreaming as ResponseCreateParamsNonStreaming, type ResponseCreateParamsStreaming as ResponseCreateParamsStreaming, type ResponseRetrieveParams as ResponseRetrieveParams, type ResponseRetrieveParamsNonStreaming as ResponseRetrieveParamsNonStreaming, type ResponseRetrieveParamsStreaming as ResponseRetrieveParamsStreaming, type ResponseCompactParams as ResponseCompactParams, };
8555
9163
  export { InputItems as InputItems, type ResponseItemList as ResponseItemList, type InputItemListParams as InputItemListParams, };
8556
9164
  export { InputTokens as InputTokens, type InputTokenCountResponse as InputTokenCountResponse, type InputTokenCountParams as InputTokenCountParams, };
8557
9165
  }