openai 7.8.0 → 7.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (175) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/auth/x509-transport.js +1 -1
  3. package/client.d.mts +3 -0
  4. package/client.d.mts.map +1 -1
  5. package/client.d.ts +3 -0
  6. package/client.d.ts.map +1 -1
  7. package/client.js +4 -1
  8. package/client.js.map +1 -1
  9. package/client.mjs +3 -0
  10. package/client.mjs.map +1 -1
  11. package/internal/auth/x509-credential-options.js +1 -1
  12. package/internal/auth/x509-token-exchange.js +1 -1
  13. package/internal/auth/x509-transport-capability.js +1 -1
  14. package/internal/auth/x509-transport-registry.js +1 -1
  15. package/internal/auth/x509-workload-identity-auth.js +1 -1
  16. package/lib/responses/ResponseInputItems.d.mts.map +1 -1
  17. package/lib/responses/ResponseInputItems.d.ts.map +1 -1
  18. package/lib/responses/ResponseInputItems.js +1 -0
  19. package/lib/responses/ResponseInputItems.js.map +1 -1
  20. package/lib/responses/ResponseInputItems.mjs +1 -0
  21. package/lib/responses/ResponseInputItems.mjs.map +1 -1
  22. package/package.json +7 -3
  23. package/resources/admin/organization/usage.d.mts +5 -0
  24. package/resources/admin/organization/usage.d.mts.map +1 -1
  25. package/resources/admin/organization/usage.d.ts +5 -0
  26. package/resources/admin/organization/usage.d.ts.map +1 -1
  27. package/resources/batches.d.mts +3 -3
  28. package/resources/batches.d.ts +3 -3
  29. package/resources/beta/beta.d.mts +2 -2
  30. package/resources/beta/beta.d.mts.map +1 -1
  31. package/resources/beta/beta.d.ts +2 -2
  32. package/resources/beta/beta.d.ts.map +1 -1
  33. package/resources/beta/beta.js.map +1 -1
  34. package/resources/beta/beta.mjs.map +1 -1
  35. package/resources/beta/index.d.mts +1 -1
  36. package/resources/beta/index.d.mts.map +1 -1
  37. package/resources/beta/index.d.ts +1 -1
  38. package/resources/beta/index.d.ts.map +1 -1
  39. package/resources/beta/index.js.map +1 -1
  40. package/resources/beta/index.mjs.map +1 -1
  41. package/resources/beta/responses/index.d.mts +1 -1
  42. package/resources/beta/responses/index.d.mts.map +1 -1
  43. package/resources/beta/responses/index.d.ts +1 -1
  44. package/resources/beta/responses/index.d.ts.map +1 -1
  45. package/resources/beta/responses/index.js.map +1 -1
  46. package/resources/beta/responses/index.mjs.map +1 -1
  47. package/resources/beta/responses/responses.d.mts +666 -39
  48. package/resources/beta/responses/responses.d.mts.map +1 -1
  49. package/resources/beta/responses/responses.d.ts +666 -39
  50. package/resources/beta/responses/responses.d.ts.map +1 -1
  51. package/resources/beta/responses/responses.js +1 -1
  52. package/resources/beta/responses/responses.js.map +1 -1
  53. package/resources/beta/responses/responses.mjs +1 -1
  54. package/resources/beta/responses/responses.mjs.map +1 -1
  55. package/resources/beta/responses/ws.d.mts.map +1 -1
  56. package/resources/beta/responses/ws.d.ts.map +1 -1
  57. package/resources/beta/responses/ws.js +1 -0
  58. package/resources/beta/responses/ws.js.map +1 -1
  59. package/resources/beta/responses/ws.mjs +1 -0
  60. package/resources/beta/responses/ws.mjs.map +1 -1
  61. package/resources/chat/completions/completions.d.mts +4 -4
  62. package/resources/chat/completions/completions.d.ts +4 -4
  63. package/resources/completions.d.mts +0 -4
  64. package/resources/completions.d.mts.map +1 -1
  65. package/resources/completions.d.ts +0 -4
  66. package/resources/completions.d.ts.map +1 -1
  67. package/resources/conversations/items.d.mts +1 -1
  68. package/resources/conversations/items.d.mts.map +1 -1
  69. package/resources/conversations/items.d.ts +1 -1
  70. package/resources/conversations/items.d.ts.map +1 -1
  71. package/resources/evals/evals.d.mts +4 -4
  72. package/resources/evals/evals.d.ts +4 -4
  73. package/resources/evals/runs/runs.d.mts +1 -1
  74. package/resources/evals/runs/runs.d.ts +1 -1
  75. package/resources/index.d.mts +1 -0
  76. package/resources/index.d.mts.map +1 -1
  77. package/resources/index.d.ts +1 -0
  78. package/resources/index.d.ts.map +1 -1
  79. package/resources/index.js +3 -1
  80. package/resources/index.js.map +1 -1
  81. package/resources/index.mjs +1 -0
  82. package/resources/index.mjs.map +1 -1
  83. package/resources/responses/responses.d.mts +1103 -495
  84. package/resources/responses/responses.d.mts.map +1 -1
  85. package/resources/responses/responses.d.ts +1103 -495
  86. package/resources/responses/responses.d.ts.map +1 -1
  87. package/resources/responses/responses.js +1 -1
  88. package/resources/responses/responses.js.map +1 -1
  89. package/resources/responses/responses.mjs +1 -1
  90. package/resources/responses/responses.mjs.map +1 -1
  91. package/resources/responses/ws.d.mts.map +1 -1
  92. package/resources/responses/ws.d.ts.map +1 -1
  93. package/resources/responses/ws.js +1 -0
  94. package/resources/responses/ws.js.map +1 -1
  95. package/resources/responses/ws.mjs +1 -0
  96. package/resources/responses/ws.mjs.map +1 -1
  97. package/resources/safety/alerts.d.mts +32 -0
  98. package/resources/safety/alerts.d.mts.map +1 -0
  99. package/resources/safety/alerts.d.ts +32 -0
  100. package/resources/safety/alerts.d.ts.map +1 -0
  101. package/resources/safety/alerts.js +16 -0
  102. package/resources/safety/alerts.js.map +1 -0
  103. package/resources/safety/alerts.mjs +12 -0
  104. package/resources/safety/alerts.mjs.map +1 -0
  105. package/resources/safety/index.d.mts +3 -0
  106. package/resources/safety/index.d.mts.map +1 -0
  107. package/resources/safety/index.d.ts +3 -0
  108. package/resources/safety/index.d.ts.map +1 -0
  109. package/resources/safety/index.js +9 -0
  110. package/resources/safety/index.js.map +1 -0
  111. package/resources/safety/index.mjs +4 -0
  112. package/resources/safety/index.mjs.map +1 -0
  113. package/resources/safety/safety.d.mts +10 -0
  114. package/resources/safety/safety.d.mts.map +1 -0
  115. package/resources/safety/safety.d.ts +10 -0
  116. package/resources/safety/safety.d.ts.map +1 -0
  117. package/resources/safety/safety.js +17 -0
  118. package/resources/safety/safety.js.map +1 -0
  119. package/resources/safety/safety.mjs +12 -0
  120. package/resources/safety/safety.mjs.map +1 -0
  121. package/resources/safety.d.mts +2 -0
  122. package/resources/safety.d.mts.map +1 -0
  123. package/resources/safety.d.ts +2 -0
  124. package/resources/safety.d.ts.map +1 -0
  125. package/resources/safety.js +6 -0
  126. package/resources/safety.js.map +1 -0
  127. package/resources/safety.mjs +3 -0
  128. package/resources/safety.mjs.map +1 -0
  129. package/resources/shared.d.mts +29 -3
  130. package/resources/shared.d.mts.map +1 -1
  131. package/resources/shared.d.ts +29 -3
  132. package/resources/shared.d.ts.map +1 -1
  133. package/resources/videos.d.mts +28 -0
  134. package/resources/videos.d.mts.map +1 -1
  135. package/resources/videos.d.ts +28 -0
  136. package/resources/videos.d.ts.map +1 -1
  137. package/resources/webhooks/webhooks.d.mts +62 -2
  138. package/resources/webhooks/webhooks.d.mts.map +1 -1
  139. package/resources/webhooks/webhooks.d.ts +62 -2
  140. package/resources/webhooks/webhooks.d.ts.map +1 -1
  141. package/src/client.ts +5 -0
  142. package/src/lib/responses/ResponseInputItems.ts +1 -0
  143. package/src/resources/admin/organization/usage.ts +6 -0
  144. package/src/resources/batches.ts +3 -3
  145. package/src/resources/beta/beta.ts +22 -0
  146. package/src/resources/beta/index.ts +11 -0
  147. package/src/resources/beta/responses/index.ts +11 -0
  148. package/src/resources/beta/responses/responses.ts +807 -31
  149. package/src/resources/beta/responses/ws.ts +1 -0
  150. package/src/resources/chat/completions/completions.ts +4 -4
  151. package/src/resources/completions.ts +0 -5
  152. package/src/resources/conversations/items.ts +1 -0
  153. package/src/resources/evals/evals.ts +4 -4
  154. package/src/resources/evals/runs/runs.ts +1 -1
  155. package/src/resources/index.ts +1 -0
  156. package/src/resources/responses/api.md +11 -0
  157. package/src/resources/responses/responses.ts +1284 -533
  158. package/src/resources/responses/ws.ts +1 -0
  159. package/src/resources/safety/alerts.ts +51 -0
  160. package/src/resources/safety/index.ts +4 -0
  161. package/src/resources/safety/safety.ts +15 -0
  162. package/src/resources/safety.ts +3 -0
  163. package/src/resources/shared.ts +39 -2
  164. package/src/resources/videos.ts +38 -0
  165. package/src/resources/webhooks/api.md +2 -0
  166. package/src/resources/webhooks/webhooks.ts +77 -1
  167. package/src/version.ts +1 -1
  168. package/version.d.mts +1 -1
  169. package/version.d.mts.map +1 -1
  170. package/version.d.ts +1 -1
  171. package/version.d.ts.map +1 -1
  172. package/version.js +1 -1
  173. package/version.js.map +1 -1
  174. package/version.mjs +1 -1
  175. package/version.mjs.map +1 -1
@@ -237,7 +237,7 @@ export class Responses extends APIResource {
237
237
  * @example
238
238
  * ```ts
239
239
  * const compactedResponse = await client.responses.compact({
240
- * model: 'gpt-5.6-sol',
240
+ * model: 'gpt-6-astra',
241
241
  * });
242
242
  * ```
243
243
  */
@@ -671,6 +671,12 @@ export interface CustomTool {
671
671
  */
672
672
  allowed_callers?: Array<'direct' | 'programmatic'> | null;
673
673
 
674
+ /**
675
+ * Whether the tool response can be returned asynchronously versus immediately
676
+ * returned on next response creation.
677
+ */
678
+ async?: boolean;
679
+
674
680
  /**
675
681
  * Whether this tool should be deferred and discovered via tool search.
676
682
  */
@@ -845,6 +851,8 @@ export interface FunctionTool {
845
851
  */
846
852
  allowed_callers?: Array<'direct' | 'programmatic'> | null;
847
853
 
854
+ async?: boolean;
855
+
848
856
  /**
849
857
  * Whether this function is deferred and loaded via tool search.
850
858
  */
@@ -1001,6 +1009,12 @@ export namespace NamespaceTool {
1001
1009
  */
1002
1010
  allowed_callers?: Array<'direct' | 'programmatic'> | null;
1003
1011
 
1012
+ /**
1013
+ * Whether the tool response can be returned asynchronously versus immediately
1014
+ * returned on next response creation.
1015
+ */
1016
+ async?: boolean;
1017
+
1004
1018
  /**
1005
1019
  * Whether this function should be deferred and discovered via tool search.
1006
1020
  */
@@ -1068,9 +1082,9 @@ export interface Response {
1068
1082
  metadata: Shared.Metadata | null;
1069
1083
 
1070
1084
  /**
1071
- * Model ID used to generate the response, like `gpt-4o` or `o3`. OpenAI offers a
1072
- * wide range of models with different capabilities, performance characteristics,
1073
- * and price points. Refer to the
1085
+ * Model ID used to generate the response, like `gpt-6-astra`. OpenAI offers a wide
1086
+ * range of models with different capabilities, performance characteristics, and
1087
+ * price points. Refer to the
1074
1088
  * [model guide](https://platform.openai.com/docs/models) to browse and compare
1075
1089
  * available models.
1076
1090
  */
@@ -1233,8 +1247,6 @@ export interface Response {
1233
1247
  prompt_cache_retention?: 'in_memory' | '24h' | null;
1234
1248
 
1235
1249
  /**
1236
- * **gpt-5 and o-series models only**
1237
- *
1238
1250
  * Configuration options for
1239
1251
  * [reasoning models](https://platform.openai.com/docs/guides/reasoning).
1240
1252
  */
@@ -1333,9 +1345,11 @@ export namespace Response {
1333
1345
  */
1334
1346
  export interface IncompleteDetails {
1335
1347
  /**
1336
- * The reason why the response is incomplete.
1348
+ * The reason why the response is incomplete. `steered` means the response stopped
1349
+ * at a safe output boundary after a WebSocket `response.steer` event. The server
1350
+ * can then create a successor response automatically with the queued input.
1337
1351
  */
1338
- reason?: 'max_output_tokens' | 'content_filter';
1352
+ reason?: 'max_output_tokens' | 'max_messages' | 'content_filter' | 'steered';
1339
1353
  }
1340
1354
 
1341
1355
  export interface SpecificProgrammaticToolCallingParam {
@@ -2398,6 +2412,75 @@ export interface ResponseComputerToolCallOutputScreenshot {
2398
2412
  image_url?: string;
2399
2413
  }
2400
2414
 
2415
+ /**
2416
+ * A configuration update that applies to subsequent responses until it is replaced
2417
+ * by another configuration update.
2418
+ */
2419
+ export interface ResponseConfigurationUpdateItem {
2420
+ /**
2421
+ * The unique ID of the configuration update item.
2422
+ */
2423
+ id: string;
2424
+
2425
+ /**
2426
+ * The item type. Always `configuration_update`.
2427
+ */
2428
+ type: 'configuration_update';
2429
+
2430
+ /**
2431
+ * The reasoning configuration applied by this update.
2432
+ */
2433
+ reasoning?: ResponseConfigurationUpdateItem.Reasoning;
2434
+ }
2435
+
2436
+ export namespace ResponseConfigurationUpdateItem {
2437
+ /**
2438
+ * The reasoning configuration applied by this update.
2439
+ */
2440
+ export interface Reasoning {
2441
+ /**
2442
+ * The reasoning effort used for subsequent responses until another configuration
2443
+ * update replaces it.
2444
+ */
2445
+ effort?: Shared.ReasoningEffort | null;
2446
+ }
2447
+ }
2448
+
2449
+ /**
2450
+ * An update to the conversation's response configuration. The configuration
2451
+ * remains in effect for subsequent responses until it is replaced by another
2452
+ * configuration update.
2453
+ */
2454
+ export interface ResponseConfigurationUpdateItemParam {
2455
+ /**
2456
+ * The item type. Always `configuration_update`.
2457
+ */
2458
+ type: 'configuration_update';
2459
+
2460
+ /**
2461
+ * The unique ID of the configuration update item.
2462
+ */
2463
+ id?: string | null;
2464
+
2465
+ /**
2466
+ * Updates to reasoning configuration. Only effort is supported.
2467
+ */
2468
+ reasoning?: ResponseConfigurationUpdateItemParam.Reasoning;
2469
+ }
2470
+
2471
+ export namespace ResponseConfigurationUpdateItemParam {
2472
+ /**
2473
+ * Updates to reasoning configuration. Only effort is supported.
2474
+ */
2475
+ export interface Reasoning {
2476
+ /**
2477
+ * The reasoning effort to use for subsequent responses until another configuration
2478
+ * update replaces it.
2479
+ */
2480
+ effort?: Shared.ReasoningEffort | null;
2481
+ }
2482
+ }
2483
+
2401
2484
  /**
2402
2485
  * Represents a container created with /v1/containers.
2403
2486
  */
@@ -2601,6 +2684,11 @@ export interface ResponseCustomToolCall {
2601
2684
  */
2602
2685
  id?: string;
2603
2686
 
2687
+ /**
2688
+ * Whether the custom tool call runs asynchronously.
2689
+ */
2690
+ async?: boolean;
2691
+
2604
2692
  /**
2605
2693
  * The execution context that produced this tool call.
2606
2694
  */
@@ -2794,6 +2882,7 @@ export interface ResponseError {
2794
2882
  | 'invalid_prompt'
2795
2883
  | 'data_residency_mismatch'
2796
2884
  | 'bio_policy'
2885
+ | 'misalignment_policy_violation'
2797
2886
  | 'vector_store_timeout'
2798
2887
  | 'invalid_image'
2799
2888
  | 'invalid_image_format'
@@ -2814,6 +2903,44 @@ export interface ResponseError {
2814
2903
  * A human-readable description of the error.
2815
2904
  */
2816
2905
  message: string;
2906
+
2907
+ misalignment?: ResponseError.Misalignment;
2908
+ }
2909
+
2910
+ export namespace ResponseError {
2911
+ export interface Misalignment {
2912
+ /**
2913
+ * The public explanation for this block.
2914
+ */
2915
+ detailed_explanation?: string;
2916
+
2917
+ /**
2918
+ * An optional classification; clients must accept additional values.
2919
+ */
2920
+ error_type?:
2921
+ | (string & {})
2922
+ | 'potentially_unintended_data_transfer'
2923
+ | 'potentially_unintended_data_access'
2924
+ | 'potentially_unintended_destructive_activity'
2925
+ | 'other';
2926
+
2927
+ /**
2928
+ * An optional public continuation instruction.
2929
+ */
2930
+ steer?: Misalignment.Steer;
2931
+ }
2932
+
2933
+ export namespace Misalignment {
2934
+ /**
2935
+ * An optional public continuation instruction.
2936
+ */
2937
+ export interface Steer {
2938
+ /**
2939
+ * The public continuation instruction.
2940
+ */
2941
+ message: string;
2942
+ }
2943
+ }
2817
2944
  }
2818
2945
 
2819
2946
  /**
@@ -3414,6 +3541,11 @@ export interface ResponseFunctionToolCall {
3414
3541
  */
3415
3542
  id?: string;
3416
3543
 
3544
+ /**
3545
+ * Whether the function tool call runs asynchronously.
3546
+ */
3547
+ async?: boolean;
3548
+
3417
3549
  /**
3418
3550
  * The execution context that produced this tool call.
3419
3551
  */
@@ -3839,6 +3971,10 @@ export type ResponseIncludable =
3839
3971
 
3840
3972
  /**
3841
3973
  * An event that is emitted when a response finishes as incomplete.
3974
+ *
3975
+ * Over WebSocket, steering can finish a response with
3976
+ * `response.incomplete_details.reason` set to `steered`, followed automatically by
3977
+ * a successor `response.created` that commits the queued steering input.
3842
3978
  */
3843
3979
  export interface ResponseIncompleteEvent {
3844
3980
  /**
@@ -4132,6 +4268,7 @@ export type ResponseInputItem =
4132
4268
  | ResponseInputItem.ToolSearchCall
4133
4269
  | ResponseToolSearchOutputItemParam
4134
4270
  | ResponseInputItem.AdditionalTools
4271
+ | ResponseConfigurationUpdateItemParam
4135
4272
  | ResponseReasoningItem
4136
4273
  | ResponseCompactionItemParam
4137
4274
  | ResponseInputItem.ImageGenerationCall
@@ -5173,6 +5310,7 @@ export type ResponseItem =
5173
5310
  | ResponseToolSearchCall
5174
5311
  | ResponseToolSearchOutputItem
5175
5312
  | ResponseItem.AdditionalTools
5313
+ | ResponseConfigurationUpdateItem
5176
5314
  | ResponseReasoningItem
5177
5315
  | ResponseItem.Program
5178
5316
  | ResponseItem.ProgramOutput
@@ -7312,130 +7450,151 @@ export namespace ResponseShellCallOutputContentDoneEvent {
7312
7450
  export type ResponseStatus = 'completed' | 'failed' | 'in_progress' | 'cancelled' | 'queued' | 'incomplete';
7313
7451
 
7314
7452
  /**
7315
- * Event emitted while a response is streamed.
7316
- */
7317
- export type ResponseStreamEvent =
7318
- | ResponseAudioDeltaEvent
7319
- | ResponseAudioDoneEvent
7320
- | ResponseAudioTranscriptDeltaEvent
7321
- | ResponseAudioTranscriptDoneEvent
7322
- | ResponseCodeInterpreterCallCodeDeltaEvent
7323
- | ResponseCodeInterpreterCallCodeDoneEvent
7324
- | ResponseCodeInterpreterCallCompletedEvent
7325
- | ResponseCodeInterpreterCallInProgressEvent
7326
- | ResponseCodeInterpreterCallInterpretingEvent
7327
- | ResponseCompletedEvent
7328
- | ResponseContentPartAddedEvent
7329
- | ResponseContentPartDoneEvent
7330
- | ResponseCreatedEvent
7331
- | ResponseErrorEvent
7332
- | ResponseFileSearchCallCompletedEvent
7333
- | ResponseFileSearchCallInProgressEvent
7334
- | ResponseFileSearchCallSearchingEvent
7335
- | ResponseFunctionCallArgumentsDeltaEvent
7336
- | ResponseFunctionCallArgumentsDoneEvent
7337
- | ResponseShellCallCommandAddedEvent
7338
- | ResponseShellCallCommandDeltaEvent
7339
- | ResponseShellCallCommandDoneEvent
7340
- | ResponseShellCallOutputContentDeltaEvent
7341
- | ResponseShellCallOutputContentDoneEvent
7342
- | ResponseInProgressEvent
7343
- | ResponseFailedEvent
7344
- | ResponseIncompleteEvent
7345
- | ResponseOutputItemAddedEvent
7346
- | ResponseOutputItemDoneEvent
7347
- | ResponseReasoningSummaryPartAddedEvent
7348
- | ResponseReasoningSummaryPartDoneEvent
7349
- | ResponseReasoningSummaryTextDeltaEvent
7350
- | ResponseReasoningSummaryTextDoneEvent
7351
- | ResponseReasoningTextDeltaEvent
7352
- | ResponseReasoningTextDoneEvent
7353
- | ResponseRefusalDeltaEvent
7354
- | ResponseRefusalDoneEvent
7355
- | ResponseTextDeltaEvent
7356
- | ResponseTextDoneEvent
7357
- | ResponseWebSearchCallCompletedEvent
7358
- | ResponseWebSearchCallInProgressEvent
7359
- | ResponseWebSearchCallSearchingEvent
7360
- | ResponseImageGenCallCompletedEvent
7361
- | ResponseImageGenCallGeneratingEvent
7362
- | ResponseImageGenCallInProgressEvent
7363
- | ResponseImageGenCallPartialImageEvent
7364
- | ResponseMcpCallArgumentsDeltaEvent
7365
- | ResponseMcpCallArgumentsDoneEvent
7366
- | ResponseMcpCallCompletedEvent
7367
- | ResponseMcpCallFailedEvent
7368
- | ResponseMcpCallInProgressEvent
7369
- | ResponseMcpListToolsCompletedEvent
7370
- | ResponseMcpListToolsFailedEvent
7371
- | ResponseMcpListToolsInProgressEvent
7372
- | ResponseOutputTextAnnotationAddedEvent
7373
- | ResponseQueuedEvent
7374
- | ResponseCustomToolCallInputDeltaEvent
7375
- | ResponseCustomToolCallInputDoneEvent;
7376
-
7377
- /**
7378
- * Configuration options for a text response from the model. Can be plain text or
7379
- * structured JSON data. Learn more:
7453
+ * Emitted when steering input has been validated and queued. Acceptance means the
7454
+ * server owns the input, not that it has been applied. The successor's
7455
+ * `response.created` event is the commit point. If accepted input cannot be
7456
+ * committed, `response.steer.failed` returns it with the same steering ID.
7380
7457
  *
7381
- * - [Text inputs and outputs](https://platform.openai.com/docs/guides/text)
7382
- * - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs)
7458
+ * When the response stops for client-owned tool output or approval, the input
7459
+ * remains queued and `response.steer.pending` is emitted after
7460
+ * `response.completed`. Fill the pending event's `required_input` stubs with saved
7461
+ * results and send one matching explicit `response.create` per parent. Do not
7462
+ * resend accepted input while it is still queued.
7383
7463
  */
7384
- export interface ResponseTextConfig {
7464
+ export interface ResponseSteerAcceptedEvent {
7385
7465
  /**
7386
- * An object specifying the format that the model must output.
7387
- *
7388
- * Configuring `{ "type": "json_schema" }` enables Structured Outputs, which
7389
- * ensures the model will match your supplied JSON schema. Learn more in the
7390
- * [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs).
7391
- *
7392
- * The default format is `{ "type": "text" }` with no additional options.
7393
- *
7394
- * **Not recommended for gpt-4o and newer models:**
7395
- *
7396
- * Setting to `{ "type": "json_object" }` enables the older JSON mode, which
7397
- * ensures the message the model generates is valid JSON. Using `json_schema` is
7398
- * preferred for models that support it.
7466
+ * The sequence number for this event.
7399
7467
  */
7400
- format?: ResponseFormatTextConfig;
7468
+ sequence_number: number;
7401
7469
 
7402
7470
  /**
7403
- * Constrains the verbosity of the model's response. Lower values will result in
7404
- * more concise responses, while higher values will result in more verbose
7405
- * responses. Currently supported values are `low`, `medium`, and `high`. The
7406
- * default is `medium`.
7471
+ * The accepted steering submission.
7407
7472
  */
7408
- verbosity?: 'low' | 'medium' | 'high' | null;
7473
+ steer: ResponseSteerAcceptedEvent.Steer;
7474
+
7475
+ /**
7476
+ * The event discriminator. Always `response.steer.accepted`.
7477
+ */
7478
+ type: 'response.steer.accepted';
7479
+
7480
+ /**
7481
+ * The WebSocket lane that emitted this event. This field is present when the
7482
+ * target response's `response.create` event supplied a `stream_id`.
7483
+ */
7484
+ stream_id?: string;
7409
7485
  }
7410
7486
 
7411
- /**
7412
- * Emitted when there is an additional text delta.
7413
- */
7414
- export interface ResponseTextDeltaEvent {
7487
+ export namespace ResponseSteerAcceptedEvent {
7415
7488
  /**
7416
- * The index of the content part that the text delta was added to.
7489
+ * The accepted steering submission.
7417
7490
  */
7418
- content_index: number;
7491
+ export interface Steer {
7492
+ /**
7493
+ * The ID assigned to the steering submission.
7494
+ */
7495
+ id: string;
7496
+
7497
+ /**
7498
+ * The ID of the response being steered.
7499
+ */
7500
+ previous_response_id: string;
7501
+ }
7502
+ }
7419
7503
 
7504
+ /**
7505
+ * A machine-readable steering error code. Clients should handle unknown values
7506
+ * because additional codes may be introduced. Known values include:
7507
+ *
7508
+ * - `response_not_found`: The target response is not available on this connection.
7509
+ * - `invalid_input`: The event or input failed validation.
7510
+ * - `steering_not_supported`: The model or response execution mode does not
7511
+ * support steering.
7512
+ * - `too_many_pending_steers`: Too much steering input is pending for the
7513
+ * response.
7514
+ * - `response_already_completed`: The response completed and is no longer
7515
+ * accepting steering input.
7516
+ * - `response_not_active`: The response is no longer accepting steering input.
7517
+ * - `successor_creation_failed`: The successor response could not be created.
7518
+ */
7519
+ export type ResponseSteerErrorCode =
7520
+ | 'response_not_found'
7521
+ | 'invalid_input'
7522
+ | 'steering_not_supported'
7523
+ | 'too_many_pending_steers'
7524
+ | 'response_already_completed'
7525
+ | 'response_not_active'
7526
+ | 'successor_creation_failed'
7527
+ | (string & {});
7528
+
7529
+ /**
7530
+ * Queues user input to steer a response on this WebSocket connection. Input can
7531
+ * contain text, images, and files. Steering is supported only for single-agent
7532
+ * responses on models and execution modes that support steering. Responses bound
7533
+ * to a conversation or using automatic compaction do not support steering.
7534
+ *
7535
+ * A `response.steer.accepted` event acknowledges that the server owns the queued
7536
+ * input, not that it has been applied. The successor's `response.created` event is
7537
+ * the commit point. Input that cannot be committed is returned in
7538
+ * `response.steer.failed`.
7539
+ *
7540
+ * Steering may cause the active response to finish at a safe output boundary with
7541
+ * `response.incomplete` and `incomplete_details.reason` set to `steered`, followed
7542
+ * automatically by a successor `response.created`. Normal completion can also be
7543
+ * followed by an automatic successor. Automatic successors inherit the previous
7544
+ * response's settings and continue from it with the queued input.
7545
+ *
7546
+ * If the response stops for client-owned tool output or approval, accepted
7547
+ * steering input remains queued and `response.steer.pending` is emitted after
7548
+ * `response.completed`. Fill the `required_input` stubs from that event with saved
7549
+ * tool results or approval decisions, and send one explicit `response.create` per
7550
+ * parent with the same `previous_response_id` and WebSocket lane. Do not rerun
7551
+ * tools or resend accepted steering input. The queued input is prepended in
7552
+ * submission order to that request's input, and the explicit request retains its
7553
+ * own settings.
7554
+ *
7555
+ * This event accepts only `type`, `previous_response_id`, and `input`. Do not send
7556
+ * `stream_id`; the target response determines the WebSocket lane.
7557
+ */
7558
+ export interface ResponseSteerEvent {
7420
7559
  /**
7421
- * The text delta that was added.
7560
+ * Input to queue for a continuation of the response. Uses the same string or
7561
+ * input-item shape as `response.create.input`, with a non-empty array when
7562
+ * supplying input items.
7563
+ *
7564
+ * Steering accepts only messages with the `user` role. Each message may contain
7565
+ * only `type`, `role`, and `content`, with `content` as a string or an array of
7566
+ * `input_text`, `input_image`, and `input_file` parts. The optional `type` must be
7567
+ * `message`. Other roles, tool outputs, and item types are not supported for
7568
+ * steering.
7422
7569
  */
7423
- delta: string;
7570
+ input: ResponseSteerInput;
7424
7571
 
7425
7572
  /**
7426
- * The ID of the output item that the text delta was added to.
7573
+ * The ID of the response to steer on this WebSocket connection.
7427
7574
  */
7428
- item_id: string;
7575
+ previous_response_id: string;
7429
7576
 
7430
7577
  /**
7431
- * The log probabilities of the tokens in the delta.
7578
+ * The event discriminator. Always `response.steer`.
7432
7579
  */
7433
- logprobs: Array<ResponseTextDeltaEvent.Logprob>;
7580
+ type: 'response.steer';
7581
+ }
7434
7582
 
7583
+ /**
7584
+ * Emitted when steering input is rejected or cannot be committed to a successor
7585
+ * response. Returns the original, uncommitted input so the client can carry it
7586
+ * into `response.create` when appropriate. Invalid input must be corrected before
7587
+ * retrying.
7588
+ *
7589
+ * Failures after acceptance include the same steering ID. Failures before an ID is
7590
+ * allocated omit `steer.id`. A lost connection or missing acknowledgement leaves
7591
+ * the outcome unknown; it is not proof that the input was rejected.
7592
+ */
7593
+ export interface ResponseSteerFailedEvent {
7435
7594
  /**
7436
- * The index of the output item that the text delta was added to.
7595
+ * Information about why the input could not be committed.
7437
7596
  */
7438
- output_index: number;
7597
+ error: ResponseSteerFailedEvent.Error;
7439
7598
 
7440
7599
  /**
7441
7600
  * The sequence number for this event.
@@ -7443,57 +7602,564 @@ export interface ResponseTextDeltaEvent {
7443
7602
  sequence_number: number;
7444
7603
 
7445
7604
  /**
7446
- * The type of the event. Always `response.output_text.delta`.
7605
+ * The steering submission that could not be committed.
7447
7606
  */
7448
- type: 'response.output_text.delta';
7607
+ steer: ResponseSteerFailedEvent.Steer;
7608
+
7609
+ /**
7610
+ * The event discriminator. Always `response.steer.failed`.
7611
+ */
7612
+ type: 'response.steer.failed';
7613
+
7614
+ /**
7615
+ * The WebSocket lane that emitted this event, when the target response is
7616
+ * available and its `response.create` event supplied a `stream_id`.
7617
+ */
7618
+ stream_id?: string;
7449
7619
  }
7450
7620
 
7451
- export namespace ResponseTextDeltaEvent {
7621
+ export namespace ResponseSteerFailedEvent {
7452
7622
  /**
7453
- * A logprob is the logarithmic probability that the model assigns to producing a
7454
- * particular token at a given position in the sequence. Less-negative (higher)
7455
- * logprob values indicate greater model confidence in that token choice.
7623
+ * Information about why the input could not be committed.
7456
7624
  */
7457
- export interface Logprob {
7625
+ export interface Error {
7458
7626
  /**
7459
- * A possible text token.
7627
+ * A machine-readable steering error code. Clients should handle unknown values
7628
+ * because additional codes may be introduced. Known values include:
7629
+ *
7630
+ * - `response_not_found`: The target response is not available on this connection.
7631
+ * - `invalid_input`: The event or input failed validation.
7632
+ * - `steering_not_supported`: The model or response execution mode does not
7633
+ * support steering.
7634
+ * - `too_many_pending_steers`: Too much steering input is pending for the
7635
+ * response.
7636
+ * - `response_already_completed`: The response completed and is no longer
7637
+ * accepting steering input.
7638
+ * - `response_not_active`: The response is no longer accepting steering input.
7639
+ * - `successor_creation_failed`: The successor response could not be created.
7460
7640
  */
7461
- token: string;
7641
+ code: ResponsesAPI.ResponseSteerErrorCode;
7462
7642
 
7463
7643
  /**
7464
- * The log probability of this token.
7644
+ * A human-readable description of the error.
7465
7645
  */
7466
- logprob: number;
7646
+ message: string;
7467
7647
 
7468
7648
  /**
7469
- * The log probabilities of up to 20 of the most likely tokens.
7649
+ * The error type. Always `invalid_request_error`.
7470
7650
  */
7471
- top_logprobs?: Array<Logprob.TopLogprob>;
7651
+ type: 'invalid_request_error';
7472
7652
  }
7473
7653
 
7474
- export namespace Logprob {
7475
- export interface TopLogprob {
7476
- /**
7477
- * A possible text token.
7478
- */
7479
- token?: string;
7654
+ /**
7655
+ * The steering submission that could not be committed.
7656
+ */
7657
+ export interface Steer {
7658
+ /**
7659
+ * Input to queue for a continuation of the response. Uses the same string or
7660
+ * input-item shape as `response.create.input`, with a non-empty array when
7661
+ * supplying input items.
7662
+ *
7663
+ * Steering accepts only messages with the `user` role. Each message may contain
7664
+ * only `type`, `role`, and `content`, with `content` as a string or an array of
7665
+ * `input_text`, `input_image`, and `input_file` parts. The optional `type` must be
7666
+ * `message`. Other roles, tool outputs, and item types are not supported for
7667
+ * steering.
7668
+ */
7669
+ input: ResponsesAPI.ResponseSteerInput;
7480
7670
 
7481
- /**
7482
- * The log probability of this token.
7483
- */
7484
- logprob?: number;
7485
- }
7671
+ /**
7672
+ * The ID of the response that was targeted for steering.
7673
+ */
7674
+ previous_response_id: string;
7675
+
7676
+ /**
7677
+ * The ID assigned to the steering submission, if one was allocated.
7678
+ */
7679
+ id?: string;
7486
7680
  }
7487
7681
  }
7488
7682
 
7489
7683
  /**
7490
- * Emitted when text content is finalized.
7684
+ * Input to queue for a continuation of the response. Uses the same string or
7685
+ * input-item shape as `response.create.input`, with a non-empty array when
7686
+ * supplying input items.
7687
+ *
7688
+ * Steering accepts only messages with the `user` role. Each message may contain
7689
+ * only `type`, `role`, and `content`, with `content` as a string or an array of
7690
+ * `input_text`, `input_image`, and `input_file` parts. The optional `type` must be
7691
+ * `message`. Other roles, tool outputs, and item types are not supported for
7692
+ * steering.
7491
7693
  */
7492
- export interface ResponseTextDoneEvent {
7493
- /**
7494
- * The index of the content part that the text content is finalized.
7495
- */
7496
- content_index: number;
7694
+ export type ResponseSteerInput =
7695
+ | string
7696
+ | Array<ResponseSteerInputItemList.Message | ResponseSteerInputItemList.FunctionCallOutput>;
7697
+
7698
+ export namespace ResponseSteerInputItemList {
7699
+ export interface Message {
7700
+ /**
7701
+ * The message content, as an array of content parts.
7702
+ */
7703
+ content: Array<ResponsesAPI.ResponseSteerInputContent> | string;
7704
+
7705
+ /**
7706
+ * The message role. Always `user`.
7707
+ */
7708
+ role: 'user';
7709
+
7710
+ /**
7711
+ * The item type. Always `message`.
7712
+ */
7713
+ type: 'message';
7714
+
7715
+ /**
7716
+ * The unique ID of this message item.
7717
+ */
7718
+ id?: string | null;
7719
+
7720
+ /**
7721
+ * The status of the message item.
7722
+ */
7723
+ status?: string | null;
7724
+ }
7725
+
7726
+ /**
7727
+ * The output of a function tool call.
7728
+ */
7729
+ export interface FunctionCallOutput {
7730
+ /**
7731
+ * Text, image, or file output of the function tool call.
7732
+ */
7733
+ output: string | ResponsesAPI.ResponseFunctionCallOutputItemList;
7734
+
7735
+ /**
7736
+ * The type of the function tool call output. Always `function_call_output`.
7737
+ */
7738
+ type: 'function_call_output';
7739
+
7740
+ /**
7741
+ * The unique ID of the function tool call output. Populated when this item is
7742
+ * returned via API.
7743
+ */
7744
+ id?: string | null;
7745
+
7746
+ /**
7747
+ * The unique ID of the function tool call generated by the model.
7748
+ */
7749
+ call_id?: string | null;
7750
+
7751
+ /**
7752
+ * The execution context that produced this tool call.
7753
+ */
7754
+ caller?: FunctionCallOutput.Direct | FunctionCallOutput.Program | null;
7755
+
7756
+ /**
7757
+ * The name of the tool that produced the output.
7758
+ */
7759
+ name?: string | null;
7760
+
7761
+ /**
7762
+ * The namespace of the tool that produced the output.
7763
+ */
7764
+ namespace?: string | null;
7765
+
7766
+ /**
7767
+ * The status of the item. One of `in_progress`, `completed`, or `incomplete`.
7768
+ * Populated when items are returned via API.
7769
+ */
7770
+ status?: 'in_progress' | 'completed' | 'incomplete' | null;
7771
+ }
7772
+
7773
+ export namespace FunctionCallOutput {
7774
+ export interface Direct {
7775
+ /**
7776
+ * The caller type. Always `direct`.
7777
+ */
7778
+ type: 'direct';
7779
+ }
7780
+
7781
+ export interface Program {
7782
+ /**
7783
+ * The call ID of the program item that produced this tool call.
7784
+ */
7785
+ caller_id: string;
7786
+
7787
+ /**
7788
+ * The caller type. Always `program`.
7789
+ */
7790
+ type: 'program';
7791
+ }
7792
+ }
7793
+ }
7794
+
7795
+ /**
7796
+ * A piece of message content, such as text, an image, or a file.
7797
+ */
7798
+ export type ResponseSteerInputContent =
7799
+ | ResponseInputTextContent
7800
+ | ResponseInputImageContent
7801
+ | ResponseInputFileContent;
7802
+
7803
+ /**
7804
+ * Emitted when accepted steering input remains queued after the target response
7805
+ * completes. The server still owns the input. Do not resend it. The successor's
7806
+ * `response.created` event is the commit point.
7807
+ *
7808
+ * When `reason` is `waiting_for_required_input`, this event follows
7809
+ * `response.completed` while the response waits for the tool results or approval
7810
+ * decisions identified by `required_input`. Copy those stubs, fill their result
7811
+ * fields using the ordinary `response.create` input schemas, and submit one
7812
+ * continuation per parent with the same `previous_response_id` and WebSocket lane.
7813
+ * Use saved results without rerunning tools. The queued steering input is
7814
+ * prepended in submission order to the continuation's input. That explicit request
7815
+ * retains its own settings.
7816
+ *
7817
+ * This notification is emitted at most once per steering submission. Multiple
7818
+ * submissions for the same parent can report the same required inputs; they do not
7819
+ * each require a separate continuation.
7820
+ */
7821
+ export interface ResponseSteerPendingEvent {
7822
+ /**
7823
+ * An extensible enum describing why accepted steering input is still queued.
7824
+ * Clients should handle unknown values because additional reasons may be
7825
+ * introduced. Known values include:
7826
+ *
7827
+ * - `waiting_for_required_input`: The response is waiting for the tool results or
7828
+ * approval decisions identified by `required_input`.
7829
+ */
7830
+ reason: ResponseSteerPendingReason;
7831
+
7832
+ /**
7833
+ * Input stubs identifying outstanding client-owned tool results or approval
7834
+ * decisions. Each stub contains identifying fields only; the client supplies the
7835
+ * result before including it in `response.create`.
7836
+ */
7837
+ required_input: Array<ResponseSteerRequiredInput>;
7838
+
7839
+ /**
7840
+ * The sequence number for this event.
7841
+ */
7842
+ sequence_number: number;
7843
+
7844
+ /**
7845
+ * The steering submission that remains queued.
7846
+ */
7847
+ steer: ResponseSteerPendingEvent.Steer;
7848
+
7849
+ /**
7850
+ * The event discriminator. Always `response.steer.pending`.
7851
+ */
7852
+ type: 'response.steer.pending';
7853
+
7854
+ /**
7855
+ * The WebSocket lane that emitted this event. This field is present when the
7856
+ * target response's `response.create` event supplied a `stream_id`.
7857
+ */
7858
+ stream_id?: string;
7859
+ }
7860
+
7861
+ export namespace ResponseSteerPendingEvent {
7862
+ /**
7863
+ * The steering submission that remains queued.
7864
+ */
7865
+ export interface Steer {
7866
+ /**
7867
+ * The ID assigned to the steering submission.
7868
+ */
7869
+ id: string;
7870
+
7871
+ /**
7872
+ * The ID of the response being steered.
7873
+ */
7874
+ previous_response_id: string;
7875
+ }
7876
+ }
7877
+
7878
+ /**
7879
+ * An extensible enum describing why accepted steering input is still queued.
7880
+ * Clients should handle unknown values because additional reasons may be
7881
+ * introduced. Known values include:
7882
+ *
7883
+ * - `waiting_for_required_input`: The response is waiting for the tool results or
7884
+ * approval decisions identified by `required_input`.
7885
+ */
7886
+ export type ResponseSteerPendingReason = 'waiting_for_required_input' | (string & {});
7887
+
7888
+ /**
7889
+ * An input stub identifying an outstanding client-owned tool result or approval
7890
+ * decision. Copy the stub and fill the result fields using the corresponding
7891
+ * `response.create` input schema. Use saved results without rerunning the tool.
7892
+ * The server does not supply results, approval decisions, or safety
7893
+ * acknowledgements in these stubs.
7894
+ */
7895
+ export type ResponseSteerRequiredInput =
7896
+ | ResponseSteerRequiredInput.FunctionCallOutput
7897
+ | ResponseSteerRequiredInput.CustomToolCallOutput
7898
+ | ResponseSteerRequiredInput.ComputerCallOutput
7899
+ | ResponseSteerRequiredInput.ShellCallOutput
7900
+ | ResponseSteerRequiredInput.ApplyPatchCallOutput
7901
+ | ResponseSteerRequiredInput.ToolSearchOutput
7902
+ | ResponseSteerRequiredInput.McpApprovalResponse;
7903
+
7904
+ export namespace ResponseSteerRequiredInput {
7905
+ /**
7906
+ * Supply `output` using the function tool call output input schema.
7907
+ */
7908
+ export interface FunctionCallOutput {
7909
+ call_id: string;
7910
+
7911
+ name: string;
7912
+
7913
+ type: 'function_call_output';
7914
+ }
7915
+
7916
+ /**
7917
+ * Supply `output` using the custom tool call output input schema. The original
7918
+ * custom tool call supplies the tool's name.
7919
+ */
7920
+ export interface CustomToolCallOutput {
7921
+ call_id: string;
7922
+
7923
+ type: 'custom_tool_call_output';
7924
+ }
7925
+
7926
+ /**
7927
+ * Supply `output` using the computer tool call output input schema, including any
7928
+ * required `acknowledged_safety_checks`.
7929
+ */
7930
+ export interface ComputerCallOutput {
7931
+ call_id: string;
7932
+
7933
+ type: 'computer_call_output';
7934
+ }
7935
+
7936
+ /**
7937
+ * Supply `output` using the shell tool call output input schema. Each output entry
7938
+ * includes `stdout`, `stderr`, and `outcome`.
7939
+ */
7940
+ export interface ShellCallOutput {
7941
+ call_id: string;
7942
+
7943
+ type: 'shell_call_output';
7944
+ }
7945
+
7946
+ /**
7947
+ * Supply `status` and optional `output` using the apply patch tool call output
7948
+ * input schema.
7949
+ */
7950
+ export interface ApplyPatchCallOutput {
7951
+ call_id: string;
7952
+
7953
+ type: 'apply_patch_call_output';
7954
+ }
7955
+
7956
+ /**
7957
+ * Supply `tools` using the tool search output input schema, retaining
7958
+ * `execution: "client"`.
7959
+ */
7960
+ export interface ToolSearchOutput {
7961
+ call_id: string;
7962
+
7963
+ execution: 'client';
7964
+
7965
+ type: 'tool_search_output';
7966
+ }
7967
+
7968
+ /**
7969
+ * Supply `approve` using the MCP approval response input schema. An optional
7970
+ * `reason` can be supplied when denying the request. The original approval request
7971
+ * identifies the tool and server.
7972
+ */
7973
+ export interface McpApprovalResponse {
7974
+ approval_request_id: string;
7975
+
7976
+ type: 'mcp_approval_response';
7977
+ }
7978
+ }
7979
+
7980
+ /**
7981
+ * Event emitted while a response is streamed.
7982
+ */
7983
+ export type ResponseStreamEvent =
7984
+ | ResponseAudioDeltaEvent
7985
+ | ResponseAudioDoneEvent
7986
+ | ResponseAudioTranscriptDeltaEvent
7987
+ | ResponseAudioTranscriptDoneEvent
7988
+ | ResponseCodeInterpreterCallCodeDeltaEvent
7989
+ | ResponseCodeInterpreterCallCodeDoneEvent
7990
+ | ResponseCodeInterpreterCallCompletedEvent
7991
+ | ResponseCodeInterpreterCallInProgressEvent
7992
+ | ResponseCodeInterpreterCallInterpretingEvent
7993
+ | ResponseCompletedEvent
7994
+ | ResponseContentPartAddedEvent
7995
+ | ResponseContentPartDoneEvent
7996
+ | ResponseCreatedEvent
7997
+ | ResponseErrorEvent
7998
+ | ResponseFileSearchCallCompletedEvent
7999
+ | ResponseFileSearchCallInProgressEvent
8000
+ | ResponseFileSearchCallSearchingEvent
8001
+ | ResponseFunctionCallArgumentsDeltaEvent
8002
+ | ResponseFunctionCallArgumentsDoneEvent
8003
+ | ResponseShellCallCommandAddedEvent
8004
+ | ResponseShellCallCommandDeltaEvent
8005
+ | ResponseShellCallCommandDoneEvent
8006
+ | ResponseShellCallOutputContentDeltaEvent
8007
+ | ResponseShellCallOutputContentDoneEvent
8008
+ | ResponseInProgressEvent
8009
+ | ResponseFailedEvent
8010
+ | ResponseIncompleteEvent
8011
+ | ResponseOutputItemAddedEvent
8012
+ | ResponseOutputItemDoneEvent
8013
+ | ResponseReasoningSummaryPartAddedEvent
8014
+ | ResponseReasoningSummaryPartDoneEvent
8015
+ | ResponseReasoningSummaryTextDeltaEvent
8016
+ | ResponseReasoningSummaryTextDoneEvent
8017
+ | ResponseReasoningTextDeltaEvent
8018
+ | ResponseReasoningTextDoneEvent
8019
+ | ResponseRefusalDeltaEvent
8020
+ | ResponseRefusalDoneEvent
8021
+ | ResponseTextDeltaEvent
8022
+ | ResponseTextDoneEvent
8023
+ | ResponseWebSearchCallCompletedEvent
8024
+ | ResponseWebSearchCallInProgressEvent
8025
+ | ResponseWebSearchCallSearchingEvent
8026
+ | ResponseImageGenCallCompletedEvent
8027
+ | ResponseImageGenCallGeneratingEvent
8028
+ | ResponseImageGenCallInProgressEvent
8029
+ | ResponseImageGenCallPartialImageEvent
8030
+ | ResponseMcpCallArgumentsDeltaEvent
8031
+ | ResponseMcpCallArgumentsDoneEvent
8032
+ | ResponseMcpCallCompletedEvent
8033
+ | ResponseMcpCallFailedEvent
8034
+ | ResponseMcpCallInProgressEvent
8035
+ | ResponseMcpListToolsCompletedEvent
8036
+ | ResponseMcpListToolsFailedEvent
8037
+ | ResponseMcpListToolsInProgressEvent
8038
+ | ResponseOutputTextAnnotationAddedEvent
8039
+ | ResponseQueuedEvent
8040
+ | ResponseCustomToolCallInputDeltaEvent
8041
+ | ResponseCustomToolCallInputDoneEvent;
8042
+
8043
+ /**
8044
+ * Configuration options for a text response from the model. Can be plain text or
8045
+ * structured JSON data. Learn more:
8046
+ *
8047
+ * - [Text inputs and outputs](https://platform.openai.com/docs/guides/text)
8048
+ * - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs)
8049
+ */
8050
+ export interface ResponseTextConfig {
8051
+ /**
8052
+ * An object specifying the format that the model must output.
8053
+ *
8054
+ * Configuring `{ "type": "json_schema" }` enables Structured Outputs, which
8055
+ * ensures the model will match your supplied JSON schema. Learn more in the
8056
+ * [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs).
8057
+ *
8058
+ * The default format is `{ "type": "text" }` with no additional options.
8059
+ *
8060
+ * **Not recommended for gpt-4o and newer models:**
8061
+ *
8062
+ * Setting to `{ "type": "json_object" }` enables the older JSON mode, which
8063
+ * ensures the message the model generates is valid JSON. Using `json_schema` is
8064
+ * preferred for models that support it.
8065
+ */
8066
+ format?: ResponseFormatTextConfig;
8067
+
8068
+ /**
8069
+ * Constrains the verbosity of the model's response. Lower values will result in
8070
+ * more concise responses, while higher values will result in more verbose
8071
+ * responses. Currently supported values are `low`, `medium`, and `high`. The
8072
+ * default is `medium`.
8073
+ */
8074
+ verbosity?: 'low' | 'medium' | 'high' | null;
8075
+ }
8076
+
8077
+ /**
8078
+ * Emitted when there is an additional text delta.
8079
+ */
8080
+ export interface ResponseTextDeltaEvent {
8081
+ /**
8082
+ * The index of the content part that the text delta was added to.
8083
+ */
8084
+ content_index: number;
8085
+
8086
+ /**
8087
+ * The text delta that was added.
8088
+ */
8089
+ delta: string;
8090
+
8091
+ /**
8092
+ * The ID of the output item that the text delta was added to.
8093
+ */
8094
+ item_id: string;
8095
+
8096
+ /**
8097
+ * The log probabilities of the tokens in the delta.
8098
+ */
8099
+ logprobs: Array<ResponseTextDeltaEvent.Logprob>;
8100
+
8101
+ /**
8102
+ * The index of the output item that the text delta was added to.
8103
+ */
8104
+ output_index: number;
8105
+
8106
+ /**
8107
+ * The sequence number for this event.
8108
+ */
8109
+ sequence_number: number;
8110
+
8111
+ /**
8112
+ * The type of the event. Always `response.output_text.delta`.
8113
+ */
8114
+ type: 'response.output_text.delta';
8115
+ }
8116
+
8117
+ export namespace ResponseTextDeltaEvent {
8118
+ /**
8119
+ * A logprob is the logarithmic probability that the model assigns to producing a
8120
+ * particular token at a given position in the sequence. Less-negative (higher)
8121
+ * logprob values indicate greater model confidence in that token choice.
8122
+ */
8123
+ export interface Logprob {
8124
+ /**
8125
+ * A possible text token.
8126
+ */
8127
+ token: string;
8128
+
8129
+ /**
8130
+ * The log probability of this token.
8131
+ */
8132
+ logprob: number;
8133
+
8134
+ /**
8135
+ * The log probabilities of up to 20 of the most likely tokens.
8136
+ */
8137
+ top_logprobs?: Array<Logprob.TopLogprob>;
8138
+ }
8139
+
8140
+ export namespace Logprob {
8141
+ export interface TopLogprob {
8142
+ /**
8143
+ * A possible text token.
8144
+ */
8145
+ token?: string;
8146
+
8147
+ /**
8148
+ * The log probability of this token.
8149
+ */
8150
+ logprob?: number;
8151
+ }
8152
+ }
8153
+ }
8154
+
8155
+ /**
8156
+ * Emitted when text content is finalized.
8157
+ */
8158
+ export interface ResponseTextDoneEvent {
8159
+ /**
8160
+ * The index of the content part that the text content is finalized.
8161
+ */
8162
+ content_index: number;
7497
8163
 
7498
8164
  /**
7499
8165
  * The ID of the output item that the text content is finalized.
@@ -7699,11 +8365,6 @@ export interface ResponseUsage {
7699
8365
  * The total number of tokens used.
7700
8366
  */
7701
8367
  total_tokens: number;
7702
-
7703
- /**
7704
- * Compute units for the request. Currently null when available.
7705
- */
7706
- compute_units?: number | null;
7707
8368
  }
7708
8369
 
7709
8370
  export namespace ResponseUsage {
@@ -7809,455 +8470,490 @@ export interface ResponseWebSearchCallSearchingEvent {
7809
8470
  type: 'response.web_search_call.searching';
7810
8471
  }
7811
8472
 
7812
- export interface ResponsesClientEvent {
7813
- /**
7814
- * The type of the client event. Always `response.create`.
7815
- */
7816
- type: 'response.create';
7817
-
7818
- /**
7819
- * Whether to run the model response in the background.
7820
- * [Learn more](https://platform.openai.com/docs/guides/background).
7821
- */
7822
- background?: boolean | null;
8473
+ /**
8474
+ * Client events accepted by the Responses WebSocket server.
8475
+ */
8476
+ export type ResponsesClientEvent = ResponsesClientEvent.ResponseCreate | ResponseSteerEvent;
7823
8477
 
7824
- /**
7825
- * Context management configuration for this request.
7826
- */
7827
- context_management?: Array<ResponsesClientEvent.ContextManagement> | null;
8478
+ export namespace ResponsesClientEvent {
8479
+ // custom code for back compat aliases
8480
+ // Preserve the names exposed before ResponsesClientEvent became a union.
8481
+ export type ContextManagement = ResponseCreate.ContextManagement;
8482
+ export type Moderation = ResponseCreate.Moderation;
7828
8483
 
7829
- /**
7830
- * The conversation that this response belongs to. Items from this conversation are
7831
- * prepended to `input_items` for this response request. Input items and output
7832
- * items from this response are automatically added to this conversation after this
7833
- * response completes.
7834
- */
7835
- conversation?: string | ResponseConversationParam | null;
8484
+ export namespace Moderation {
8485
+ export type Policy = ResponseCreate.Moderation.Policy;
7836
8486
 
7837
- /**
7838
- * Specify additional output data to include in the model response. Currently
7839
- * supported values are:
7840
- *
7841
- * - `web_search_call.action.sources`: Include the sources of the web search tool
7842
- * call.
7843
- * - `code_interpreter_call.outputs`: Includes the outputs of python code execution
7844
- * in code interpreter tool call items.
7845
- * - `computer_call_output.output.image_url`: Include image urls from the computer
7846
- * call output.
7847
- * - `file_search_call.results`: Include the search results of the file search tool
7848
- * call.
7849
- * - `message.input_image.image_url`: Include image urls from the input message.
7850
- * - `message.output_text.logprobs`: Include logprobs with assistant messages.
7851
- * - `reasoning.encrypted_content`: Includes an encrypted version of reasoning
7852
- * tokens in reasoning item outputs. This enables reasoning items to be used in
7853
- * multi-turn conversations when using the Responses API statelessly (like when
7854
- * the `store` parameter is set to `false`, or when an organization is enrolled
7855
- * in the zero data retention program).
7856
- */
7857
- include?: Array<ResponseIncludable> | null;
8487
+ export namespace Policy {
8488
+ export type Input = ResponseCreate.Moderation.Policy.Input;
8489
+ export type Output = ResponseCreate.Moderation.Policy.Output;
8490
+ }
8491
+ }
7858
8492
 
7859
- /**
7860
- * Text, image, or file inputs to the model, used to generate a response.
7861
- *
7862
- * Learn more:
7863
- *
7864
- * - [Text inputs and outputs](https://platform.openai.com/docs/guides/text)
7865
- * - [Image inputs](https://platform.openai.com/docs/guides/images)
7866
- * - [File inputs](https://platform.openai.com/docs/guides/pdf-files)
7867
- * - [Conversation state](https://platform.openai.com/docs/guides/conversation-state)
7868
- * - [Function calling](https://platform.openai.com/docs/guides/function-calling)
7869
- */
7870
- input?: string | ResponseInput;
8493
+ export type PromptCacheOptions = ResponseCreate.PromptCacheOptions;
8494
+ export type StreamOptions = ResponseCreate.StreamOptions;
8495
+ export type SpecificProgrammaticToolCallingParam = ResponseCreate.SpecificProgrammaticToolCallingParam;
8496
+ // end custom code for back compat aliases
7871
8497
 
7872
8498
  /**
7873
- * A system (or developer) message inserted into the model's context.
8499
+ * Client event for creating a response over a persistent WebSocket connection.
8500
+ * This payload uses the same top-level fields as `POST /v1/responses`, plus
8501
+ * WebSocket-only envelope metadata.
7874
8502
  *
7875
- * When using along with `previous_response_id`, the instructions from a previous
7876
- * response will not be carried over to the next response. This makes it simple to
7877
- * swap out system (or developer) messages in new responses.
7878
- */
7879
- instructions?: string | null;
7880
-
7881
- /**
7882
- * An upper bound for the number of tokens that can be generated for a response,
7883
- * including visible output tokens and
7884
- * [reasoning tokens](https://platform.openai.com/docs/guides/reasoning).
7885
- */
7886
- max_output_tokens?: number | null;
7887
-
7888
- /**
7889
- * The maximum number of total calls to built-in tools that can be processed in a
7890
- * response. This maximum number applies across all built-in tool calls, not per
7891
- * individual tool. Any further attempts to call a tool by the model will be
7892
- * ignored.
7893
- */
7894
- max_tool_calls?: number | null;
7895
-
7896
- /**
7897
- * Set of 16 key-value pairs that can be attached to an object. This can be useful
7898
- * for storing additional information about the object in a structured format, and
7899
- * querying for objects via API or the dashboard.
8503
+ * Notes:
7900
8504
  *
7901
- * Keys are strings with a maximum length of 64 characters. Values are strings with
7902
- * a maximum length of 512 characters.
8505
+ * - `stream` is implicit over WebSocket and should not be sent.
8506
+ * - `background` is not supported over WebSocket.
8507
+ * - `stream_id` is WebSocket-only and is not part of `POST /v1/responses`.
7903
8508
  */
7904
- metadata?: Shared.Metadata | null;
8509
+ export interface ResponseCreate {
8510
+ /**
8511
+ * The type of the client event. Always `response.create`.
8512
+ */
8513
+ type: 'response.create';
7905
8514
 
7906
- /**
7907
- * Model ID used to generate the response, like `gpt-4o` or `o3`. OpenAI offers a
7908
- * wide range of models with different capabilities, performance characteristics,
7909
- * and price points. Refer to the
7910
- * [model guide](https://platform.openai.com/docs/models) to browse and compare
7911
- * available models.
7912
- */
7913
- model?: Shared.ResponsesModel;
8515
+ /**
8516
+ * Whether to run the model response in the background.
8517
+ * [Learn more](https://platform.openai.com/docs/guides/background).
8518
+ */
8519
+ background?: boolean | null;
7914
8520
 
7915
- /**
7916
- * Configuration for running moderation on the input and output of this response.
7917
- */
7918
- moderation?: ResponsesClientEvent.Moderation | null;
8521
+ /**
8522
+ * Context management configuration for this request.
8523
+ */
8524
+ context_management?: Array<ResponseCreate.ContextManagement> | null;
7919
8525
 
7920
- /**
7921
- * Whether to allow the model to run tool calls in parallel.
7922
- */
7923
- parallel_tool_calls?: boolean | null;
8526
+ /**
8527
+ * The conversation that this response belongs to. Items from this conversation are
8528
+ * prepended to `input_items` for this response request. Input items and output
8529
+ * items from this response are automatically added to this conversation after this
8530
+ * response completes.
8531
+ */
8532
+ conversation?: string | ResponsesAPI.ResponseConversationParam | null;
7924
8533
 
7925
- /**
7926
- * The unique ID of the previous response to the model. Use this to create
7927
- * multi-turn conversations. Learn more about
7928
- * [conversation state](https://platform.openai.com/docs/guides/conversation-state).
7929
- * Cannot be used in conjunction with `conversation`.
7930
- */
7931
- previous_response_id?: string | null;
8534
+ /**
8535
+ * Specify additional output data to include in the model response. Currently
8536
+ * supported values are:
8537
+ *
8538
+ * - `web_search_call.action.sources`: Include the sources of the web search tool
8539
+ * call.
8540
+ * - `code_interpreter_call.outputs`: Includes the outputs of python code execution
8541
+ * in code interpreter tool call items.
8542
+ * - `computer_call_output.output.image_url`: Include image urls from the computer
8543
+ * call output.
8544
+ * - `file_search_call.results`: Include the search results of the file search tool
8545
+ * call.
8546
+ * - `message.input_image.image_url`: Include image urls from the input message.
8547
+ * - `message.output_text.logprobs`: Include logprobs with assistant messages.
8548
+ * - `reasoning.encrypted_content`: Includes an encrypted version of reasoning
8549
+ * tokens in reasoning item outputs. This enables reasoning items to be used in
8550
+ * multi-turn conversations when using the Responses API statelessly (like when
8551
+ * the `store` parameter is set to `false`, or when an organization is enrolled
8552
+ * in the zero data retention program).
8553
+ */
8554
+ include?: Array<ResponsesAPI.ResponseIncludable> | null;
8555
+
8556
+ /**
8557
+ * Text, image, or file inputs to the model, used to generate a response.
8558
+ *
8559
+ * Learn more:
8560
+ *
8561
+ * - [Text inputs and outputs](https://platform.openai.com/docs/guides/text)
8562
+ * - [Image inputs](https://platform.openai.com/docs/guides/images)
8563
+ * - [File inputs](https://platform.openai.com/docs/guides/pdf-files)
8564
+ * - [Conversation state](https://platform.openai.com/docs/guides/conversation-state)
8565
+ * - [Function calling](https://platform.openai.com/docs/guides/function-calling)
8566
+ */
8567
+ input?: string | ResponsesAPI.ResponseInput;
7932
8568
 
7933
- /**
7934
- * Reference to a prompt template and its variables.
7935
- * [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts).
7936
- */
7937
- prompt?: ResponsePrompt | null;
8569
+ /**
8570
+ * A system (or developer) message inserted into the model's context.
8571
+ *
8572
+ * When using along with `previous_response_id`, the instructions from a previous
8573
+ * response will not be carried over to the next response. This makes it simple to
8574
+ * swap out system (or developer) messages in new responses.
8575
+ */
8576
+ instructions?: string | null;
7938
8577
 
7939
- /**
7940
- * Used by OpenAI to cache responses for similar requests to optimize your cache
7941
- * hit rates. Replaces the `user` field.
7942
- * [Learn more](https://platform.openai.com/docs/guides/prompt-caching).
7943
- */
7944
- prompt_cache_key?: string | null;
8578
+ /**
8579
+ * An upper bound for the number of tokens that can be generated for a response,
8580
+ * including visible output tokens and
8581
+ * [reasoning tokens](https://platform.openai.com/docs/guides/reasoning).
8582
+ */
8583
+ max_output_tokens?: number | null;
7945
8584
 
7946
- /**
7947
- * Options for prompt caching. Supported for `gpt-5.6` and later models. By
7948
- * default, OpenAI automatically chooses one implicit cache breakpoint. You can add
7949
- * explicit breakpoints to content blocks with `prompt_cache_breakpoint`. Each
7950
- * request can write up to four breakpoints. For cache matching, OpenAI considers
7951
- * up to the latest 80 breakpoints in the conversation, without a content-block
7952
- * lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The
7953
- * `ttl` defaults to `30m`, which is currently the only supported value. See the
7954
- * [prompt caching guide](https://platform.openai.com/docs/guides/prompt-caching)
7955
- * for current details.
7956
- */
7957
- prompt_cache_options?: ResponsesClientEvent.PromptCacheOptions;
8585
+ /**
8586
+ * The maximum number of total calls to built-in tools that can be processed in a
8587
+ * response. This maximum number applies across all built-in tool calls, not per
8588
+ * individual tool. Any further attempts to call a tool by the model will be
8589
+ * ignored.
8590
+ */
8591
+ max_tool_calls?: number | null;
7958
8592
 
7959
- /**
7960
- * @deprecated Deprecated. Use `prompt_cache_options.ttl` instead.
7961
- *
7962
- * The retention policy for the prompt cache. Set to `24h` to enable extended
7963
- * prompt caching, which keeps cached prefixes active for longer, up to a maximum
7964
- * of 24 hours.
7965
- * [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention).
7966
- * This field expresses a maximum retention policy, while
7967
- * `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two fields
7968
- * are independent and do not interact. For `gpt-5.5`, `gpt-5.5-pro`, and future
7969
- * models, only `24h` is supported.
7970
- *
7971
- * For older models that support both `in_memory` and `24h`, the default depends on
7972
- * your organization's data retention policy:
7973
- *
7974
- * - Organizations without ZDR enabled default to `24h`.
7975
- * - Organizations with ZDR enabled default to `in_memory` when
7976
- * `prompt_cache_retention` is not specified.
7977
- */
7978
- prompt_cache_retention?: 'in_memory' | '24h' | null;
8593
+ /**
8594
+ * Set of 16 key-value pairs that can be attached to an object. This can be useful
8595
+ * for storing additional information about the object in a structured format, and
8596
+ * querying for objects via API or the dashboard.
8597
+ *
8598
+ * Keys are strings with a maximum length of 64 characters. Values are strings with
8599
+ * a maximum length of 512 characters.
8600
+ */
8601
+ metadata?: Shared.Metadata | null;
7979
8602
 
7980
- /**
7981
- * **gpt-5 and o-series models only**
7982
- *
7983
- * Configuration options for
7984
- * [reasoning models](https://platform.openai.com/docs/guides/reasoning).
7985
- */
7986
- reasoning?: Shared.Reasoning | null;
8603
+ /**
8604
+ * Model ID used to generate the response, like `gpt-6-astra`. OpenAI offers a wide
8605
+ * range of models with different capabilities, performance characteristics, and
8606
+ * price points. Refer to the
8607
+ * [model guide](https://platform.openai.com/docs/models) to browse and compare
8608
+ * available models.
8609
+ */
8610
+ model?: Shared.ResponsesModel;
7987
8611
 
7988
- /**
7989
- * A stable identifier used to help detect users of your application that may be
7990
- * violating OpenAI's usage policies. The IDs should be a string that uniquely
7991
- * identifies each user, with a maximum length of 64 characters. We recommend
7992
- * hashing their username or email address, in order to avoid sending us any
7993
- * identifying information.
7994
- * [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers).
7995
- */
7996
- safety_identifier?: string | null;
8612
+ /**
8613
+ * Configuration for running moderation on the input and output of this response.
8614
+ */
8615
+ moderation?: ResponseCreate.Moderation | null;
7997
8616
 
7998
- /**
7999
- * Specifies the processing type used for serving the request.
8000
- *
8001
- * - If set to 'auto', then the request will be processed with the service tier
8002
- * configured in the Project settings. Unless otherwise configured, the Project
8003
- * will use 'default'.
8004
- * - If set to 'default', then the request will be processed with the standard
8005
- * pricing and performance for the selected model.
8006
- * - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)',
8007
- * then the request will be processed with the Flex Processing service tier.
8008
- * - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level,
8009
- * include the `service_tier=fast` or `service_tier=priority` parameter for
8010
- * Responses or Chat Completions. The response will show `service_tier=priority`
8011
- * regardless of if you specify `service_tier=fast` or `priority` in your
8012
- * request.
8013
- * - If set to 'ultrafast', then the request will be processed with the
8014
- * access-controlled Ultrafast Processing service tier. This tier is currently
8015
- * available for `gpt-5.6-sol`; a response served through it will show
8016
- * `service_tier=ultrafast`.
8017
- * - When not set, the default behavior is 'auto'.
8018
- *
8019
- * When the `service_tier` parameter is set, the response body will include the
8020
- * `service_tier` value based on the processing mode actually used to serve the
8021
- * request. This response value may be different from the value set in the
8022
- * parameter.
8023
- */
8024
- service_tier?: ServiceTier | null;
8617
+ /**
8618
+ * Whether to allow the model to run tool calls in parallel.
8619
+ */
8620
+ parallel_tool_calls?: boolean | null;
8025
8621
 
8026
- /**
8027
- * Whether to store the generated model response for later retrieval via API.
8028
- */
8029
- store?: boolean | null;
8622
+ /**
8623
+ * The unique ID of the previous response to the model. Use this to create
8624
+ * multi-turn conversations. Learn more about
8625
+ * [conversation state](https://platform.openai.com/docs/guides/conversation-state).
8626
+ * Cannot be used in conjunction with `conversation`.
8627
+ */
8628
+ previous_response_id?: string | null;
8030
8629
 
8031
- /**
8032
- * If set to true, the model response data will be streamed to the client as it is
8033
- * generated using
8034
- * [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format).
8035
- * See the
8036
- * [Streaming section below](https://platform.openai.com/docs/api-reference/responses-streaming)
8037
- * for more information.
8038
- */
8039
- stream?: boolean | null;
8630
+ /**
8631
+ * Reference to a prompt template and its variables.
8632
+ * [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts).
8633
+ */
8634
+ prompt?: ResponsesAPI.ResponsePrompt | null;
8040
8635
 
8041
- /**
8042
- * The WebSocket lane for this response. Requests with the same `stream_id` are
8043
- * processed FIFO, and events for the response echo the same `stream_id`.
8044
- *
8045
- * `stream_id` controls routing; `previous_response_id` controls conversation
8046
- * lineage, so a new lane can fork from a response created on another lane.
8047
- */
8048
- stream_id?: string;
8636
+ /**
8637
+ * Used by OpenAI to cache responses for similar requests to optimize your cache
8638
+ * hit rates. Replaces the `user` field.
8639
+ * [Learn more](https://platform.openai.com/docs/guides/prompt-caching).
8640
+ */
8641
+ prompt_cache_key?: string | null;
8049
8642
 
8050
- /**
8051
- * Options for streaming responses. Only set this when you set `stream: true`.
8052
- */
8053
- stream_options?: ResponsesClientEvent.StreamOptions | null;
8643
+ /**
8644
+ * Options for prompt caching. Supported for `gpt-5.6` and later models. By
8645
+ * default, OpenAI automatically chooses one implicit cache breakpoint. You can add
8646
+ * explicit breakpoints to content blocks with `prompt_cache_breakpoint`. Each
8647
+ * request can write up to four breakpoints. For cache matching, OpenAI considers
8648
+ * up to the latest 80 breakpoints in the conversation, without a content-block
8649
+ * lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The
8650
+ * `ttl` defaults to `30m`, which is currently the only supported value. See the
8651
+ * [prompt caching guide](https://platform.openai.com/docs/guides/prompt-caching)
8652
+ * for current details.
8653
+ */
8654
+ prompt_cache_options?: ResponseCreate.PromptCacheOptions;
8054
8655
 
8055
- /**
8056
- * What sampling temperature to use, between 0 and 2. Higher values like 0.8 will
8057
- * make the output more random, while lower values like 0.2 will make it more
8058
- * focused and deterministic. We generally recommend altering this or `top_p` but
8059
- * not both.
8060
- */
8061
- temperature?: number | null;
8656
+ /**
8657
+ * @deprecated Deprecated. Use `prompt_cache_options.ttl` instead.
8658
+ *
8659
+ * The retention policy for the prompt cache. Set to `24h` to enable extended
8660
+ * prompt caching, which keeps cached prefixes active for longer, up to a maximum
8661
+ * of 24 hours.
8662
+ * [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention).
8663
+ * This field expresses a maximum retention policy, while
8664
+ * `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two fields
8665
+ * are independent and do not interact. For `gpt-5.5`, `gpt-5.5-pro`, and future
8666
+ * models, only `24h` is supported.
8667
+ *
8668
+ * For older models that support both `in_memory` and `24h`, the default depends on
8669
+ * your organization's data retention policy:
8670
+ *
8671
+ * - Organizations without ZDR enabled default to `24h`.
8672
+ * - Organizations with ZDR enabled default to `in_memory` when
8673
+ * `prompt_cache_retention` is not specified.
8674
+ */
8675
+ prompt_cache_retention?: 'in_memory' | '24h' | null;
8062
8676
 
8063
- /**
8064
- * Configuration options for a text response from the model. Can be plain text or
8065
- * structured JSON data. Learn more:
8066
- *
8067
- * - [Text inputs and outputs](https://platform.openai.com/docs/guides/text)
8068
- * - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs)
8069
- */
8070
- text?: ResponseTextConfig;
8677
+ /**
8678
+ * Configuration options for
8679
+ * [reasoning models](https://platform.openai.com/docs/guides/reasoning).
8680
+ */
8681
+ reasoning?: Shared.Reasoning | null;
8071
8682
 
8072
- /**
8073
- * How the model should select which tool (or tools) to use when generating a
8074
- * response. See the `tools` parameter to see how to specify which tools the model
8075
- * can call.
8076
- */
8077
- tool_choice?:
8078
- | ToolChoiceOptions
8079
- | ToolChoiceAllowed
8080
- | ToolChoiceTypes
8081
- | ToolChoiceFunction
8082
- | ToolChoiceMcp
8083
- | ToolChoiceCustom
8084
- | ResponsesClientEvent.SpecificProgrammaticToolCallingParam
8085
- | ToolChoiceApplyPatch
8086
- | ToolChoiceShell;
8683
+ /**
8684
+ * A stable identifier used to help detect users of your application that may be
8685
+ * violating OpenAI's usage policies. The IDs should be a string that uniquely
8686
+ * identifies each user, with a maximum length of 64 characters. We recommend
8687
+ * hashing their username or email address, in order to avoid sending us any
8688
+ * identifying information.
8689
+ * [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers).
8690
+ */
8691
+ safety_identifier?: string | null;
8087
8692
 
8088
- /**
8089
- * An array of tools the model may call while generating a response. You can
8090
- * specify which tool to use by setting the `tool_choice` parameter.
8091
- *
8092
- * We support the following categories of tools:
8093
- *
8094
- * - **Built-in tools**: Tools that are provided by OpenAI that extend the model's
8095
- * capabilities, like
8096
- * [web search](https://platform.openai.com/docs/guides/tools-web-search) or
8097
- * [file search](https://platform.openai.com/docs/guides/tools-file-search).
8098
- * Learn more about
8099
- * [built-in tools](https://platform.openai.com/docs/guides/tools).
8100
- * - **MCP Tools**: Integrations with third-party systems via custom MCP servers or
8101
- * predefined connectors such as Google Drive and SharePoint. Learn more about
8102
- * [MCP Tools](https://platform.openai.com/docs/guides/tools-connectors-mcp).
8103
- * - **Function calls (custom tools)**: Functions that are defined by you, enabling
8104
- * the model to call your own code with strongly typed arguments and outputs.
8105
- * Learn more about
8106
- * [function calling](https://platform.openai.com/docs/guides/function-calling).
8107
- * You can also use custom tools to call your own code.
8108
- */
8109
- tools?: Array<Tool>;
8693
+ /**
8694
+ * Specifies the processing type used for serving the request.
8695
+ *
8696
+ * - If set to 'auto', then the request will be processed with the service tier
8697
+ * configured in the Project settings. Unless otherwise configured, the Project
8698
+ * will use 'default'.
8699
+ * - If set to 'default', then the request will be processed with the standard
8700
+ * pricing and performance for the selected model.
8701
+ * - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)',
8702
+ * then the request will be processed with the Flex Processing service tier.
8703
+ * - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level,
8704
+ * include the `service_tier=fast` or `service_tier=priority` parameter for
8705
+ * Responses or Chat Completions. The response will show `service_tier=priority`
8706
+ * regardless of if you specify `service_tier=fast` or `priority` in your
8707
+ * request.
8708
+ * - If set to 'ultrafast', then the request will be processed with the
8709
+ * access-controlled Ultrafast Processing service tier. This tier is currently
8710
+ * available for `gpt-5.6-sol`; a response served through it will show
8711
+ * `service_tier=ultrafast`.
8712
+ * - When not set, the default behavior is 'auto'.
8713
+ *
8714
+ * When the `service_tier` parameter is set, the response body will include the
8715
+ * `service_tier` value based on the processing mode actually used to serve the
8716
+ * request. This response value may be different from the value set in the
8717
+ * parameter.
8718
+ */
8719
+ service_tier?: ResponsesAPI.ServiceTier | null;
8110
8720
 
8111
- /**
8112
- * An integer between 0 and 20 specifying the maximum number of most likely tokens
8113
- * to return at each token position, each with an associated log probability. In
8114
- * some cases, the number of returned tokens may be fewer than requested.
8115
- */
8116
- top_logprobs?: number | null;
8721
+ /**
8722
+ * Whether to store the generated model response for later retrieval via API.
8723
+ */
8724
+ store?: boolean | null;
8117
8725
 
8118
- /**
8119
- * An alternative to sampling with temperature, called nucleus sampling, where the
8120
- * model considers the results of the tokens with top_p probability mass. So 0.1
8121
- * means only the tokens comprising the top 10% probability mass are considered.
8122
- *
8123
- * We generally recommend altering this or `temperature` but not both.
8124
- */
8125
- top_p?: number | null;
8726
+ /**
8727
+ * If set to true, the model response data will be streamed to the client as it is
8728
+ * generated using
8729
+ * [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format).
8730
+ * See the
8731
+ * [Streaming section below](https://platform.openai.com/docs/api-reference/responses-streaming)
8732
+ * for more information.
8733
+ */
8734
+ stream?: boolean | null;
8126
8735
 
8127
- /**
8128
- * @deprecated The truncation strategy to use for the model response.
8129
- *
8130
- * - `auto`: If the input to this Response exceeds the model's context window size,
8131
- * the model will truncate the response to fit the context window by dropping
8132
- * items from the beginning of the conversation.
8133
- * - `disabled` (default): If the input size will exceed the context window size
8134
- * for a model, the request will fail with a 400 error.
8135
- */
8136
- truncation?: 'auto' | 'disabled' | null;
8736
+ /**
8737
+ * The WebSocket lane for this response. Requests with the same `stream_id` are
8738
+ * processed FIFO, and events for the response echo the same `stream_id`.
8739
+ *
8740
+ * `stream_id` controls routing; `previous_response_id` controls conversation
8741
+ * lineage, so a new lane can fork from a response created on another lane.
8742
+ */
8743
+ stream_id?: string;
8137
8744
 
8138
- /**
8139
- * @deprecated This field is being replaced by `safety_identifier` and
8140
- * `prompt_cache_key`. Use `prompt_cache_key` instead to maintain caching
8141
- * optimizations. A stable identifier for your end-users. Used to boost cache hit
8142
- * rates by better bucketing similar requests and to help OpenAI detect and prevent
8143
- * abuse.
8144
- * [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers).
8145
- */
8146
- user?: string;
8147
- }
8745
+ /**
8746
+ * Options for streaming responses. Only set this when you set `stream: true`.
8747
+ */
8748
+ stream_options?: ResponseCreate.StreamOptions | null;
8148
8749
 
8149
- export namespace ResponsesClientEvent {
8150
- export interface ContextManagement {
8151
8750
  /**
8152
- * The context management entry type. Currently only 'compaction' is supported.
8751
+ * What sampling temperature to use, between 0 and 2. Higher values like 0.8 will
8752
+ * make the output more random, while lower values like 0.2 will make it more
8753
+ * focused and deterministic. We generally recommend altering this or `top_p` but
8754
+ * not both.
8153
8755
  */
8154
- type: string;
8756
+ temperature?: number | null;
8155
8757
 
8156
8758
  /**
8157
- * Token threshold at which compaction should be triggered for this entry.
8759
+ * Configuration options for a text response from the model. Can be plain text or
8760
+ * structured JSON data. Learn more:
8761
+ *
8762
+ * - [Text inputs and outputs](https://platform.openai.com/docs/guides/text)
8763
+ * - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs)
8158
8764
  */
8159
- compact_threshold?: number | null;
8160
- }
8765
+ text?: ResponsesAPI.ResponseTextConfig;
8161
8766
 
8162
- /**
8163
- * Configuration for running moderation on the input and output of this response.
8164
- */
8165
- export interface Moderation {
8166
8767
  /**
8167
- * The moderation model to use for moderated completions, e.g.
8168
- * 'omni-moderation-latest'.
8768
+ * How the model should select which tool (or tools) to use when generating a
8769
+ * response. See the `tools` parameter to see how to specify which tools the model
8770
+ * can call.
8169
8771
  */
8170
- model: string;
8772
+ tool_choice?:
8773
+ | ResponsesAPI.ToolChoiceOptions
8774
+ | ResponsesAPI.ToolChoiceAllowed
8775
+ | ResponsesAPI.ToolChoiceTypes
8776
+ | ResponsesAPI.ToolChoiceFunction
8777
+ | ResponsesAPI.ToolChoiceMcp
8778
+ | ResponsesAPI.ToolChoiceCustom
8779
+ | ResponseCreate.SpecificProgrammaticToolCallingParam
8780
+ | ResponsesAPI.ToolChoiceApplyPatch
8781
+ | ResponsesAPI.ToolChoiceShell;
8171
8782
 
8172
8783
  /**
8173
- * The policy to apply to moderated response input and output.
8784
+ * An array of tools the model may call while generating a response. You can
8785
+ * specify which tool to use by setting the `tool_choice` parameter.
8786
+ *
8787
+ * We support the following categories of tools:
8788
+ *
8789
+ * - **Built-in tools**: Tools that are provided by OpenAI that extend the model's
8790
+ * capabilities, like
8791
+ * [web search](https://platform.openai.com/docs/guides/tools-web-search) or
8792
+ * [file search](https://platform.openai.com/docs/guides/tools-file-search).
8793
+ * Learn more about
8794
+ * [built-in tools](https://platform.openai.com/docs/guides/tools).
8795
+ * - **MCP Tools**: Integrations with third-party systems via custom MCP servers or
8796
+ * predefined connectors such as Google Drive and SharePoint. Learn more about
8797
+ * [MCP Tools](https://platform.openai.com/docs/guides/tools-connectors-mcp).
8798
+ * - **Function calls (custom tools)**: Functions that are defined by you, enabling
8799
+ * the model to call your own code with strongly typed arguments and outputs.
8800
+ * Learn more about
8801
+ * [function calling](https://platform.openai.com/docs/guides/function-calling).
8802
+ * You can also use custom tools to call your own code.
8803
+ */
8804
+ tools?: Array<ResponsesAPI.Tool>;
8805
+
8806
+ /**
8807
+ * An integer between 0 and 20 specifying the maximum number of most likely tokens
8808
+ * to return at each token position, each with an associated log probability. In
8809
+ * some cases, the number of returned tokens may be fewer than requested.
8810
+ */
8811
+ top_logprobs?: number | null;
8812
+
8813
+ /**
8814
+ * An alternative to sampling with temperature, called nucleus sampling, where the
8815
+ * model considers the results of the tokens with top_p probability mass. So 0.1
8816
+ * means only the tokens comprising the top 10% probability mass are considered.
8817
+ *
8818
+ * We generally recommend altering this or `temperature` but not both.
8174
8819
  */
8175
- policy?: Moderation.Policy | null;
8176
- }
8820
+ top_p?: number | null;
8177
8821
 
8178
- export namespace Moderation {
8179
8822
  /**
8180
- * The policy to apply to moderated response input and output.
8823
+ * @deprecated The truncation strategy to use for the model response.
8824
+ *
8825
+ * - `auto`: If the input to this Response exceeds the model's context window size,
8826
+ * the model will truncate the response to fit the context window by dropping
8827
+ * items from the beginning of the conversation.
8828
+ * - `disabled` (default): If the input size will exceed the context window size
8829
+ * for a model, the request will fail with a 400 error.
8181
8830
  */
8182
- export interface Policy {
8831
+ truncation?: 'auto' | 'disabled' | null;
8832
+
8833
+ /**
8834
+ * @deprecated This field is being replaced by `safety_identifier` and
8835
+ * `prompt_cache_key`. Use `prompt_cache_key` instead to maintain caching
8836
+ * optimizations. A stable identifier for your end-users. Used to boost cache hit
8837
+ * rates by better bucketing similar requests and to help OpenAI detect and prevent
8838
+ * abuse.
8839
+ * [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers).
8840
+ */
8841
+ user?: string;
8842
+ }
8843
+
8844
+ export namespace ResponseCreate {
8845
+ export interface ContextManagement {
8183
8846
  /**
8184
- * The moderation policy for the response input.
8847
+ * The context management entry type. Currently only 'compaction' is supported.
8185
8848
  */
8186
- input?: Policy.Input | null;
8849
+ type: string;
8187
8850
 
8188
8851
  /**
8189
- * The moderation policy for the response output.
8852
+ * Token threshold at which compaction should be triggered for this entry.
8190
8853
  */
8191
- output?: Policy.Output | null;
8854
+ compact_threshold?: number | null;
8192
8855
  }
8193
8856
 
8194
- export namespace Policy {
8857
+ /**
8858
+ * Configuration for running moderation on the input and output of this response.
8859
+ */
8860
+ export interface Moderation {
8195
8861
  /**
8196
- * The moderation policy for the response input.
8862
+ * The moderation model to use for moderated completions, e.g.
8863
+ * 'omni-moderation-latest'.
8197
8864
  */
8198
- export interface Input {
8199
- mode: 'score' | 'block';
8200
- }
8865
+ model: string;
8201
8866
 
8202
8867
  /**
8203
- * The moderation policy for the response output.
8868
+ * The policy to apply to moderated response input and output.
8204
8869
  */
8205
- export interface Output {
8206
- mode: 'score' | 'block';
8870
+ policy?: Moderation.Policy | null;
8871
+ }
8872
+
8873
+ export namespace Moderation {
8874
+ /**
8875
+ * The policy to apply to moderated response input and output.
8876
+ */
8877
+ export interface Policy {
8878
+ /**
8879
+ * The moderation policy for the response input.
8880
+ */
8881
+ input?: Policy.Input | null;
8882
+
8883
+ /**
8884
+ * The moderation policy for the response output.
8885
+ */
8886
+ output?: Policy.Output | null;
8887
+ }
8888
+
8889
+ export namespace Policy {
8890
+ /**
8891
+ * The moderation policy for the response input.
8892
+ */
8893
+ export interface Input {
8894
+ mode: 'score' | 'block';
8895
+ }
8896
+
8897
+ /**
8898
+ * The moderation policy for the response output.
8899
+ */
8900
+ export interface Output {
8901
+ mode: 'score' | 'block';
8902
+ }
8207
8903
  }
8208
8904
  }
8209
- }
8210
8905
 
8211
- /**
8212
- * Options for prompt caching. Supported for `gpt-5.6` and later models. By
8213
- * default, OpenAI automatically chooses one implicit cache breakpoint. You can add
8214
- * explicit breakpoints to content blocks with `prompt_cache_breakpoint`. Each
8215
- * request can write up to four breakpoints. For cache matching, OpenAI considers
8216
- * up to the latest 80 breakpoints in the conversation, without a content-block
8217
- * lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The
8218
- * `ttl` defaults to `30m`, which is currently the only supported value. See the
8219
- * [prompt caching guide](https://platform.openai.com/docs/guides/prompt-caching)
8220
- * for current details.
8221
- */
8222
- export interface PromptCacheOptions {
8223
8906
  /**
8224
- * Controls whether OpenAI automatically creates an implicit cache breakpoint.
8225
- * Defaults to `implicit`. With `implicit`, OpenAI creates one implicit breakpoint
8226
- * and writes up to the latest three explicit breakpoints in the request. With
8227
- * `explicit`, OpenAI does not create an implicit breakpoint and writes up to the
8228
- * latest four explicit breakpoints. If there are no explicit breakpoints, the
8229
- * request does not use prompt caching.
8907
+ * Options for prompt caching. Supported for `gpt-5.6` and later models. By
8908
+ * default, OpenAI automatically chooses one implicit cache breakpoint. You can add
8909
+ * explicit breakpoints to content blocks with `prompt_cache_breakpoint`. Each
8910
+ * request can write up to four breakpoints. For cache matching, OpenAI considers
8911
+ * up to the latest 80 breakpoints in the conversation, without a content-block
8912
+ * lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The
8913
+ * `ttl` defaults to `30m`, which is currently the only supported value. See the
8914
+ * [prompt caching guide](https://platform.openai.com/docs/guides/prompt-caching)
8915
+ * for current details.
8230
8916
  */
8231
- mode?: 'implicit' | 'explicit';
8917
+ export interface PromptCacheOptions {
8918
+ /**
8919
+ * Controls whether OpenAI automatically creates an implicit cache breakpoint.
8920
+ * Defaults to `implicit`. With `implicit`, OpenAI creates one implicit breakpoint
8921
+ * and writes up to the latest three explicit breakpoints in the request. With
8922
+ * `explicit`, OpenAI does not create an implicit breakpoint and writes up to the
8923
+ * latest four explicit breakpoints. If there are no explicit breakpoints, the
8924
+ * request does not use prompt caching.
8925
+ */
8926
+ mode?: 'implicit' | 'explicit';
8232
8927
 
8233
- /**
8234
- * The minimum lifetime applied to every implicit and explicit cache breakpoint
8235
- * written by the request. Defaults to `30m`, which is currently the only supported
8236
- * value. The backend may retain cache entries for longer.
8237
- */
8238
- ttl?: '30m';
8239
- }
8928
+ /**
8929
+ * The minimum lifetime applied to every implicit and explicit cache breakpoint
8930
+ * written by the request. Defaults to `30m`, which is currently the only supported
8931
+ * value. The backend may retain cache entries for longer.
8932
+ */
8933
+ ttl?: '30m';
8934
+ }
8240
8935
 
8241
- /**
8242
- * Options for streaming responses. Only set this when you set `stream: true`.
8243
- */
8244
- export interface StreamOptions {
8245
8936
  /**
8246
- * When true, stream obfuscation will be enabled. Stream obfuscation adds random
8247
- * characters to an `obfuscation` field on streaming delta events to normalize
8248
- * payload sizes as a mitigation to certain side-channel attacks. These obfuscation
8249
- * fields are included by default, but add a small amount of overhead to the data
8250
- * stream. You can set `include_obfuscation` to false to optimize for bandwidth if
8251
- * you trust the network links between your application and the OpenAI API.
8937
+ * Options for streaming responses. Only set this when you set `stream: true`.
8252
8938
  */
8253
- include_obfuscation?: boolean;
8254
- }
8939
+ export interface StreamOptions {
8940
+ /**
8941
+ * When true, stream obfuscation will be enabled. Stream obfuscation adds random
8942
+ * characters to an `obfuscation` field on streaming delta events to normalize
8943
+ * payload sizes as a mitigation to certain side-channel attacks. These obfuscation
8944
+ * fields are included by default, but add a small amount of overhead to the data
8945
+ * stream. You can set `include_obfuscation` to false to optimize for bandwidth if
8946
+ * you trust the network links between your application and the OpenAI API.
8947
+ */
8948
+ include_obfuscation?: boolean;
8949
+ }
8255
8950
 
8256
- export interface SpecificProgrammaticToolCallingParam {
8257
- /**
8258
- * The tool to call. Always `programmatic_tool_calling`.
8259
- */
8260
- type: 'programmatic_tool_calling';
8951
+ export interface SpecificProgrammaticToolCallingParam {
8952
+ /**
8953
+ * The tool to call. Always `programmatic_tool_calling`.
8954
+ */
8955
+ type: 'programmatic_tool_calling';
8956
+ }
8261
8957
  }
8262
8958
  }
8263
8959
 
@@ -8323,7 +9019,10 @@ export type ResponsesServerEvent =
8323
9019
  | ResponsesServerEvent.ResponseCustomToolCallInputWsDelta
8324
9020
  | ResponsesServerEvent.ResponseCustomToolCallInputWsDone
8325
9021
  | ResponsesServerEvent.ResponseWsStreamingError
8326
- | ResponsesServerEvent.ResponseWsError;
9022
+ | ResponsesServerEvent.ResponseWsError
9023
+ | ResponseSteerAcceptedEvent
9024
+ | ResponseSteerPendingEvent
9025
+ | ResponseSteerFailedEvent;
8327
9026
 
8328
9027
  export namespace ResponsesServerEvent {
8329
9028
  /**
@@ -8603,6 +9302,10 @@ export namespace ResponsesServerEvent {
8603
9302
 
8604
9303
  /**
8605
9304
  * An event that is emitted when a response finishes as incomplete.
9305
+ *
9306
+ * Over WebSocket, steering can finish a response with
9307
+ * `response.incomplete_details.reason` set to `steered`, followed automatically by
9308
+ * a successor `response.created` that commits the queued steering input.
8606
9309
  */
8607
9310
  export interface ResponseWsIncomplete extends ResponseIncompleteEvent {
8608
9311
  /**
@@ -9028,6 +9731,44 @@ export namespace ResponsesServerEvent {
9028
9731
  * The response headers that were emitted with the error, if any.
9029
9732
  */
9030
9733
  headers?: { [key: string]: string };
9734
+
9735
+ misalignment?: Error.Misalignment;
9736
+ }
9737
+
9738
+ export namespace Error {
9739
+ export interface Misalignment {
9740
+ /**
9741
+ * The public explanation for this block.
9742
+ */
9743
+ detailed_explanation?: string;
9744
+
9745
+ /**
9746
+ * An optional classification; clients must accept additional values.
9747
+ */
9748
+ error_type?:
9749
+ | (string & {})
9750
+ | 'potentially_unintended_data_transfer'
9751
+ | 'potentially_unintended_data_access'
9752
+ | 'potentially_unintended_destructive_activity'
9753
+ | 'other';
9754
+
9755
+ /**
9756
+ * An optional public continuation instruction.
9757
+ */
9758
+ steer?: Misalignment.Steer;
9759
+ }
9760
+
9761
+ export namespace Misalignment {
9762
+ /**
9763
+ * An optional public continuation instruction.
9764
+ */
9765
+ export interface Steer {
9766
+ /**
9767
+ * The public continuation instruction.
9768
+ */
9769
+ message: string;
9770
+ }
9771
+ }
9031
9772
  }
9032
9773
  }
9033
9774
  }
@@ -9855,9 +10596,9 @@ export interface ResponseCreateParamsBase {
9855
10596
  metadata?: Shared.Metadata | null;
9856
10597
 
9857
10598
  /**
9858
- * Model ID used to generate the response, like `gpt-4o` or `o3`. OpenAI offers a
9859
- * wide range of models with different capabilities, performance characteristics,
9860
- * and price points. Refer to the
10599
+ * Model ID used to generate the response, like `gpt-6-astra`. OpenAI offers a wide
10600
+ * range of models with different capabilities, performance characteristics, and
10601
+ * price points. Refer to the
9861
10602
  * [model guide](https://platform.openai.com/docs/models) to browse and compare
9862
10603
  * available models.
9863
10604
  */
@@ -9929,8 +10670,6 @@ export interface ResponseCreateParamsBase {
9929
10670
  prompt_cache_retention?: 'in_memory' | '24h' | null;
9930
10671
 
9931
10672
  /**
9932
- * **gpt-5 and o-series models only**
9933
- *
9934
10673
  * Configuration options for
9935
10674
  * [reasoning models](https://platform.openai.com/docs/guides/reasoning).
9936
10675
  */
@@ -10295,13 +11034,14 @@ export interface ResponseRetrieveParamsStreaming extends ResponseRetrieveParamsB
10295
11034
 
10296
11035
  export interface ResponseCompactParams {
10297
11036
  /**
10298
- * Model ID used to generate the response, like `gpt-5` or `o3`. OpenAI offers a
10299
- * wide range of models with different capabilities, performance characteristics,
10300
- * and price points. Refer to the
11037
+ * Model ID used to generate the response, like `gpt-6-astra`. OpenAI offers a wide
11038
+ * range of models with different capabilities, performance characteristics, and
11039
+ * price points. Refer to the
10301
11040
  * [model guide](https://platform.openai.com/docs/models) to browse and compare
10302
11041
  * available models.
10303
11042
  */
10304
11043
  model:
11044
+ | 'gpt-6-astra'
10305
11045
  | 'gpt-5.6-sol'
10306
11046
  | 'gpt-5.6-terra'
10307
11047
  | 'gpt-5.6-luna'
@@ -10550,6 +11290,8 @@ export declare namespace Responses {
10550
11290
  type ResponseComputerToolCall as ResponseComputerToolCall,
10551
11291
  type ResponseComputerToolCallOutputItem as ResponseComputerToolCallOutputItem,
10552
11292
  type ResponseComputerToolCallOutputScreenshot as ResponseComputerToolCallOutputScreenshot,
11293
+ type ResponseConfigurationUpdateItem as ResponseConfigurationUpdateItem,
11294
+ type ResponseConfigurationUpdateItemParam as ResponseConfigurationUpdateItemParam,
10553
11295
  type ResponseContainerReference as ResponseContainerReference,
10554
11296
  type ResponseContent as ResponseContent,
10555
11297
  type ResponseContentPartAddedEvent as ResponseContentPartAddedEvent,
@@ -10636,6 +11378,15 @@ export declare namespace Responses {
10636
11378
  type ResponseShellCallOutputContentDeltaEvent as ResponseShellCallOutputContentDeltaEvent,
10637
11379
  type ResponseShellCallOutputContentDoneEvent as ResponseShellCallOutputContentDoneEvent,
10638
11380
  type ResponseStatus as ResponseStatus,
11381
+ type ResponseSteerAcceptedEvent as ResponseSteerAcceptedEvent,
11382
+ type ResponseSteerErrorCode as ResponseSteerErrorCode,
11383
+ type ResponseSteerEvent as ResponseSteerEvent,
11384
+ type ResponseSteerFailedEvent as ResponseSteerFailedEvent,
11385
+ type ResponseSteerInput as ResponseSteerInput,
11386
+ type ResponseSteerInputContent as ResponseSteerInputContent,
11387
+ type ResponseSteerPendingEvent as ResponseSteerPendingEvent,
11388
+ type ResponseSteerPendingReason as ResponseSteerPendingReason,
11389
+ type ResponseSteerRequiredInput as ResponseSteerRequiredInput,
10639
11390
  type ResponseStreamEvent as ResponseStreamEvent,
10640
11391
  type ResponseTextConfig as ResponseTextConfig,
10641
11392
  type ResponseTextDeltaEvent as ResponseTextDeltaEvent,