openai 7.9.0 → 7.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (148) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/client.d.mts +3 -0
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +3 -0
  5. package/client.d.ts.map +1 -1
  6. package/client.js +3 -0
  7. package/client.js.map +1 -1
  8. package/client.mjs +3 -0
  9. package/client.mjs.map +1 -1
  10. package/lib/responses/ResponseInputItems.d.mts.map +1 -1
  11. package/lib/responses/ResponseInputItems.d.ts.map +1 -1
  12. package/lib/responses/ResponseInputItems.js +1 -0
  13. package/lib/responses/ResponseInputItems.js.map +1 -1
  14. package/lib/responses/ResponseInputItems.mjs +1 -0
  15. package/lib/responses/ResponseInputItems.mjs.map +1 -1
  16. package/package.json +1 -1
  17. package/resources/admin/organization/usage.d.mts +1 -1
  18. package/resources/admin/organization/usage.d.ts +1 -1
  19. package/resources/batches.d.mts +1 -1
  20. package/resources/batches.d.ts +1 -1
  21. package/resources/beta/beta.d.mts +2 -2
  22. package/resources/beta/beta.d.mts.map +1 -1
  23. package/resources/beta/beta.d.ts +2 -2
  24. package/resources/beta/beta.d.ts.map +1 -1
  25. package/resources/beta/beta.js.map +1 -1
  26. package/resources/beta/beta.mjs.map +1 -1
  27. package/resources/beta/index.d.mts +1 -1
  28. package/resources/beta/index.d.mts.map +1 -1
  29. package/resources/beta/index.d.ts +1 -1
  30. package/resources/beta/index.d.ts.map +1 -1
  31. package/resources/beta/index.js.map +1 -1
  32. package/resources/beta/index.mjs.map +1 -1
  33. package/resources/beta/responses/index.d.mts +1 -1
  34. package/resources/beta/responses/index.d.mts.map +1 -1
  35. package/resources/beta/responses/index.d.ts +1 -1
  36. package/resources/beta/responses/index.d.ts.map +1 -1
  37. package/resources/beta/responses/index.js.map +1 -1
  38. package/resources/beta/responses/index.mjs.map +1 -1
  39. package/resources/beta/responses/responses.d.mts +660 -17
  40. package/resources/beta/responses/responses.d.mts.map +1 -1
  41. package/resources/beta/responses/responses.d.ts +660 -17
  42. package/resources/beta/responses/responses.d.ts.map +1 -1
  43. package/resources/beta/responses/responses.js +1 -1
  44. package/resources/beta/responses/responses.js.map +1 -1
  45. package/resources/beta/responses/responses.mjs +1 -1
  46. package/resources/beta/responses/responses.mjs.map +1 -1
  47. package/resources/chat/completions/completions.d.mts +2 -2
  48. package/resources/chat/completions/completions.d.ts +2 -2
  49. package/resources/conversations/items.d.mts +1 -1
  50. package/resources/conversations/items.d.mts.map +1 -1
  51. package/resources/conversations/items.d.ts +1 -1
  52. package/resources/conversations/items.d.ts.map +1 -1
  53. package/resources/evals/evals.d.mts +4 -4
  54. package/resources/evals/evals.d.ts +4 -4
  55. package/resources/evals/runs/runs.d.mts +1 -1
  56. package/resources/evals/runs/runs.d.ts +1 -1
  57. package/resources/index.d.mts +1 -0
  58. package/resources/index.d.mts.map +1 -1
  59. package/resources/index.d.ts +1 -0
  60. package/resources/index.d.ts.map +1 -1
  61. package/resources/index.js +3 -1
  62. package/resources/index.js.map +1 -1
  63. package/resources/index.mjs +1 -0
  64. package/resources/index.mjs.map +1 -1
  65. package/resources/responses/responses.d.mts +1098 -480
  66. package/resources/responses/responses.d.mts.map +1 -1
  67. package/resources/responses/responses.d.ts +1098 -480
  68. package/resources/responses/responses.d.ts.map +1 -1
  69. package/resources/responses/responses.js +1 -1
  70. package/resources/responses/responses.js.map +1 -1
  71. package/resources/responses/responses.mjs +1 -1
  72. package/resources/responses/responses.mjs.map +1 -1
  73. package/resources/safety/alerts.d.mts +32 -0
  74. package/resources/safety/alerts.d.mts.map +1 -0
  75. package/resources/safety/alerts.d.ts +32 -0
  76. package/resources/safety/alerts.d.ts.map +1 -0
  77. package/resources/safety/alerts.js +16 -0
  78. package/resources/safety/alerts.js.map +1 -0
  79. package/resources/safety/alerts.mjs +12 -0
  80. package/resources/safety/alerts.mjs.map +1 -0
  81. package/resources/safety/index.d.mts +3 -0
  82. package/resources/safety/index.d.mts.map +1 -0
  83. package/resources/safety/index.d.ts +3 -0
  84. package/resources/safety/index.d.ts.map +1 -0
  85. package/resources/safety/index.js +9 -0
  86. package/resources/safety/index.js.map +1 -0
  87. package/resources/safety/index.mjs +4 -0
  88. package/resources/safety/index.mjs.map +1 -0
  89. package/resources/safety/safety.d.mts +10 -0
  90. package/resources/safety/safety.d.mts.map +1 -0
  91. package/resources/safety/safety.d.ts +10 -0
  92. package/resources/safety/safety.d.ts.map +1 -0
  93. package/resources/safety/safety.js +17 -0
  94. package/resources/safety/safety.js.map +1 -0
  95. package/resources/safety/safety.mjs +12 -0
  96. package/resources/safety/safety.mjs.map +1 -0
  97. package/resources/safety.d.mts +2 -0
  98. package/resources/safety.d.mts.map +1 -0
  99. package/resources/safety.d.ts +2 -0
  100. package/resources/safety.d.ts.map +1 -0
  101. package/resources/safety.js +6 -0
  102. package/resources/safety.js.map +1 -0
  103. package/resources/safety.mjs +3 -0
  104. package/resources/safety.mjs.map +1 -0
  105. package/resources/shared.d.mts +29 -1
  106. package/resources/shared.d.mts.map +1 -1
  107. package/resources/shared.d.ts +29 -1
  108. package/resources/shared.d.ts.map +1 -1
  109. package/resources/videos.d.mts +28 -0
  110. package/resources/videos.d.mts.map +1 -1
  111. package/resources/videos.d.ts +28 -0
  112. package/resources/videos.d.ts.map +1 -1
  113. package/resources/webhooks/webhooks.d.mts +62 -2
  114. package/resources/webhooks/webhooks.d.mts.map +1 -1
  115. package/resources/webhooks/webhooks.d.ts +62 -2
  116. package/resources/webhooks/webhooks.d.ts.map +1 -1
  117. package/src/client.ts +5 -0
  118. package/src/lib/responses/ResponseInputItems.ts +1 -0
  119. package/src/resources/admin/organization/usage.ts +1 -1
  120. package/src/resources/batches.ts +1 -1
  121. package/src/resources/beta/beta.ts +22 -0
  122. package/src/resources/beta/index.ts +11 -0
  123. package/src/resources/beta/responses/index.ts +11 -0
  124. package/src/resources/beta/responses/responses.ts +801 -8
  125. package/src/resources/chat/completions/completions.ts +2 -2
  126. package/src/resources/conversations/items.ts +1 -0
  127. package/src/resources/evals/evals.ts +4 -4
  128. package/src/resources/evals/runs/runs.ts +1 -1
  129. package/src/resources/index.ts +1 -0
  130. package/src/resources/responses/api.md +11 -0
  131. package/src/resources/responses/responses.ts +1280 -518
  132. package/src/resources/safety/alerts.ts +51 -0
  133. package/src/resources/safety/index.ts +4 -0
  134. package/src/resources/safety/safety.ts +15 -0
  135. package/src/resources/safety.ts +3 -0
  136. package/src/resources/shared.ts +39 -0
  137. package/src/resources/videos.ts +38 -0
  138. package/src/resources/webhooks/api.md +2 -0
  139. package/src/resources/webhooks/webhooks.ts +77 -1
  140. package/src/version.ts +1 -1
  141. package/version.d.mts +1 -1
  142. package/version.d.mts.map +1 -1
  143. package/version.d.ts +1 -1
  144. package/version.d.ts.map +1 -1
  145. package/version.js +1 -1
  146. package/version.js.map +1 -1
  147. package/version.mjs +1 -1
  148. package/version.mjs.map +1 -1
@@ -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,7 +1082,7 @@ export interface Response {
1068
1082
  metadata: Shared.Metadata | null;
1069
1083
 
1070
1084
  /**
1071
- * Model ID used to generate the response, like `gpt-5.6-sol`. OpenAI offers a wide
1085
+ * Model ID used to generate the response, like `gpt-6-astra`. OpenAI offers a wide
1072
1086
  * range of models with different capabilities, performance characteristics, and
1073
1087
  * price points. Refer to the
1074
1088
  * [model guide](https://platform.openai.com/docs/models) to browse and compare
@@ -1331,9 +1345,11 @@ export namespace Response {
1331
1345
  */
1332
1346
  export interface IncompleteDetails {
1333
1347
  /**
1334
- * 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.
1335
1351
  */
1336
- reason?: 'max_output_tokens' | 'max_messages' | 'content_filter';
1352
+ reason?: 'max_output_tokens' | 'max_messages' | 'content_filter' | 'steered';
1337
1353
  }
1338
1354
 
1339
1355
  export interface SpecificProgrammaticToolCallingParam {
@@ -2396,6 +2412,75 @@ export interface ResponseComputerToolCallOutputScreenshot {
2396
2412
  image_url?: string;
2397
2413
  }
2398
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
+
2399
2484
  /**
2400
2485
  * Represents a container created with /v1/containers.
2401
2486
  */
@@ -2599,6 +2684,11 @@ export interface ResponseCustomToolCall {
2599
2684
  */
2600
2685
  id?: string;
2601
2686
 
2687
+ /**
2688
+ * Whether the custom tool call runs asynchronously.
2689
+ */
2690
+ async?: boolean;
2691
+
2602
2692
  /**
2603
2693
  * The execution context that produced this tool call.
2604
2694
  */
@@ -2792,6 +2882,7 @@ export interface ResponseError {
2792
2882
  | 'invalid_prompt'
2793
2883
  | 'data_residency_mismatch'
2794
2884
  | 'bio_policy'
2885
+ | 'misalignment_policy_violation'
2795
2886
  | 'vector_store_timeout'
2796
2887
  | 'invalid_image'
2797
2888
  | 'invalid_image_format'
@@ -2812,6 +2903,44 @@ export interface ResponseError {
2812
2903
  * A human-readable description of the error.
2813
2904
  */
2814
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
+ }
2815
2944
  }
2816
2945
 
2817
2946
  /**
@@ -3412,6 +3541,11 @@ export interface ResponseFunctionToolCall {
3412
3541
  */
3413
3542
  id?: string;
3414
3543
 
3544
+ /**
3545
+ * Whether the function tool call runs asynchronously.
3546
+ */
3547
+ async?: boolean;
3548
+
3415
3549
  /**
3416
3550
  * The execution context that produced this tool call.
3417
3551
  */
@@ -3837,6 +3971,10 @@ export type ResponseIncludable =
3837
3971
 
3838
3972
  /**
3839
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.
3840
3978
  */
3841
3979
  export interface ResponseIncompleteEvent {
3842
3980
  /**
@@ -4130,6 +4268,7 @@ export type ResponseInputItem =
4130
4268
  | ResponseInputItem.ToolSearchCall
4131
4269
  | ResponseToolSearchOutputItemParam
4132
4270
  | ResponseInputItem.AdditionalTools
4271
+ | ResponseConfigurationUpdateItemParam
4133
4272
  | ResponseReasoningItem
4134
4273
  | ResponseCompactionItemParam
4135
4274
  | ResponseInputItem.ImageGenerationCall
@@ -5171,6 +5310,7 @@ export type ResponseItem =
5171
5310
  | ResponseToolSearchCall
5172
5311
  | ResponseToolSearchOutputItem
5173
5312
  | ResponseItem.AdditionalTools
5313
+ | ResponseConfigurationUpdateItem
5174
5314
  | ResponseReasoningItem
5175
5315
  | ResponseItem.Program
5176
5316
  | ResponseItem.ProgramOutput
@@ -7310,130 +7450,151 @@ export namespace ResponseShellCallOutputContentDoneEvent {
7310
7450
  export type ResponseStatus = 'completed' | 'failed' | 'in_progress' | 'cancelled' | 'queued' | 'incomplete';
7311
7451
 
7312
7452
  /**
7313
- * Event emitted while a response is streamed.
7314
- */
7315
- export type ResponseStreamEvent =
7316
- | ResponseAudioDeltaEvent
7317
- | ResponseAudioDoneEvent
7318
- | ResponseAudioTranscriptDeltaEvent
7319
- | ResponseAudioTranscriptDoneEvent
7320
- | ResponseCodeInterpreterCallCodeDeltaEvent
7321
- | ResponseCodeInterpreterCallCodeDoneEvent
7322
- | ResponseCodeInterpreterCallCompletedEvent
7323
- | ResponseCodeInterpreterCallInProgressEvent
7324
- | ResponseCodeInterpreterCallInterpretingEvent
7325
- | ResponseCompletedEvent
7326
- | ResponseContentPartAddedEvent
7327
- | ResponseContentPartDoneEvent
7328
- | ResponseCreatedEvent
7329
- | ResponseErrorEvent
7330
- | ResponseFileSearchCallCompletedEvent
7331
- | ResponseFileSearchCallInProgressEvent
7332
- | ResponseFileSearchCallSearchingEvent
7333
- | ResponseFunctionCallArgumentsDeltaEvent
7334
- | ResponseFunctionCallArgumentsDoneEvent
7335
- | ResponseShellCallCommandAddedEvent
7336
- | ResponseShellCallCommandDeltaEvent
7337
- | ResponseShellCallCommandDoneEvent
7338
- | ResponseShellCallOutputContentDeltaEvent
7339
- | ResponseShellCallOutputContentDoneEvent
7340
- | ResponseInProgressEvent
7341
- | ResponseFailedEvent
7342
- | ResponseIncompleteEvent
7343
- | ResponseOutputItemAddedEvent
7344
- | ResponseOutputItemDoneEvent
7345
- | ResponseReasoningSummaryPartAddedEvent
7346
- | ResponseReasoningSummaryPartDoneEvent
7347
- | ResponseReasoningSummaryTextDeltaEvent
7348
- | ResponseReasoningSummaryTextDoneEvent
7349
- | ResponseReasoningTextDeltaEvent
7350
- | ResponseReasoningTextDoneEvent
7351
- | ResponseRefusalDeltaEvent
7352
- | ResponseRefusalDoneEvent
7353
- | ResponseTextDeltaEvent
7354
- | ResponseTextDoneEvent
7355
- | ResponseWebSearchCallCompletedEvent
7356
- | ResponseWebSearchCallInProgressEvent
7357
- | ResponseWebSearchCallSearchingEvent
7358
- | ResponseImageGenCallCompletedEvent
7359
- | ResponseImageGenCallGeneratingEvent
7360
- | ResponseImageGenCallInProgressEvent
7361
- | ResponseImageGenCallPartialImageEvent
7362
- | ResponseMcpCallArgumentsDeltaEvent
7363
- | ResponseMcpCallArgumentsDoneEvent
7364
- | ResponseMcpCallCompletedEvent
7365
- | ResponseMcpCallFailedEvent
7366
- | ResponseMcpCallInProgressEvent
7367
- | ResponseMcpListToolsCompletedEvent
7368
- | ResponseMcpListToolsFailedEvent
7369
- | ResponseMcpListToolsInProgressEvent
7370
- | ResponseOutputTextAnnotationAddedEvent
7371
- | ResponseQueuedEvent
7372
- | ResponseCustomToolCallInputDeltaEvent
7373
- | ResponseCustomToolCallInputDoneEvent;
7374
-
7375
- /**
7376
- * Configuration options for a text response from the model. Can be plain text or
7377
- * 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.
7378
7457
  *
7379
- * - [Text inputs and outputs](https://platform.openai.com/docs/guides/text)
7380
- * - [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.
7381
7463
  */
7382
- export interface ResponseTextConfig {
7464
+ export interface ResponseSteerAcceptedEvent {
7383
7465
  /**
7384
- * An object specifying the format that the model must output.
7385
- *
7386
- * Configuring `{ "type": "json_schema" }` enables Structured Outputs, which
7387
- * ensures the model will match your supplied JSON schema. Learn more in the
7388
- * [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs).
7389
- *
7390
- * The default format is `{ "type": "text" }` with no additional options.
7391
- *
7392
- * **Not recommended for gpt-4o and newer models:**
7393
- *
7394
- * Setting to `{ "type": "json_object" }` enables the older JSON mode, which
7395
- * ensures the message the model generates is valid JSON. Using `json_schema` is
7396
- * preferred for models that support it.
7466
+ * The sequence number for this event.
7397
7467
  */
7398
- format?: ResponseFormatTextConfig;
7468
+ sequence_number: number;
7399
7469
 
7400
7470
  /**
7401
- * Constrains the verbosity of the model's response. Lower values will result in
7402
- * more concise responses, while higher values will result in more verbose
7403
- * responses. Currently supported values are `low`, `medium`, and `high`. The
7404
- * default is `medium`.
7471
+ * The accepted steering submission.
7405
7472
  */
7406
- 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;
7407
7485
  }
7408
7486
 
7409
- /**
7410
- * Emitted when there is an additional text delta.
7411
- */
7412
- export interface ResponseTextDeltaEvent {
7487
+ export namespace ResponseSteerAcceptedEvent {
7413
7488
  /**
7414
- * The index of the content part that the text delta was added to.
7489
+ * The accepted steering submission.
7415
7490
  */
7416
- 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
+ }
7417
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 {
7418
7559
  /**
7419
- * 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.
7420
7569
  */
7421
- delta: string;
7570
+ input: ResponseSteerInput;
7422
7571
 
7423
7572
  /**
7424
- * 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.
7425
7574
  */
7426
- item_id: string;
7575
+ previous_response_id: string;
7427
7576
 
7428
7577
  /**
7429
- * The log probabilities of the tokens in the delta.
7578
+ * The event discriminator. Always `response.steer`.
7430
7579
  */
7431
- logprobs: Array<ResponseTextDeltaEvent.Logprob>;
7580
+ type: 'response.steer';
7581
+ }
7432
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 {
7433
7594
  /**
7434
- * The index of the output item that the text delta was added to.
7595
+ * Information about why the input could not be committed.
7435
7596
  */
7436
- output_index: number;
7597
+ error: ResponseSteerFailedEvent.Error;
7437
7598
 
7438
7599
  /**
7439
7600
  * The sequence number for this event.
@@ -7441,59 +7602,566 @@ export interface ResponseTextDeltaEvent {
7441
7602
  sequence_number: number;
7442
7603
 
7443
7604
  /**
7444
- * The type of the event. Always `response.output_text.delta`.
7605
+ * The steering submission that could not be committed.
7445
7606
  */
7446
- 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;
7447
7619
  }
7448
7620
 
7449
- export namespace ResponseTextDeltaEvent {
7621
+ export namespace ResponseSteerFailedEvent {
7450
7622
  /**
7451
- * A logprob is the logarithmic probability that the model assigns to producing a
7452
- * particular token at a given position in the sequence. Less-negative (higher)
7453
- * logprob values indicate greater model confidence in that token choice.
7623
+ * Information about why the input could not be committed.
7454
7624
  */
7455
- export interface Logprob {
7625
+ export interface Error {
7456
7626
  /**
7457
- * 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.
7458
7640
  */
7459
- token: string;
7641
+ code: ResponsesAPI.ResponseSteerErrorCode;
7460
7642
 
7461
7643
  /**
7462
- * The log probability of this token.
7644
+ * A human-readable description of the error.
7463
7645
  */
7464
- logprob: number;
7646
+ message: string;
7465
7647
 
7466
7648
  /**
7467
- * The log probabilities of up to 20 of the most likely tokens.
7649
+ * The error type. Always `invalid_request_error`.
7468
7650
  */
7469
- top_logprobs?: Array<Logprob.TopLogprob>;
7651
+ type: 'invalid_request_error';
7470
7652
  }
7471
7653
 
7472
- export namespace Logprob {
7473
- export interface TopLogprob {
7474
- /**
7475
- * A possible text token.
7476
- */
7477
- 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;
7478
7670
 
7479
- /**
7480
- * The log probability of this token.
7481
- */
7482
- logprob?: number;
7483
- }
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;
7484
7680
  }
7485
7681
  }
7486
7682
 
7487
7683
  /**
7488
- * 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.
7489
7693
  */
7490
- export interface ResponseTextDoneEvent {
7491
- /**
7492
- * The index of the content part that the text content is finalized.
7493
- */
7494
- content_index: number;
7694
+ export type ResponseSteerInput =
7695
+ | string
7696
+ | Array<ResponseSteerInputItemList.Message | ResponseSteerInputItemList.FunctionCallOutput>;
7495
7697
 
7496
- /**
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;
8163
+
8164
+ /**
7497
8165
  * The ID of the output item that the text content is finalized.
7498
8166
  */
7499
8167
  item_id: string;
@@ -7802,453 +8470,490 @@ export interface ResponseWebSearchCallSearchingEvent {
7802
8470
  type: 'response.web_search_call.searching';
7803
8471
  }
7804
8472
 
7805
- export interface ResponsesClientEvent {
7806
- /**
7807
- * The type of the client event. Always `response.create`.
7808
- */
7809
- type: 'response.create';
7810
-
7811
- /**
7812
- * Whether to run the model response in the background.
7813
- * [Learn more](https://platform.openai.com/docs/guides/background).
7814
- */
7815
- background?: boolean | null;
8473
+ /**
8474
+ * Client events accepted by the Responses WebSocket server.
8475
+ */
8476
+ export type ResponsesClientEvent = ResponsesClientEvent.ResponseCreate | ResponseSteerEvent;
7816
8477
 
7817
- /**
7818
- * Context management configuration for this request.
7819
- */
7820
- 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;
7821
8483
 
7822
- /**
7823
- * The conversation that this response belongs to. Items from this conversation are
7824
- * prepended to `input_items` for this response request. Input items and output
7825
- * items from this response are automatically added to this conversation after this
7826
- * response completes.
7827
- */
7828
- conversation?: string | ResponseConversationParam | null;
8484
+ export namespace Moderation {
8485
+ export type Policy = ResponseCreate.Moderation.Policy;
7829
8486
 
7830
- /**
7831
- * Specify additional output data to include in the model response. Currently
7832
- * supported values are:
7833
- *
7834
- * - `web_search_call.action.sources`: Include the sources of the web search tool
7835
- * call.
7836
- * - `code_interpreter_call.outputs`: Includes the outputs of python code execution
7837
- * in code interpreter tool call items.
7838
- * - `computer_call_output.output.image_url`: Include image urls from the computer
7839
- * call output.
7840
- * - `file_search_call.results`: Include the search results of the file search tool
7841
- * call.
7842
- * - `message.input_image.image_url`: Include image urls from the input message.
7843
- * - `message.output_text.logprobs`: Include logprobs with assistant messages.
7844
- * - `reasoning.encrypted_content`: Includes an encrypted version of reasoning
7845
- * tokens in reasoning item outputs. This enables reasoning items to be used in
7846
- * multi-turn conversations when using the Responses API statelessly (like when
7847
- * the `store` parameter is set to `false`, or when an organization is enrolled
7848
- * in the zero data retention program).
7849
- */
7850
- 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
+ }
7851
8492
 
7852
- /**
7853
- * Text, image, or file inputs to the model, used to generate a response.
7854
- *
7855
- * Learn more:
7856
- *
7857
- * - [Text inputs and outputs](https://platform.openai.com/docs/guides/text)
7858
- * - [Image inputs](https://platform.openai.com/docs/guides/images)
7859
- * - [File inputs](https://platform.openai.com/docs/guides/pdf-files)
7860
- * - [Conversation state](https://platform.openai.com/docs/guides/conversation-state)
7861
- * - [Function calling](https://platform.openai.com/docs/guides/function-calling)
7862
- */
7863
- 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
7864
8497
 
7865
8498
  /**
7866
- * 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.
7867
8502
  *
7868
- * When using along with `previous_response_id`, the instructions from a previous
7869
- * response will not be carried over to the next response. This makes it simple to
7870
- * swap out system (or developer) messages in new responses.
7871
- */
7872
- instructions?: string | null;
7873
-
7874
- /**
7875
- * An upper bound for the number of tokens that can be generated for a response,
7876
- * including visible output tokens and
7877
- * [reasoning tokens](https://platform.openai.com/docs/guides/reasoning).
7878
- */
7879
- max_output_tokens?: number | null;
7880
-
7881
- /**
7882
- * The maximum number of total calls to built-in tools that can be processed in a
7883
- * response. This maximum number applies across all built-in tool calls, not per
7884
- * individual tool. Any further attempts to call a tool by the model will be
7885
- * ignored.
7886
- */
7887
- max_tool_calls?: number | null;
7888
-
7889
- /**
7890
- * Set of 16 key-value pairs that can be attached to an object. This can be useful
7891
- * for storing additional information about the object in a structured format, and
7892
- * querying for objects via API or the dashboard.
8503
+ * Notes:
7893
8504
  *
7894
- * Keys are strings with a maximum length of 64 characters. Values are strings with
7895
- * a maximum length of 512 characters.
7896
- */
7897
- metadata?: Shared.Metadata | null;
7898
-
7899
- /**
7900
- * Model ID used to generate the response, like `gpt-5.6-sol`. OpenAI offers a wide
7901
- * range of models with different capabilities, performance characteristics, and
7902
- * price points. Refer to the
7903
- * [model guide](https://platform.openai.com/docs/models) to browse and compare
7904
- * available models.
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`.
7905
8508
  */
7906
- model?: Shared.ResponsesModel;
8509
+ export interface ResponseCreate {
8510
+ /**
8511
+ * The type of the client event. Always `response.create`.
8512
+ */
8513
+ type: 'response.create';
7907
8514
 
7908
- /**
7909
- * Configuration for running moderation on the input and output of this response.
7910
- */
7911
- moderation?: ResponsesClientEvent.Moderation | null;
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;
7912
8520
 
7913
- /**
7914
- * Whether to allow the model to run tool calls in parallel.
7915
- */
7916
- parallel_tool_calls?: boolean | null;
8521
+ /**
8522
+ * Context management configuration for this request.
8523
+ */
8524
+ context_management?: Array<ResponseCreate.ContextManagement> | null;
7917
8525
 
7918
- /**
7919
- * The unique ID of the previous response to the model. Use this to create
7920
- * multi-turn conversations. Learn more about
7921
- * [conversation state](https://platform.openai.com/docs/guides/conversation-state).
7922
- * Cannot be used in conjunction with `conversation`.
7923
- */
7924
- previous_response_id?: string | 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;
7925
8533
 
7926
- /**
7927
- * Reference to a prompt template and its variables.
7928
- * [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts).
7929
- */
7930
- prompt?: ResponsePrompt | 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;
7931
8568
 
7932
- /**
7933
- * Used by OpenAI to cache responses for similar requests to optimize your cache
7934
- * hit rates. Replaces the `user` field.
7935
- * [Learn more](https://platform.openai.com/docs/guides/prompt-caching).
7936
- */
7937
- prompt_cache_key?: string | 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
- * Options for prompt caching. Supported for `gpt-5.6` and later models. By
7941
- * default, OpenAI automatically chooses one implicit cache breakpoint. You can add
7942
- * explicit breakpoints to content blocks with `prompt_cache_breakpoint`. Each
7943
- * request can write up to four breakpoints. For cache matching, OpenAI considers
7944
- * up to the latest 80 breakpoints in the conversation, without a content-block
7945
- * lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The
7946
- * `ttl` defaults to `30m`, which is currently the only supported value. See the
7947
- * [prompt caching guide](https://platform.openai.com/docs/guides/prompt-caching)
7948
- * for current details.
7949
- */
7950
- prompt_cache_options?: ResponsesClientEvent.PromptCacheOptions;
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;
7951
8584
 
7952
- /**
7953
- * @deprecated Deprecated. Use `prompt_cache_options.ttl` instead.
7954
- *
7955
- * The retention policy for the prompt cache. Set to `24h` to enable extended
7956
- * prompt caching, which keeps cached prefixes active for longer, up to a maximum
7957
- * of 24 hours.
7958
- * [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention).
7959
- * This field expresses a maximum retention policy, while
7960
- * `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two fields
7961
- * are independent and do not interact. For `gpt-5.5`, `gpt-5.5-pro`, and future
7962
- * models, only `24h` is supported.
7963
- *
7964
- * For older models that support both `in_memory` and `24h`, the default depends on
7965
- * your organization's data retention policy:
7966
- *
7967
- * - Organizations without ZDR enabled default to `24h`.
7968
- * - Organizations with ZDR enabled default to `in_memory` when
7969
- * `prompt_cache_retention` is not specified.
7970
- */
7971
- prompt_cache_retention?: 'in_memory' | '24h' | null;
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;
7972
8592
 
7973
- /**
7974
- * Configuration options for
7975
- * [reasoning models](https://platform.openai.com/docs/guides/reasoning).
7976
- */
7977
- reasoning?: Shared.Reasoning | 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;
7978
8602
 
7979
- /**
7980
- * A stable identifier used to help detect users of your application that may be
7981
- * violating OpenAI's usage policies. The IDs should be a string that uniquely
7982
- * identifies each user, with a maximum length of 64 characters. We recommend
7983
- * hashing their username or email address, in order to avoid sending us any
7984
- * identifying information.
7985
- * [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers).
7986
- */
7987
- safety_identifier?: string | 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;
7988
8611
 
7989
- /**
7990
- * Specifies the processing type used for serving the request.
7991
- *
7992
- * - If set to 'auto', then the request will be processed with the service tier
7993
- * configured in the Project settings. Unless otherwise configured, the Project
7994
- * will use 'default'.
7995
- * - If set to 'default', then the request will be processed with the standard
7996
- * pricing and performance for the selected model.
7997
- * - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)',
7998
- * then the request will be processed with the Flex Processing service tier.
7999
- * - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level,
8000
- * include the `service_tier=fast` or `service_tier=priority` parameter for
8001
- * Responses or Chat Completions. The response will show `service_tier=priority`
8002
- * regardless of if you specify `service_tier=fast` or `priority` in your
8003
- * request.
8004
- * - If set to 'ultrafast', then the request will be processed with the
8005
- * access-controlled Ultrafast Processing service tier. This tier is currently
8006
- * available for `gpt-5.6-sol`; a response served through it will show
8007
- * `service_tier=ultrafast`.
8008
- * - When not set, the default behavior is 'auto'.
8009
- *
8010
- * When the `service_tier` parameter is set, the response body will include the
8011
- * `service_tier` value based on the processing mode actually used to serve the
8012
- * request. This response value may be different from the value set in the
8013
- * parameter.
8014
- */
8015
- service_tier?: ServiceTier | null;
8612
+ /**
8613
+ * Configuration for running moderation on the input and output of this response.
8614
+ */
8615
+ moderation?: ResponseCreate.Moderation | null;
8016
8616
 
8017
- /**
8018
- * Whether to store the generated model response for later retrieval via API.
8019
- */
8020
- store?: boolean | null;
8617
+ /**
8618
+ * Whether to allow the model to run tool calls in parallel.
8619
+ */
8620
+ parallel_tool_calls?: boolean | null;
8021
8621
 
8022
- /**
8023
- * If set to true, the model response data will be streamed to the client as it is
8024
- * generated using
8025
- * [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format).
8026
- * See the
8027
- * [Streaming section below](https://platform.openai.com/docs/api-reference/responses-streaming)
8028
- * for more information.
8029
- */
8030
- stream?: 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;
8031
8629
 
8032
- /**
8033
- * The WebSocket lane for this response. Requests with the same `stream_id` are
8034
- * processed FIFO, and events for the response echo the same `stream_id`.
8035
- *
8036
- * `stream_id` controls routing; `previous_response_id` controls conversation
8037
- * lineage, so a new lane can fork from a response created on another lane.
8038
- */
8039
- stream_id?: string;
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
- * Options for streaming responses. Only set this when you set `stream: true`.
8043
- */
8044
- stream_options?: ResponsesClientEvent.StreamOptions | null;
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;
8045
8642
 
8046
- /**
8047
- * What sampling temperature to use, between 0 and 2. Higher values like 0.8 will
8048
- * make the output more random, while lower values like 0.2 will make it more
8049
- * focused and deterministic. We generally recommend altering this or `top_p` but
8050
- * not both.
8051
- */
8052
- temperature?: number | 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;
8053
8655
 
8054
- /**
8055
- * Configuration options for a text response from the model. Can be plain text or
8056
- * structured JSON data. Learn more:
8057
- *
8058
- * - [Text inputs and outputs](https://platform.openai.com/docs/guides/text)
8059
- * - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs)
8060
- */
8061
- text?: ResponseTextConfig;
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
- * How the model should select which tool (or tools) to use when generating a
8065
- * response. See the `tools` parameter to see how to specify which tools the model
8066
- * can call.
8067
- */
8068
- tool_choice?:
8069
- | ToolChoiceOptions
8070
- | ToolChoiceAllowed
8071
- | ToolChoiceTypes
8072
- | ToolChoiceFunction
8073
- | ToolChoiceMcp
8074
- | ToolChoiceCustom
8075
- | ResponsesClientEvent.SpecificProgrammaticToolCallingParam
8076
- | ToolChoiceApplyPatch
8077
- | ToolChoiceShell;
8677
+ /**
8678
+ * Configuration options for
8679
+ * [reasoning models](https://platform.openai.com/docs/guides/reasoning).
8680
+ */
8681
+ reasoning?: Shared.Reasoning | null;
8078
8682
 
8079
- /**
8080
- * An array of tools the model may call while generating a response. You can
8081
- * specify which tool to use by setting the `tool_choice` parameter.
8082
- *
8083
- * We support the following categories of tools:
8084
- *
8085
- * - **Built-in tools**: Tools that are provided by OpenAI that extend the model's
8086
- * capabilities, like
8087
- * [web search](https://platform.openai.com/docs/guides/tools-web-search) or
8088
- * [file search](https://platform.openai.com/docs/guides/tools-file-search).
8089
- * Learn more about
8090
- * [built-in tools](https://platform.openai.com/docs/guides/tools).
8091
- * - **MCP Tools**: Integrations with third-party systems via custom MCP servers or
8092
- * predefined connectors such as Google Drive and SharePoint. Learn more about
8093
- * [MCP Tools](https://platform.openai.com/docs/guides/tools-connectors-mcp).
8094
- * - **Function calls (custom tools)**: Functions that are defined by you, enabling
8095
- * the model to call your own code with strongly typed arguments and outputs.
8096
- * Learn more about
8097
- * [function calling](https://platform.openai.com/docs/guides/function-calling).
8098
- * You can also use custom tools to call your own code.
8099
- */
8100
- tools?: Array<Tool>;
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;
8101
8692
 
8102
- /**
8103
- * An integer between 0 and 20 specifying the maximum number of most likely tokens
8104
- * to return at each token position, each with an associated log probability. In
8105
- * some cases, the number of returned tokens may be fewer than requested.
8106
- */
8107
- top_logprobs?: number | null;
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;
8108
8720
 
8109
- /**
8110
- * An alternative to sampling with temperature, called nucleus sampling, where the
8111
- * model considers the results of the tokens with top_p probability mass. So 0.1
8112
- * means only the tokens comprising the top 10% probability mass are considered.
8113
- *
8114
- * We generally recommend altering this or `temperature` but not both.
8115
- */
8116
- top_p?: 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
- * @deprecated The truncation strategy to use for the model response.
8120
- *
8121
- * - `auto`: If the input to this Response exceeds the model's context window size,
8122
- * the model will truncate the response to fit the context window by dropping
8123
- * items from the beginning of the conversation.
8124
- * - `disabled` (default): If the input size will exceed the context window size
8125
- * for a model, the request will fail with a 400 error.
8126
- */
8127
- truncation?: 'auto' | 'disabled' | 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;
8128
8735
 
8129
- /**
8130
- * @deprecated This field is being replaced by `safety_identifier` and
8131
- * `prompt_cache_key`. Use `prompt_cache_key` instead to maintain caching
8132
- * optimizations. A stable identifier for your end-users. Used to boost cache hit
8133
- * rates by better bucketing similar requests and to help OpenAI detect and prevent
8134
- * abuse.
8135
- * [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers).
8136
- */
8137
- user?: string;
8138
- }
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;
8139
8744
 
8140
- export namespace ResponsesClientEvent {
8141
- export interface ContextManagement {
8142
8745
  /**
8143
- * The context management entry type. Currently only 'compaction' is supported.
8746
+ * Options for streaming responses. Only set this when you set `stream: true`.
8144
8747
  */
8145
- type: string;
8748
+ stream_options?: ResponseCreate.StreamOptions | null;
8146
8749
 
8147
8750
  /**
8148
- * Token threshold at which compaction should be triggered for this entry.
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.
8149
8755
  */
8150
- compact_threshold?: number | null;
8151
- }
8756
+ temperature?: number | null;
8152
8757
 
8153
- /**
8154
- * Configuration for running moderation on the input and output of this response.
8155
- */
8156
- export interface Moderation {
8157
8758
  /**
8158
- * The moderation model to use for moderated completions, e.g.
8159
- * 'omni-moderation-latest'.
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)
8160
8764
  */
8161
- model: string;
8765
+ text?: ResponsesAPI.ResponseTextConfig;
8162
8766
 
8163
8767
  /**
8164
- * The policy to apply to moderated response input and output.
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.
8165
8771
  */
8166
- policy?: Moderation.Policy | null;
8167
- }
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;
8168
8782
 
8169
- export namespace Moderation {
8170
8783
  /**
8171
- * 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.
8172
8819
  */
8173
- export interface Policy {
8820
+ top_p?: number | null;
8821
+
8822
+ /**
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.
8830
+ */
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 {
8174
8846
  /**
8175
- * The moderation policy for the response input.
8847
+ * The context management entry type. Currently only 'compaction' is supported.
8176
8848
  */
8177
- input?: Policy.Input | null;
8849
+ type: string;
8178
8850
 
8179
8851
  /**
8180
- * The moderation policy for the response output.
8852
+ * Token threshold at which compaction should be triggered for this entry.
8181
8853
  */
8182
- output?: Policy.Output | null;
8854
+ compact_threshold?: number | null;
8183
8855
  }
8184
8856
 
8185
- export namespace Policy {
8857
+ /**
8858
+ * Configuration for running moderation on the input and output of this response.
8859
+ */
8860
+ export interface Moderation {
8186
8861
  /**
8187
- * The moderation policy for the response input.
8862
+ * The moderation model to use for moderated completions, e.g.
8863
+ * 'omni-moderation-latest'.
8188
8864
  */
8189
- export interface Input {
8190
- mode: 'score' | 'block';
8191
- }
8865
+ model: string;
8192
8866
 
8193
8867
  /**
8194
- * The moderation policy for the response output.
8868
+ * The policy to apply to moderated response input and output.
8195
8869
  */
8196
- export interface Output {
8197
- 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
+ }
8198
8903
  }
8199
8904
  }
8200
- }
8201
8905
 
8202
- /**
8203
- * Options for prompt caching. Supported for `gpt-5.6` and later models. By
8204
- * default, OpenAI automatically chooses one implicit cache breakpoint. You can add
8205
- * explicit breakpoints to content blocks with `prompt_cache_breakpoint`. Each
8206
- * request can write up to four breakpoints. For cache matching, OpenAI considers
8207
- * up to the latest 80 breakpoints in the conversation, without a content-block
8208
- * lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The
8209
- * `ttl` defaults to `30m`, which is currently the only supported value. See the
8210
- * [prompt caching guide](https://platform.openai.com/docs/guides/prompt-caching)
8211
- * for current details.
8212
- */
8213
- export interface PromptCacheOptions {
8214
8906
  /**
8215
- * Controls whether OpenAI automatically creates an implicit cache breakpoint.
8216
- * Defaults to `implicit`. With `implicit`, OpenAI creates one implicit breakpoint
8217
- * and writes up to the latest three explicit breakpoints in the request. With
8218
- * `explicit`, OpenAI does not create an implicit breakpoint and writes up to the
8219
- * latest four explicit breakpoints. If there are no explicit breakpoints, the
8220
- * 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.
8221
8916
  */
8222
- 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';
8223
8927
 
8224
- /**
8225
- * The minimum lifetime applied to every implicit and explicit cache breakpoint
8226
- * written by the request. Defaults to `30m`, which is currently the only supported
8227
- * value. The backend may retain cache entries for longer.
8228
- */
8229
- ttl?: '30m';
8230
- }
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
+ }
8231
8935
 
8232
- /**
8233
- * Options for streaming responses. Only set this when you set `stream: true`.
8234
- */
8235
- export interface StreamOptions {
8236
8936
  /**
8237
- * When true, stream obfuscation will be enabled. Stream obfuscation adds random
8238
- * characters to an `obfuscation` field on streaming delta events to normalize
8239
- * payload sizes as a mitigation to certain side-channel attacks. These obfuscation
8240
- * fields are included by default, but add a small amount of overhead to the data
8241
- * stream. You can set `include_obfuscation` to false to optimize for bandwidth if
8242
- * 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`.
8243
8938
  */
8244
- include_obfuscation?: boolean;
8245
- }
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
+ }
8246
8950
 
8247
- export interface SpecificProgrammaticToolCallingParam {
8248
- /**
8249
- * The tool to call. Always `programmatic_tool_calling`.
8250
- */
8251
- 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
+ }
8252
8957
  }
8253
8958
  }
8254
8959
 
@@ -8314,7 +9019,10 @@ export type ResponsesServerEvent =
8314
9019
  | ResponsesServerEvent.ResponseCustomToolCallInputWsDelta
8315
9020
  | ResponsesServerEvent.ResponseCustomToolCallInputWsDone
8316
9021
  | ResponsesServerEvent.ResponseWsStreamingError
8317
- | ResponsesServerEvent.ResponseWsError;
9022
+ | ResponsesServerEvent.ResponseWsError
9023
+ | ResponseSteerAcceptedEvent
9024
+ | ResponseSteerPendingEvent
9025
+ | ResponseSteerFailedEvent;
8318
9026
 
8319
9027
  export namespace ResponsesServerEvent {
8320
9028
  /**
@@ -8594,6 +9302,10 @@ export namespace ResponsesServerEvent {
8594
9302
 
8595
9303
  /**
8596
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.
8597
9309
  */
8598
9310
  export interface ResponseWsIncomplete extends ResponseIncompleteEvent {
8599
9311
  /**
@@ -9019,6 +9731,44 @@ export namespace ResponsesServerEvent {
9019
9731
  * The response headers that were emitted with the error, if any.
9020
9732
  */
9021
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
+ }
9022
9772
  }
9023
9773
  }
9024
9774
  }
@@ -9846,7 +10596,7 @@ export interface ResponseCreateParamsBase {
9846
10596
  metadata?: Shared.Metadata | null;
9847
10597
 
9848
10598
  /**
9849
- * Model ID used to generate the response, like `gpt-5.6-sol`. OpenAI offers a wide
10599
+ * Model ID used to generate the response, like `gpt-6-astra`. OpenAI offers a wide
9850
10600
  * range of models with different capabilities, performance characteristics, and
9851
10601
  * price points. Refer to the
9852
10602
  * [model guide](https://platform.openai.com/docs/models) to browse and compare
@@ -10284,13 +11034,14 @@ export interface ResponseRetrieveParamsStreaming extends ResponseRetrieveParamsB
10284
11034
 
10285
11035
  export interface ResponseCompactParams {
10286
11036
  /**
10287
- * Model ID used to generate the response, like `gpt-5.6-sol`. OpenAI offers a wide
11037
+ * Model ID used to generate the response, like `gpt-6-astra`. OpenAI offers a wide
10288
11038
  * range of models with different capabilities, performance characteristics, and
10289
11039
  * price points. Refer to the
10290
11040
  * [model guide](https://platform.openai.com/docs/models) to browse and compare
10291
11041
  * available models.
10292
11042
  */
10293
11043
  model:
11044
+ | 'gpt-6-astra'
10294
11045
  | 'gpt-5.6-sol'
10295
11046
  | 'gpt-5.6-terra'
10296
11047
  | 'gpt-5.6-luna'
@@ -10539,6 +11290,8 @@ export declare namespace Responses {
10539
11290
  type ResponseComputerToolCall as ResponseComputerToolCall,
10540
11291
  type ResponseComputerToolCallOutputItem as ResponseComputerToolCallOutputItem,
10541
11292
  type ResponseComputerToolCallOutputScreenshot as ResponseComputerToolCallOutputScreenshot,
11293
+ type ResponseConfigurationUpdateItem as ResponseConfigurationUpdateItem,
11294
+ type ResponseConfigurationUpdateItemParam as ResponseConfigurationUpdateItemParam,
10542
11295
  type ResponseContainerReference as ResponseContainerReference,
10543
11296
  type ResponseContent as ResponseContent,
10544
11297
  type ResponseContentPartAddedEvent as ResponseContentPartAddedEvent,
@@ -10625,6 +11378,15 @@ export declare namespace Responses {
10625
11378
  type ResponseShellCallOutputContentDeltaEvent as ResponseShellCallOutputContentDeltaEvent,
10626
11379
  type ResponseShellCallOutputContentDoneEvent as ResponseShellCallOutputContentDoneEvent,
10627
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,
10628
11390
  type ResponseStreamEvent as ResponseStreamEvent,
10629
11391
  type ResponseTextConfig as ResponseTextConfig,
10630
11392
  type ResponseTextDeltaEvent as ResponseTextDeltaEvent,