openai 7.9.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 (148) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/client.d.mts +3 -0
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +3 -0
  5. package/client.d.ts.map +1 -1
  6. package/client.js +3 -0
  7. package/client.js.map +1 -1
  8. package/client.mjs +3 -0
  9. package/client.mjs.map +1 -1
  10. package/lib/responses/ResponseInputItems.d.mts.map +1 -1
  11. package/lib/responses/ResponseInputItems.d.ts.map +1 -1
  12. package/lib/responses/ResponseInputItems.js +1 -0
  13. package/lib/responses/ResponseInputItems.js.map +1 -1
  14. package/lib/responses/ResponseInputItems.mjs +1 -0
  15. package/lib/responses/ResponseInputItems.mjs.map +1 -1
  16. package/package.json +1 -1
  17. package/resources/admin/organization/usage.d.mts +1 -1
  18. package/resources/admin/organization/usage.d.ts +1 -1
  19. package/resources/batches.d.mts +1 -1
  20. package/resources/batches.d.ts +1 -1
  21. package/resources/beta/beta.d.mts +2 -2
  22. package/resources/beta/beta.d.mts.map +1 -1
  23. package/resources/beta/beta.d.ts +2 -2
  24. package/resources/beta/beta.d.ts.map +1 -1
  25. package/resources/beta/beta.js.map +1 -1
  26. package/resources/beta/beta.mjs.map +1 -1
  27. package/resources/beta/index.d.mts +1 -1
  28. package/resources/beta/index.d.mts.map +1 -1
  29. package/resources/beta/index.d.ts +1 -1
  30. package/resources/beta/index.d.ts.map +1 -1
  31. package/resources/beta/index.js.map +1 -1
  32. package/resources/beta/index.mjs.map +1 -1
  33. package/resources/beta/responses/index.d.mts +1 -1
  34. package/resources/beta/responses/index.d.mts.map +1 -1
  35. package/resources/beta/responses/index.d.ts +1 -1
  36. package/resources/beta/responses/index.d.ts.map +1 -1
  37. package/resources/beta/responses/index.js.map +1 -1
  38. package/resources/beta/responses/index.mjs.map +1 -1
  39. package/resources/beta/responses/responses.d.mts +660 -17
  40. package/resources/beta/responses/responses.d.mts.map +1 -1
  41. package/resources/beta/responses/responses.d.ts +660 -17
  42. package/resources/beta/responses/responses.d.ts.map +1 -1
  43. package/resources/beta/responses/responses.js +1 -1
  44. package/resources/beta/responses/responses.js.map +1 -1
  45. package/resources/beta/responses/responses.mjs +1 -1
  46. package/resources/beta/responses/responses.mjs.map +1 -1
  47. package/resources/chat/completions/completions.d.mts +2 -2
  48. package/resources/chat/completions/completions.d.ts +2 -2
  49. package/resources/conversations/items.d.mts +1 -1
  50. package/resources/conversations/items.d.mts.map +1 -1
  51. package/resources/conversations/items.d.ts +1 -1
  52. package/resources/conversations/items.d.ts.map +1 -1
  53. package/resources/evals/evals.d.mts +4 -4
  54. package/resources/evals/evals.d.ts +4 -4
  55. package/resources/evals/runs/runs.d.mts +1 -1
  56. package/resources/evals/runs/runs.d.ts +1 -1
  57. package/resources/index.d.mts +1 -0
  58. package/resources/index.d.mts.map +1 -1
  59. package/resources/index.d.ts +1 -0
  60. package/resources/index.d.ts.map +1 -1
  61. package/resources/index.js +3 -1
  62. package/resources/index.js.map +1 -1
  63. package/resources/index.mjs +1 -0
  64. package/resources/index.mjs.map +1 -1
  65. package/resources/responses/responses.d.mts +1098 -480
  66. package/resources/responses/responses.d.mts.map +1 -1
  67. package/resources/responses/responses.d.ts +1098 -480
  68. package/resources/responses/responses.d.ts.map +1 -1
  69. package/resources/responses/responses.js +1 -1
  70. package/resources/responses/responses.js.map +1 -1
  71. package/resources/responses/responses.mjs +1 -1
  72. package/resources/responses/responses.mjs.map +1 -1
  73. package/resources/safety/alerts.d.mts +32 -0
  74. package/resources/safety/alerts.d.mts.map +1 -0
  75. package/resources/safety/alerts.d.ts +32 -0
  76. package/resources/safety/alerts.d.ts.map +1 -0
  77. package/resources/safety/alerts.js +16 -0
  78. package/resources/safety/alerts.js.map +1 -0
  79. package/resources/safety/alerts.mjs +12 -0
  80. package/resources/safety/alerts.mjs.map +1 -0
  81. package/resources/safety/index.d.mts +3 -0
  82. package/resources/safety/index.d.mts.map +1 -0
  83. package/resources/safety/index.d.ts +3 -0
  84. package/resources/safety/index.d.ts.map +1 -0
  85. package/resources/safety/index.js +9 -0
  86. package/resources/safety/index.js.map +1 -0
  87. package/resources/safety/index.mjs +4 -0
  88. package/resources/safety/index.mjs.map +1 -0
  89. package/resources/safety/safety.d.mts +10 -0
  90. package/resources/safety/safety.d.mts.map +1 -0
  91. package/resources/safety/safety.d.ts +10 -0
  92. package/resources/safety/safety.d.ts.map +1 -0
  93. package/resources/safety/safety.js +17 -0
  94. package/resources/safety/safety.js.map +1 -0
  95. package/resources/safety/safety.mjs +12 -0
  96. package/resources/safety/safety.mjs.map +1 -0
  97. package/resources/safety.d.mts +2 -0
  98. package/resources/safety.d.mts.map +1 -0
  99. package/resources/safety.d.ts +2 -0
  100. package/resources/safety.d.ts.map +1 -0
  101. package/resources/safety.js +6 -0
  102. package/resources/safety.js.map +1 -0
  103. package/resources/safety.mjs +3 -0
  104. package/resources/safety.mjs.map +1 -0
  105. package/resources/shared.d.mts +29 -1
  106. package/resources/shared.d.mts.map +1 -1
  107. package/resources/shared.d.ts +29 -1
  108. package/resources/shared.d.ts.map +1 -1
  109. package/resources/videos.d.mts +28 -0
  110. package/resources/videos.d.mts.map +1 -1
  111. package/resources/videos.d.ts +28 -0
  112. package/resources/videos.d.ts.map +1 -1
  113. package/resources/webhooks/webhooks.d.mts +62 -2
  114. package/resources/webhooks/webhooks.d.mts.map +1 -1
  115. package/resources/webhooks/webhooks.d.ts +62 -2
  116. package/resources/webhooks/webhooks.d.ts.map +1 -1
  117. package/src/client.ts +5 -0
  118. package/src/lib/responses/ResponseInputItems.ts +1 -0
  119. package/src/resources/admin/organization/usage.ts +1 -1
  120. package/src/resources/batches.ts +1 -1
  121. package/src/resources/beta/beta.ts +22 -0
  122. package/src/resources/beta/index.ts +11 -0
  123. package/src/resources/beta/responses/index.ts +11 -0
  124. package/src/resources/beta/responses/responses.ts +801 -8
  125. package/src/resources/chat/completions/completions.ts +2 -2
  126. package/src/resources/conversations/items.ts +1 -0
  127. package/src/resources/evals/evals.ts +4 -4
  128. package/src/resources/evals/runs/runs.ts +1 -1
  129. package/src/resources/index.ts +1 -0
  130. package/src/resources/responses/api.md +11 -0
  131. package/src/resources/responses/responses.ts +1280 -518
  132. package/src/resources/safety/alerts.ts +51 -0
  133. package/src/resources/safety/index.ts +4 -0
  134. package/src/resources/safety/safety.ts +15 -0
  135. package/src/resources/safety.ts +3 -0
  136. package/src/resources/shared.ts +39 -0
  137. package/src/resources/videos.ts +38 -0
  138. package/src/resources/webhooks/api.md +2 -0
  139. package/src/resources/webhooks/webhooks.ts +77 -1
  140. package/src/version.ts +1 -1
  141. package/version.d.mts +1 -1
  142. package/version.d.mts.map +1 -1
  143. package/version.d.ts +1 -1
  144. package/version.d.ts.map +1 -1
  145. package/version.js +1 -1
  146. package/version.js.map +1 -1
  147. package/version.mjs +1 -1
  148. 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,7 +806,7 @@ export interface Response {
795
806
  */
796
807
  metadata: Shared.Metadata | null;
797
808
  /**
798
- * Model ID used to generate the response, like `gpt-5.6-sol`. OpenAI offers a wide
809
+ * Model ID used to generate the response, like `gpt-6-astra`. OpenAI offers a wide
799
810
  * range of models with different capabilities, performance characteristics, and
800
811
  * price points. Refer to the
801
812
  * [model guide](https://platform.openai.com/docs/models) to browse and compare
@@ -1022,9 +1033,11 @@ export declare namespace Response {
1022
1033
  */
1023
1034
  interface IncompleteDetails {
1024
1035
  /**
1025
- * 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.
1026
1039
  */
1027
- reason?: 'max_output_tokens' | 'max_messages' | 'content_filter';
1040
+ reason?: 'max_output_tokens' | 'max_messages' | 'content_filter' | 'steered';
1028
1041
  }
1029
1042
  interface SpecificProgrammaticToolCallingParam {
1030
1043
  /**
@@ -1929,6 +1942,67 @@ export interface ResponseComputerToolCallOutputScreenshot {
1929
1942
  */
1930
1943
  image_url?: string;
1931
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
+ }
1932
2006
  /**
1933
2007
  * Represents a container created with /v1/containers.
1934
2008
  */
@@ -2096,6 +2170,10 @@ export interface ResponseCustomToolCall {
2096
2170
  * The unique ID of the custom tool call in the OpenAI platform.
2097
2171
  */
2098
2172
  id?: string;
2173
+ /**
2174
+ * Whether the custom tool call runs asynchronously.
2175
+ */
2176
+ async?: boolean;
2099
2177
  /**
2100
2178
  * The execution context that produced this tool call.
2101
2179
  */
@@ -2254,11 +2332,39 @@ export interface ResponseError {
2254
2332
  /**
2255
2333
  * The error code for the response.
2256
2334
  */
2257
- 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';
2258
2336
  /**
2259
2337
  * A human-readable description of the error.
2260
2338
  */
2261
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
+ }
2262
2368
  }
2263
2369
  /**
2264
2370
  * Emitted when an error occurs.
@@ -2764,6 +2870,10 @@ export interface ResponseFunctionToolCall {
2764
2870
  * The unique ID of the function tool call.
2765
2871
  */
2766
2872
  id?: string;
2873
+ /**
2874
+ * Whether the function tool call runs asynchronously.
2875
+ */
2876
+ async?: boolean;
2767
2877
  /**
2768
2878
  * The execution context that produced this tool call.
2769
2879
  */
@@ -3116,6 +3226,10 @@ export interface ResponseInProgressEvent {
3116
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';
3117
3227
  /**
3118
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.
3119
3233
  */
3120
3234
  export interface ResponseIncompleteEvent {
3121
3235
  /**
@@ -3359,7 +3473,7 @@ export declare namespace ResponseInputImageContent {
3359
3473
  * `assistant` role are presumed to have been generated by the model in previous
3360
3474
  * interactions.
3361
3475
  */
3362
- 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;
3363
3477
  export declare namespace ResponseInputItem {
3364
3478
  /**
3365
3479
  * A message input to the model with a role indicating instruction following
@@ -4213,7 +4327,7 @@ export declare namespace ResponseInputTextContent {
4213
4327
  /**
4214
4328
  * Content item used to generate a response.
4215
4329
  */
4216
- 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;
4217
4331
  export declare namespace ResponseItem {
4218
4332
  interface AdditionalTools {
4219
4333
  /**
@@ -5964,151 +6078,594 @@ export declare namespace ResponseShellCallOutputContentDoneEvent {
5964
6078
  */
5965
6079
  export type ResponseStatus = 'completed' | 'failed' | 'in_progress' | 'cancelled' | 'queued' | 'incomplete';
5966
6080
  /**
5967
- * 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.
5968
6091
  */
5969
- 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
+ }
5970
6126
  /**
5971
- * Configuration options for a text response from the model. Can be plain text or
5972
- * 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:
5973
6129
  *
5974
- * - [Text inputs and outputs](https://platform.openai.com/docs/guides/text)
5975
- * - [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.
5976
6170
  */
5977
- export interface ResponseTextConfig {
6171
+ export interface ResponseSteerEvent {
5978
6172
  /**
5979
- * An object specifying the format that the model must output.
5980
- *
5981
- * Configuring `{ "type": "json_schema" }` enables Structured Outputs, which
5982
- * ensures the model will match your supplied JSON schema. Learn more in the
5983
- * [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs).
5984
- *
5985
- * The default format is `{ "type": "text" }` with no additional options.
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.
5986
6176
  *
5987
- * **Not recommended for gpt-4o and newer models:**
5988
- *
5989
- * Setting to `{ "type": "json_object" }` enables the older JSON mode, which
5990
- * ensures the message the model generates is valid JSON. Using `json_schema` is
5991
- * 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.
5992
6182
  */
5993
- format?: ResponseFormatTextConfig;
6183
+ input: ResponseSteerInput;
5994
6184
  /**
5995
- * Constrains the verbosity of the model's response. Lower values will result in
5996
- * more concise responses, while higher values will result in more verbose
5997
- * responses. Currently supported values are `low`, `medium`, and `high`. The
5998
- * default is `medium`.
6185
+ * The ID of the response to steer on this WebSocket connection.
5999
6186
  */
6000
- verbosity?: 'low' | 'medium' | 'high' | null;
6187
+ previous_response_id: string;
6188
+ /**
6189
+ * The event discriminator. Always `response.steer`.
6190
+ */
6191
+ type: 'response.steer';
6001
6192
  }
6002
6193
  /**
6003
- * 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.
6004
6202
  */
6005
- export interface ResponseTextDeltaEvent {
6203
+ export interface ResponseSteerFailedEvent {
6006
6204
  /**
6007
- * The index of the content part that the text delta was added to.
6205
+ * Information about why the input could not be committed.
6008
6206
  */
6009
- content_index: number;
6207
+ error: ResponseSteerFailedEvent.Error;
6010
6208
  /**
6011
- * The text delta that was added.
6209
+ * The sequence number for this event.
6012
6210
  */
6013
- delta: string;
6211
+ sequence_number: number;
6014
6212
  /**
6015
- * The ID of the output item that the text delta was added to.
6213
+ * The steering submission that could not be committed.
6016
6214
  */
6017
- item_id: string;
6215
+ steer: ResponseSteerFailedEvent.Steer;
6018
6216
  /**
6019
- * The log probabilities of the tokens in the delta.
6217
+ * The event discriminator. Always `response.steer.failed`.
6020
6218
  */
6021
- logprobs: Array<ResponseTextDeltaEvent.Logprob>;
6219
+ type: 'response.steer.failed';
6022
6220
  /**
6023
- * 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`.
6024
6223
  */
6025
- output_index: number;
6224
+ stream_id?: string;
6225
+ }
6226
+ export declare namespace ResponseSteerFailedEvent {
6026
6227
  /**
6027
- * The sequence number for this event.
6228
+ * Information about why the input could not be committed.
6028
6229
  */
6029
- 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
+ }
6030
6256
  /**
6031
- * The type of the event. Always `response.output_text.delta`.
6257
+ * The steering submission that could not be committed.
6032
6258
  */
6033
- 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
+ }
6034
6281
  }
6035
- 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
+ }
6036
6317
  /**
6037
- * A logprob is the logarithmic probability that the model assigns to producing a
6038
- * particular token at a given position in the sequence. Less-negative (higher)
6039
- * logprob values indicate greater model confidence in that token choice.
6318
+ * The output of a function tool call.
6040
6319
  */
6041
- interface Logprob {
6320
+ interface FunctionCallOutput {
6042
6321
  /**
6043
- * A possible text token.
6322
+ * Text, image, or file output of the function tool call.
6044
6323
  */
6045
- token: string;
6324
+ output: string | ResponsesAPI.ResponseFunctionCallOutputItemList;
6046
6325
  /**
6047
- * The log probability of this token.
6326
+ * The type of the function tool call output. Always `function_call_output`.
6048
6327
  */
6049
- logprob: number;
6328
+ type: 'function_call_output';
6050
6329
  /**
6051
- * 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.
6052
6332
  */
6053
- 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;
6054
6355
  }
6055
- namespace Logprob {
6056
- interface TopLogprob {
6356
+ namespace FunctionCallOutput {
6357
+ interface Direct {
6057
6358
  /**
6058
- * A possible text token.
6359
+ * The caller type. Always `direct`.
6059
6360
  */
6060
- token?: string;
6361
+ type: 'direct';
6362
+ }
6363
+ interface Program {
6061
6364
  /**
6062
- * The log probability of this token.
6365
+ * The call ID of the program item that produced this tool call.
6063
6366
  */
6064
- logprob?: number;
6367
+ caller_id: string;
6368
+ /**
6369
+ * The caller type. Always `program`.
6370
+ */
6371
+ type: 'program';
6065
6372
  }
6066
6373
  }
6067
6374
  }
6068
6375
  /**
6069
- * Emitted when text content is finalized.
6376
+ * A piece of message content, such as text, an image, or a file.
6070
6377
  */
6071
- export interface ResponseTextDoneEvent {
6072
- /**
6073
- * The index of the content part that the text content is finalized.
6074
- */
6075
- content_index: number;
6076
- /**
6077
- * The ID of the output item that the text content is finalized.
6078
- */
6079
- 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 {
6080
6398
  /**
6081
- * 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`.
6082
6405
  */
6083
- logprobs: Array<ResponseTextDoneEvent.Logprob>;
6406
+ reason: ResponseSteerPendingReason;
6084
6407
  /**
6085
- * 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`.
6086
6411
  */
6087
- output_index: number;
6412
+ required_input: Array<ResponseSteerRequiredInput>;
6088
6413
  /**
6089
6414
  * The sequence number for this event.
6090
6415
  */
6091
6416
  sequence_number: number;
6092
6417
  /**
6093
- * The text content that is finalized.
6418
+ * The steering submission that remains queued.
6094
6419
  */
6095
- text: string;
6420
+ steer: ResponseSteerPendingEvent.Steer;
6096
6421
  /**
6097
- * The type of the event. Always `response.output_text.done`.
6422
+ * The event discriminator. Always `response.steer.pending`.
6098
6423
  */
6099
- 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;
6100
6430
  }
6101
- export declare namespace ResponseTextDoneEvent {
6431
+ export declare namespace ResponseSteerPendingEvent {
6102
6432
  /**
6103
- * A logprob is the logarithmic probability that the model assigns to producing a
6104
- * particular token at a given position in the sequence. Less-negative (higher)
6105
- * logprob values indicate greater model confidence in that token choice.
6433
+ * The steering submission that remains queued.
6106
6434
  */
6107
- interface Logprob {
6435
+ interface Steer {
6108
6436
  /**
6109
- * A possible text token.
6437
+ * The ID assigned to the steering submission.
6110
6438
  */
6111
- 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;
6112
6669
  /**
6113
6670
  * The log probability of this token.
6114
6671
  */
@@ -6304,433 +6861,462 @@ export interface ResponseWebSearchCallInProgressEvent {
6304
6861
  /**
6305
6862
  * The sequence number of the web search call being processed.
6306
6863
  */
6307
- sequence_number: number;
6308
- /**
6309
- * The type of the event. Always `response.web_search_call.in_progress`.
6310
- */
6311
- type: 'response.web_search_call.in_progress';
6312
- }
6313
- /**
6314
- * Emitted when a web search call is executing.
6315
- */
6316
- export interface ResponseWebSearchCallSearchingEvent {
6317
- /**
6318
- * Unique ID for the output item associated with the web search call.
6319
- */
6320
- item_id: string;
6321
- /**
6322
- * The index of the output item that the web search call is associated with.
6323
- */
6324
- output_index: number;
6325
- /**
6326
- * The sequence number of the web search call being processed.
6327
- */
6328
- sequence_number: number;
6329
- /**
6330
- * The type of the event. Always `response.web_search_call.searching`.
6331
- */
6332
- type: 'response.web_search_call.searching';
6333
- }
6334
- export interface ResponsesClientEvent {
6335
- /**
6336
- * The type of the client event. Always `response.create`.
6337
- */
6338
- type: 'response.create';
6339
- /**
6340
- * Whether to run the model response in the background.
6341
- * [Learn more](https://platform.openai.com/docs/guides/background).
6342
- */
6343
- background?: boolean | null;
6344
- /**
6345
- * Context management configuration for this request.
6346
- */
6347
- context_management?: Array<ResponsesClientEvent.ContextManagement> | null;
6348
- /**
6349
- * The conversation that this response belongs to. Items from this conversation are
6350
- * prepended to `input_items` for this response request. Input items and output
6351
- * items from this response are automatically added to this conversation after this
6352
- * response completes.
6353
- */
6354
- conversation?: string | ResponseConversationParam | null;
6355
- /**
6356
- * Specify additional output data to include in the model response. Currently
6357
- * supported values are:
6358
- *
6359
- * - `web_search_call.action.sources`: Include the sources of the web search tool
6360
- * call.
6361
- * - `code_interpreter_call.outputs`: Includes the outputs of python code execution
6362
- * in code interpreter tool call items.
6363
- * - `computer_call_output.output.image_url`: Include image urls from the computer
6364
- * call output.
6365
- * - `file_search_call.results`: Include the search results of the file search tool
6366
- * call.
6367
- * - `message.input_image.image_url`: Include image urls from the input message.
6368
- * - `message.output_text.logprobs`: Include logprobs with assistant messages.
6369
- * - `reasoning.encrypted_content`: Includes an encrypted version of reasoning
6370
- * tokens in reasoning item outputs. This enables reasoning items to be used in
6371
- * multi-turn conversations when using the Responses API statelessly (like when
6372
- * the `store` parameter is set to `false`, or when an organization is enrolled
6373
- * in the zero data retention program).
6374
- */
6375
- include?: Array<ResponseIncludable> | null;
6376
- /**
6377
- * Text, image, or file inputs to the model, used to generate a response.
6378
- *
6379
- * Learn more:
6380
- *
6381
- * - [Text inputs and outputs](https://platform.openai.com/docs/guides/text)
6382
- * - [Image inputs](https://platform.openai.com/docs/guides/images)
6383
- * - [File inputs](https://platform.openai.com/docs/guides/pdf-files)
6384
- * - [Conversation state](https://platform.openai.com/docs/guides/conversation-state)
6385
- * - [Function calling](https://platform.openai.com/docs/guides/function-calling)
6386
- */
6387
- input?: string | ResponseInput;
6388
- /**
6389
- * A system (or developer) message inserted into the model's context.
6390
- *
6391
- * When using along with `previous_response_id`, the instructions from a previous
6392
- * response will not be carried over to the next response. This makes it simple to
6393
- * swap out system (or developer) messages in new responses.
6394
- */
6395
- instructions?: string | null;
6396
- /**
6397
- * An upper bound for the number of tokens that can be generated for a response,
6398
- * including visible output tokens and
6399
- * [reasoning tokens](https://platform.openai.com/docs/guides/reasoning).
6400
- */
6401
- max_output_tokens?: number | null;
6402
- /**
6403
- * The maximum number of total calls to built-in tools that can be processed in a
6404
- * response. This maximum number applies across all built-in tool calls, not per
6405
- * individual tool. Any further attempts to call a tool by the model will be
6406
- * ignored.
6407
- */
6408
- max_tool_calls?: number | null;
6409
- /**
6410
- * Set of 16 key-value pairs that can be attached to an object. This can be useful
6411
- * for storing additional information about the object in a structured format, and
6412
- * querying for objects via API or the dashboard.
6413
- *
6414
- * Keys are strings with a maximum length of 64 characters. Values are strings with
6415
- * a maximum length of 512 characters.
6416
- */
6417
- metadata?: Shared.Metadata | null;
6418
- /**
6419
- * Model ID used to generate the response, like `gpt-5.6-sol`. OpenAI offers a wide
6420
- * range of models with different capabilities, performance characteristics, and
6421
- * price points. Refer to the
6422
- * [model guide](https://platform.openai.com/docs/models) to browse and compare
6423
- * available models.
6424
- */
6425
- model?: Shared.ResponsesModel;
6426
- /**
6427
- * Configuration for running moderation on the input and output of this response.
6428
- */
6429
- moderation?: ResponsesClientEvent.Moderation | null;
6430
- /**
6431
- * Whether to allow the model to run tool calls in parallel.
6432
- */
6433
- parallel_tool_calls?: boolean | null;
6434
- /**
6435
- * The unique ID of the previous response to the model. Use this to create
6436
- * multi-turn conversations. Learn more about
6437
- * [conversation state](https://platform.openai.com/docs/guides/conversation-state).
6438
- * Cannot be used in conjunction with `conversation`.
6439
- */
6440
- previous_response_id?: string | null;
6441
- /**
6442
- * Reference to a prompt template and its variables.
6443
- * [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts).
6444
- */
6445
- prompt?: ResponsePrompt | null;
6446
- /**
6447
- * Used by OpenAI to cache responses for similar requests to optimize your cache
6448
- * hit rates. Replaces the `user` field.
6449
- * [Learn more](https://platform.openai.com/docs/guides/prompt-caching).
6450
- */
6451
- prompt_cache_key?: string | null;
6452
- /**
6453
- * Options for prompt caching. Supported for `gpt-5.6` and later models. By
6454
- * default, OpenAI automatically chooses one implicit cache breakpoint. You can add
6455
- * explicit breakpoints to content blocks with `prompt_cache_breakpoint`. Each
6456
- * request can write up to four breakpoints. For cache matching, OpenAI considers
6457
- * up to the latest 80 breakpoints in the conversation, without a content-block
6458
- * lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The
6459
- * `ttl` defaults to `30m`, which is currently the only supported value. See the
6460
- * [prompt caching guide](https://platform.openai.com/docs/guides/prompt-caching)
6461
- * for current details.
6462
- */
6463
- prompt_cache_options?: ResponsesClientEvent.PromptCacheOptions;
6464
- /**
6465
- * @deprecated Deprecated. Use `prompt_cache_options.ttl` instead.
6466
- *
6467
- * The retention policy for the prompt cache. Set to `24h` to enable extended
6468
- * prompt caching, which keeps cached prefixes active for longer, up to a maximum
6469
- * of 24 hours.
6470
- * [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention).
6471
- * This field expresses a maximum retention policy, while
6472
- * `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two fields
6473
- * are independent and do not interact. For `gpt-5.5`, `gpt-5.5-pro`, and future
6474
- * models, only `24h` is supported.
6475
- *
6476
- * For older models that support both `in_memory` and `24h`, the default depends on
6477
- * your organization's data retention policy:
6478
- *
6479
- * - Organizations without ZDR enabled default to `24h`.
6480
- * - Organizations with ZDR enabled default to `in_memory` when
6481
- * `prompt_cache_retention` is not specified.
6482
- */
6483
- prompt_cache_retention?: 'in_memory' | '24h' | null;
6484
- /**
6485
- * Configuration options for
6486
- * [reasoning models](https://platform.openai.com/docs/guides/reasoning).
6487
- */
6488
- reasoning?: Shared.Reasoning | null;
6489
- /**
6490
- * A stable identifier used to help detect users of your application that may be
6491
- * violating OpenAI's usage policies. The IDs should be a string that uniquely
6492
- * identifies each user, with a maximum length of 64 characters. We recommend
6493
- * hashing their username or email address, in order to avoid sending us any
6494
- * identifying information.
6495
- * [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers).
6496
- */
6497
- safety_identifier?: string | null;
6498
- /**
6499
- * Specifies the processing type used for serving the request.
6500
- *
6501
- * - If set to 'auto', then the request will be processed with the service tier
6502
- * configured in the Project settings. Unless otherwise configured, the Project
6503
- * will use 'default'.
6504
- * - If set to 'default', then the request will be processed with the standard
6505
- * pricing and performance for the selected model.
6506
- * - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)',
6507
- * then the request will be processed with the Flex Processing service tier.
6508
- * - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level,
6509
- * include the `service_tier=fast` or `service_tier=priority` parameter for
6510
- * Responses or Chat Completions. The response will show `service_tier=priority`
6511
- * regardless of if you specify `service_tier=fast` or `priority` in your
6512
- * request.
6513
- * - If set to 'ultrafast', then the request will be processed with the
6514
- * access-controlled Ultrafast Processing service tier. This tier is currently
6515
- * available for `gpt-5.6-sol`; a response served through it will show
6516
- * `service_tier=ultrafast`.
6517
- * - When not set, the default behavior is 'auto'.
6518
- *
6519
- * When the `service_tier` parameter is set, the response body will include the
6520
- * `service_tier` value based on the processing mode actually used to serve the
6521
- * request. This response value may be different from the value set in the
6522
- * parameter.
6523
- */
6524
- service_tier?: ServiceTier | null;
6525
- /**
6526
- * Whether to store the generated model response for later retrieval via API.
6527
- */
6528
- store?: boolean | null;
6529
- /**
6530
- * If set to true, the model response data will be streamed to the client as it is
6531
- * generated using
6532
- * [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format).
6533
- * See the
6534
- * [Streaming section below](https://platform.openai.com/docs/api-reference/responses-streaming)
6535
- * for more information.
6536
- */
6537
- stream?: boolean | null;
6538
- /**
6539
- * The WebSocket lane for this response. Requests with the same `stream_id` are
6540
- * processed FIFO, and events for the response echo the same `stream_id`.
6541
- *
6542
- * `stream_id` controls routing; `previous_response_id` controls conversation
6543
- * lineage, so a new lane can fork from a response created on another lane.
6544
- */
6545
- stream_id?: string;
6546
- /**
6547
- * Options for streaming responses. Only set this when you set `stream: true`.
6548
- */
6549
- stream_options?: ResponsesClientEvent.StreamOptions | null;
6550
- /**
6551
- * What sampling temperature to use, between 0 and 2. Higher values like 0.8 will
6552
- * make the output more random, while lower values like 0.2 will make it more
6553
- * focused and deterministic. We generally recommend altering this or `top_p` but
6554
- * not both.
6555
- */
6556
- temperature?: number | null;
6557
- /**
6558
- * Configuration options for a text response from the model. Can be plain text or
6559
- * structured JSON data. Learn more:
6560
- *
6561
- * - [Text inputs and outputs](https://platform.openai.com/docs/guides/text)
6562
- * - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs)
6563
- */
6564
- text?: ResponseTextConfig;
6565
- /**
6566
- * How the model should select which tool (or tools) to use when generating a
6567
- * response. See the `tools` parameter to see how to specify which tools the model
6568
- * can call.
6569
- */
6570
- tool_choice?: ToolChoiceOptions | ToolChoiceAllowed | ToolChoiceTypes | ToolChoiceFunction | ToolChoiceMcp | ToolChoiceCustom | ResponsesClientEvent.SpecificProgrammaticToolCallingParam | ToolChoiceApplyPatch | ToolChoiceShell;
6864
+ sequence_number: number;
6571
6865
  /**
6572
- * An array of tools the model may call while generating a response. You can
6573
- * specify which tool to use by setting the `tool_choice` parameter.
6574
- *
6575
- * We support the following categories of tools:
6576
- *
6577
- * - **Built-in tools**: Tools that are provided by OpenAI that extend the model's
6578
- * capabilities, like
6579
- * [web search](https://platform.openai.com/docs/guides/tools-web-search) or
6580
- * [file search](https://platform.openai.com/docs/guides/tools-file-search).
6581
- * Learn more about
6582
- * [built-in tools](https://platform.openai.com/docs/guides/tools).
6583
- * - **MCP Tools**: Integrations with third-party systems via custom MCP servers or
6584
- * predefined connectors such as Google Drive and SharePoint. Learn more about
6585
- * [MCP Tools](https://platform.openai.com/docs/guides/tools-connectors-mcp).
6586
- * - **Function calls (custom tools)**: Functions that are defined by you, enabling
6587
- * the model to call your own code with strongly typed arguments and outputs.
6588
- * Learn more about
6589
- * [function calling](https://platform.openai.com/docs/guides/function-calling).
6590
- * You can also use custom tools to call your own code.
6866
+ * The type of the event. Always `response.web_search_call.in_progress`.
6591
6867
  */
6592
- 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 {
6593
6874
  /**
6594
- * An integer between 0 and 20 specifying the maximum number of most likely tokens
6595
- * to return at each token position, each with an associated log probability. In
6596
- * 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.
6597
6876
  */
6598
- top_logprobs?: number | null;
6877
+ item_id: string;
6599
6878
  /**
6600
- * An alternative to sampling with temperature, called nucleus sampling, where the
6601
- * model considers the results of the tokens with top_p probability mass. So 0.1
6602
- * means only the tokens comprising the top 10% probability mass are considered.
6603
- *
6604
- * 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.
6605
6880
  */
6606
- top_p?: number | null;
6881
+ output_index: number;
6607
6882
  /**
6608
- * @deprecated The truncation strategy to use for the model response.
6609
- *
6610
- * - `auto`: If the input to this Response exceeds the model's context window size,
6611
- * the model will truncate the response to fit the context window by dropping
6612
- * items from the beginning of the conversation.
6613
- * - `disabled` (default): If the input size will exceed the context window size
6614
- * for a model, the request will fail with a 400 error.
6883
+ * The sequence number of the web search call being processed.
6615
6884
  */
6616
- truncation?: 'auto' | 'disabled' | null;
6885
+ sequence_number: number;
6617
6886
  /**
6618
- * @deprecated This field is being replaced by `safety_identifier` and
6619
- * `prompt_cache_key`. Use `prompt_cache_key` instead to maintain caching
6620
- * optimizations. A stable identifier for your end-users. Used to boost cache hit
6621
- * rates by better bucketing similar requests and to help OpenAI detect and prevent
6622
- * abuse.
6623
- * [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`.
6624
6888
  */
6625
- user?: string;
6889
+ type: 'response.web_search_call.searching';
6626
6890
  }
6891
+ /**
6892
+ * Client events accepted by the Responses WebSocket server.
6893
+ */
6894
+ export type ResponsesClientEvent = ResponsesClientEvent.ResponseCreate | ResponseSteerEvent;
6627
6895
  export declare namespace ResponsesClientEvent {
6628
- 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 {
6629
6920
  /**
6630
- * The context management entry type. Currently only 'compaction' is supported.
6921
+ * The type of the client event. Always `response.create`.
6631
6922
  */
6632
- type: string;
6923
+ type: 'response.create';
6633
6924
  /**
6634
- * 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).
6635
6927
  */
6636
- compact_threshold?: number | null;
6637
- }
6638
- /**
6639
- * Configuration for running moderation on the input and output of this response.
6640
- */
6641
- interface Moderation {
6928
+ background?: boolean | null;
6642
6929
  /**
6643
- * The moderation model to use for moderated completions, e.g.
6644
- * 'omni-moderation-latest'.
6930
+ * Context management configuration for this request.
6645
6931
  */
6646
- model: string;
6932
+ context_management?: Array<ResponseCreate.ContextManagement> | null;
6647
6933
  /**
6648
- * 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.
6649
6938
  */
6650
- policy?: Moderation.Policy | null;
6651
- }
6652
- namespace Moderation {
6939
+ conversation?: string | ResponsesAPI.ResponseConversationParam | null;
6653
6940
  /**
6654
- * 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)
6655
6971
  */
6656
- 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 {
6657
7214
  /**
6658
- * The moderation policy for the response input.
7215
+ * The context management entry type. Currently only 'compaction' is supported.
6659
7216
  */
6660
- input?: Policy.Input | null;
7217
+ type: string;
6661
7218
  /**
6662
- * The moderation policy for the response output.
7219
+ * Token threshold at which compaction should be triggered for this entry.
6663
7220
  */
6664
- output?: Policy.Output | null;
7221
+ compact_threshold?: number | null;
6665
7222
  }
6666
- namespace Policy {
7223
+ /**
7224
+ * Configuration for running moderation on the input and output of this response.
7225
+ */
7226
+ interface Moderation {
6667
7227
  /**
6668
- * The moderation policy for the response input.
7228
+ * The moderation model to use for moderated completions, e.g.
7229
+ * 'omni-moderation-latest'.
6669
7230
  */
6670
- interface Input {
6671
- mode: 'score' | 'block';
6672
- }
7231
+ model: string;
6673
7232
  /**
6674
- * The moderation policy for the response output.
7233
+ * The policy to apply to moderated response input and output.
6675
7234
  */
6676
- interface Output {
6677
- 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
+ }
6678
7264
  }
6679
7265
  }
6680
- }
6681
- /**
6682
- * Options for prompt caching. Supported for `gpt-5.6` and later models. By
6683
- * default, OpenAI automatically chooses one implicit cache breakpoint. You can add
6684
- * explicit breakpoints to content blocks with `prompt_cache_breakpoint`. Each
6685
- * request can write up to four breakpoints. For cache matching, OpenAI considers
6686
- * up to the latest 80 breakpoints in the conversation, without a content-block
6687
- * lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The
6688
- * `ttl` defaults to `30m`, which is currently the only supported value. See the
6689
- * [prompt caching guide](https://platform.openai.com/docs/guides/prompt-caching)
6690
- * for current details.
6691
- */
6692
- interface PromptCacheOptions {
6693
- /**
6694
- * Controls whether OpenAI automatically creates an implicit cache breakpoint.
6695
- * Defaults to `implicit`. With `implicit`, OpenAI creates one implicit breakpoint
6696
- * and writes up to the latest three explicit breakpoints in the request. With
6697
- * `explicit`, OpenAI does not create an implicit breakpoint and writes up to the
6698
- * latest four explicit breakpoints. If there are no explicit breakpoints, the
6699
- * request does not use prompt caching.
6700
- */
6701
- mode?: 'implicit' | 'explicit';
6702
- /**
6703
- * The minimum lifetime applied to every implicit and explicit cache breakpoint
6704
- * written by the request. Defaults to `30m`, which is currently the only supported
6705
- * value. The backend may retain cache entries for longer.
6706
- */
6707
- ttl?: '30m';
6708
- }
6709
- /**
6710
- * Options for streaming responses. Only set this when you set `stream: true`.
6711
- */
6712
- interface StreamOptions {
6713
7266
  /**
6714
- * When true, stream obfuscation will be enabled. Stream obfuscation adds random
6715
- * characters to an `obfuscation` field on streaming delta events to normalize
6716
- * payload sizes as a mitigation to certain side-channel attacks. These obfuscation
6717
- * fields are included by default, but add a small amount of overhead to the data
6718
- * stream. You can set `include_obfuscation` to false to optimize for bandwidth if
6719
- * you trust the network links between your application and the OpenAI API.
6720
- */
6721
- include_obfuscation?: boolean;
6722
- }
6723
- 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
+ }
6724
7294
  /**
6725
- * The tool to call. Always `programmatic_tool_calling`.
7295
+ * Options for streaming responses. Only set this when you set `stream: true`.
6726
7296
  */
6727
- 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
+ }
6728
7314
  }
6729
7315
  }
6730
7316
  /**
6731
7317
  * Server events emitted by the Responses WebSocket server.
6732
7318
  */
6733
- 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;
6734
7320
  export declare namespace ResponsesServerEvent {
6735
7321
  /**
6736
7322
  * Emitted when there is a partial audio response.
@@ -6984,6 +7570,10 @@ export declare namespace ResponsesServerEvent {
6984
7570
  }
6985
7571
  /**
6986
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.
6987
7577
  */
6988
7578
  interface ResponseWsIncomplete extends ResponseIncompleteEvent {
6989
7579
  /**
@@ -7369,6 +7959,34 @@ export declare namespace ResponsesServerEvent {
7369
7959
  headers?: {
7370
7960
  [key: string]: string;
7371
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
+ }
7372
7990
  }
7373
7991
  }
7374
7992
  }
@@ -8062,7 +8680,7 @@ export interface ResponseCreateParamsBase {
8062
8680
  */
8063
8681
  metadata?: Shared.Metadata | null;
8064
8682
  /**
8065
- * Model ID used to generate the response, like `gpt-5.6-sol`. OpenAI offers a wide
8683
+ * Model ID used to generate the response, like `gpt-6-astra`. OpenAI offers a wide
8066
8684
  * range of models with different capabilities, performance characteristics, and
8067
8685
  * price points. Refer to the
8068
8686
  * [model guide](https://platform.openai.com/docs/models) to browse and compare
@@ -8446,13 +9064,13 @@ export interface ResponseRetrieveParamsStreaming extends ResponseRetrieveParamsB
8446
9064
  }
8447
9065
  export interface ResponseCompactParams {
8448
9066
  /**
8449
- * Model ID used to generate the response, like `gpt-5.6-sol`. OpenAI offers a wide
9067
+ * Model ID used to generate the response, like `gpt-6-astra`. OpenAI offers a wide
8450
9068
  * range of models with different capabilities, performance characteristics, and
8451
9069
  * price points. Refer to the
8452
9070
  * [model guide](https://platform.openai.com/docs/models) to browse and compare
8453
9071
  * available models.
8454
9072
  */
8455
- 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;
8456
9074
  /**
8457
9075
  * Text, image, or file inputs to the model, used to generate a response
8458
9076
  */
@@ -8541,7 +9159,7 @@ export declare namespace ResponseCompactParams {
8541
9159
  }
8542
9160
  }
8543
9161
  export declare namespace Responses {
8544
- 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, };
8545
9163
  export { InputItems as InputItems, type ResponseItemList as ResponseItemList, type InputItemListParams as InputItemListParams, };
8546
9164
  export { InputTokens as InputTokens, type InputTokenCountResponse as InputTokenCountResponse, type InputTokenCountParams as InputTokenCountParams, };
8547
9165
  }