openai 0.84.0 → 0.86.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 (1321) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +110 -0
  3. data/README.md +95 -13
  4. data/SECURITY.md +10 -0
  5. data/docs/architecture/security-model.md +293 -0
  6. data/lib/openai/auth/workload_identity_auth.rb +2 -2
  7. data/lib/openai/auth/x509_token_exchange.rb +7 -1
  8. data/lib/openai/auth/x509_transport.rb +21 -3
  9. data/lib/openai/client.rb +8 -2
  10. data/lib/openai/errors.rb +28 -9
  11. data/lib/openai/file_part.rb +35 -2
  12. data/lib/openai/helpers/realtime/client_extension.rb +37 -121
  13. data/lib/openai/helpers/realtime/connection.rb +13 -90
  14. data/lib/openai/helpers/realtime/connection_manager.rb +22 -77
  15. data/lib/openai/helpers/realtime/connection_resources.rb +3 -1
  16. data/lib/openai/helpers/realtime/errors.rb +3 -27
  17. data/lib/openai/helpers/realtime/transports/async_websocket.rb +25 -368
  18. data/lib/openai/helpers/responses_websocket/client_extension.rb +62 -0
  19. data/lib/openai/helpers/responses_websocket/connection.rb +288 -0
  20. data/lib/openai/helpers/responses_websocket/connection_manager.rb +34 -0
  21. data/lib/openai/helpers/responses_websocket/connection_resources.rb +22 -0
  22. data/lib/openai/helpers/responses_websocket/errors.rb +56 -0
  23. data/lib/openai/helpers/responses_websocket/resources/responses_extension.rb +31 -0
  24. data/lib/openai/helpers/responses_websocket/transports/async_websocket.rb +29 -0
  25. data/lib/openai/helpers/responses_websocket/unknown_server_event.rb +54 -0
  26. data/lib/openai/helpers/responses_websocket.rb +12 -0
  27. data/lib/openai/helpers/sorbet.rb +7 -1
  28. data/lib/openai/helpers/streaming/chat_completion_stream.rb +65 -15
  29. data/lib/openai/helpers/streaming/chat_events.rb +9 -7
  30. data/lib/openai/helpers/streaming/response_stream.rb +79 -68
  31. data/lib/openai/helpers/structured_output/array_of.rb +2 -2
  32. data/lib/openai/helpers/structured_output/base_model.rb +19 -5
  33. data/lib/openai/helpers/structured_output/chat_completion_parser.rb +6 -3
  34. data/lib/openai/helpers/structured_output/json_schema_converter.rb +35 -12
  35. data/lib/openai/helpers/structured_output/response_parser.rb +125 -2
  36. data/lib/openai/helpers/websocket/async_websocket_transport.rb +422 -0
  37. data/lib/openai/helpers/websocket/client_request.rb +131 -0
  38. data/lib/openai/helpers/websocket/connection.rb +104 -0
  39. data/lib/openai/helpers/websocket/connection_manager.rb +104 -0
  40. data/lib/openai/helpers/websocket/errors.rb +32 -0
  41. data/lib/openai/helpers/websocket/protocol.rb +26 -0
  42. data/lib/openai/helpers/websocket.rb +10 -0
  43. data/lib/openai/internal/conversation_cursor_page.rb +1 -1
  44. data/lib/openai/internal/cursor_page.rb +1 -1
  45. data/lib/openai/internal/next_cursor_page.rb +1 -1
  46. data/lib/openai/internal/page.rb +1 -1
  47. data/lib/openai/internal/transport/base_client.rb +45 -8
  48. data/lib/openai/internal/transport/request_body_merge.rb +71 -0
  49. data/lib/openai/internal/type/base_page.rb +2 -2
  50. data/lib/openai/internal/type/base_stream.rb +8 -0
  51. data/lib/openai/internal/type/converter.rb +10 -2
  52. data/lib/openai/internal/type/duplicable_response_carrier.rb +23 -0
  53. data/lib/openai/internal/type/file_input.rb +3 -3
  54. data/lib/openai/internal/type/union.rb +24 -4
  55. data/lib/openai/internal/util.rb +139 -20
  56. data/lib/openai/internal/vector_store_file_uploader.rb +1 -1
  57. data/lib/openai/models/admin/organization/projects/service_accounts/api_key_create_params.rb +9 -1
  58. data/lib/openai/models/admin/organization/projects/service_accounts/api_key_create_response.rb +14 -1
  59. data/lib/openai/models/admin/organization/usage_costs_params.rb +1 -1
  60. data/lib/openai/models/audio/transcription_create_response.rb +5 -5
  61. data/lib/openai/models/batch.rb +2 -2
  62. data/lib/openai/models/beta/beta_custom_tool.rb +13 -1
  63. data/lib/openai/models/beta/beta_function_tool.rb +8 -1
  64. data/lib/openai/models/beta/beta_namespace_tool.rb +10 -1
  65. data/lib/openai/models/beta/beta_response.rb +150 -11
  66. data/lib/openai/models/beta/beta_response_configuration_update_item.rb +103 -0
  67. data/lib/openai/models/beta/beta_response_configuration_update_item_param.rb +104 -0
  68. data/lib/openai/models/beta/beta_response_custom_tool_call.rb +9 -1
  69. data/lib/openai/models/beta/beta_response_custom_tool_call_item.rb +3 -1
  70. data/lib/openai/models/beta/beta_response_error.rb +96 -1
  71. data/lib/openai/models/beta/beta_response_function_call_arguments_done_event.rb +1 -9
  72. data/lib/openai/models/beta/beta_response_function_tool_call.rb +9 -1
  73. data/lib/openai/models/beta/beta_response_function_tool_call_item.rb +3 -1
  74. data/lib/openai/models/beta/beta_response_function_web_search.rb +1 -0
  75. data/lib/openai/models/beta/beta_response_incomplete_event.rb +4 -0
  76. data/lib/openai/models/beta/beta_response_inject_event.rb +2 -2
  77. data/lib/openai/models/beta/beta_response_inject_failed_event.rb +2 -2
  78. data/lib/openai/models/beta/beta_response_input_item.rb +6 -1
  79. data/lib/openai/models/beta/beta_response_item.rb +5 -1
  80. data/lib/openai/models/beta/beta_response_steer_accepted_event.rb +81 -0
  81. data/lib/openai/models/beta/beta_response_steer_error_code.rb +61 -0
  82. data/lib/openai/models/beta/beta_response_steer_event.rb +75 -0
  83. data/lib/openai/models/beta/beta_response_steer_failed_event.rb +151 -0
  84. data/lib/openai/models/beta/beta_response_steer_input.rb +360 -0
  85. data/lib/openai/models/beta/beta_response_steer_input_content.rb +28 -0
  86. data/lib/openai/models/beta/beta_response_steer_pending_event.rb +113 -0
  87. data/lib/openai/models/beta/beta_response_steer_pending_reason.rb +26 -0
  88. data/lib/openai/models/beta/beta_response_steer_required_input.rb +215 -0
  89. data/lib/openai/models/beta/beta_response_stream_event.rb +4 -0
  90. data/lib/openai/models/beta/beta_responses_client_event.rb +50 -8
  91. data/lib/openai/models/beta/beta_responses_server_event.rb +165 -5
  92. data/lib/openai/models/beta/response_compact_params.rb +23 -18
  93. data/lib/openai/models/beta/response_create_params.rb +19 -7
  94. data/lib/openai/models/beta/responses/beta_response_item_list.rb +2 -2
  95. data/lib/openai/models/beta/responses/input_token_count_params.rb +3 -3
  96. data/lib/openai/models/chat/completion_create_params.rb +4 -4
  97. data/lib/openai/models/chat_model.rb +1 -0
  98. data/lib/openai/models/conversations/conversation_create_params.rb +2 -2
  99. data/lib/openai/models/conversations/conversation_item.rb +5 -1
  100. data/lib/openai/models/conversations/conversation_item_list.rb +2 -2
  101. data/lib/openai/models/conversations/item_create_params.rb +2 -2
  102. data/lib/openai/models/error_object.rb +90 -1
  103. data/lib/openai/models/eval_create_response.rb +1 -1
  104. data/lib/openai/models/eval_list_response.rb +1 -1
  105. data/lib/openai/models/eval_retrieve_response.rb +1 -1
  106. data/lib/openai/models/eval_update_response.rb +1 -1
  107. data/lib/openai/models/evals/create_eval_completions_run_data_source.rb +2 -2
  108. data/lib/openai/models/responses/custom_tool.rb +13 -1
  109. data/lib/openai/models/responses/function_tool.rb +8 -1
  110. data/lib/openai/models/responses/input_token_count_params.rb +3 -3
  111. data/lib/openai/models/responses/namespace_tool.rb +10 -1
  112. data/lib/openai/models/responses/response.rb +151 -14
  113. data/lib/openai/models/responses/response_compact_params.rb +23 -18
  114. data/lib/openai/models/responses/response_configuration_update_item.rb +56 -0
  115. data/lib/openai/models/responses/response_configuration_update_item_param.rb +57 -0
  116. data/lib/openai/models/responses/response_create_params.rb +15 -6
  117. data/lib/openai/models/responses/response_custom_tool_call.rb +9 -1
  118. data/lib/openai/models/responses/response_custom_tool_call_item.rb +3 -1
  119. data/lib/openai/models/responses/response_error.rb +96 -1
  120. data/lib/openai/models/responses/response_function_call_arguments_done_event.rb +1 -9
  121. data/lib/openai/models/responses/response_function_tool_call.rb +9 -1
  122. data/lib/openai/models/responses/response_function_tool_call_item.rb +3 -1
  123. data/lib/openai/models/responses/response_function_web_search.rb +1 -0
  124. data/lib/openai/models/responses/response_incomplete_event.rb +4 -0
  125. data/lib/openai/models/responses/response_input_item.rb +6 -1
  126. data/lib/openai/models/responses/response_item.rb +5 -1
  127. data/lib/openai/models/responses/response_item_list.rb +2 -2
  128. data/lib/openai/models/responses/response_steer_accepted_event.rb +79 -0
  129. data/lib/openai/models/responses/response_steer_error_code.rb +59 -0
  130. data/lib/openai/models/responses/response_steer_event.rb +73 -0
  131. data/lib/openai/models/responses/response_steer_failed_event.rb +149 -0
  132. data/lib/openai/models/responses/response_steer_input.rb +304 -0
  133. data/lib/openai/models/responses/response_steer_input_content.rb +26 -0
  134. data/lib/openai/models/responses/response_steer_pending_event.rb +111 -0
  135. data/lib/openai/models/responses/response_steer_pending_reason.rb +24 -0
  136. data/lib/openai/models/responses/response_steer_required_input.rb +213 -0
  137. data/lib/openai/models/responses/response_stream_event.rb +4 -0
  138. data/lib/openai/models/responses/responses_client_event.rb +881 -769
  139. data/lib/openai/models/responses/responses_server_event.rb +163 -5
  140. data/lib/openai/models/safety/alert_retrieve_params.rb +24 -0
  141. data/lib/openai/models/safety/safety_alert.rb +96 -0
  142. data/lib/openai/models/video_create_error.rb +93 -1
  143. data/lib/openai/models/webhooks/safety_alert_created_webhook_event.rb +63 -0
  144. data/lib/openai/models/webhooks/safety_org_alert_created_webhook_event.rb +63 -0
  145. data/lib/openai/models/webhooks/unwrap_webhook_event.rb +7 -1
  146. data/lib/openai/models.rb +2 -0
  147. data/lib/openai/net_http_client.rb +17 -3
  148. data/lib/openai/providers/bedrock.rb +22 -13
  149. data/lib/openai/request_options.rb +18 -4
  150. data/lib/openai/resources/admin/organization/projects/service_accounts/api_keys.rb +3 -1
  151. data/lib/openai/resources/beta/responses/input_items.rb +1 -1
  152. data/lib/openai/resources/beta/responses/input_tokens.rb +1 -1
  153. data/lib/openai/resources/beta/responses.rb +6 -6
  154. data/lib/openai/resources/chat/completions.rb +2 -2
  155. data/lib/openai/resources/containers/files.rb +1 -0
  156. data/lib/openai/resources/conversations/items.rb +3 -3
  157. data/lib/openai/resources/conversations.rb +1 -1
  158. data/lib/openai/resources/responses/input_items.rb +1 -1
  159. data/lib/openai/resources/responses/input_tokens.rb +1 -1
  160. data/lib/openai/resources/responses.rb +42 -10
  161. data/lib/openai/resources/safety/alerts.rb +37 -0
  162. data/lib/openai/resources/safety.rb +18 -0
  163. data/lib/openai/resources/webhooks.rb +1 -1
  164. data/lib/openai/response_carrier.rb +42 -0
  165. data/lib/openai/version.rb +1 -1
  166. data/lib/openai.rb +32 -0
  167. data/rbi/openai/auth/subject_token_providers.rbi +72 -0
  168. data/rbi/openai/client.rbi +3 -0
  169. data/rbi/openai/errors.rbi +53 -4
  170. data/rbi/openai/file_part.rbi +5 -0
  171. data/rbi/openai/helpers/realtime/extensions.rbi +3 -3
  172. data/rbi/openai/helpers/responses_websocket/connection.rbi +82 -0
  173. data/rbi/openai/helpers/responses_websocket/connection_manager.rbi +39 -0
  174. data/rbi/openai/helpers/responses_websocket/connection_resources.rbi +17 -0
  175. data/rbi/openai/helpers/responses_websocket/extensions.rbi +108 -0
  176. data/rbi/openai/helpers/responses_websocket/transports/async_websocket.rbi +28 -0
  177. data/rbi/openai/helpers/responses_websocket/unknown_server_event.rbi +29 -0
  178. data/rbi/openai/helpers/streaming/chat_completion_stream.rbi +214 -0
  179. data/rbi/openai/helpers/streaming/events.rbi +61 -4
  180. data/rbi/openai/helpers/streaming/exceptions.rbi +30 -0
  181. data/rbi/openai/helpers/streaming/response_stream.rbi +7 -3
  182. data/rbi/openai/helpers/structured_output/response_parser.rbi +23 -0
  183. data/rbi/openai/helpers/websocket.rbi +33 -0
  184. data/rbi/openai/internal/transport/base_client.rbi +11 -0
  185. data/rbi/openai/internal/type/base_stream.rbi +4 -0
  186. data/rbi/openai/internal/util.rbi +1 -0
  187. data/rbi/openai/models/admin/organization/projects/service_accounts/api_key_create_params.rbi +10 -0
  188. data/rbi/openai/models/admin/organization/projects/service_accounts/api_key_create_response.rbi +19 -1
  189. data/rbi/openai/models/admin/organization/usage_costs_params.rbi +2 -2
  190. data/rbi/openai/models/batch.rbi +2 -2
  191. data/rbi/openai/models/beta/beta_custom_tool.rbi +15 -0
  192. data/rbi/openai/models/beta/beta_function_tool.rbi +11 -0
  193. data/rbi/openai/models/beta/beta_namespace_tool.rbi +15 -0
  194. data/rbi/openai/models/beta/beta_response.rbi +301 -9
  195. data/rbi/openai/models/beta/beta_response_configuration_update_item.rbi +200 -0
  196. data/rbi/openai/models/beta/beta_response_configuration_update_item_param.rbi +207 -0
  197. data/rbi/openai/models/beta/beta_response_custom_tool_call.rbi +13 -0
  198. data/rbi/openai/models/beta/beta_response_custom_tool_call_item.rbi +6 -0
  199. data/rbi/openai/models/beta/beta_response_error.rbi +161 -3
  200. data/rbi/openai/models/beta/beta_response_function_call_arguments_done_event.rbi +0 -10
  201. data/rbi/openai/models/beta/beta_response_function_tool_call.rbi +13 -0
  202. data/rbi/openai/models/beta/beta_response_function_tool_call_item.rbi +6 -0
  203. data/rbi/openai/models/beta/beta_response_function_web_search.rbi +1 -0
  204. data/rbi/openai/models/beta/beta_response_incomplete_event.rbi +4 -0
  205. data/rbi/openai/models/beta/beta_response_inject_created_event.rbi +1 -1
  206. data/rbi/openai/models/beta/beta_response_inject_event.rbi +3 -0
  207. data/rbi/openai/models/beta/beta_response_inject_failed_event.rbi +4 -1
  208. data/rbi/openai/models/beta/beta_response_input_item.rbi +1 -0
  209. data/rbi/openai/models/beta/beta_response_item.rbi +1 -0
  210. data/rbi/openai/models/beta/beta_response_steer_accepted_event.rbi +148 -0
  211. data/rbi/openai/models/beta/beta_response_steer_error_code.rbi +65 -0
  212. data/rbi/openai/models/beta/beta_response_steer_event.rbi +118 -0
  213. data/rbi/openai/models/beta/beta_response_steer_failed_event.rbi +271 -0
  214. data/rbi/openai/models/beta/beta_response_steer_input.rbi +602 -0
  215. data/rbi/openai/models/beta/beta_response_steer_input_content.rbi +31 -0
  216. data/rbi/openai/models/beta/beta_response_steer_pending_event.rbi +222 -0
  217. data/rbi/openai/models/beta/beta_response_steer_pending_reason.rbi +35 -0
  218. data/rbi/openai/models/beta/beta_response_steer_required_input.rbi +379 -0
  219. data/rbi/openai/models/beta/beta_responses_client_event.rbi +72 -43
  220. data/rbi/openai/models/beta/beta_responses_server_event.rbi +283 -80
  221. data/rbi/openai/models/beta/response_compact_params.rbi +25 -21
  222. data/rbi/openai/models/beta/response_create_params.rbi +16 -3
  223. data/rbi/openai/models/beta/responses/beta_response_item_list.rbi +1 -0
  224. data/rbi/openai/models/chat/completion_create_params.rbi +3 -3
  225. data/rbi/openai/models/chat_model.rbi +1 -0
  226. data/rbi/openai/models/conversations/conversation_create_params.rbi +3 -0
  227. data/rbi/openai/models/conversations/conversation_item.rbi +1 -0
  228. data/rbi/openai/models/conversations/conversation_item_list.rbi +1 -0
  229. data/rbi/openai/models/conversations/item_create_params.rbi +3 -0
  230. data/rbi/openai/models/error_object.rbi +156 -3
  231. data/rbi/openai/models/eval_create_response.rbi +1 -1
  232. data/rbi/openai/models/eval_list_response.rbi +1 -1
  233. data/rbi/openai/models/eval_retrieve_response.rbi +1 -1
  234. data/rbi/openai/models/eval_update_response.rbi +1 -1
  235. data/rbi/openai/models/evals/create_eval_completions_run_data_source.rbi +2 -2
  236. data/rbi/openai/models/realtime/conversation_created_event.rbi +4 -1
  237. data/rbi/openai/models/realtime/conversation_item_create_event.rbi +2 -2
  238. data/rbi/openai/models/realtime/conversation_item_delete_event.rbi +1 -1
  239. data/rbi/openai/models/realtime/conversation_item_input_audio_transcription_completed_event.rbi +5 -3
  240. data/rbi/openai/models/realtime/conversation_item_input_audio_transcription_delta_event.rbi +2 -2
  241. data/rbi/openai/models/realtime/conversation_item_input_audio_transcription_failed_event.rbi +1 -1
  242. data/rbi/openai/models/realtime/conversation_item_retrieve_event.rbi +1 -1
  243. data/rbi/openai/models/realtime/conversation_item_truncate_event.rbi +1 -1
  244. data/rbi/openai/models/realtime/input_audio_buffer_append_event.rbi +1 -1
  245. data/rbi/openai/models/realtime/input_audio_buffer_clear_event.rbi +1 -1
  246. data/rbi/openai/models/realtime/input_audio_buffer_commit_event.rbi +1 -1
  247. data/rbi/openai/models/realtime/output_audio_buffer_clear_event.rbi +1 -1
  248. data/rbi/openai/models/realtime/rate_limits_updated_event.rbi +4 -4
  249. data/rbi/openai/models/realtime/response_cancel_event.rbi +1 -1
  250. data/rbi/openai/models/realtime/response_content_part_added_event.rbi +4 -4
  251. data/rbi/openai/models/realtime/response_content_part_done_event.rbi +4 -4
  252. data/rbi/openai/models/realtime/response_create_event.rbi +5 -1
  253. data/rbi/openai/models/realtime/session_update_event.rbi +1 -1
  254. data/rbi/openai/models/responses/custom_tool.rbi +15 -0
  255. data/rbi/openai/models/responses/function_tool.rbi +11 -0
  256. data/rbi/openai/models/responses/namespace_tool.rbi +15 -0
  257. data/rbi/openai/models/responses/response.rbi +299 -8
  258. data/rbi/openai/models/responses/response_compact_params.rbi +25 -21
  259. data/rbi/openai/models/responses/response_configuration_update_item.rbi +112 -0
  260. data/rbi/openai/models/responses/response_configuration_update_item_param.rbi +117 -0
  261. data/rbi/openai/models/responses/response_create_params.rbi +14 -2
  262. data/rbi/openai/models/responses/response_custom_tool_call.rbi +13 -0
  263. data/rbi/openai/models/responses/response_custom_tool_call_item.rbi +6 -0
  264. data/rbi/openai/models/responses/response_error.rbi +161 -3
  265. data/rbi/openai/models/responses/response_function_call_arguments_done_event.rbi +1 -17
  266. data/rbi/openai/models/responses/response_function_tool_call.rbi +13 -0
  267. data/rbi/openai/models/responses/response_function_tool_call_item.rbi +6 -0
  268. data/rbi/openai/models/responses/response_function_web_search.rbi +1 -0
  269. data/rbi/openai/models/responses/response_incomplete_event.rbi +4 -0
  270. data/rbi/openai/models/responses/response_input_item.rbi +1 -0
  271. data/rbi/openai/models/responses/response_item.rbi +1 -0
  272. data/rbi/openai/models/responses/response_item_list.rbi +1 -0
  273. data/rbi/openai/models/responses/response_steer_accepted_event.rbi +146 -0
  274. data/rbi/openai/models/responses/response_steer_error_code.rbi +63 -0
  275. data/rbi/openai/models/responses/response_steer_event.rbi +119 -0
  276. data/rbi/openai/models/responses/response_steer_failed_event.rbi +272 -0
  277. data/rbi/openai/models/responses/response_steer_input.rbi +474 -0
  278. data/rbi/openai/models/responses/response_steer_input_content.rbi +29 -0
  279. data/rbi/openai/models/responses/response_steer_pending_event.rbi +220 -0
  280. data/rbi/openai/models/responses/response_steer_pending_reason.rbi +33 -0
  281. data/rbi/openai/models/responses/response_steer_required_input.rbi +377 -0
  282. data/rbi/openai/models/responses/responses_client_event.rbi +1228 -1036
  283. data/rbi/openai/models/responses/responses_server_event.rbi +410 -75
  284. data/rbi/openai/models/safety/alert_retrieve_params.rbi +55 -0
  285. data/rbi/openai/models/safety/safety_alert.rbi +147 -0
  286. data/rbi/openai/models/video_create_error.rbi +149 -3
  287. data/rbi/openai/models/webhooks/safety_alert_created_webhook_event.rbi +130 -0
  288. data/rbi/openai/models/webhooks/safety_org_alert_created_webhook_event.rbi +130 -0
  289. data/rbi/openai/models/webhooks/unwrap_webhook_event.rbi +3 -1
  290. data/rbi/openai/models.rbi +2 -0
  291. data/rbi/openai/resources/admin/organization/projects/service_accounts/api_keys.rbi +3 -0
  292. data/rbi/openai/resources/admin/organization/usage.rbi +1 -1
  293. data/rbi/openai/resources/audio/speech.rbi +1 -1
  294. data/rbi/openai/resources/beta/responses.rbi +10 -9
  295. data/rbi/openai/resources/chat/completions.rbi +2 -2
  296. data/rbi/openai/resources/containers/files/content.rbi +1 -1
  297. data/rbi/openai/resources/conversations/items.rbi +1 -0
  298. data/rbi/openai/resources/conversations.rbi +1 -0
  299. data/rbi/openai/resources/files.rbi +5 -1
  300. data/rbi/openai/resources/responses.rbi +155 -9
  301. data/rbi/openai/resources/safety/alerts.rbi +30 -0
  302. data/rbi/openai/resources/safety.rbi +18 -0
  303. data/rbi/openai/resources/skills/content.rbi +5 -1
  304. data/rbi/openai/resources/skills/versions/content.rbi +3 -1
  305. data/rbi/openai/resources/videos.rbi +1 -1
  306. data/rbi/openai/resources/webhooks.rbi +3 -1
  307. data/rbi/openai/response_carrier.rbi +25 -0
  308. data/sig/openai/auth/subject_token_providers.rbs +42 -0
  309. data/sig/openai/client.rbs +2 -0
  310. data/sig/openai/errors.rbs +36 -2
  311. data/sig/openai/file_part.rbs +3 -0
  312. data/sig/openai/helpers/realtime/extensions.rbs +2 -2
  313. data/sig/openai/helpers/responses_websocket/connection.rbs +48 -0
  314. data/sig/openai/helpers/responses_websocket/connection_manager.rbs +19 -0
  315. data/sig/openai/helpers/responses_websocket/connection_resources.rbs +12 -0
  316. data/sig/openai/helpers/responses_websocket/extensions.rbs +55 -0
  317. data/sig/openai/helpers/responses_websocket/transports/async_websocket.rbs +19 -0
  318. data/sig/openai/helpers/responses_websocket/unknown_server_event.rbs +15 -0
  319. data/sig/openai/helpers/streaming/exceptions.rbs +24 -0
  320. data/sig/openai/helpers/streaming/response_stream.rbs +103 -0
  321. data/sig/openai/helpers/structured_output/response_parser.rbs +10 -0
  322. data/sig/openai/helpers/websocket.rbs +18 -0
  323. data/sig/openai/internal/transport/base_client.rbs +5 -0
  324. data/sig/openai/internal/type/base_stream.rbs +2 -0
  325. data/sig/openai/internal/type/request_parameters.rbs +1 -1
  326. data/sig/openai/internal/util.rbs +1 -0
  327. data/sig/openai/models/admin/organization/admin_api_key.rbs +18 -18
  328. data/sig/openai/models/admin/organization/admin_api_key_create_params.rbs +7 -4
  329. data/sig/openai/models/admin/organization/admin_api_key_create_response.rbs +6 -6
  330. data/sig/openai/models/admin/organization/admin_api_key_delete_params.rbs +2 -2
  331. data/sig/openai/models/admin/organization/admin_api_key_delete_response.rbs +2 -2
  332. data/sig/openai/models/admin/organization/admin_api_key_list_params.rbs +8 -8
  333. data/sig/openai/models/admin/organization/admin_api_key_retrieve_params.rbs +2 -2
  334. data/sig/openai/models/admin/organization/audit_log_list_params.rbs +27 -27
  335. data/sig/openai/models/admin/organization/audit_log_list_response.rbs +428 -423
  336. data/sig/openai/models/admin/organization/certificate.rbs +6 -6
  337. data/sig/openai/models/admin/organization/certificate_activate_params.rbs +5 -3
  338. data/sig/openai/models/admin/organization/certificate_activate_response.rbs +5 -4
  339. data/sig/openai/models/admin/organization/certificate_create_params.rbs +7 -4
  340. data/sig/openai/models/admin/organization/certificate_deactivate_params.rbs +5 -3
  341. data/sig/openai/models/admin/organization/certificate_deactivate_response.rbs +5 -4
  342. data/sig/openai/models/admin/organization/certificate_delete_params.rbs +2 -3
  343. data/sig/openai/models/admin/organization/certificate_delete_response.rbs +2 -2
  344. data/sig/openai/models/admin/organization/certificate_list_params.rbs +8 -8
  345. data/sig/openai/models/admin/organization/certificate_list_response.rbs +5 -4
  346. data/sig/openai/models/admin/organization/certificate_retrieve_params.rbs +4 -4
  347. data/sig/openai/models/admin/organization/certificate_update_params.rbs +7 -4
  348. data/sig/openai/models/admin/organization/data_retention_retrieve_params.rbs +2 -2
  349. data/sig/openai/models/admin/organization/data_retention_update_params.rbs +3 -3
  350. data/sig/openai/models/admin/organization/group_create_params.rbs +2 -2
  351. data/sig/openai/models/admin/organization/group_delete_params.rbs +2 -2
  352. data/sig/openai/models/admin/organization/group_delete_response.rbs +2 -2
  353. data/sig/openai/models/admin/organization/group_list_params.rbs +8 -8
  354. data/sig/openai/models/admin/organization/group_retrieve_params.rbs +2 -2
  355. data/sig/openai/models/admin/organization/group_update_params.rbs +6 -3
  356. data/sig/openai/models/admin/organization/groups/role_create_params.rbs +6 -3
  357. data/sig/openai/models/admin/organization/groups/role_create_response.rbs +4 -4
  358. data/sig/openai/models/admin/organization/groups/role_delete_params.rbs +6 -3
  359. data/sig/openai/models/admin/organization/groups/role_list_params.rbs +8 -8
  360. data/sig/openai/models/admin/organization/groups/role_retrieve_params.rbs +6 -3
  361. data/sig/openai/models/admin/organization/groups/user_create_params.rbs +6 -3
  362. data/sig/openai/models/admin/organization/groups/user_create_response.rbs +2 -2
  363. data/sig/openai/models/admin/organization/groups/user_delete_params.rbs +6 -3
  364. data/sig/openai/models/admin/organization/groups/user_delete_response.rbs +2 -2
  365. data/sig/openai/models/admin/organization/groups/user_list_params.rbs +8 -8
  366. data/sig/openai/models/admin/organization/groups/user_retrieve_params.rbs +6 -3
  367. data/sig/openai/models/admin/organization/invite.rbs +6 -6
  368. data/sig/openai/models/admin/organization/invite_create_params.rbs +4 -4
  369. data/sig/openai/models/admin/organization/invite_delete_params.rbs +2 -2
  370. data/sig/openai/models/admin/organization/invite_delete_response.rbs +2 -2
  371. data/sig/openai/models/admin/organization/invite_list_params.rbs +8 -5
  372. data/sig/openai/models/admin/organization/invite_retrieve_params.rbs +2 -2
  373. data/sig/openai/models/admin/organization/organization_data_retention.rbs +2 -2
  374. data/sig/openai/models/admin/organization/organization_spend_alert.rbs +6 -6
  375. data/sig/openai/models/admin/organization/organization_spend_alert_deleted.rbs +2 -2
  376. data/sig/openai/models/admin/organization/organization_spend_limit.rbs +2 -2
  377. data/sig/openai/models/admin/organization/organization_spend_limit_deleted.rbs +2 -2
  378. data/sig/openai/models/admin/organization/organization_user.rbs +46 -46
  379. data/sig/openai/models/admin/organization/project.rbs +12 -12
  380. data/sig/openai/models/admin/organization/project_archive_params.rbs +2 -2
  381. data/sig/openai/models/admin/organization/project_create_params.rbs +8 -8
  382. data/sig/openai/models/admin/organization/project_list_params.rbs +10 -6
  383. data/sig/openai/models/admin/organization/project_retrieve_params.rbs +2 -2
  384. data/sig/openai/models/admin/organization/project_update_params.rbs +8 -8
  385. data/sig/openai/models/admin/organization/projects/api_key_delete_params.rbs +6 -3
  386. data/sig/openai/models/admin/organization/projects/api_key_delete_response.rbs +2 -2
  387. data/sig/openai/models/admin/organization/projects/api_key_list_params.rbs +8 -8
  388. data/sig/openai/models/admin/organization/projects/api_key_retrieve_params.rbs +6 -3
  389. data/sig/openai/models/admin/organization/projects/certificate_activate_params.rbs +6 -3
  390. data/sig/openai/models/admin/organization/projects/certificate_activate_response.rbs +4 -4
  391. data/sig/openai/models/admin/organization/projects/certificate_deactivate_params.rbs +6 -3
  392. data/sig/openai/models/admin/organization/projects/certificate_deactivate_response.rbs +4 -4
  393. data/sig/openai/models/admin/organization/projects/certificate_list_params.rbs +8 -8
  394. data/sig/openai/models/admin/organization/projects/certificate_list_response.rbs +4 -4
  395. data/sig/openai/models/admin/organization/projects/data_retention_retrieve_params.rbs +2 -2
  396. data/sig/openai/models/admin/organization/projects/data_retention_update_params.rbs +3 -3
  397. data/sig/openai/models/admin/organization/projects/group_create_params.rbs +7 -3
  398. data/sig/openai/models/admin/organization/projects/group_delete_params.rbs +6 -3
  399. data/sig/openai/models/admin/organization/projects/group_delete_response.rbs +2 -2
  400. data/sig/openai/models/admin/organization/projects/group_list_params.rbs +8 -8
  401. data/sig/openai/models/admin/organization/projects/group_retrieve_params.rbs +4 -4
  402. data/sig/openai/models/admin/organization/projects/groups/role_create_params.rbs +7 -3
  403. data/sig/openai/models/admin/organization/projects/groups/role_create_response.rbs +4 -4
  404. data/sig/openai/models/admin/organization/projects/groups/role_delete_params.rbs +7 -3
  405. data/sig/openai/models/admin/organization/projects/groups/role_list_params.rbs +8 -8
  406. data/sig/openai/models/admin/organization/projects/groups/role_retrieve_params.rbs +7 -3
  407. data/sig/openai/models/admin/organization/projects/hosted_tool_permission_retrieve_params.rbs +2 -2
  408. data/sig/openai/models/admin/organization/projects/hosted_tool_permission_update_params.rbs +12 -12
  409. data/sig/openai/models/admin/organization/projects/model_permission_delete_params.rbs +2 -2
  410. data/sig/openai/models/admin/organization/projects/model_permission_retrieve_params.rbs +2 -2
  411. data/sig/openai/models/admin/organization/projects/model_permission_update_params.rbs +3 -3
  412. data/sig/openai/models/admin/organization/projects/project_api_key.rbs +8 -8
  413. data/sig/openai/models/admin/organization/projects/project_data_retention.rbs +2 -2
  414. data/sig/openai/models/admin/organization/projects/project_group.rbs +2 -2
  415. data/sig/openai/models/admin/organization/projects/project_model_permissions.rbs +2 -2
  416. data/sig/openai/models/admin/organization/projects/project_model_permissions_deleted.rbs +2 -2
  417. data/sig/openai/models/admin/organization/projects/project_rate_limit.rbs +10 -10
  418. data/sig/openai/models/admin/organization/projects/project_service_account.rbs +2 -2
  419. data/sig/openai/models/admin/organization/projects/project_spend_alert.rbs +6 -6
  420. data/sig/openai/models/admin/organization/projects/project_spend_alert_deleted.rbs +2 -2
  421. data/sig/openai/models/admin/organization/projects/project_spend_limit.rbs +2 -2
  422. data/sig/openai/models/admin/organization/projects/project_spend_limit_deleted.rbs +2 -2
  423. data/sig/openai/models/admin/organization/projects/project_user.rbs +6 -6
  424. data/sig/openai/models/admin/organization/projects/rate_limit_list_rate_limits_params.rbs +8 -8
  425. data/sig/openai/models/admin/organization/projects/rate_limit_update_rate_limit_params.rbs +14 -14
  426. data/sig/openai/models/admin/organization/projects/role_create_params.rbs +4 -4
  427. data/sig/openai/models/admin/organization/projects/role_delete_params.rbs +6 -3
  428. data/sig/openai/models/admin/organization/projects/role_delete_response.rbs +2 -2
  429. data/sig/openai/models/admin/organization/projects/role_list_params.rbs +8 -8
  430. data/sig/openai/models/admin/organization/projects/role_retrieve_params.rbs +6 -3
  431. data/sig/openai/models/admin/organization/projects/role_update_params.rbs +8 -8
  432. data/sig/openai/models/admin/organization/projects/service_account_create_params.rbs +4 -4
  433. data/sig/openai/models/admin/organization/projects/service_account_create_response.rbs +4 -4
  434. data/sig/openai/models/admin/organization/projects/service_account_delete_params.rbs +6 -3
  435. data/sig/openai/models/admin/organization/projects/service_account_delete_response.rbs +2 -2
  436. data/sig/openai/models/admin/organization/projects/service_account_list_params.rbs +9 -5
  437. data/sig/openai/models/admin/organization/projects/service_account_retrieve_params.rbs +6 -3
  438. data/sig/openai/models/admin/organization/projects/service_account_update_params.rbs +6 -6
  439. data/sig/openai/models/admin/organization/projects/service_accounts/api_key_create_params.rbs +11 -6
  440. data/sig/openai/models/admin/organization/projects/service_accounts/api_key_create_response.rbs +9 -4
  441. data/sig/openai/models/admin/organization/projects/spend_alert_create_params.rbs +7 -7
  442. data/sig/openai/models/admin/organization/projects/spend_alert_delete_params.rbs +6 -3
  443. data/sig/openai/models/admin/organization/projects/spend_alert_list_params.rbs +10 -10
  444. data/sig/openai/models/admin/organization/projects/spend_alert_retrieve_params.rbs +6 -3
  445. data/sig/openai/models/admin/organization/projects/spend_alert_update_params.rbs +7 -7
  446. data/sig/openai/models/admin/organization/projects/spend_limit_delete_params.rbs +2 -2
  447. data/sig/openai/models/admin/organization/projects/spend_limit_retrieve_params.rbs +2 -2
  448. data/sig/openai/models/admin/organization/projects/spend_limit_update_params.rbs +3 -3
  449. data/sig/openai/models/admin/organization/projects/user_create_params.rbs +6 -6
  450. data/sig/openai/models/admin/organization/projects/user_delete_params.rbs +6 -3
  451. data/sig/openai/models/admin/organization/projects/user_delete_response.rbs +2 -2
  452. data/sig/openai/models/admin/organization/projects/user_list_params.rbs +9 -5
  453. data/sig/openai/models/admin/organization/projects/user_retrieve_params.rbs +6 -3
  454. data/sig/openai/models/admin/organization/projects/user_update_params.rbs +8 -4
  455. data/sig/openai/models/admin/organization/projects/users/role_create_params.rbs +7 -3
  456. data/sig/openai/models/admin/organization/projects/users/role_create_response.rbs +2 -2
  457. data/sig/openai/models/admin/organization/projects/users/role_delete_params.rbs +7 -3
  458. data/sig/openai/models/admin/organization/projects/users/role_list_params.rbs +8 -8
  459. data/sig/openai/models/admin/organization/projects/users/role_retrieve_params.rbs +7 -3
  460. data/sig/openai/models/admin/organization/role.rbs +2 -2
  461. data/sig/openai/models/admin/organization/role_create_params.rbs +4 -4
  462. data/sig/openai/models/admin/organization/role_delete_params.rbs +2 -2
  463. data/sig/openai/models/admin/organization/role_delete_response.rbs +6 -2
  464. data/sig/openai/models/admin/organization/role_list_params.rbs +8 -8
  465. data/sig/openai/models/admin/organization/role_retrieve_params.rbs +2 -2
  466. data/sig/openai/models/admin/organization/role_update_params.rbs +8 -8
  467. data/sig/openai/models/admin/organization/spend_alert_create_params.rbs +7 -7
  468. data/sig/openai/models/admin/organization/spend_alert_delete_params.rbs +2 -2
  469. data/sig/openai/models/admin/organization/spend_alert_list_params.rbs +10 -10
  470. data/sig/openai/models/admin/organization/spend_alert_retrieve_params.rbs +2 -2
  471. data/sig/openai/models/admin/organization/spend_alert_update_params.rbs +7 -7
  472. data/sig/openai/models/admin/organization/spend_limit_delete_params.rbs +2 -2
  473. data/sig/openai/models/admin/organization/spend_limit_retrieve_params.rbs +2 -2
  474. data/sig/openai/models/admin/organization/spend_limit_update_params.rbs +3 -3
  475. data/sig/openai/models/admin/organization/usage_audio_speeches_params.rbs +20 -20
  476. data/sig/openai/models/admin/organization/usage_audio_speeches_response.rbs +142 -142
  477. data/sig/openai/models/admin/organization/usage_audio_transcriptions_params.rbs +20 -20
  478. data/sig/openai/models/admin/organization/usage_audio_transcriptions_response.rbs +142 -142
  479. data/sig/openai/models/admin/organization/usage_code_interpreter_sessions_params.rbs +14 -14
  480. data/sig/openai/models/admin/organization/usage_code_interpreter_sessions_response.rbs +142 -142
  481. data/sig/openai/models/admin/organization/usage_completions_params.rbs +22 -22
  482. data/sig/openai/models/admin/organization/usage_completions_response.rbs +142 -142
  483. data/sig/openai/models/admin/organization/usage_costs_params.rbs +18 -18
  484. data/sig/openai/models/admin/organization/usage_costs_response.rbs +142 -142
  485. data/sig/openai/models/admin/organization/usage_embeddings_params.rbs +20 -20
  486. data/sig/openai/models/admin/organization/usage_embeddings_response.rbs +142 -142
  487. data/sig/openai/models/admin/organization/usage_file_search_calls_params.rbs +20 -20
  488. data/sig/openai/models/admin/organization/usage_file_search_calls_response.rbs +142 -142
  489. data/sig/openai/models/admin/organization/usage_images_params.rbs +24 -24
  490. data/sig/openai/models/admin/organization/usage_images_response.rbs +142 -142
  491. data/sig/openai/models/admin/organization/usage_moderations_params.rbs +20 -20
  492. data/sig/openai/models/admin/organization/usage_moderations_response.rbs +142 -142
  493. data/sig/openai/models/admin/organization/usage_vector_stores_params.rbs +14 -14
  494. data/sig/openai/models/admin/organization/usage_vector_stores_response.rbs +142 -142
  495. data/sig/openai/models/admin/organization/usage_web_search_calls_params.rbs +22 -22
  496. data/sig/openai/models/admin/organization/usage_web_search_calls_response.rbs +142 -142
  497. data/sig/openai/models/admin/organization/user_delete_params.rbs +2 -2
  498. data/sig/openai/models/admin/organization/user_delete_response.rbs +2 -2
  499. data/sig/openai/models/admin/organization/user_list_params.rbs +10 -6
  500. data/sig/openai/models/admin/organization/user_retrieve_params.rbs +2 -2
  501. data/sig/openai/models/admin/organization/user_update_params.rbs +10 -10
  502. data/sig/openai/models/admin/organization/users/role_create_params.rbs +6 -3
  503. data/sig/openai/models/admin/organization/users/role_create_response.rbs +2 -2
  504. data/sig/openai/models/admin/organization/users/role_delete_params.rbs +6 -3
  505. data/sig/openai/models/admin/organization/users/role_list_params.rbs +8 -8
  506. data/sig/openai/models/admin/organization/users/role_retrieve_params.rbs +6 -3
  507. data/sig/openai/models/audio/speech_create_params.rbs +10 -10
  508. data/sig/openai/models/audio/transcription.rbs +19 -18
  509. data/sig/openai/models/audio/transcription_create_params.rbs +30 -30
  510. data/sig/openai/models/audio/transcription_diarized.rbs +12 -12
  511. data/sig/openai/models/audio/transcription_diarized_segment.rbs +2 -2
  512. data/sig/openai/models/audio/transcription_text_delta_event.rbs +10 -10
  513. data/sig/openai/models/audio/transcription_text_done_event.rbs +18 -18
  514. data/sig/openai/models/audio/transcription_text_segment_event.rbs +2 -2
  515. data/sig/openai/models/audio/transcription_verbose.rbs +8 -8
  516. data/sig/openai/models/audio/translation_create_params.rbs +8 -8
  517. data/sig/openai/models/audio/translation_verbose.rbs +2 -2
  518. data/sig/openai/models/auto_file_chunking_strategy_param.rbs +2 -2
  519. data/sig/openai/models/batch.rbs +34 -34
  520. data/sig/openai/models/batch_cancel_params.rbs +2 -2
  521. data/sig/openai/models/batch_create_params.rbs +8 -8
  522. data/sig/openai/models/batch_error.rbs +5 -5
  523. data/sig/openai/models/batch_list_params.rbs +8 -5
  524. data/sig/openai/models/batch_retrieve_params.rbs +2 -2
  525. data/sig/openai/models/beta/assistant.rbs +18 -18
  526. data/sig/openai/models/beta/assistant_create_params.rbs +42 -42
  527. data/sig/openai/models/beta/assistant_delete_params.rbs +2 -2
  528. data/sig/openai/models/beta/assistant_deleted.rbs +2 -2
  529. data/sig/openai/models/beta/assistant_list_params.rbs +10 -10
  530. data/sig/openai/models/beta/assistant_retrieve_params.rbs +2 -2
  531. data/sig/openai/models/beta/assistant_stream_event.rbs +53 -50
  532. data/sig/openai/models/beta/assistant_tool_choice.rbs +2 -2
  533. data/sig/openai/models/beta/assistant_update_params.rbs +32 -32
  534. data/sig/openai/models/beta/beta_apply_patch_tool.rbs +4 -4
  535. data/sig/openai/models/beta/beta_compacted_response.rbs +2 -2
  536. data/sig/openai/models/beta/beta_computer_action.rbs +25 -25
  537. data/sig/openai/models/beta/beta_computer_tool.rbs +2 -2
  538. data/sig/openai/models/beta/beta_computer_use_preview_tool.rbs +2 -2
  539. data/sig/openai/models/beta/beta_container_auto.rbs +10 -10
  540. data/sig/openai/models/beta/beta_container_network_policy_allowlist.rbs +4 -4
  541. data/sig/openai/models/beta/beta_container_network_policy_disabled.rbs +2 -2
  542. data/sig/openai/models/beta/beta_container_reference.rbs +2 -2
  543. data/sig/openai/models/beta/beta_custom_tool.rbs +21 -14
  544. data/sig/openai/models/beta/beta_easy_input_message.rbs +4 -4
  545. data/sig/openai/models/beta/beta_file_search_tool.rbs +14 -14
  546. data/sig/openai/models/beta/beta_function_shell_tool.rbs +6 -6
  547. data/sig/openai/models/beta/beta_function_tool.rbs +17 -10
  548. data/sig/openai/models/beta/beta_inline_skill.rbs +2 -2
  549. data/sig/openai/models/beta/beta_inline_skill_source.rbs +3 -3
  550. data/sig/openai/models/beta/beta_local_environment.rbs +3 -3
  551. data/sig/openai/models/beta/beta_mcp_tool_call_error.rbs +6 -6
  552. data/sig/openai/models/beta/beta_namespace_tool.rbs +23 -16
  553. data/sig/openai/models/beta/beta_response.rbs +191 -69
  554. data/sig/openai/models/beta/beta_response_apply_patch_tool_call.rbs +18 -18
  555. data/sig/openai/models/beta/beta_response_apply_patch_tool_call_output.rbs +14 -14
  556. data/sig/openai/models/beta/beta_response_audio_delta_event.rbs +4 -4
  557. data/sig/openai/models/beta/beta_response_audio_done_event.rbs +4 -4
  558. data/sig/openai/models/beta/beta_response_audio_transcript_delta_event.rbs +4 -4
  559. data/sig/openai/models/beta/beta_response_audio_transcript_done_event.rbs +4 -4
  560. data/sig/openai/models/beta/beta_response_code_interpreter_call_code_delta_event.rbs +4 -4
  561. data/sig/openai/models/beta/beta_response_code_interpreter_call_code_done_event.rbs +4 -4
  562. data/sig/openai/models/beta/beta_response_code_interpreter_call_completed_event.rbs +4 -4
  563. data/sig/openai/models/beta/beta_response_code_interpreter_call_in_progress_event.rbs +4 -4
  564. data/sig/openai/models/beta/beta_response_code_interpreter_call_interpreting_event.rbs +4 -4
  565. data/sig/openai/models/beta/beta_response_code_interpreter_tool_call.rbs +8 -8
  566. data/sig/openai/models/beta/beta_response_compaction_item.rbs +6 -6
  567. data/sig/openai/models/beta/beta_response_compaction_item_param.rbs +6 -6
  568. data/sig/openai/models/beta/beta_response_completed_event.rbs +4 -4
  569. data/sig/openai/models/beta/beta_response_computer_tool_call.rbs +8 -8
  570. data/sig/openai/models/beta/beta_response_computer_tool_call_output_item.rbs +10 -10
  571. data/sig/openai/models/beta/beta_response_computer_tool_call_output_screenshot.rbs +4 -4
  572. data/sig/openai/models/beta/beta_response_configuration_update_item.rbs +91 -0
  573. data/sig/openai/models/beta/beta_response_configuration_update_item_param.rbs +87 -0
  574. data/sig/openai/models/beta/beta_response_container_reference.rbs +2 -2
  575. data/sig/openai/models/beta/beta_response_content.rbs +2 -2
  576. data/sig/openai/models/beta/beta_response_content_part_added_event.rbs +6 -6
  577. data/sig/openai/models/beta/beta_response_content_part_done_event.rbs +6 -6
  578. data/sig/openai/models/beta/beta_response_created_event.rbs +4 -4
  579. data/sig/openai/models/beta/beta_response_custom_tool_call.rbs +21 -14
  580. data/sig/openai/models/beta/beta_response_custom_tool_call_input_delta_event.rbs +4 -4
  581. data/sig/openai/models/beta/beta_response_custom_tool_call_input_done_event.rbs +4 -4
  582. data/sig/openai/models/beta/beta_response_custom_tool_call_item.rbs +13 -10
  583. data/sig/openai/models/beta/beta_response_custom_tool_call_output.rbs +12 -12
  584. data/sig/openai/models/beta/beta_response_custom_tool_call_output_item.rbs +8 -8
  585. data/sig/openai/models/beta/beta_response_error.rbs +82 -3
  586. data/sig/openai/models/beta/beta_response_error_event.rbs +4 -4
  587. data/sig/openai/models/beta/beta_response_failed_event.rbs +4 -4
  588. data/sig/openai/models/beta/beta_response_file_search_call_completed_event.rbs +4 -4
  589. data/sig/openai/models/beta/beta_response_file_search_call_in_progress_event.rbs +4 -4
  590. data/sig/openai/models/beta/beta_response_file_search_call_searching_event.rbs +4 -4
  591. data/sig/openai/models/beta/beta_response_file_search_tool_call.rbs +16 -16
  592. data/sig/openai/models/beta/beta_response_format_text_config.rbs +4 -4
  593. data/sig/openai/models/beta/beta_response_format_text_json_schema_config.rbs +6 -6
  594. data/sig/openai/models/beta/beta_response_function_call_arguments_delta_event.rbs +4 -4
  595. data/sig/openai/models/beta/beta_response_function_call_arguments_done_event.rbs +4 -9
  596. data/sig/openai/models/beta/beta_response_function_shell_call_output_content.rbs +4 -4
  597. data/sig/openai/models/beta/beta_response_function_shell_tool_call.rbs +12 -12
  598. data/sig/openai/models/beta/beta_response_function_shell_tool_call_output.rbs +18 -18
  599. data/sig/openai/models/beta/beta_response_function_tool_call.rbs +23 -16
  600. data/sig/openai/models/beta/beta_response_function_tool_call_item.rbs +13 -10
  601. data/sig/openai/models/beta/beta_response_function_tool_call_output_item.rbs +18 -18
  602. data/sig/openai/models/beta/beta_response_function_web_search.rbs +21 -19
  603. data/sig/openai/models/beta/beta_response_image_gen_call_completed_event.rbs +4 -4
  604. data/sig/openai/models/beta/beta_response_image_gen_call_generating_event.rbs +4 -4
  605. data/sig/openai/models/beta/beta_response_image_gen_call_in_progress_event.rbs +4 -4
  606. data/sig/openai/models/beta/beta_response_image_gen_call_partial_image_event.rbs +12 -12
  607. data/sig/openai/models/beta/beta_response_in_progress_event.rbs +4 -4
  608. data/sig/openai/models/beta/beta_response_incomplete_event.rbs +4 -4
  609. data/sig/openai/models/beta/beta_response_inject_created_event.rbs +4 -4
  610. data/sig/openai/models/beta/beta_response_inject_event.rbs +2 -2
  611. data/sig/openai/models/beta/beta_response_inject_failed_event.rbs +4 -4
  612. data/sig/openai/models/beta/beta_response_input_audio.rbs +2 -2
  613. data/sig/openai/models/beta/beta_response_input_file.rbs +16 -16
  614. data/sig/openai/models/beta/beta_response_input_file_content.rbs +16 -16
  615. data/sig/openai/models/beta/beta_response_input_image.rbs +10 -10
  616. data/sig/openai/models/beta/beta_response_input_image_content.rbs +12 -12
  617. data/sig/openai/models/beta/beta_response_input_item.rbs +237 -228
  618. data/sig/openai/models/beta/beta_response_input_message_item.rbs +6 -6
  619. data/sig/openai/models/beta/beta_response_input_text.rbs +6 -6
  620. data/sig/openai/models/beta/beta_response_input_text_content.rbs +6 -6
  621. data/sig/openai/models/beta/beta_response_item.rbs +93 -92
  622. data/sig/openai/models/beta/beta_response_local_environment.rbs +2 -2
  623. data/sig/openai/models/beta/beta_response_mcp_call_arguments_delta_event.rbs +4 -4
  624. data/sig/openai/models/beta/beta_response_mcp_call_arguments_done_event.rbs +4 -4
  625. data/sig/openai/models/beta/beta_response_mcp_call_completed_event.rbs +4 -4
  626. data/sig/openai/models/beta/beta_response_mcp_call_failed_event.rbs +4 -4
  627. data/sig/openai/models/beta/beta_response_mcp_call_in_progress_event.rbs +4 -4
  628. data/sig/openai/models/beta/beta_response_mcp_list_tools_completed_event.rbs +4 -4
  629. data/sig/openai/models/beta/beta_response_mcp_list_tools_failed_event.rbs +4 -4
  630. data/sig/openai/models/beta/beta_response_mcp_list_tools_in_progress_event.rbs +4 -4
  631. data/sig/openai/models/beta/beta_response_output_audio.rbs +2 -2
  632. data/sig/openai/models/beta/beta_response_output_item.rbs +92 -92
  633. data/sig/openai/models/beta/beta_response_output_item_added_event.rbs +4 -4
  634. data/sig/openai/models/beta/beta_response_output_item_done_event.rbs +4 -4
  635. data/sig/openai/models/beta/beta_response_output_message.rbs +8 -8
  636. data/sig/openai/models/beta/beta_response_output_refusal.rbs +2 -2
  637. data/sig/openai/models/beta/beta_response_output_text.rbs +13 -12
  638. data/sig/openai/models/beta/beta_response_output_text_annotation_added_event.rbs +13 -12
  639. data/sig/openai/models/beta/beta_response_prompt.rbs +4 -4
  640. data/sig/openai/models/beta/beta_response_queued_event.rbs +4 -4
  641. data/sig/openai/models/beta/beta_response_reasoning_item.rbs +14 -14
  642. data/sig/openai/models/beta/beta_response_reasoning_summary_part_added_event.rbs +6 -6
  643. data/sig/openai/models/beta/beta_response_reasoning_summary_part_done_event.rbs +8 -8
  644. data/sig/openai/models/beta/beta_response_reasoning_summary_text_delta_event.rbs +4 -4
  645. data/sig/openai/models/beta/beta_response_reasoning_summary_text_done_event.rbs +4 -4
  646. data/sig/openai/models/beta/beta_response_reasoning_text_delta_event.rbs +4 -4
  647. data/sig/openai/models/beta/beta_response_reasoning_text_done_event.rbs +4 -4
  648. data/sig/openai/models/beta/beta_response_refusal_delta_event.rbs +4 -4
  649. data/sig/openai/models/beta/beta_response_refusal_done_event.rbs +4 -4
  650. data/sig/openai/models/beta/beta_response_shell_call_command_added_event.rbs +4 -4
  651. data/sig/openai/models/beta/beta_response_shell_call_command_delta_event.rbs +6 -6
  652. data/sig/openai/models/beta/beta_response_shell_call_command_done_event.rbs +4 -4
  653. data/sig/openai/models/beta/beta_response_shell_call_output_content_delta_event.rbs +6 -6
  654. data/sig/openai/models/beta/beta_response_shell_call_output_content_done_event.rbs +10 -10
  655. data/sig/openai/models/beta/beta_response_steer_accepted_event.rbs +53 -0
  656. data/sig/openai/models/beta/beta_response_steer_error_code.rbs +31 -0
  657. data/sig/openai/models/beta/beta_response_steer_event.rbs +34 -0
  658. data/sig/openai/models/beta/beta_response_steer_failed_event.rbs +102 -0
  659. data/sig/openai/models/beta/beta_response_steer_input.rbs +214 -0
  660. data/sig/openai/models/beta/beta_response_steer_input_content.rbs +18 -0
  661. data/sig/openai/models/beta/beta_response_steer_pending_event.rbs +63 -0
  662. data/sig/openai/models/beta/beta_response_steer_pending_reason.rbs +16 -0
  663. data/sig/openai/models/beta/beta_response_steer_required_input.rbs +161 -0
  664. data/sig/openai/models/beta/beta_response_text_config.rbs +4 -4
  665. data/sig/openai/models/beta/beta_response_text_delta_event.rbs +8 -8
  666. data/sig/openai/models/beta/beta_response_text_done_event.rbs +8 -8
  667. data/sig/openai/models/beta/beta_response_tool_search_call.rbs +6 -6
  668. data/sig/openai/models/beta/beta_response_tool_search_output_item.rbs +6 -6
  669. data/sig/openai/models/beta/beta_response_tool_search_output_item_param.rbs +12 -12
  670. data/sig/openai/models/beta/beta_response_web_search_call_completed_event.rbs +4 -4
  671. data/sig/openai/models/beta/beta_response_web_search_call_in_progress_event.rbs +4 -4
  672. data/sig/openai/models/beta/beta_response_web_search_call_searching_event.rbs +4 -4
  673. data/sig/openai/models/beta/beta_responses_client_event.rbs +108 -97
  674. data/sig/openai/models/beta/beta_responses_server_event.rbs +444 -370
  675. data/sig/openai/models/beta/beta_skill_reference.rbs +3 -3
  676. data/sig/openai/models/beta/beta_tool.rbs +80 -74
  677. data/sig/openai/models/beta/beta_tool_choice_allowed.rbs +2 -2
  678. data/sig/openai/models/beta/beta_tool_choice_apply_patch.rbs +2 -2
  679. data/sig/openai/models/beta/beta_tool_choice_custom.rbs +2 -2
  680. data/sig/openai/models/beta/beta_tool_choice_function.rbs +2 -2
  681. data/sig/openai/models/beta/beta_tool_choice_mcp.rbs +2 -2
  682. data/sig/openai/models/beta/beta_tool_choice_shell.rbs +2 -2
  683. data/sig/openai/models/beta/beta_tool_search_tool.rbs +8 -8
  684. data/sig/openai/models/beta/beta_web_search_preview_tool.rbs +16 -16
  685. data/sig/openai/models/beta/beta_web_search_tool.rbs +20 -20
  686. data/sig/openai/models/beta/chatkit/chat_session.rbs +2 -2
  687. data/sig/openai/models/beta/chatkit/chat_session_chatkit_configuration_param.rbs +14 -14
  688. data/sig/openai/models/beta/chatkit/chat_session_expires_after_param.rbs +2 -2
  689. data/sig/openai/models/beta/chatkit/chat_session_rate_limits_param.rbs +2 -2
  690. data/sig/openai/models/beta/chatkit/chat_session_workflow_param.rbs +8 -8
  691. data/sig/openai/models/beta/chatkit/chatkit_response_output_text.rbs +10 -10
  692. data/sig/openai/models/beta/chatkit/chatkit_thread.rbs +8 -8
  693. data/sig/openai/models/beta/chatkit/chatkit_thread_assistant_message_item.rbs +4 -4
  694. data/sig/openai/models/beta/chatkit/chatkit_thread_item_list.rbs +14 -14
  695. data/sig/openai/models/beta/chatkit/chatkit_thread_user_message_item.rbs +8 -8
  696. data/sig/openai/models/beta/chatkit/chatkit_widget_item.rbs +4 -4
  697. data/sig/openai/models/beta/chatkit/session_cancel_params.rbs +2 -2
  698. data/sig/openai/models/beta/chatkit/session_create_params.rbs +8 -8
  699. data/sig/openai/models/beta/chatkit/thread_delete_params.rbs +2 -2
  700. data/sig/openai/models/beta/chatkit/thread_delete_response.rbs +2 -2
  701. data/sig/openai/models/beta/chatkit/thread_list_items_params.rbs +10 -10
  702. data/sig/openai/models/beta/chatkit/thread_list_params.rbs +12 -12
  703. data/sig/openai/models/beta/chatkit/thread_retrieve_params.rbs +2 -2
  704. data/sig/openai/models/beta/code_interpreter_tool.rbs +2 -2
  705. data/sig/openai/models/beta/file_search_tool.rbs +10 -10
  706. data/sig/openai/models/beta/function_tool.rbs +2 -2
  707. data/sig/openai/models/beta/message_stream_event.rbs +10 -10
  708. data/sig/openai/models/beta/response_cancel_params.rbs +4 -4
  709. data/sig/openai/models/beta/response_compact_params.rbs +25 -23
  710. data/sig/openai/models/beta/response_create_params.rbs +102 -95
  711. data/sig/openai/models/beta/response_delete_params.rbs +4 -4
  712. data/sig/openai/models/beta/response_retrieve_params.rbs +10 -10
  713. data/sig/openai/models/beta/responses/beta_response_item_list.rbs +2 -2
  714. data/sig/openai/models/beta/responses/input_item_list_params.rbs +12 -12
  715. data/sig/openai/models/beta/responses/input_token_count_params.rbs +44 -44
  716. data/sig/openai/models/beta/responses/input_token_count_response.rbs +2 -2
  717. data/sig/openai/models/beta/run_step_stream_event.rbs +14 -14
  718. data/sig/openai/models/beta/run_stream_event.rbs +23 -20
  719. data/sig/openai/models/beta/thread.rbs +10 -10
  720. data/sig/openai/models/beta/thread_create_and_run_params.rbs +76 -76
  721. data/sig/openai/models/beta/thread_create_params.rbs +38 -38
  722. data/sig/openai/models/beta/thread_delete_params.rbs +2 -2
  723. data/sig/openai/models/beta/thread_deleted.rbs +6 -2
  724. data/sig/openai/models/beta/thread_retrieve_params.rbs +2 -2
  725. data/sig/openai/models/beta/thread_stream_event.rbs +7 -3
  726. data/sig/openai/models/beta/thread_update_params.rbs +14 -14
  727. data/sig/openai/models/beta/threads/file_citation_annotation.rbs +2 -2
  728. data/sig/openai/models/beta/threads/file_citation_delta_annotation.rbs +12 -12
  729. data/sig/openai/models/beta/threads/file_path_annotation.rbs +2 -2
  730. data/sig/openai/models/beta/threads/file_path_delta_annotation.rbs +12 -12
  731. data/sig/openai/models/beta/threads/image_file.rbs +2 -2
  732. data/sig/openai/models/beta/threads/image_file_content_block.rbs +2 -2
  733. data/sig/openai/models/beta/threads/image_file_delta.rbs +4 -4
  734. data/sig/openai/models/beta/threads/image_file_delta_block.rbs +4 -4
  735. data/sig/openai/models/beta/threads/image_url.rbs +2 -2
  736. data/sig/openai/models/beta/threads/image_url_content_block.rbs +2 -2
  737. data/sig/openai/models/beta/threads/image_url_delta.rbs +4 -4
  738. data/sig/openai/models/beta/threads/image_url_delta_block.rbs +4 -4
  739. data/sig/openai/models/beta/threads/message.rbs +8 -8
  740. data/sig/openai/models/beta/threads/message_create_params.rbs +12 -12
  741. data/sig/openai/models/beta/threads/message_delete_params.rbs +6 -3
  742. data/sig/openai/models/beta/threads/message_deleted.rbs +2 -2
  743. data/sig/openai/models/beta/threads/message_delta.rbs +4 -4
  744. data/sig/openai/models/beta/threads/message_delta_event.rbs +2 -2
  745. data/sig/openai/models/beta/threads/message_list_params.rbs +12 -12
  746. data/sig/openai/models/beta/threads/message_retrieve_params.rbs +6 -3
  747. data/sig/openai/models/beta/threads/message_update_params.rbs +4 -4
  748. data/sig/openai/models/beta/threads/refusal_content_block.rbs +2 -2
  749. data/sig/openai/models/beta/threads/refusal_delta_block.rbs +2 -2
  750. data/sig/openai/models/beta/threads/required_action_function_tool_call.rbs +2 -2
  751. data/sig/openai/models/beta/threads/run.rbs +12 -12
  752. data/sig/openai/models/beta/threads/run_cancel_params.rbs +6 -3
  753. data/sig/openai/models/beta/threads/run_create_params.rbs +46 -46
  754. data/sig/openai/models/beta/threads/run_list_params.rbs +10 -10
  755. data/sig/openai/models/beta/threads/run_retrieve_params.rbs +6 -3
  756. data/sig/openai/models/beta/threads/run_submit_tool_outputs_params.rbs +5 -5
  757. data/sig/openai/models/beta/threads/run_update_params.rbs +4 -4
  758. data/sig/openai/models/beta/threads/runs/code_interpreter_logs.rbs +2 -2
  759. data/sig/openai/models/beta/threads/runs/code_interpreter_output_image.rbs +6 -6
  760. data/sig/openai/models/beta/threads/runs/code_interpreter_tool_call.rbs +6 -6
  761. data/sig/openai/models/beta/threads/runs/code_interpreter_tool_call_delta.rbs +10 -10
  762. data/sig/openai/models/beta/threads/runs/file_search_tool_call.rbs +12 -12
  763. data/sig/openai/models/beta/threads/runs/file_search_tool_call_delta.rbs +8 -3
  764. data/sig/openai/models/beta/threads/runs/function_tool_call.rbs +2 -2
  765. data/sig/openai/models/beta/threads/runs/function_tool_call_delta.rbs +11 -10
  766. data/sig/openai/models/beta/threads/runs/message_creation_step_details.rbs +2 -2
  767. data/sig/openai/models/beta/threads/runs/run_step.rbs +2 -2
  768. data/sig/openai/models/beta/threads/runs/run_step_delta.rbs +2 -2
  769. data/sig/openai/models/beta/threads/runs/run_step_delta_event.rbs +2 -2
  770. data/sig/openai/models/beta/threads/runs/run_step_delta_message_delta.rbs +6 -6
  771. data/sig/openai/models/beta/threads/runs/step_list_params.rbs +12 -12
  772. data/sig/openai/models/beta/threads/runs/step_retrieve_params.rbs +4 -4
  773. data/sig/openai/models/beta/threads/runs/tool_call_delta_object.rbs +4 -4
  774. data/sig/openai/models/beta/threads/runs/tool_calls_step_details.rbs +2 -2
  775. data/sig/openai/models/beta/threads/text_content_block.rbs +2 -2
  776. data/sig/openai/models/beta/threads/text_content_block_param.rbs +2 -2
  777. data/sig/openai/models/beta/threads/text_delta.rbs +4 -4
  778. data/sig/openai/models/beta/threads/text_delta_block.rbs +4 -4
  779. data/sig/openai/models/chat/chat_completion.rbs +24 -24
  780. data/sig/openai/models/chat/chat_completion_allowed_tool_choice.rbs +2 -2
  781. data/sig/openai/models/chat/chat_completion_assistant_message_param.rbs +14 -14
  782. data/sig/openai/models/chat/chat_completion_chunk.rbs +46 -46
  783. data/sig/openai/models/chat/chat_completion_content_part.rbs +11 -10
  784. data/sig/openai/models/chat/chat_completion_content_part_image.rbs +8 -8
  785. data/sig/openai/models/chat/chat_completion_content_part_input_audio.rbs +6 -6
  786. data/sig/openai/models/chat/chat_completion_content_part_refusal.rbs +2 -2
  787. data/sig/openai/models/chat/chat_completion_content_part_text.rbs +6 -6
  788. data/sig/openai/models/chat/chat_completion_custom_tool.rbs +10 -10
  789. data/sig/openai/models/chat/chat_completion_deleted.rbs +2 -2
  790. data/sig/openai/models/chat/chat_completion_developer_message_param.rbs +4 -4
  791. data/sig/openai/models/chat/chat_completion_function_message_param.rbs +2 -2
  792. data/sig/openai/models/chat/chat_completion_function_tool.rbs +2 -2
  793. data/sig/openai/models/chat/chat_completion_message.rbs +12 -12
  794. data/sig/openai/models/chat/chat_completion_message_custom_tool_call.rbs +2 -2
  795. data/sig/openai/models/chat/chat_completion_message_function_tool_call.rbs +2 -2
  796. data/sig/openai/models/chat/chat_completion_named_tool_choice.rbs +2 -2
  797. data/sig/openai/models/chat/chat_completion_named_tool_choice_custom.rbs +2 -2
  798. data/sig/openai/models/chat/chat_completion_prediction_content.rbs +2 -2
  799. data/sig/openai/models/chat/chat_completion_store_message.rbs +12 -12
  800. data/sig/openai/models/chat/chat_completion_stream_options.rbs +2 -2
  801. data/sig/openai/models/chat/chat_completion_system_message_param.rbs +4 -4
  802. data/sig/openai/models/chat/chat_completion_tool_message_param.rbs +2 -2
  803. data/sig/openai/models/chat/chat_completion_user_message_param.rbs +4 -4
  804. data/sig/openai/models/chat/completion_create_params.rbs +98 -98
  805. data/sig/openai/models/chat/completion_delete_params.rbs +2 -2
  806. data/sig/openai/models/chat/completion_list_params.rbs +12 -12
  807. data/sig/openai/models/chat/completion_retrieve_params.rbs +2 -2
  808. data/sig/openai/models/chat/completion_update_params.rbs +6 -3
  809. data/sig/openai/models/chat/completions/message_list_params.rbs +8 -8
  810. data/sig/openai/models/chat_model.rbs +3 -1
  811. data/sig/openai/models/completion.rbs +6 -6
  812. data/sig/openai/models/completion_choice.rbs +8 -8
  813. data/sig/openai/models/completion_create_params.rbs +32 -32
  814. data/sig/openai/models/completion_usage.rbs +24 -24
  815. data/sig/openai/models/container_create_params.rbs +12 -12
  816. data/sig/openai/models/container_create_response.rbs +14 -14
  817. data/sig/openai/models/container_delete_params.rbs +2 -2
  818. data/sig/openai/models/container_list_params.rbs +10 -10
  819. data/sig/openai/models/container_list_response.rbs +14 -14
  820. data/sig/openai/models/container_retrieve_params.rbs +2 -2
  821. data/sig/openai/models/container_retrieve_response.rbs +14 -14
  822. data/sig/openai/models/containers/file_create_params.rbs +6 -6
  823. data/sig/openai/models/containers/file_create_response.rbs +2 -2
  824. data/sig/openai/models/containers/file_delete_params.rbs +6 -3
  825. data/sig/openai/models/containers/file_list_params.rbs +8 -8
  826. data/sig/openai/models/containers/file_list_response.rbs +2 -2
  827. data/sig/openai/models/containers/file_retrieve_params.rbs +6 -3
  828. data/sig/openai/models/containers/file_retrieve_response.rbs +2 -2
  829. data/sig/openai/models/containers/files/content_retrieve_params.rbs +6 -3
  830. data/sig/openai/models/content_provenance_check.rbs +4 -4
  831. data/sig/openai/models/content_provenance_check_create_params.rbs +5 -3
  832. data/sig/openai/models/conversations/computer_screenshot_content.rbs +6 -6
  833. data/sig/openai/models/conversations/conversation.rbs +2 -2
  834. data/sig/openai/models/conversations/conversation_create_params.rbs +6 -6
  835. data/sig/openai/models/conversations/conversation_delete_params.rbs +2 -2
  836. data/sig/openai/models/conversations/conversation_deleted.rbs +2 -2
  837. data/sig/openai/models/conversations/conversation_deleted_resource.rbs +2 -2
  838. data/sig/openai/models/conversations/conversation_item.rbs +47 -46
  839. data/sig/openai/models/conversations/conversation_item_list.rbs +2 -2
  840. data/sig/openai/models/conversations/conversation_retrieve_params.rbs +2 -2
  841. data/sig/openai/models/conversations/conversation_update_params.rbs +6 -3
  842. data/sig/openai/models/conversations/item_create_params.rbs +4 -4
  843. data/sig/openai/models/conversations/item_delete_params.rbs +6 -3
  844. data/sig/openai/models/conversations/item_list_params.rbs +10 -10
  845. data/sig/openai/models/conversations/item_retrieve_params.rbs +4 -4
  846. data/sig/openai/models/conversations/message.rbs +6 -6
  847. data/sig/openai/models/conversations/summary_text_content.rbs +2 -2
  848. data/sig/openai/models/conversations/text_content.rbs +2 -2
  849. data/sig/openai/models/create_embedding_response.rbs +2 -2
  850. data/sig/openai/models/custom_tool_input_format.rbs +4 -4
  851. data/sig/openai/models/deleted_skill.rbs +3 -2
  852. data/sig/openai/models/embedding.rbs +2 -2
  853. data/sig/openai/models/embedding_create_params.rbs +8 -8
  854. data/sig/openai/models/error_object.rbs +82 -3
  855. data/sig/openai/models/eval_create_params.rbs +40 -40
  856. data/sig/openai/models/eval_create_response.rbs +22 -22
  857. data/sig/openai/models/eval_custom_data_source_config.rbs +2 -2
  858. data/sig/openai/models/eval_delete_params.rbs +2 -2
  859. data/sig/openai/models/eval_list_params.rbs +10 -10
  860. data/sig/openai/models/eval_list_response.rbs +22 -22
  861. data/sig/openai/models/eval_retrieve_params.rbs +2 -2
  862. data/sig/openai/models/eval_retrieve_response.rbs +22 -22
  863. data/sig/openai/models/eval_stored_completions_data_source_config.rbs +4 -4
  864. data/sig/openai/models/eval_update_params.rbs +9 -5
  865. data/sig/openai/models/eval_update_response.rbs +22 -22
  866. data/sig/openai/models/evals/create_eval_completions_run_data_source.rbs +49 -49
  867. data/sig/openai/models/evals/create_eval_jsonl_run_data_source.rbs +8 -8
  868. data/sig/openai/models/evals/run_cancel_params.rbs +6 -3
  869. data/sig/openai/models/evals/run_cancel_response.rbs +66 -66
  870. data/sig/openai/models/evals/run_create_params.rbs +68 -68
  871. data/sig/openai/models/evals/run_create_response.rbs +66 -66
  872. data/sig/openai/models/evals/run_delete_params.rbs +6 -3
  873. data/sig/openai/models/evals/run_delete_response.rbs +2 -2
  874. data/sig/openai/models/evals/run_list_params.rbs +10 -10
  875. data/sig/openai/models/evals/run_list_response.rbs +66 -66
  876. data/sig/openai/models/evals/run_retrieve_params.rbs +6 -3
  877. data/sig/openai/models/evals/run_retrieve_response.rbs +66 -66
  878. data/sig/openai/models/evals/runs/output_item_list_params.rbs +10 -10
  879. data/sig/openai/models/evals/runs/output_item_list_response.rbs +8 -8
  880. data/sig/openai/models/evals/runs/output_item_retrieve_params.rbs +7 -3
  881. data/sig/openai/models/evals/runs/output_item_retrieve_response.rbs +8 -8
  882. data/sig/openai/models/file_content_params.rbs +2 -2
  883. data/sig/openai/models/file_create_params.rbs +6 -6
  884. data/sig/openai/models/file_delete_params.rbs +2 -2
  885. data/sig/openai/models/file_deleted.rbs +2 -2
  886. data/sig/openai/models/file_list_params.rbs +10 -10
  887. data/sig/openai/models/file_object.rbs +6 -6
  888. data/sig/openai/models/file_retrieve_params.rbs +2 -2
  889. data/sig/openai/models/fine_tuning/alpha/grader_run_params.rbs +4 -4
  890. data/sig/openai/models/fine_tuning/alpha/grader_validate_params.rbs +3 -3
  891. data/sig/openai/models/fine_tuning/alpha/grader_validate_response.rbs +2 -2
  892. data/sig/openai/models/fine_tuning/checkpoints/permission_create_params.rbs +6 -3
  893. data/sig/openai/models/fine_tuning/checkpoints/permission_create_response.rbs +2 -2
  894. data/sig/openai/models/fine_tuning/checkpoints/permission_delete_params.rbs +6 -3
  895. data/sig/openai/models/fine_tuning/checkpoints/permission_delete_response.rbs +2 -2
  896. data/sig/openai/models/fine_tuning/checkpoints/permission_list_params.rbs +10 -10
  897. data/sig/openai/models/fine_tuning/checkpoints/permission_list_response.rbs +2 -2
  898. data/sig/openai/models/fine_tuning/checkpoints/permission_retrieve_params.rbs +10 -10
  899. data/sig/openai/models/fine_tuning/checkpoints/permission_retrieve_response.rbs +8 -8
  900. data/sig/openai/models/fine_tuning/dpo_hyperparameters.rbs +8 -8
  901. data/sig/openai/models/fine_tuning/dpo_method.rbs +2 -2
  902. data/sig/openai/models/fine_tuning/fine_tuning_job.rbs +22 -22
  903. data/sig/openai/models/fine_tuning/fine_tuning_job_event.rbs +6 -6
  904. data/sig/openai/models/fine_tuning/fine_tuning_job_wandb_integration.rbs +6 -6
  905. data/sig/openai/models/fine_tuning/fine_tuning_job_wandb_integration_object.rbs +2 -2
  906. data/sig/openai/models/fine_tuning/job_cancel_params.rbs +2 -3
  907. data/sig/openai/models/fine_tuning/job_create_params.rbs +36 -36
  908. data/sig/openai/models/fine_tuning/job_list_events_params.rbs +9 -5
  909. data/sig/openai/models/fine_tuning/job_list_params.rbs +10 -6
  910. data/sig/openai/models/fine_tuning/job_pause_params.rbs +2 -3
  911. data/sig/openai/models/fine_tuning/job_resume_params.rbs +2 -3
  912. data/sig/openai/models/fine_tuning/job_retrieve_params.rbs +2 -3
  913. data/sig/openai/models/fine_tuning/jobs/checkpoint_list_params.rbs +9 -5
  914. data/sig/openai/models/fine_tuning/jobs/fine_tuning_job_checkpoint.rbs +16 -16
  915. data/sig/openai/models/fine_tuning/reinforcement_hyperparameters.rbs +14 -14
  916. data/sig/openai/models/fine_tuning/reinforcement_method.rbs +2 -2
  917. data/sig/openai/models/fine_tuning/supervised_hyperparameters.rbs +6 -6
  918. data/sig/openai/models/fine_tuning/supervised_method.rbs +2 -2
  919. data/sig/openai/models/function_definition.rbs +6 -6
  920. data/sig/openai/models/graders/grader_input_item.rbs +5 -5
  921. data/sig/openai/models/graders/label_model_grader.rbs +9 -9
  922. data/sig/openai/models/graders/multi_grader.rbs +2 -2
  923. data/sig/openai/models/graders/python_grader.rbs +3 -3
  924. data/sig/openai/models/graders/score_model_grader.rbs +23 -23
  925. data/sig/openai/models/graders/string_check_grader.rbs +2 -2
  926. data/sig/openai/models/graders/text_similarity_grader.rbs +2 -2
  927. data/sig/openai/models/image.rbs +4 -4
  928. data/sig/openai/models/image_create_variation_params.rbs +12 -12
  929. data/sig/openai/models/image_edit_completed_event.rbs +2 -2
  930. data/sig/openai/models/image_edit_params.rbs +26 -26
  931. data/sig/openai/models/image_edit_partial_image_event.rbs +2 -2
  932. data/sig/openai/models/image_gen_completed_event.rbs +2 -2
  933. data/sig/openai/models/image_gen_partial_image_event.rbs +2 -2
  934. data/sig/openai/models/image_generate_params.rbs +26 -26
  935. data/sig/openai/models/image_input_reference_param.rbs +2 -2
  936. data/sig/openai/models/images_response.rbs +14 -14
  937. data/sig/openai/models/model.rbs +4 -4
  938. data/sig/openai/models/model_delete_params.rbs +5 -2
  939. data/sig/openai/models/model_list_params.rbs +2 -2
  940. data/sig/openai/models/model_retrieve_params.rbs +5 -2
  941. data/sig/openai/models/moderation_create_params.rbs +4 -4
  942. data/sig/openai/models/moderation_image_url_input.rbs +5 -2
  943. data/sig/openai/models/moderation_text_input.rbs +2 -2
  944. data/sig/openai/models/other_file_chunking_strategy_object.rbs +2 -2
  945. data/sig/openai/models/realtime/audio_transcription.rbs +12 -12
  946. data/sig/openai/models/realtime/call_accept_params.rbs +30 -30
  947. data/sig/openai/models/realtime/call_create_params.rbs +7 -4
  948. data/sig/openai/models/realtime/call_hangup_params.rbs +2 -2
  949. data/sig/openai/models/realtime/call_refer_params.rbs +6 -3
  950. data/sig/openai/models/realtime/call_reject_params.rbs +7 -4
  951. data/sig/openai/models/realtime/client_secret_create_params.rbs +10 -10
  952. data/sig/openai/models/realtime/conversation_created_event.rbs +6 -6
  953. data/sig/openai/models/realtime/conversation_item_added.rbs +4 -4
  954. data/sig/openai/models/realtime/conversation_item_create_event.rbs +6 -6
  955. data/sig/openai/models/realtime/conversation_item_created_event.rbs +4 -4
  956. data/sig/openai/models/realtime/conversation_item_delete_event.rbs +7 -3
  957. data/sig/openai/models/realtime/conversation_item_deleted_event.rbs +2 -2
  958. data/sig/openai/models/realtime/conversation_item_done.rbs +4 -4
  959. data/sig/openai/models/realtime/conversation_item_input_audio_transcription_completed_event.rbs +14 -14
  960. data/sig/openai/models/realtime/conversation_item_input_audio_transcription_delta_event.rbs +8 -8
  961. data/sig/openai/models/realtime/conversation_item_input_audio_transcription_failed_event.rbs +7 -7
  962. data/sig/openai/models/realtime/conversation_item_input_audio_transcription_segment.rbs +2 -2
  963. data/sig/openai/models/realtime/conversation_item_retrieve_event.rbs +4 -4
  964. data/sig/openai/models/realtime/conversation_item_truncate_event.rbs +4 -4
  965. data/sig/openai/models/realtime/conversation_item_truncated_event.rbs +2 -2
  966. data/sig/openai/models/realtime/conversation_item_with_reference.rbs +30 -30
  967. data/sig/openai/models/realtime/input_audio_buffer_append_event.rbs +7 -3
  968. data/sig/openai/models/realtime/input_audio_buffer_clear_event.rbs +5 -2
  969. data/sig/openai/models/realtime/input_audio_buffer_cleared_event.rbs +2 -2
  970. data/sig/openai/models/realtime/input_audio_buffer_commit_event.rbs +5 -2
  971. data/sig/openai/models/realtime/input_audio_buffer_committed_event.rbs +4 -4
  972. data/sig/openai/models/realtime/input_audio_buffer_dtmf_event_received_event.rbs +2 -2
  973. data/sig/openai/models/realtime/input_audio_buffer_speech_started_event.rbs +2 -2
  974. data/sig/openai/models/realtime/input_audio_buffer_speech_stopped_event.rbs +2 -2
  975. data/sig/openai/models/realtime/input_audio_buffer_timeout_triggered.rbs +2 -2
  976. data/sig/openai/models/realtime/mcp_list_tools_completed.rbs +6 -2
  977. data/sig/openai/models/realtime/mcp_list_tools_failed.rbs +2 -2
  978. data/sig/openai/models/realtime/mcp_list_tools_in_progress.rbs +2 -2
  979. data/sig/openai/models/realtime/output_audio_buffer_clear_event.rbs +5 -2
  980. data/sig/openai/models/realtime/rate_limits_updated_event.rbs +10 -10
  981. data/sig/openai/models/realtime/realtime_audio_config.rbs +4 -4
  982. data/sig/openai/models/realtime/realtime_audio_config_input.rbs +10 -10
  983. data/sig/openai/models/realtime/realtime_audio_config_output.rbs +6 -6
  984. data/sig/openai/models/realtime/realtime_audio_formats.rbs +8 -8
  985. data/sig/openai/models/realtime/realtime_audio_input_turn_detection.rbs +22 -22
  986. data/sig/openai/models/realtime/realtime_conversation_item_assistant_message.rbs +18 -18
  987. data/sig/openai/models/realtime/realtime_conversation_item_function_call.rbs +10 -10
  988. data/sig/openai/models/realtime/realtime_conversation_item_function_call_output.rbs +8 -8
  989. data/sig/openai/models/realtime/realtime_conversation_item_system_message.rbs +14 -14
  990. data/sig/openai/models/realtime/realtime_conversation_item_user_message.rbs +22 -22
  991. data/sig/openai/models/realtime/realtime_error.rbs +6 -6
  992. data/sig/openai/models/realtime/realtime_error_event.rbs +2 -2
  993. data/sig/openai/models/realtime/realtime_function_tool.rbs +8 -8
  994. data/sig/openai/models/realtime/realtime_mcp_approval_request.rbs +2 -2
  995. data/sig/openai/models/realtime/realtime_mcp_approval_response.rbs +4 -4
  996. data/sig/openai/models/realtime/realtime_mcp_list_tools.rbs +8 -8
  997. data/sig/openai/models/realtime/realtime_mcp_protocol_error.rbs +2 -2
  998. data/sig/openai/models/realtime/realtime_mcp_tool_call.rbs +8 -8
  999. data/sig/openai/models/realtime/realtime_mcp_tool_execution_error.rbs +2 -2
  1000. data/sig/openai/models/realtime/realtime_mcphttp_error.rbs +2 -2
  1001. data/sig/openai/models/realtime/realtime_reasoning.rbs +2 -2
  1002. data/sig/openai/models/realtime/realtime_response.rbs +28 -28
  1003. data/sig/openai/models/realtime/realtime_response_create_audio_output.rbs +6 -6
  1004. data/sig/openai/models/realtime/realtime_response_create_mcp_tool.rbs +32 -32
  1005. data/sig/openai/models/realtime/realtime_response_create_params.rbs +24 -24
  1006. data/sig/openai/models/realtime/realtime_response_status.rbs +8 -8
  1007. data/sig/openai/models/realtime/realtime_response_usage.rbs +10 -10
  1008. data/sig/openai/models/realtime/realtime_response_usage_input_token_details.rbs +18 -14
  1009. data/sig/openai/models/realtime/realtime_response_usage_output_token_details.rbs +2 -2
  1010. data/sig/openai/models/realtime/realtime_server_event.rbs +8 -8
  1011. data/sig/openai/models/realtime/realtime_session.rbs +68 -68
  1012. data/sig/openai/models/realtime/realtime_session_create_request.rbs +28 -28
  1013. data/sig/openai/models/realtime/realtime_session_create_response.rbs +113 -110
  1014. data/sig/openai/models/realtime/realtime_tools_config_union.rbs +38 -32
  1015. data/sig/openai/models/realtime/realtime_tracing_config.rbs +4 -4
  1016. data/sig/openai/models/realtime/realtime_transcription_session_audio.rbs +2 -2
  1017. data/sig/openai/models/realtime/realtime_transcription_session_audio_input.rbs +10 -10
  1018. data/sig/openai/models/realtime/realtime_transcription_session_audio_input_turn_detection.rbs +22 -22
  1019. data/sig/openai/models/realtime/realtime_transcription_session_create_request.rbs +6 -6
  1020. data/sig/openai/models/realtime/realtime_transcription_session_create_response.rbs +20 -20
  1021. data/sig/openai/models/realtime/realtime_transcription_session_turn_detection.rbs +8 -8
  1022. data/sig/openai/models/realtime/realtime_translation_client_secret_create_request.rbs +6 -6
  1023. data/sig/openai/models/realtime/realtime_translation_input_audio_buffer_append_event.rbs +4 -4
  1024. data/sig/openai/models/realtime/realtime_translation_input_transcript_delta_event.rbs +4 -4
  1025. data/sig/openai/models/realtime/realtime_translation_output_audio_delta_event.rbs +10 -10
  1026. data/sig/openai/models/realtime/realtime_translation_output_transcript_delta_event.rbs +4 -4
  1027. data/sig/openai/models/realtime/realtime_translation_session.rbs +12 -12
  1028. data/sig/openai/models/realtime/realtime_translation_session_close_event.rbs +2 -2
  1029. data/sig/openai/models/realtime/realtime_translation_session_closed_event.rbs +2 -2
  1030. data/sig/openai/models/realtime/realtime_translation_session_create_request.rbs +12 -12
  1031. data/sig/openai/models/realtime/realtime_translation_session_created_event.rbs +2 -2
  1032. data/sig/openai/models/realtime/realtime_translation_session_update_event.rbs +4 -4
  1033. data/sig/openai/models/realtime/realtime_translation_session_update_request.rbs +12 -12
  1034. data/sig/openai/models/realtime/realtime_translation_session_updated_event.rbs +2 -2
  1035. data/sig/openai/models/realtime/realtime_truncation_retention_ratio.rbs +6 -6
  1036. data/sig/openai/models/realtime/response_audio_delta_event.rbs +2 -2
  1037. data/sig/openai/models/realtime/response_audio_done_event.rbs +2 -2
  1038. data/sig/openai/models/realtime/response_audio_transcript_delta_event.rbs +2 -2
  1039. data/sig/openai/models/realtime/response_audio_transcript_done_event.rbs +2 -2
  1040. data/sig/openai/models/realtime/response_cancel_event.rbs +4 -4
  1041. data/sig/openai/models/realtime/response_content_part_added_event.rbs +10 -10
  1042. data/sig/openai/models/realtime/response_content_part_done_event.rbs +10 -10
  1043. data/sig/openai/models/realtime/response_create_event.rbs +6 -6
  1044. data/sig/openai/models/realtime/response_created_event.rbs +2 -2
  1045. data/sig/openai/models/realtime/response_done_event.rbs +2 -2
  1046. data/sig/openai/models/realtime/response_function_call_arguments_delta_event.rbs +2 -2
  1047. data/sig/openai/models/realtime/response_function_call_arguments_done_event.rbs +2 -2
  1048. data/sig/openai/models/realtime/response_mcp_call_arguments_delta.rbs +4 -4
  1049. data/sig/openai/models/realtime/response_mcp_call_arguments_done.rbs +2 -2
  1050. data/sig/openai/models/realtime/response_mcp_call_completed.rbs +2 -2
  1051. data/sig/openai/models/realtime/response_mcp_call_failed.rbs +2 -2
  1052. data/sig/openai/models/realtime/response_mcp_call_in_progress.rbs +2 -2
  1053. data/sig/openai/models/realtime/response_output_item_added_event.rbs +2 -2
  1054. data/sig/openai/models/realtime/response_output_item_done_event.rbs +2 -2
  1055. data/sig/openai/models/realtime/response_text_delta_event.rbs +2 -2
  1056. data/sig/openai/models/realtime/response_text_done_event.rbs +2 -2
  1057. data/sig/openai/models/realtime/session_created_event.rbs +2 -2
  1058. data/sig/openai/models/realtime/session_update_event.rbs +4 -4
  1059. data/sig/openai/models/realtime/session_updated_event.rbs +2 -2
  1060. data/sig/openai/models/realtime/transcription_session_update.rbs +24 -24
  1061. data/sig/openai/models/realtime/transcription_session_updated_event.rbs +18 -18
  1062. data/sig/openai/models/reasoning.rbs +10 -10
  1063. data/sig/openai/models/response_format_json_object.rbs +2 -2
  1064. data/sig/openai/models/response_format_json_schema.rbs +8 -8
  1065. data/sig/openai/models/response_format_text.rbs +2 -2
  1066. data/sig/openai/models/response_format_text_grammar.rbs +2 -2
  1067. data/sig/openai/models/response_format_text_python.rbs +2 -2
  1068. data/sig/openai/models/responses/apply_patch_tool.rbs +4 -4
  1069. data/sig/openai/models/responses/compacted_response.rbs +2 -2
  1070. data/sig/openai/models/responses/computer_action.rbs +25 -25
  1071. data/sig/openai/models/responses/computer_tool.rbs +2 -2
  1072. data/sig/openai/models/responses/computer_use_preview_tool.rbs +2 -2
  1073. data/sig/openai/models/responses/container_auto.rbs +10 -10
  1074. data/sig/openai/models/responses/container_network_policy_allowlist.rbs +4 -4
  1075. data/sig/openai/models/responses/container_network_policy_disabled.rbs +2 -2
  1076. data/sig/openai/models/responses/container_reference.rbs +2 -2
  1077. data/sig/openai/models/responses/custom_tool.rbs +17 -10
  1078. data/sig/openai/models/responses/easy_input_message.rbs +4 -4
  1079. data/sig/openai/models/responses/file_search_tool.rbs +14 -14
  1080. data/sig/openai/models/responses/function_shell_tool.rbs +6 -6
  1081. data/sig/openai/models/responses/function_tool.rbs +17 -10
  1082. data/sig/openai/models/responses/inline_skill.rbs +2 -2
  1083. data/sig/openai/models/responses/inline_skill_source.rbs +3 -3
  1084. data/sig/openai/models/responses/input_item_list_params.rbs +10 -10
  1085. data/sig/openai/models/responses/input_token_count_params.rbs +32 -32
  1086. data/sig/openai/models/responses/input_token_count_response.rbs +2 -2
  1087. data/sig/openai/models/responses/local_environment.rbs +3 -3
  1088. data/sig/openai/models/responses/mcp_tool_call_error.rbs +6 -6
  1089. data/sig/openai/models/responses/namespace_tool.rbs +23 -16
  1090. data/sig/openai/models/responses/response.rbs +178 -58
  1091. data/sig/openai/models/responses/response_apply_patch_tool_call.rbs +16 -16
  1092. data/sig/openai/models/responses/response_apply_patch_tool_call_output.rbs +12 -12
  1093. data/sig/openai/models/responses/response_audio_delta_event.rbs +2 -2
  1094. data/sig/openai/models/responses/response_audio_done_event.rbs +2 -2
  1095. data/sig/openai/models/responses/response_audio_transcript_delta_event.rbs +2 -2
  1096. data/sig/openai/models/responses/response_audio_transcript_done_event.rbs +2 -2
  1097. data/sig/openai/models/responses/response_cancel_params.rbs +2 -2
  1098. data/sig/openai/models/responses/response_code_interpreter_call_code_delta_event.rbs +2 -2
  1099. data/sig/openai/models/responses/response_code_interpreter_call_code_done_event.rbs +2 -2
  1100. data/sig/openai/models/responses/response_code_interpreter_call_completed_event.rbs +2 -2
  1101. data/sig/openai/models/responses/response_code_interpreter_call_in_progress_event.rbs +2 -2
  1102. data/sig/openai/models/responses/response_code_interpreter_call_interpreting_event.rbs +2 -2
  1103. data/sig/openai/models/responses/response_code_interpreter_tool_call.rbs +6 -6
  1104. data/sig/openai/models/responses/response_compact_params.rbs +23 -21
  1105. data/sig/openai/models/responses/response_compaction_item.rbs +4 -4
  1106. data/sig/openai/models/responses/response_compaction_item_param.rbs +3 -3
  1107. data/sig/openai/models/responses/response_completed_event.rbs +2 -2
  1108. data/sig/openai/models/responses/response_computer_tool_call.rbs +31 -31
  1109. data/sig/openai/models/responses/response_computer_tool_call_output_item.rbs +8 -8
  1110. data/sig/openai/models/responses/response_computer_tool_call_output_screenshot.rbs +4 -4
  1111. data/sig/openai/models/responses/response_configuration_update_item.rbs +46 -0
  1112. data/sig/openai/models/responses/response_configuration_update_item_param.rbs +46 -0
  1113. data/sig/openai/models/responses/response_container_reference.rbs +2 -2
  1114. data/sig/openai/models/responses/response_content.rbs +2 -2
  1115. data/sig/openai/models/responses/response_content_part_added_event.rbs +4 -4
  1116. data/sig/openai/models/responses/response_content_part_done_event.rbs +4 -4
  1117. data/sig/openai/models/responses/response_create_params.rbs +83 -78
  1118. data/sig/openai/models/responses/response_created_event.rbs +2 -2
  1119. data/sig/openai/models/responses/response_custom_tool_call.rbs +19 -12
  1120. data/sig/openai/models/responses/response_custom_tool_call_input_delta_event.rbs +2 -2
  1121. data/sig/openai/models/responses/response_custom_tool_call_input_done_event.rbs +2 -2
  1122. data/sig/openai/models/responses/response_custom_tool_call_item.rbs +11 -8
  1123. data/sig/openai/models/responses/response_custom_tool_call_output.rbs +10 -10
  1124. data/sig/openai/models/responses/response_custom_tool_call_output_item.rbs +6 -6
  1125. data/sig/openai/models/responses/response_delete_params.rbs +2 -2
  1126. data/sig/openai/models/responses/response_error.rbs +79 -3
  1127. data/sig/openai/models/responses/response_error_event.rbs +2 -2
  1128. data/sig/openai/models/responses/response_failed_event.rbs +2 -2
  1129. data/sig/openai/models/responses/response_file_search_call_completed_event.rbs +2 -2
  1130. data/sig/openai/models/responses/response_file_search_call_in_progress_event.rbs +2 -2
  1131. data/sig/openai/models/responses/response_file_search_call_searching_event.rbs +2 -2
  1132. data/sig/openai/models/responses/response_file_search_tool_call.rbs +14 -14
  1133. data/sig/openai/models/responses/response_format_text_json_schema_config.rbs +6 -6
  1134. data/sig/openai/models/responses/response_function_call_arguments_delta_event.rbs +2 -2
  1135. data/sig/openai/models/responses/response_function_call_arguments_done_event.rbs +2 -7
  1136. data/sig/openai/models/responses/response_function_shell_call_output_content.rbs +4 -4
  1137. data/sig/openai/models/responses/response_function_shell_tool_call.rbs +10 -10
  1138. data/sig/openai/models/responses/response_function_shell_tool_call_output.rbs +16 -16
  1139. data/sig/openai/models/responses/response_function_tool_call.rbs +21 -14
  1140. data/sig/openai/models/responses/response_function_tool_call_item.rbs +11 -8
  1141. data/sig/openai/models/responses/response_function_tool_call_output_item.rbs +16 -16
  1142. data/sig/openai/models/responses/response_function_web_search.rbs +19 -17
  1143. data/sig/openai/models/responses/response_image_gen_call_completed_event.rbs +2 -2
  1144. data/sig/openai/models/responses/response_image_gen_call_generating_event.rbs +2 -2
  1145. data/sig/openai/models/responses/response_image_gen_call_in_progress_event.rbs +2 -2
  1146. data/sig/openai/models/responses/response_image_gen_call_partial_image_event.rbs +10 -10
  1147. data/sig/openai/models/responses/response_in_progress_event.rbs +2 -2
  1148. data/sig/openai/models/responses/response_incomplete_event.rbs +2 -2
  1149. data/sig/openai/models/responses/response_input_audio.rbs +2 -2
  1150. data/sig/openai/models/responses/response_input_file.rbs +16 -16
  1151. data/sig/openai/models/responses/response_input_file_content.rbs +16 -16
  1152. data/sig/openai/models/responses/response_input_image.rbs +10 -10
  1153. data/sig/openai/models/responses/response_input_image_content.rbs +12 -12
  1154. data/sig/openai/models/responses/response_input_item.rbs +167 -158
  1155. data/sig/openai/models/responses/response_input_message_item.rbs +4 -4
  1156. data/sig/openai/models/responses/response_input_text.rbs +6 -6
  1157. data/sig/openai/models/responses/response_input_text_content.rbs +6 -6
  1158. data/sig/openai/models/responses/response_item.rbs +47 -46
  1159. data/sig/openai/models/responses/response_item_list.rbs +2 -2
  1160. data/sig/openai/models/responses/response_local_environment.rbs +2 -2
  1161. data/sig/openai/models/responses/response_mcp_call_arguments_delta_event.rbs +2 -2
  1162. data/sig/openai/models/responses/response_mcp_call_arguments_done_event.rbs +2 -2
  1163. data/sig/openai/models/responses/response_mcp_call_completed_event.rbs +2 -2
  1164. data/sig/openai/models/responses/response_mcp_call_failed_event.rbs +2 -2
  1165. data/sig/openai/models/responses/response_mcp_call_in_progress_event.rbs +2 -2
  1166. data/sig/openai/models/responses/response_mcp_list_tools_completed_event.rbs +2 -2
  1167. data/sig/openai/models/responses/response_mcp_list_tools_failed_event.rbs +2 -2
  1168. data/sig/openai/models/responses/response_mcp_list_tools_in_progress_event.rbs +2 -2
  1169. data/sig/openai/models/responses/response_output_audio.rbs +2 -2
  1170. data/sig/openai/models/responses/response_output_item.rbs +46 -46
  1171. data/sig/openai/models/responses/response_output_item_added_event.rbs +2 -2
  1172. data/sig/openai/models/responses/response_output_item_done_event.rbs +2 -2
  1173. data/sig/openai/models/responses/response_output_message.rbs +6 -6
  1174. data/sig/openai/models/responses/response_output_refusal.rbs +2 -2
  1175. data/sig/openai/models/responses/response_output_text.rbs +13 -12
  1176. data/sig/openai/models/responses/response_output_text_annotation_added_event.rbs +11 -10
  1177. data/sig/openai/models/responses/response_prompt.rbs +4 -4
  1178. data/sig/openai/models/responses/response_queued_event.rbs +2 -2
  1179. data/sig/openai/models/responses/response_reasoning_item.rbs +12 -12
  1180. data/sig/openai/models/responses/response_reasoning_summary_part_added_event.rbs +4 -4
  1181. data/sig/openai/models/responses/response_reasoning_summary_part_done_event.rbs +6 -6
  1182. data/sig/openai/models/responses/response_reasoning_summary_text_delta_event.rbs +2 -2
  1183. data/sig/openai/models/responses/response_reasoning_summary_text_done_event.rbs +2 -2
  1184. data/sig/openai/models/responses/response_reasoning_text_delta_event.rbs +2 -2
  1185. data/sig/openai/models/responses/response_reasoning_text_done_event.rbs +2 -2
  1186. data/sig/openai/models/responses/response_refusal_delta_event.rbs +2 -2
  1187. data/sig/openai/models/responses/response_refusal_done_event.rbs +2 -2
  1188. data/sig/openai/models/responses/response_retrieve_params.rbs +8 -8
  1189. data/sig/openai/models/responses/response_shell_call_command_added_event.rbs +2 -2
  1190. data/sig/openai/models/responses/response_shell_call_command_delta_event.rbs +4 -4
  1191. data/sig/openai/models/responses/response_shell_call_command_done_event.rbs +2 -2
  1192. data/sig/openai/models/responses/response_shell_call_output_content_delta_event.rbs +4 -4
  1193. data/sig/openai/models/responses/response_shell_call_output_content_done_event.rbs +8 -8
  1194. data/sig/openai/models/responses/response_steer_accepted_event.rbs +51 -0
  1195. data/sig/openai/models/responses/response_steer_error_code.rbs +29 -0
  1196. data/sig/openai/models/responses/response_steer_event.rbs +32 -0
  1197. data/sig/openai/models/responses/response_steer_failed_event.rbs +100 -0
  1198. data/sig/openai/models/responses/response_steer_input.rbs +182 -0
  1199. data/sig/openai/models/responses/response_steer_input_content.rbs +16 -0
  1200. data/sig/openai/models/responses/response_steer_pending_event.rbs +61 -0
  1201. data/sig/openai/models/responses/response_steer_pending_reason.rbs +13 -0
  1202. data/sig/openai/models/responses/response_steer_required_input.rbs +159 -0
  1203. data/sig/openai/models/responses/response_text_config.rbs +4 -4
  1204. data/sig/openai/models/responses/response_text_delta_event.rbs +6 -6
  1205. data/sig/openai/models/responses/response_text_done_event.rbs +6 -6
  1206. data/sig/openai/models/responses/response_tool_search_call.rbs +4 -4
  1207. data/sig/openai/models/responses/response_tool_search_output_item.rbs +4 -4
  1208. data/sig/openai/models/responses/response_tool_search_output_item_param.rbs +10 -10
  1209. data/sig/openai/models/responses/response_web_search_call_completed_event.rbs +2 -2
  1210. data/sig/openai/models/responses/response_web_search_call_in_progress_event.rbs +2 -2
  1211. data/sig/openai/models/responses/response_web_search_call_searching_event.rbs +2 -2
  1212. data/sig/openai/models/responses/responses_client_event.rbs +360 -344
  1213. data/sig/openai/models/responses/responses_server_event.rbs +328 -254
  1214. data/sig/openai/models/responses/skill_reference.rbs +3 -3
  1215. data/sig/openai/models/responses/tool.rbs +80 -74
  1216. data/sig/openai/models/responses/tool_choice_allowed.rbs +2 -2
  1217. data/sig/openai/models/responses/tool_choice_apply_patch.rbs +2 -2
  1218. data/sig/openai/models/responses/tool_choice_custom.rbs +2 -2
  1219. data/sig/openai/models/responses/tool_choice_function.rbs +2 -2
  1220. data/sig/openai/models/responses/tool_choice_mcp.rbs +3 -2
  1221. data/sig/openai/models/responses/tool_choice_shell.rbs +2 -2
  1222. data/sig/openai/models/responses/tool_search_tool.rbs +8 -8
  1223. data/sig/openai/models/responses/web_search_preview_tool.rbs +16 -16
  1224. data/sig/openai/models/responses/web_search_tool.rbs +20 -20
  1225. data/sig/openai/models/safety/alert_retrieve_params.rbs +22 -0
  1226. data/sig/openai/models/safety/safety_alert.rbs +81 -0
  1227. data/sig/openai/models/skill.rbs +2 -2
  1228. data/sig/openai/models/skill_create_params.rbs +6 -4
  1229. data/sig/openai/models/skill_delete_params.rbs +2 -2
  1230. data/sig/openai/models/skill_list.rbs +2 -2
  1231. data/sig/openai/models/skill_list_params.rbs +8 -8
  1232. data/sig/openai/models/skill_retrieve_params.rbs +2 -2
  1233. data/sig/openai/models/skill_update_params.rbs +6 -3
  1234. data/sig/openai/models/skills/content_retrieve_params.rbs +2 -2
  1235. data/sig/openai/models/skills/deleted_skill_version.rbs +2 -2
  1236. data/sig/openai/models/skills/skill_version.rbs +2 -2
  1237. data/sig/openai/models/skills/skill_version_list.rbs +2 -2
  1238. data/sig/openai/models/skills/version_create_params.rbs +6 -6
  1239. data/sig/openai/models/skills/version_delete_params.rbs +6 -3
  1240. data/sig/openai/models/skills/version_list_params.rbs +8 -8
  1241. data/sig/openai/models/skills/version_retrieve_params.rbs +6 -3
  1242. data/sig/openai/models/skills/versions/content_retrieve_params.rbs +6 -3
  1243. data/sig/openai/models/static_file_chunking_strategy_object.rbs +2 -2
  1244. data/sig/openai/models/static_file_chunking_strategy_object_param.rbs +2 -2
  1245. data/sig/openai/models/upload.rbs +4 -4
  1246. data/sig/openai/models/upload_cancel_params.rbs +2 -2
  1247. data/sig/openai/models/upload_complete_params.rbs +8 -4
  1248. data/sig/openai/models/upload_create_params.rbs +6 -6
  1249. data/sig/openai/models/uploads/part_create_params.rbs +6 -3
  1250. data/sig/openai/models/uploads/upload_part.rbs +2 -2
  1251. data/sig/openai/models/vector_store.rbs +8 -8
  1252. data/sig/openai/models/vector_store_create_params.rbs +16 -16
  1253. data/sig/openai/models/vector_store_delete_params.rbs +2 -2
  1254. data/sig/openai/models/vector_store_deleted.rbs +2 -2
  1255. data/sig/openai/models/vector_store_list_params.rbs +10 -10
  1256. data/sig/openai/models/vector_store_retrieve_params.rbs +2 -2
  1257. data/sig/openai/models/vector_store_search_params.rbs +14 -14
  1258. data/sig/openai/models/vector_store_update_params.rbs +10 -10
  1259. data/sig/openai/models/vector_stores/file_batch_cancel_params.rbs +6 -3
  1260. data/sig/openai/models/vector_stores/file_batch_create_params.rbs +14 -14
  1261. data/sig/openai/models/vector_stores/file_batch_list_files_params.rbs +12 -12
  1262. data/sig/openai/models/vector_stores/file_batch_retrieve_params.rbs +6 -3
  1263. data/sig/openai/models/vector_stores/file_content_params.rbs +6 -3
  1264. data/sig/openai/models/vector_stores/file_content_response.rbs +2 -2
  1265. data/sig/openai/models/vector_stores/file_create_params.rbs +6 -6
  1266. data/sig/openai/models/vector_stores/file_delete_params.rbs +6 -3
  1267. data/sig/openai/models/vector_stores/file_list_params.rbs +12 -12
  1268. data/sig/openai/models/vector_stores/file_retrieve_params.rbs +6 -3
  1269. data/sig/openai/models/vector_stores/file_update_params.rbs +3 -3
  1270. data/sig/openai/models/vector_stores/vector_store_file.rbs +6 -6
  1271. data/sig/openai/models/vector_stores/vector_store_file_batch.rbs +2 -2
  1272. data/sig/openai/models/vector_stores/vector_store_file_deleted.rbs +2 -2
  1273. data/sig/openai/models/video.rbs +2 -2
  1274. data/sig/openai/models/video_create_character_params.rbs +6 -3
  1275. data/sig/openai/models/video_create_error.rbs +87 -3
  1276. data/sig/openai/models/video_create_params.rbs +10 -10
  1277. data/sig/openai/models/video_delete_params.rbs +2 -2
  1278. data/sig/openai/models/video_delete_response.rbs +2 -2
  1279. data/sig/openai/models/video_download_content_params.rbs +4 -4
  1280. data/sig/openai/models/video_edit_params.rbs +6 -3
  1281. data/sig/openai/models/video_extend_params.rbs +3 -3
  1282. data/sig/openai/models/video_get_character_params.rbs +2 -2
  1283. data/sig/openai/models/video_list_params.rbs +8 -8
  1284. data/sig/openai/models/video_remix_params.rbs +6 -3
  1285. data/sig/openai/models/video_retrieve_params.rbs +2 -2
  1286. data/sig/openai/models/webhooks/batch_cancelled_webhook_event.rbs +4 -4
  1287. data/sig/openai/models/webhooks/batch_completed_webhook_event.rbs +4 -4
  1288. data/sig/openai/models/webhooks/batch_expired_webhook_event.rbs +4 -4
  1289. data/sig/openai/models/webhooks/batch_failed_webhook_event.rbs +4 -4
  1290. data/sig/openai/models/webhooks/eval_run_canceled_webhook_event.rbs +4 -4
  1291. data/sig/openai/models/webhooks/eval_run_failed_webhook_event.rbs +4 -4
  1292. data/sig/openai/models/webhooks/eval_run_succeeded_webhook_event.rbs +4 -4
  1293. data/sig/openai/models/webhooks/fine_tuning_job_cancelled_webhook_event.rbs +4 -4
  1294. data/sig/openai/models/webhooks/fine_tuning_job_failed_webhook_event.rbs +4 -4
  1295. data/sig/openai/models/webhooks/fine_tuning_job_succeeded_webhook_event.rbs +4 -4
  1296. data/sig/openai/models/webhooks/live_call_incoming_webhook_event.rbs +4 -4
  1297. data/sig/openai/models/webhooks/realtime_call_incoming_webhook_event.rbs +4 -4
  1298. data/sig/openai/models/webhooks/response_cancelled_webhook_event.rbs +4 -4
  1299. data/sig/openai/models/webhooks/response_completed_webhook_event.rbs +4 -4
  1300. data/sig/openai/models/webhooks/response_failed_webhook_event.rbs +4 -4
  1301. data/sig/openai/models/webhooks/response_incomplete_webhook_event.rbs +4 -4
  1302. data/sig/openai/models/webhooks/safety_alert_created_webhook_event.rbs +52 -0
  1303. data/sig/openai/models/webhooks/safety_org_alert_created_webhook_event.rbs +52 -0
  1304. data/sig/openai/models/webhooks/unwrap_webhook_event.rbs +2 -0
  1305. data/sig/openai/models/webhooks/webhook_unwrap_params.rbs +2 -3
  1306. data/sig/openai/models.rbs +2 -0
  1307. data/sig/openai/request_options.rbs +7 -7
  1308. data/sig/openai/resources/admin/organization/projects/service_accounts/api_keys.rbs +1 -0
  1309. data/sig/openai/resources/audio/speech.rbs +1 -1
  1310. data/sig/openai/resources/containers/files/content.rbs +1 -1
  1311. data/sig/openai/resources/files.rbs +1 -1
  1312. data/sig/openai/resources/responses.rbs +51 -2
  1313. data/sig/openai/resources/safety/alerts.rbs +14 -0
  1314. data/sig/openai/resources/safety.rbs +9 -0
  1315. data/sig/openai/resources/skills/content.rbs +1 -1
  1316. data/sig/openai/resources/skills/versions/content.rbs +1 -1
  1317. data/sig/openai/resources/videos.rbs +1 -1
  1318. data/sig/openai/resources/webhooks.rbs +3 -1
  1319. data/sig/openai/response_carrier.rbs +13 -0
  1320. data/sig/openai/streaming.rbs +10 -0
  1321. metadata +127 -1
@@ -5,544 +5,46 @@ module OpenAI
5
5
 
6
6
  module Responses
7
7
 
8
- class ResponsesClientEvent < OpenAI::Internal::Type::BaseModel
8
+ # Client events accepted by the Responses WebSocket server.
9
+ module ResponsesClientEvent
10
+ extend OpenAI::Internal::Type::Union
9
11
 
10
- OrHash = T.type_alias do
12
+ Variants = T.type_alias do
11
13
  T.any(
12
- OpenAI::Responses::ResponsesClientEvent,
13
- OpenAI::Internal::AnyHash
14
+ OpenAI::Responses::ResponsesClientEvent::ResponseCreate,
15
+ OpenAI::Responses::ResponseSteerEvent
14
16
  )
15
17
  end
16
18
 
17
- # The type of the client event. Always `response.create`.
18
- sig { returns(Symbol) }
19
- attr_accessor :type
20
-
21
- # Whether to run the model response in the background.
22
- # [Learn more](https://platform.openai.com/docs/guides/background).
23
- sig { returns(T.nilable(T::Boolean)) }
24
- attr_accessor :background
25
-
26
- # Context management configuration for this request.
27
- sig { returns(T.nilable(T::Array[OpenAI::Responses::ResponsesClientEvent::ContextManagement])) }
28
- attr_accessor :context_management
29
-
30
- # The conversation that this response belongs to. Items from this conversation are
31
- # prepended to `input_items` for this response request. Input items and output
32
- # items from this response are automatically added to this conversation after this
33
- # response completes.
34
- sig { returns(T.nilable(T.any(String, OpenAI::Responses::ResponseConversationParam))) }
35
- attr_accessor :conversation
36
-
37
- # Specify additional output data to include in the model response. Currently
38
- # supported values are:
39
- #
40
- # - `web_search_call.action.sources`: Include the sources of the web search tool
41
- # call.
42
- # - `code_interpreter_call.outputs`: Includes the outputs of python code execution
43
- # in code interpreter tool call items.
44
- # - `computer_call_output.output.image_url`: Include image urls from the computer
45
- # call output.
46
- # - `file_search_call.results`: Include the search results of the file search tool
47
- # call.
48
- # - `message.input_image.image_url`: Include image urls from the input message.
49
- # - `message.output_text.logprobs`: Include logprobs with assistant messages.
50
- # - `reasoning.encrypted_content`: Includes an encrypted version of reasoning
51
- # tokens in reasoning item outputs. This enables reasoning items to be used in
52
- # multi-turn conversations when using the Responses API statelessly (like when
53
- # the `store` parameter is set to `false`, or when an organization is enrolled
54
- # in the zero data retention program).
55
- sig { returns(T.nilable(T::Array[OpenAI::Responses::ResponseIncludable::OrSymbol])) }
56
- attr_accessor :include
57
-
58
- # Text, image, or file inputs to the model, used to generate a response.
59
- #
60
- # Learn more:
61
- #
62
- # - [Text inputs and outputs](https://platform.openai.com/docs/guides/text)
63
- # - [Image inputs](https://platform.openai.com/docs/guides/images)
64
- # - [File inputs](https://platform.openai.com/docs/guides/pdf-files)
65
- # - [Conversation state](https://platform.openai.com/docs/guides/conversation-state)
66
- # - [Function calling](https://platform.openai.com/docs/guides/function-calling)
67
- sig { returns(T.nilable(OpenAI::Responses::ResponsesClientEvent::Input::Variants)) }
68
- attr_reader :input
69
-
70
- sig { params(input: OpenAI::Responses::ResponsesClientEvent::Input::Variants).void }
71
- attr_writer :input
72
-
73
- # A system (or developer) message inserted into the model's context.
74
- #
75
- # When using along with `previous_response_id`, the instructions from a previous
76
- # response will not be carried over to the next response. This makes it simple to
77
- # swap out system (or developer) messages in new responses.
78
- sig { returns(T.nilable(String)) }
79
- attr_accessor :instructions
80
-
81
- # An upper bound for the number of tokens that can be generated for a response,
82
- # including visible output tokens and
83
- # [reasoning tokens](https://platform.openai.com/docs/guides/reasoning).
84
- sig { returns(T.nilable(Integer)) }
85
- attr_accessor :max_output_tokens
86
-
87
- # The maximum number of total calls to built-in tools that can be processed in a
88
- # response. This maximum number applies across all built-in tool calls, not per
89
- # individual tool. Any further attempts to call a tool by the model will be
90
- # ignored.
91
- sig { returns(T.nilable(Integer)) }
92
- attr_accessor :max_tool_calls
93
-
94
- # Set of 16 key-value pairs that can be attached to an object. This can be useful
95
- # for storing additional information about the object in a structured format, and
96
- # querying for objects via API or the dashboard.
97
- #
98
- # Keys are strings with a maximum length of 64 characters. Values are strings with
99
- # a maximum length of 512 characters.
100
- sig { returns(T.nilable(T::Hash[Symbol, String])) }
101
- attr_accessor :metadata
102
-
103
- # Model ID used to generate the response, like `gpt-5.6-sol`. OpenAI offers a wide
104
- # range of models with different capabilities, performance characteristics, and
105
- # price points. Refer to the
106
- # [model guide](https://platform.openai.com/docs/models) to browse and compare
107
- # available models.
108
- sig {
109
- returns(
110
- T.nilable(T.any(String, OpenAI::ChatModel::OrSymbol, OpenAI::ResponsesModel::ResponsesOnlyModel::OrSymbol))
111
- )
112
- }
113
- attr_reader :model
114
-
115
- sig {
116
- params(
117
- model: T.any(String, OpenAI::ChatModel::OrSymbol, OpenAI::ResponsesModel::ResponsesOnlyModel::OrSymbol)
118
- )
119
- .void
120
- }
121
- attr_writer :model
122
-
123
- # Configuration for running moderation on the input and output of this response.
124
- sig { returns(T.nilable(OpenAI::Responses::ResponsesClientEvent::Moderation)) }
125
- attr_reader :moderation
126
-
127
- sig { params(moderation: T.nilable(OpenAI::Responses::ResponsesClientEvent::Moderation::OrHash)).void }
128
- attr_writer :moderation
129
-
130
- # Whether to allow the model to run tool calls in parallel.
131
- sig { returns(T.nilable(T::Boolean)) }
132
- attr_accessor :parallel_tool_calls
133
-
134
- # The unique ID of the previous response to the model. Use this to create
135
- # multi-turn conversations. Learn more about
136
- # [conversation state](https://platform.openai.com/docs/guides/conversation-state).
137
- # Cannot be used in conjunction with `conversation`.
138
- sig { returns(T.nilable(String)) }
139
- attr_accessor :previous_response_id
140
-
141
- # Reference to a prompt template and its variables.
142
- # [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts).
143
- sig { returns(T.nilable(OpenAI::Responses::ResponsePrompt)) }
144
- attr_reader :prompt
145
-
146
- sig { params(prompt: T.nilable(OpenAI::Responses::ResponsePrompt::OrHash)).void }
147
- attr_writer :prompt
148
-
149
- # Used by OpenAI to cache responses for similar requests to optimize your cache
150
- # hit rates. Replaces the `user` field.
151
- # [Learn more](https://platform.openai.com/docs/guides/prompt-caching).
152
- sig { returns(T.nilable(String)) }
153
- attr_accessor :prompt_cache_key
154
-
155
- # Options for prompt caching. Supported for `gpt-5.6` and later models. By
156
- # default, OpenAI automatically chooses one implicit cache breakpoint. You can add
157
- # explicit breakpoints to content blocks with `prompt_cache_breakpoint`. Each
158
- # request can write up to four breakpoints. For cache matching, OpenAI considers
159
- # up to the latest 80 breakpoints in the conversation, without a content-block
160
- # lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The
161
- # `ttl` defaults to `30m`, which is currently the only supported value. See the
162
- # [prompt caching guide](https://platform.openai.com/docs/guides/prompt-caching)
163
- # for current details.
164
- sig { returns(T.nilable(OpenAI::Responses::ResponsesClientEvent::PromptCacheOptions)) }
165
- attr_reader :prompt_cache_options
166
-
167
- sig { params(prompt_cache_options: OpenAI::Responses::ResponsesClientEvent::PromptCacheOptions::OrHash).void }
168
- attr_writer :prompt_cache_options
169
-
170
- # Deprecated. Use `prompt_cache_options.ttl` instead.
171
- #
172
- # The retention policy for the prompt cache. Set to `24h` to enable extended
173
- # prompt caching, which keeps cached prefixes active for longer, up to a maximum
174
- # of 24 hours.
175
- # [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention).
176
- # This field expresses a maximum retention policy, while
177
- # `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two fields
178
- # are independent and do not interact. For `gpt-5.5`, `gpt-5.5-pro`, and future
179
- # models, only `24h` is supported.
180
- #
181
- # For older models that support both `in_memory` and `24h`, the default depends on
182
- # your organization's data retention policy:
183
- #
184
- # - Organizations without ZDR enabled default to `24h`.
185
- # - Organizations with ZDR enabled default to `in_memory` when
186
- # `prompt_cache_retention` is not specified.
187
- sig { returns(T.nilable(OpenAI::Responses::ResponsesClientEvent::PromptCacheRetention::OrSymbol)) }
188
- attr_accessor :prompt_cache_retention
189
-
190
- # Configuration options for
191
- # [reasoning models](https://platform.openai.com/docs/guides/reasoning).
192
- sig { returns(T.nilable(OpenAI::Reasoning)) }
193
- attr_reader :reasoning
194
-
195
- sig { params(reasoning: T.nilable(OpenAI::Reasoning::OrHash)).void }
196
- attr_writer :reasoning
197
-
198
- # A stable identifier used to help detect users of your application that may be
199
- # violating OpenAI's usage policies. The IDs should be a string that uniquely
200
- # identifies each user, with a maximum length of 64 characters. We recommend
201
- # hashing their username or email address, in order to avoid sending us any
202
- # identifying information.
203
- # [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers).
204
- sig { returns(T.nilable(String)) }
205
- attr_accessor :safety_identifier
206
-
207
- # Specifies the processing type used for serving the request.
208
- #
209
- # - If set to 'auto', then the request will be processed with the service tier
210
- # configured in the Project settings. Unless otherwise configured, the Project
211
- # will use 'default'.
212
- # - If set to 'default', then the request will be processed with the standard
213
- # pricing and performance for the selected model.
214
- # - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)',
215
- # then the request will be processed with the Flex Processing service tier.
216
- # - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level,
217
- # include the `service_tier=fast` or `service_tier=priority` parameter for
218
- # Responses or Chat Completions. The response will show `service_tier=priority`
219
- # regardless of if you specify `service_tier=fast` or `priority` in your
220
- # request.
221
- # - If set to 'ultrafast', then the request will be processed with the
222
- # access-controlled Ultrafast Processing service tier. This tier is currently
223
- # available for `gpt-5.6-sol`; a response served through it will show
224
- # `service_tier=ultrafast`.
225
- # - When not set, the default behavior is 'auto'.
226
- #
227
- # When the `service_tier` parameter is set, the response body will include the
228
- # `service_tier` value based on the processing mode actually used to serve the
229
- # request. This response value may be different from the value set in the
230
- # parameter.
231
- sig { returns(T.nilable(OpenAI::Responses::ResponsesClientEvent::ServiceTier::OrSymbol)) }
232
- attr_accessor :service_tier
233
-
234
- # Whether to store the generated model response for later retrieval via API.
235
- sig { returns(T.nilable(T::Boolean)) }
236
- attr_accessor :store
237
-
238
- # If set to true, the model response data will be streamed to the client as it is
239
- # generated using
240
- # [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format).
241
- # See the
242
- # [Streaming section below](https://platform.openai.com/docs/api-reference/responses-streaming)
243
- # for more information.
244
- sig { returns(T.nilable(T::Boolean)) }
245
- attr_accessor :stream
246
-
247
- # The WebSocket lane for this response. Requests with the same `stream_id` are
248
- # processed FIFO, and events for the response echo the same `stream_id`.
249
- #
250
- # `stream_id` controls routing; `previous_response_id` controls conversation
251
- # lineage, so a new lane can fork from a response created on another lane.
252
- sig { returns(T.nilable(String)) }
253
- attr_reader :stream_id
254
-
255
- sig { params(stream_id: String).void }
256
- attr_writer :stream_id
257
-
258
- # Options for streaming responses. Only set this when you set `stream: true`.
259
- sig { returns(T.nilable(OpenAI::Responses::ResponsesClientEvent::StreamOptions)) }
260
- attr_reader :stream_options
261
-
262
- sig { params(stream_options: T.nilable(OpenAI::Responses::ResponsesClientEvent::StreamOptions::OrHash)).void }
263
- attr_writer :stream_options
264
-
265
- # What sampling temperature to use, between 0 and 2. Higher values like 0.8 will
266
- # make the output more random, while lower values like 0.2 will make it more
267
- # focused and deterministic. We generally recommend altering this or `top_p` but
268
- # not both.
269
- sig { returns(T.nilable(Float)) }
270
- attr_accessor :temperature
271
-
272
- # Configuration options for a text response from the model. Can be plain text or
273
- # structured JSON data. Learn more:
274
- #
275
- # - [Text inputs and outputs](https://platform.openai.com/docs/guides/text)
276
- # - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs)
277
- sig { returns(T.nilable(OpenAI::Responses::ResponseTextConfig)) }
278
- attr_reader :text
279
-
280
- sig { params(text: OpenAI::Responses::ResponseTextConfig::OrHash).void }
281
- attr_writer :text
282
-
283
- # How the model should select which tool (or tools) to use when generating a
284
- # response. See the `tools` parameter to see how to specify which tools the model
285
- # can call.
286
- sig {
287
- returns(
288
- T.nilable(
289
- T.any(
290
- OpenAI::Responses::ToolChoiceOptions::OrSymbol,
291
- OpenAI::Responses::ToolChoiceAllowed,
292
- OpenAI::Responses::ToolChoiceTypes,
293
- OpenAI::Responses::ToolChoiceFunction,
294
- OpenAI::Responses::ToolChoiceMcp,
295
- OpenAI::Responses::ToolChoiceCustom,
296
- OpenAI::Responses::ResponsesClientEvent::ToolChoice::SpecificProgrammaticToolCallingParam,
297
- OpenAI::Responses::ToolChoiceApplyPatch,
298
- OpenAI::Responses::ToolChoiceShell
299
- )
300
- )
301
- )
302
- }
303
- attr_reader :tool_choice
304
-
305
- sig {
306
- params(
307
- tool_choice: T.any(
308
- OpenAI::Responses::ToolChoiceOptions::OrSymbol,
309
- OpenAI::Responses::ToolChoiceAllowed::OrHash,
310
- OpenAI::Responses::ToolChoiceTypes::OrHash,
311
- OpenAI::Responses::ToolChoiceFunction::OrHash,
312
- OpenAI::Responses::ToolChoiceMcp::OrHash,
313
- OpenAI::Responses::ToolChoiceCustom::OrHash,
314
- OpenAI::Responses::ResponsesClientEvent::ToolChoice::SpecificProgrammaticToolCallingParam::OrHash,
315
- OpenAI::Responses::ToolChoiceApplyPatch::OrHash,
316
- OpenAI::Responses::ToolChoiceShell::OrHash
317
- )
318
- )
319
- .void
320
- }
321
- attr_writer :tool_choice
322
-
323
- # An array of tools the model may call while generating a response. You can
324
- # specify which tool to use by setting the `tool_choice` parameter.
325
- #
326
- # We support the following categories of tools:
327
- #
328
- # - **Built-in tools**: Tools that are provided by OpenAI that extend the model's
329
- # capabilities, like
330
- # [web search](https://platform.openai.com/docs/guides/tools-web-search) or
331
- # [file search](https://platform.openai.com/docs/guides/tools-file-search).
332
- # Learn more about
333
- # [built-in tools](https://platform.openai.com/docs/guides/tools).
334
- # - **MCP Tools**: Integrations with third-party systems via custom MCP servers or
335
- # predefined connectors such as Google Drive and SharePoint. Learn more about
336
- # [MCP Tools](https://platform.openai.com/docs/guides/tools-connectors-mcp).
337
- # - **Function calls (custom tools)**: Functions that are defined by you, enabling
338
- # the model to call your own code with strongly typed arguments and outputs.
339
- # Learn more about
340
- # [function calling](https://platform.openai.com/docs/guides/function-calling).
341
- # You can also use custom tools to call your own code.
342
- sig {
343
- returns(
344
- T.nilable(
345
- T::Array[
346
- T.any(
347
- OpenAI::Responses::FunctionTool,
348
- OpenAI::Responses::FileSearchTool,
349
- OpenAI::Responses::ComputerTool,
350
- OpenAI::Responses::ComputerUsePreviewTool,
351
- OpenAI::Responses::Tool::Mcp,
352
- OpenAI::Responses::Tool::CodeInterpreter,
353
- OpenAI::Responses::Tool::ProgrammaticToolCalling,
354
- OpenAI::Responses::Tool::ImageGeneration,
355
- OpenAI::Responses::Tool::LocalShell,
356
- OpenAI::Responses::FunctionShellTool,
357
- OpenAI::Responses::CustomTool,
358
- OpenAI::Responses::NamespaceTool,
359
- OpenAI::Responses::ToolSearchTool,
360
- OpenAI::Responses::ApplyPatchTool,
361
- OpenAI::Responses::WebSearchTool,
362
- OpenAI::Responses::WebSearchPreviewTool
363
- )
364
- ]
19
+ class ResponseCreate < OpenAI::Internal::Type::BaseModel
20
+ OrHash = T.type_alias do
21
+ T.any(
22
+ OpenAI::Responses::ResponsesClientEvent::ResponseCreate,
23
+ OpenAI::Internal::AnyHash
365
24
  )
366
- )
367
- }
368
- attr_reader :tools
369
-
370
- sig {
371
- params(
372
- tools: T::Array[
373
- T.any(
374
- OpenAI::Responses::FunctionTool::OrHash,
375
- OpenAI::Responses::FileSearchTool::OrHash,
376
- OpenAI::Responses::ComputerTool::OrHash,
377
- OpenAI::Responses::ComputerUsePreviewTool::OrHash,
378
- OpenAI::Responses::Tool::Mcp::OrHash,
379
- OpenAI::Responses::Tool::CodeInterpreter::OrHash,
380
- OpenAI::Responses::Tool::ProgrammaticToolCalling::OrHash,
381
- OpenAI::Responses::Tool::ImageGeneration::OrHash,
382
- OpenAI::Responses::Tool::LocalShell::OrHash,
383
- OpenAI::Responses::FunctionShellTool::OrHash,
384
- OpenAI::Responses::CustomTool::OrHash,
385
- OpenAI::Responses::NamespaceTool::OrHash,
386
- OpenAI::Responses::ToolSearchTool::OrHash,
387
- OpenAI::Responses::ApplyPatchTool::OrHash,
388
- OpenAI::Responses::WebSearchTool::OrHash,
389
- OpenAI::Responses::WebSearchPreviewTool::OrHash
390
- )
391
- ]
392
- )
393
- .void
394
- }
395
- attr_writer :tools
396
-
397
- # An integer between 0 and 20 specifying the maximum number of most likely tokens
398
- # to return at each token position, each with an associated log probability. In
399
- # some cases, the number of returned tokens may be fewer than requested.
400
- sig { returns(T.nilable(Integer)) }
401
- attr_accessor :top_logprobs
402
-
403
- # An alternative to sampling with temperature, called nucleus sampling, where the
404
- # model considers the results of the tokens with top_p probability mass. So 0.1
405
- # means only the tokens comprising the top 10% probability mass are considered.
406
- #
407
- # We generally recommend altering this or `temperature` but not both.
408
- sig { returns(T.nilable(Float)) }
409
- attr_accessor :top_p
410
-
411
- # The truncation strategy to use for the model response.
412
- #
413
- # - `auto`: If the input to this Response exceeds the model's context window size,
414
- # the model will truncate the response to fit the context window by dropping
415
- # items from the beginning of the conversation.
416
- # - `disabled` (default): If the input size will exceed the context window size
417
- # for a model, the request will fail with a 400 error.
418
- sig { returns(T.nilable(OpenAI::Responses::ResponsesClientEvent::Truncation::OrSymbol)) }
419
- attr_accessor :truncation
420
-
421
- # This field is being replaced by `safety_identifier` and `prompt_cache_key`. Use
422
- # `prompt_cache_key` instead to maintain caching optimizations. A stable
423
- # identifier for your end-users. Used to boost cache hit rates by better bucketing
424
- # similar requests and to help OpenAI detect and prevent abuse.
425
- # [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers).
426
- sig { returns(T.nilable(String)) }
427
- attr_reader :user
428
-
429
- sig { params(user: String).void }
430
- attr_writer :user
431
-
432
- sig do
433
- params(
434
-
435
- background: T.nilable(T::Boolean),
436
-
437
- context_management: T.nilable(T::Array[OpenAI::Responses::ResponsesClientEvent::ContextManagement::OrHash]),
438
-
439
- conversation: T.nilable(T.any(String, OpenAI::Responses::ResponseConversationParam::OrHash)),
440
-
441
- include: T.nilable(T::Array[OpenAI::Responses::ResponseIncludable::OrSymbol]),
442
-
443
- input: OpenAI::Responses::ResponsesClientEvent::Input::Variants,
444
-
445
- instructions: T.nilable(String),
446
-
447
- max_output_tokens: T.nilable(Integer),
448
-
449
- max_tool_calls: T.nilable(Integer),
450
-
451
- metadata: T.nilable(T::Hash[Symbol, String]),
452
-
453
- model: T.any(String, OpenAI::ChatModel::OrSymbol, OpenAI::ResponsesModel::ResponsesOnlyModel::OrSymbol),
454
-
455
- moderation: T.nilable(OpenAI::Responses::ResponsesClientEvent::Moderation::OrHash),
456
-
457
- parallel_tool_calls: T.nilable(T::Boolean),
458
-
459
- previous_response_id: T.nilable(String),
460
-
461
- prompt: T.nilable(OpenAI::Responses::ResponsePrompt::OrHash),
462
-
463
- prompt_cache_key: T.nilable(String),
464
-
465
- prompt_cache_options: OpenAI::Responses::ResponsesClientEvent::PromptCacheOptions::OrHash,
466
-
467
- prompt_cache_retention: T.nilable(OpenAI::Responses::ResponsesClientEvent::PromptCacheRetention::OrSymbol),
468
-
469
- reasoning: T.nilable(OpenAI::Reasoning::OrHash),
470
-
471
- safety_identifier: T.nilable(String),
472
-
473
- service_tier: T.nilable(OpenAI::Responses::ResponsesClientEvent::ServiceTier::OrSymbol),
474
-
475
- store: T.nilable(T::Boolean),
476
-
477
- stream: T.nilable(T::Boolean),
478
-
479
- stream_id: String,
480
-
481
- stream_options: T.nilable(OpenAI::Responses::ResponsesClientEvent::StreamOptions::OrHash),
482
-
483
- temperature: T.nilable(Float),
484
-
485
- text: OpenAI::Responses::ResponseTextConfig::OrHash,
486
-
487
- tool_choice: T.any(
488
- OpenAI::Responses::ToolChoiceOptions::OrSymbol,
489
- OpenAI::Responses::ToolChoiceAllowed::OrHash,
490
- OpenAI::Responses::ToolChoiceTypes::OrHash,
491
- OpenAI::Responses::ToolChoiceFunction::OrHash,
492
- OpenAI::Responses::ToolChoiceMcp::OrHash,
493
- OpenAI::Responses::ToolChoiceCustom::OrHash,
494
- OpenAI::Responses::ResponsesClientEvent::ToolChoice::SpecificProgrammaticToolCallingParam::OrHash,
495
- OpenAI::Responses::ToolChoiceApplyPatch::OrHash,
496
- OpenAI::Responses::ToolChoiceShell::OrHash
497
- ),
498
-
499
- tools: T::Array[
500
- T.any(
501
- OpenAI::Responses::FunctionTool::OrHash,
502
- OpenAI::Responses::FileSearchTool::OrHash,
503
- OpenAI::Responses::ComputerTool::OrHash,
504
- OpenAI::Responses::ComputerUsePreviewTool::OrHash,
505
- OpenAI::Responses::Tool::Mcp::OrHash,
506
- OpenAI::Responses::Tool::CodeInterpreter::OrHash,
507
- OpenAI::Responses::Tool::ProgrammaticToolCalling::OrHash,
508
- OpenAI::Responses::Tool::ImageGeneration::OrHash,
509
- OpenAI::Responses::Tool::LocalShell::OrHash,
510
- OpenAI::Responses::FunctionShellTool::OrHash,
511
- OpenAI::Responses::CustomTool::OrHash,
512
- OpenAI::Responses::NamespaceTool::OrHash,
513
- OpenAI::Responses::ToolSearchTool::OrHash,
514
- OpenAI::Responses::ApplyPatchTool::OrHash,
515
- OpenAI::Responses::WebSearchTool::OrHash,
516
- OpenAI::Responses::WebSearchPreviewTool::OrHash
517
- )
518
- ],
519
-
520
- top_logprobs: T.nilable(Integer),
521
-
522
- top_p: T.nilable(Float),
523
-
524
- truncation: T.nilable(OpenAI::Responses::ResponsesClientEvent::Truncation::OrSymbol),
525
-
526
- user: String,
25
+ end
527
26
 
528
- type: Symbol
529
- )
530
- .returns(T.attached_class)
531
- end
532
- def self.new(
27
+ # The type of the client event. Always `response.create`.
28
+ sig { returns(Symbol) }
29
+ attr_accessor :type
533
30
 
534
31
  # Whether to run the model response in the background.
535
32
  # [Learn more](https://platform.openai.com/docs/guides/background).
536
- background: nil,
33
+ sig { returns(T.nilable(T::Boolean)) }
34
+ attr_accessor :background
537
35
 
538
36
  # Context management configuration for this request.
539
- context_management: nil,
37
+ sig {
38
+ returns(T.nilable(T::Array[OpenAI::Responses::ResponsesClientEvent::ResponseCreate::ContextManagement]))
39
+ }
40
+ attr_accessor :context_management
540
41
 
541
42
  # The conversation that this response belongs to. Items from this conversation are
542
43
  # prepended to `input_items` for this response request. Input items and output
543
44
  # items from this response are automatically added to this conversation after this
544
45
  # response completes.
545
- conversation: nil,
46
+ sig { returns(T.nilable(T.any(String, OpenAI::Responses::ResponseConversationParam))) }
47
+ attr_accessor :conversation
546
48
 
547
49
  # Specify additional output data to include in the model response. Currently
548
50
  # supported values are:
@@ -562,7 +64,8 @@ module OpenAI
562
64
  # multi-turn conversations when using the Responses API statelessly (like when
563
65
  # the `store` parameter is set to `false`, or when an organization is enrolled
564
66
  # in the zero data retention program).
565
- include: nil,
67
+ sig { returns(T.nilable(T::Array[OpenAI::Responses::ResponseIncludable::OrSymbol])) }
68
+ attr_accessor :include
566
69
 
567
70
  # Text, image, or file inputs to the model, used to generate a response.
568
71
  #
@@ -573,25 +76,32 @@ module OpenAI
573
76
  # - [File inputs](https://platform.openai.com/docs/guides/pdf-files)
574
77
  # - [Conversation state](https://platform.openai.com/docs/guides/conversation-state)
575
78
  # - [Function calling](https://platform.openai.com/docs/guides/function-calling)
576
- input: nil,
79
+ sig { returns(T.nilable(OpenAI::Responses::ResponsesClientEvent::ResponseCreate::Input::Variants)) }
80
+ attr_reader :input
81
+
82
+ sig { params(input: OpenAI::Responses::ResponsesClientEvent::ResponseCreate::Input::Variants).void }
83
+ attr_writer :input
577
84
 
578
85
  # A system (or developer) message inserted into the model's context.
579
86
  #
580
87
  # When using along with `previous_response_id`, the instructions from a previous
581
88
  # response will not be carried over to the next response. This makes it simple to
582
89
  # swap out system (or developer) messages in new responses.
583
- instructions: nil,
90
+ sig { returns(T.nilable(String)) }
91
+ attr_accessor :instructions
584
92
 
585
93
  # An upper bound for the number of tokens that can be generated for a response,
586
94
  # including visible output tokens and
587
95
  # [reasoning tokens](https://platform.openai.com/docs/guides/reasoning).
588
- max_output_tokens: nil,
96
+ sig { returns(T.nilable(Integer)) }
97
+ attr_accessor :max_output_tokens
589
98
 
590
99
  # The maximum number of total calls to built-in tools that can be processed in a
591
100
  # response. This maximum number applies across all built-in tool calls, not per
592
101
  # individual tool. Any further attempts to call a tool by the model will be
593
102
  # ignored.
594
- max_tool_calls: nil,
103
+ sig { returns(T.nilable(Integer)) }
104
+ attr_accessor :max_tool_calls
595
105
 
596
106
  # Set of 16 key-value pairs that can be attached to an object. This can be useful
597
107
  # for storing additional information about the object in a structured format, and
@@ -599,35 +109,65 @@ module OpenAI
599
109
  #
600
110
  # Keys are strings with a maximum length of 64 characters. Values are strings with
601
111
  # a maximum length of 512 characters.
602
- metadata: nil,
112
+ sig { returns(T.nilable(T::Hash[Symbol, String])) }
113
+ attr_accessor :metadata
603
114
 
604
- # Model ID used to generate the response, like `gpt-5.6-sol`. OpenAI offers a wide
115
+ # Model ID used to generate the response, like `gpt-6-astra`. OpenAI offers a wide
605
116
  # range of models with different capabilities, performance characteristics, and
606
117
  # price points. Refer to the
607
118
  # [model guide](https://platform.openai.com/docs/models) to browse and compare
608
119
  # available models.
609
- model: nil,
120
+ sig {
121
+ returns(
122
+ T.nilable(
123
+ T.any(String, OpenAI::ChatModel::OrSymbol, OpenAI::ResponsesModel::ResponsesOnlyModel::OrSymbol)
124
+ )
125
+ )
126
+ }
127
+ attr_reader :model
128
+
129
+ sig {
130
+ params(
131
+ model: T.any(String, OpenAI::ChatModel::OrSymbol, OpenAI::ResponsesModel::ResponsesOnlyModel::OrSymbol)
132
+ )
133
+ .void
134
+ }
135
+ attr_writer :model
610
136
 
611
137
  # Configuration for running moderation on the input and output of this response.
612
- moderation: nil,
138
+ sig { returns(T.nilable(OpenAI::Responses::ResponsesClientEvent::ResponseCreate::Moderation)) }
139
+ attr_reader :moderation
140
+
141
+ sig {
142
+ params(moderation: T.nilable(OpenAI::Responses::ResponsesClientEvent::ResponseCreate::Moderation::OrHash))
143
+ .void
144
+ }
145
+ attr_writer :moderation
613
146
 
614
147
  # Whether to allow the model to run tool calls in parallel.
615
- parallel_tool_calls: nil,
148
+ sig { returns(T.nilable(T::Boolean)) }
149
+ attr_accessor :parallel_tool_calls
616
150
 
617
151
  # The unique ID of the previous response to the model. Use this to create
618
152
  # multi-turn conversations. Learn more about
619
153
  # [conversation state](https://platform.openai.com/docs/guides/conversation-state).
620
154
  # Cannot be used in conjunction with `conversation`.
621
- previous_response_id: nil,
155
+ sig { returns(T.nilable(String)) }
156
+ attr_accessor :previous_response_id
622
157
 
623
158
  # Reference to a prompt template and its variables.
624
159
  # [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts).
625
- prompt: nil,
160
+ sig { returns(T.nilable(OpenAI::Responses::ResponsePrompt)) }
161
+ attr_reader :prompt
162
+
163
+ sig { params(prompt: T.nilable(OpenAI::Responses::ResponsePrompt::OrHash)).void }
164
+ attr_writer :prompt
626
165
 
627
166
  # Used by OpenAI to cache responses for similar requests to optimize your cache
628
167
  # hit rates. Replaces the `user` field.
629
168
  # [Learn more](https://platform.openai.com/docs/guides/prompt-caching).
630
- prompt_cache_key: nil,
169
+ sig { returns(T.nilable(String)) }
170
+ attr_accessor :prompt_cache_key
631
171
 
632
172
  # Options for prompt caching. Supported for `gpt-5.6` and later models. By
633
173
  # default, OpenAI automatically chooses one implicit cache breakpoint. You can add
@@ -638,7 +178,16 @@ module OpenAI
638
178
  # `ttl` defaults to `30m`, which is currently the only supported value. See the
639
179
  # [prompt caching guide](https://platform.openai.com/docs/guides/prompt-caching)
640
180
  # for current details.
641
- prompt_cache_options: nil,
181
+ sig { returns(T.nilable(OpenAI::Responses::ResponsesClientEvent::ResponseCreate::PromptCacheOptions)) }
182
+ attr_reader :prompt_cache_options
183
+
184
+ sig {
185
+ params(
186
+ prompt_cache_options: OpenAI::Responses::ResponsesClientEvent::ResponseCreate::PromptCacheOptions::OrHash
187
+ )
188
+ .void
189
+ }
190
+ attr_writer :prompt_cache_options
642
191
 
643
192
  # Deprecated. Use `prompt_cache_options.ttl` instead.
644
193
  #
@@ -657,11 +206,18 @@ module OpenAI
657
206
  # - Organizations without ZDR enabled default to `24h`.
658
207
  # - Organizations with ZDR enabled default to `in_memory` when
659
208
  # `prompt_cache_retention` is not specified.
660
- prompt_cache_retention: nil,
209
+ sig {
210
+ returns(T.nilable(OpenAI::Responses::ResponsesClientEvent::ResponseCreate::PromptCacheRetention::OrSymbol))
211
+ }
212
+ attr_accessor :prompt_cache_retention
661
213
 
662
214
  # Configuration options for
663
215
  # [reasoning models](https://platform.openai.com/docs/guides/reasoning).
664
- reasoning: nil,
216
+ sig { returns(T.nilable(OpenAI::Reasoning)) }
217
+ attr_reader :reasoning
218
+
219
+ sig { params(reasoning: T.nilable(OpenAI::Reasoning::OrHash)).void }
220
+ attr_writer :reasoning
665
221
 
666
222
  # A stable identifier used to help detect users of your application that may be
667
223
  # violating OpenAI's usage policies. The IDs should be a string that uniquely
@@ -669,7 +225,8 @@ module OpenAI
669
225
  # hashing their username or email address, in order to avoid sending us any
670
226
  # identifying information.
671
227
  # [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers).
672
- safety_identifier: nil,
228
+ sig { returns(T.nilable(String)) }
229
+ attr_accessor :safety_identifier
673
230
 
674
231
  # Specifies the processing type used for serving the request.
675
232
  #
@@ -695,10 +252,12 @@ module OpenAI
695
252
  # `service_tier` value based on the processing mode actually used to serve the
696
253
  # request. This response value may be different from the value set in the
697
254
  # parameter.
698
- service_tier: nil,
255
+ sig { returns(T.nilable(OpenAI::Responses::ResponsesClientEvent::ResponseCreate::ServiceTier::OrSymbol)) }
256
+ attr_accessor :service_tier
699
257
 
700
258
  # Whether to store the generated model response for later retrieval via API.
701
- store: nil,
259
+ sig { returns(T.nilable(T::Boolean)) }
260
+ attr_accessor :store
702
261
 
703
262
  # If set to true, the model response data will be streamed to the client as it is
704
263
  # generated using
@@ -706,35 +265,89 @@ module OpenAI
706
265
  # See the
707
266
  # [Streaming section below](https://platform.openai.com/docs/api-reference/responses-streaming)
708
267
  # for more information.
709
- stream: nil,
268
+ sig { returns(T.nilable(T::Boolean)) }
269
+ attr_accessor :stream
710
270
 
711
271
  # The WebSocket lane for this response. Requests with the same `stream_id` are
712
272
  # processed FIFO, and events for the response echo the same `stream_id`.
713
273
  #
714
274
  # `stream_id` controls routing; `previous_response_id` controls conversation
715
275
  # lineage, so a new lane can fork from a response created on another lane.
716
- stream_id: nil,
276
+ sig { returns(T.nilable(String)) }
277
+ attr_reader :stream_id
278
+
279
+ sig { params(stream_id: String).void }
280
+ attr_writer :stream_id
717
281
 
718
282
  # Options for streaming responses. Only set this when you set `stream: true`.
719
- stream_options: nil,
283
+ sig { returns(T.nilable(OpenAI::Responses::ResponsesClientEvent::ResponseCreate::StreamOptions)) }
284
+ attr_reader :stream_options
285
+
286
+ sig {
287
+ params(
288
+ stream_options: T.nilable(OpenAI::Responses::ResponsesClientEvent::ResponseCreate::StreamOptions::OrHash)
289
+ )
290
+ .void
291
+ }
292
+ attr_writer :stream_options
720
293
 
721
294
  # What sampling temperature to use, between 0 and 2. Higher values like 0.8 will
722
295
  # make the output more random, while lower values like 0.2 will make it more
723
296
  # focused and deterministic. We generally recommend altering this or `top_p` but
724
297
  # not both.
725
- temperature: nil,
298
+ sig { returns(T.nilable(Float)) }
299
+ attr_accessor :temperature
726
300
 
727
301
  # Configuration options for a text response from the model. Can be plain text or
728
302
  # structured JSON data. Learn more:
729
303
  #
730
304
  # - [Text inputs and outputs](https://platform.openai.com/docs/guides/text)
731
305
  # - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs)
732
- text: nil,
306
+ sig { returns(T.nilable(OpenAI::Responses::ResponseTextConfig)) }
307
+ attr_reader :text
308
+
309
+ sig { params(text: OpenAI::Responses::ResponseTextConfig::OrHash).void }
310
+ attr_writer :text
733
311
 
734
312
  # How the model should select which tool (or tools) to use when generating a
735
313
  # response. See the `tools` parameter to see how to specify which tools the model
736
314
  # can call.
737
- tool_choice: nil,
315
+ sig {
316
+ returns(
317
+ T.nilable(
318
+ T.any(
319
+ OpenAI::Responses::ToolChoiceOptions::OrSymbol,
320
+ OpenAI::Responses::ToolChoiceAllowed,
321
+ OpenAI::Responses::ToolChoiceTypes,
322
+ OpenAI::Responses::ToolChoiceFunction,
323
+ OpenAI::Responses::ToolChoiceMcp,
324
+ OpenAI::Responses::ToolChoiceCustom,
325
+ OpenAI::Responses::ResponsesClientEvent::ResponseCreate::ToolChoice::SpecificProgrammaticToolCallingParam,
326
+ OpenAI::Responses::ToolChoiceApplyPatch,
327
+ OpenAI::Responses::ToolChoiceShell
328
+ )
329
+ )
330
+ )
331
+ }
332
+ attr_reader :tool_choice
333
+
334
+ sig {
335
+ params(
336
+ tool_choice: T.any(
337
+ OpenAI::Responses::ToolChoiceOptions::OrSymbol,
338
+ OpenAI::Responses::ToolChoiceAllowed::OrHash,
339
+ OpenAI::Responses::ToolChoiceTypes::OrHash,
340
+ OpenAI::Responses::ToolChoiceFunction::OrHash,
341
+ OpenAI::Responses::ToolChoiceMcp::OrHash,
342
+ OpenAI::Responses::ToolChoiceCustom::OrHash,
343
+ OpenAI::Responses::ResponsesClientEvent::ResponseCreate::ToolChoice::SpecificProgrammaticToolCallingParam::OrHash,
344
+ OpenAI::Responses::ToolChoiceApplyPatch::OrHash,
345
+ OpenAI::Responses::ToolChoiceShell::OrHash
346
+ )
347
+ )
348
+ .void
349
+ }
350
+ attr_writer :tool_choice
738
351
 
739
352
  # An array of tools the model may call while generating a response. You can
740
353
  # specify which tool to use by setting the `tool_choice` parameter.
@@ -755,19 +368,74 @@ module OpenAI
755
368
  # Learn more about
756
369
  # [function calling](https://platform.openai.com/docs/guides/function-calling).
757
370
  # You can also use custom tools to call your own code.
758
- tools: nil,
371
+ sig {
372
+ returns(
373
+ T.nilable(
374
+ T::Array[
375
+ T.any(
376
+ OpenAI::Responses::FunctionTool,
377
+ OpenAI::Responses::FileSearchTool,
378
+ OpenAI::Responses::ComputerTool,
379
+ OpenAI::Responses::ComputerUsePreviewTool,
380
+ OpenAI::Responses::Tool::Mcp,
381
+ OpenAI::Responses::Tool::CodeInterpreter,
382
+ OpenAI::Responses::Tool::ProgrammaticToolCalling,
383
+ OpenAI::Responses::Tool::ImageGeneration,
384
+ OpenAI::Responses::Tool::LocalShell,
385
+ OpenAI::Responses::FunctionShellTool,
386
+ OpenAI::Responses::CustomTool,
387
+ OpenAI::Responses::NamespaceTool,
388
+ OpenAI::Responses::ToolSearchTool,
389
+ OpenAI::Responses::ApplyPatchTool,
390
+ OpenAI::Responses::WebSearchTool,
391
+ OpenAI::Responses::WebSearchPreviewTool
392
+ )
393
+ ]
394
+ )
395
+ )
396
+ }
397
+ attr_reader :tools
398
+
399
+ sig {
400
+ params(
401
+ tools: T::Array[
402
+ T.any(
403
+ OpenAI::Responses::FunctionTool::OrHash,
404
+ OpenAI::Responses::FileSearchTool::OrHash,
405
+ OpenAI::Responses::ComputerTool::OrHash,
406
+ OpenAI::Responses::ComputerUsePreviewTool::OrHash,
407
+ OpenAI::Responses::Tool::Mcp::OrHash,
408
+ OpenAI::Responses::Tool::CodeInterpreter::OrHash,
409
+ OpenAI::Responses::Tool::ProgrammaticToolCalling::OrHash,
410
+ OpenAI::Responses::Tool::ImageGeneration::OrHash,
411
+ OpenAI::Responses::Tool::LocalShell::OrHash,
412
+ OpenAI::Responses::FunctionShellTool::OrHash,
413
+ OpenAI::Responses::CustomTool::OrHash,
414
+ OpenAI::Responses::NamespaceTool::OrHash,
415
+ OpenAI::Responses::ToolSearchTool::OrHash,
416
+ OpenAI::Responses::ApplyPatchTool::OrHash,
417
+ OpenAI::Responses::WebSearchTool::OrHash,
418
+ OpenAI::Responses::WebSearchPreviewTool::OrHash
419
+ )
420
+ ]
421
+ )
422
+ .void
423
+ }
424
+ attr_writer :tools
759
425
 
760
426
  # An integer between 0 and 20 specifying the maximum number of most likely tokens
761
427
  # to return at each token position, each with an associated log probability. In
762
428
  # some cases, the number of returned tokens may be fewer than requested.
763
- top_logprobs: nil,
429
+ sig { returns(T.nilable(Integer)) }
430
+ attr_accessor :top_logprobs
764
431
 
765
432
  # An alternative to sampling with temperature, called nucleus sampling, where the
766
433
  # model considers the results of the tokens with top_p probability mass. So 0.1
767
434
  # means only the tokens comprising the top 10% probability mass are considered.
768
435
  #
769
436
  # We generally recommend altering this or `temperature` but not both.
770
- top_p: nil,
437
+ sig { returns(T.nilable(Float)) }
438
+ attr_accessor :top_p
771
439
 
772
440
  # The truncation strategy to use for the model response.
773
441
  #
@@ -776,452 +444,950 @@ module OpenAI
776
444
  # items from the beginning of the conversation.
777
445
  # - `disabled` (default): If the input size will exceed the context window size
778
446
  # for a model, the request will fail with a 400 error.
779
- truncation: nil,
447
+ sig { returns(T.nilable(OpenAI::Responses::ResponsesClientEvent::ResponseCreate::Truncation::OrSymbol)) }
448
+ attr_accessor :truncation
780
449
 
781
450
  # This field is being replaced by `safety_identifier` and `prompt_cache_key`. Use
782
451
  # `prompt_cache_key` instead to maintain caching optimizations. A stable
783
452
  # identifier for your end-users. Used to boost cache hit rates by better bucketing
784
453
  # similar requests and to help OpenAI detect and prevent abuse.
785
454
  # [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers).
786
- user: nil,
455
+ sig { returns(T.nilable(String)) }
456
+ attr_reader :user
787
457
 
788
- # The type of the client event. Always `response.create`.
458
+ sig { params(user: String).void }
459
+ attr_writer :user
789
460
 
790
- type: :"response.create"
791
- )
792
- end
461
+ # Client event for creating a response over a persistent WebSocket connection.
462
+ # This payload uses the same top-level fields as `POST /v1/responses`, plus
463
+ # WebSocket-only envelope metadata.
464
+ #
465
+ # Notes:
466
+ #
467
+ # - `stream` is implicit over WebSocket and should not be sent.
468
+ # - `background` is not supported over WebSocket.
469
+ # - `stream_id` is WebSocket-only and is not part of `POST /v1/responses`.
470
+ sig do
471
+ params(
793
472
 
794
- sig do
795
- override.returns(
796
- {
797
- type: Symbol,
798
473
  background: T.nilable(T::Boolean),
799
- context_management: T.nilable(T::Array[OpenAI::Responses::ResponsesClientEvent::ContextManagement]),
800
- conversation: T.nilable(T.any(String, OpenAI::Responses::ResponseConversationParam)),
474
+
475
+ context_management: T.nilable(
476
+ T::Array[OpenAI::Responses::ResponsesClientEvent::ResponseCreate::ContextManagement::OrHash]
477
+ ),
478
+
479
+ conversation: T.nilable(T.any(String, OpenAI::Responses::ResponseConversationParam::OrHash)),
480
+
801
481
  include: T.nilable(T::Array[OpenAI::Responses::ResponseIncludable::OrSymbol]),
802
- input: OpenAI::Responses::ResponsesClientEvent::Input::Variants,
482
+
483
+ input: OpenAI::Responses::ResponsesClientEvent::ResponseCreate::Input::Variants,
484
+
803
485
  instructions: T.nilable(String),
486
+
804
487
  max_output_tokens: T.nilable(Integer),
488
+
805
489
  max_tool_calls: T.nilable(Integer),
490
+
806
491
  metadata: T.nilable(T::Hash[Symbol, String]),
492
+
807
493
  model: T.any(String, OpenAI::ChatModel::OrSymbol, OpenAI::ResponsesModel::ResponsesOnlyModel::OrSymbol),
808
- moderation: T.nilable(OpenAI::Responses::ResponsesClientEvent::Moderation),
494
+
495
+ moderation: T.nilable(OpenAI::Responses::ResponsesClientEvent::ResponseCreate::Moderation::OrHash),
496
+
809
497
  parallel_tool_calls: T.nilable(T::Boolean),
498
+
810
499
  previous_response_id: T.nilable(String),
811
- prompt: T.nilable(OpenAI::Responses::ResponsePrompt),
500
+
501
+ prompt: T.nilable(OpenAI::Responses::ResponsePrompt::OrHash),
502
+
812
503
  prompt_cache_key: T.nilable(String),
813
- prompt_cache_options: OpenAI::Responses::ResponsesClientEvent::PromptCacheOptions,
814
- prompt_cache_retention: T.nilable(OpenAI::Responses::ResponsesClientEvent::PromptCacheRetention::OrSymbol),
815
- reasoning: T.nilable(OpenAI::Reasoning),
504
+
505
+ prompt_cache_options: OpenAI::Responses::ResponsesClientEvent::ResponseCreate::PromptCacheOptions::OrHash,
506
+
507
+ prompt_cache_retention: T.nilable(
508
+ OpenAI::Responses::ResponsesClientEvent::ResponseCreate::PromptCacheRetention::OrSymbol
509
+ ),
510
+
511
+ reasoning: T.nilable(OpenAI::Reasoning::OrHash),
512
+
816
513
  safety_identifier: T.nilable(String),
817
- service_tier: T.nilable(OpenAI::Responses::ResponsesClientEvent::ServiceTier::OrSymbol),
514
+
515
+ service_tier: T.nilable(OpenAI::Responses::ResponsesClientEvent::ResponseCreate::ServiceTier::OrSymbol),
516
+
818
517
  store: T.nilable(T::Boolean),
518
+
819
519
  stream: T.nilable(T::Boolean),
520
+
820
521
  stream_id: String,
821
- stream_options: T.nilable(OpenAI::Responses::ResponsesClientEvent::StreamOptions),
522
+
523
+ stream_options: T.nilable(OpenAI::Responses::ResponsesClientEvent::ResponseCreate::StreamOptions::OrHash),
524
+
822
525
  temperature: T.nilable(Float),
823
- text: OpenAI::Responses::ResponseTextConfig,
526
+
527
+ text: OpenAI::Responses::ResponseTextConfig::OrHash,
528
+
824
529
  tool_choice: T.any(
825
530
  OpenAI::Responses::ToolChoiceOptions::OrSymbol,
826
- OpenAI::Responses::ToolChoiceAllowed,
827
- OpenAI::Responses::ToolChoiceTypes,
828
- OpenAI::Responses::ToolChoiceFunction,
829
- OpenAI::Responses::ToolChoiceMcp,
830
- OpenAI::Responses::ToolChoiceCustom,
831
- OpenAI::Responses::ResponsesClientEvent::ToolChoice::SpecificProgrammaticToolCallingParam,
832
- OpenAI::Responses::ToolChoiceApplyPatch,
833
- OpenAI::Responses::ToolChoiceShell
531
+ OpenAI::Responses::ToolChoiceAllowed::OrHash,
532
+ OpenAI::Responses::ToolChoiceTypes::OrHash,
533
+ OpenAI::Responses::ToolChoiceFunction::OrHash,
534
+ OpenAI::Responses::ToolChoiceMcp::OrHash,
535
+ OpenAI::Responses::ToolChoiceCustom::OrHash,
536
+ OpenAI::Responses::ResponsesClientEvent::ResponseCreate::ToolChoice::SpecificProgrammaticToolCallingParam::OrHash,
537
+ OpenAI::Responses::ToolChoiceApplyPatch::OrHash,
538
+ OpenAI::Responses::ToolChoiceShell::OrHash
834
539
  ),
540
+
835
541
  tools: T::Array[
836
542
  T.any(
837
- OpenAI::Responses::FunctionTool,
838
- OpenAI::Responses::FileSearchTool,
839
- OpenAI::Responses::ComputerTool,
840
- OpenAI::Responses::ComputerUsePreviewTool,
841
- OpenAI::Responses::Tool::Mcp,
842
- OpenAI::Responses::Tool::CodeInterpreter,
843
- OpenAI::Responses::Tool::ProgrammaticToolCalling,
844
- OpenAI::Responses::Tool::ImageGeneration,
845
- OpenAI::Responses::Tool::LocalShell,
846
- OpenAI::Responses::FunctionShellTool,
847
- OpenAI::Responses::CustomTool,
848
- OpenAI::Responses::NamespaceTool,
849
- OpenAI::Responses::ToolSearchTool,
850
- OpenAI::Responses::ApplyPatchTool,
851
- OpenAI::Responses::WebSearchTool,
852
- OpenAI::Responses::WebSearchPreviewTool
543
+ OpenAI::Responses::FunctionTool::OrHash,
544
+ OpenAI::Responses::FileSearchTool::OrHash,
545
+ OpenAI::Responses::ComputerTool::OrHash,
546
+ OpenAI::Responses::ComputerUsePreviewTool::OrHash,
547
+ OpenAI::Responses::Tool::Mcp::OrHash,
548
+ OpenAI::Responses::Tool::CodeInterpreter::OrHash,
549
+ OpenAI::Responses::Tool::ProgrammaticToolCalling::OrHash,
550
+ OpenAI::Responses::Tool::ImageGeneration::OrHash,
551
+ OpenAI::Responses::Tool::LocalShell::OrHash,
552
+ OpenAI::Responses::FunctionShellTool::OrHash,
553
+ OpenAI::Responses::CustomTool::OrHash,
554
+ OpenAI::Responses::NamespaceTool::OrHash,
555
+ OpenAI::Responses::ToolSearchTool::OrHash,
556
+ OpenAI::Responses::ApplyPatchTool::OrHash,
557
+ OpenAI::Responses::WebSearchTool::OrHash,
558
+ OpenAI::Responses::WebSearchPreviewTool::OrHash
853
559
  )
854
560
  ],
855
- top_logprobs: T.nilable(Integer),
856
- top_p: T.nilable(Float),
857
- truncation: T.nilable(OpenAI::Responses::ResponsesClientEvent::Truncation::OrSymbol),
858
- user: String
859
- }
860
- )
861
- end
862
- def to_hash
863
- end
864
-
865
- class ContextManagement < OpenAI::Internal::Type::BaseModel
866
- OrHash = T.type_alias do
867
- T.any(
868
- OpenAI::Responses::ResponsesClientEvent::ContextManagement,
869
- OpenAI::Internal::AnyHash
870
- )
871
- end
872
561
 
873
- # The context management entry type. Currently only 'compaction' is supported.
874
- sig { returns(String) }
875
- attr_accessor :type
562
+ top_logprobs: T.nilable(Integer),
876
563
 
877
- # Token threshold at which compaction should be triggered for this entry.
878
- sig { returns(T.nilable(Integer)) }
879
- attr_accessor :compact_threshold
564
+ top_p: T.nilable(Float),
880
565
 
881
- sig do
882
- params(
566
+ truncation: T.nilable(OpenAI::Responses::ResponsesClientEvent::ResponseCreate::Truncation::OrSymbol),
883
567
 
884
- type: String,
568
+ user: String,
885
569
 
886
- compact_threshold: T.nilable(Integer)
570
+ type: Symbol
887
571
  )
888
572
  .returns(T.attached_class)
889
573
  end
890
574
  def self.new(
891
575
 
892
- # The context management entry type. Currently only 'compaction' is supported.
893
- type:,
894
-
895
- # Token threshold at which compaction should be triggered for this entry.
896
-
897
- compact_threshold: nil
576
+ # Whether to run the model response in the background.
577
+ # [Learn more](https://platform.openai.com/docs/guides/background).
578
+ background: nil,
579
+
580
+ # Context management configuration for this request.
581
+ context_management: nil,
582
+
583
+ # The conversation that this response belongs to. Items from this conversation are
584
+ # prepended to `input_items` for this response request. Input items and output
585
+ # items from this response are automatically added to this conversation after this
586
+ # response completes.
587
+ conversation: nil,
588
+
589
+ # Specify additional output data to include in the model response. Currently
590
+ # supported values are:
591
+ #
592
+ # - `web_search_call.action.sources`: Include the sources of the web search tool
593
+ # call.
594
+ # - `code_interpreter_call.outputs`: Includes the outputs of python code execution
595
+ # in code interpreter tool call items.
596
+ # - `computer_call_output.output.image_url`: Include image urls from the computer
597
+ # call output.
598
+ # - `file_search_call.results`: Include the search results of the file search tool
599
+ # call.
600
+ # - `message.input_image.image_url`: Include image urls from the input message.
601
+ # - `message.output_text.logprobs`: Include logprobs with assistant messages.
602
+ # - `reasoning.encrypted_content`: Includes an encrypted version of reasoning
603
+ # tokens in reasoning item outputs. This enables reasoning items to be used in
604
+ # multi-turn conversations when using the Responses API statelessly (like when
605
+ # the `store` parameter is set to `false`, or when an organization is enrolled
606
+ # in the zero data retention program).
607
+ include: nil,
608
+
609
+ # Text, image, or file inputs to the model, used to generate a response.
610
+ #
611
+ # Learn more:
612
+ #
613
+ # - [Text inputs and outputs](https://platform.openai.com/docs/guides/text)
614
+ # - [Image inputs](https://platform.openai.com/docs/guides/images)
615
+ # - [File inputs](https://platform.openai.com/docs/guides/pdf-files)
616
+ # - [Conversation state](https://platform.openai.com/docs/guides/conversation-state)
617
+ # - [Function calling](https://platform.openai.com/docs/guides/function-calling)
618
+ input: nil,
619
+
620
+ # A system (or developer) message inserted into the model's context.
621
+ #
622
+ # When using along with `previous_response_id`, the instructions from a previous
623
+ # response will not be carried over to the next response. This makes it simple to
624
+ # swap out system (or developer) messages in new responses.
625
+ instructions: nil,
626
+
627
+ # An upper bound for the number of tokens that can be generated for a response,
628
+ # including visible output tokens and
629
+ # [reasoning tokens](https://platform.openai.com/docs/guides/reasoning).
630
+ max_output_tokens: nil,
631
+
632
+ # The maximum number of total calls to built-in tools that can be processed in a
633
+ # response. This maximum number applies across all built-in tool calls, not per
634
+ # individual tool. Any further attempts to call a tool by the model will be
635
+ # ignored.
636
+ max_tool_calls: nil,
637
+
638
+ # Set of 16 key-value pairs that can be attached to an object. This can be useful
639
+ # for storing additional information about the object in a structured format, and
640
+ # querying for objects via API or the dashboard.
641
+ #
642
+ # Keys are strings with a maximum length of 64 characters. Values are strings with
643
+ # a maximum length of 512 characters.
644
+ metadata: nil,
645
+
646
+ # Model ID used to generate the response, like `gpt-6-astra`. OpenAI offers a wide
647
+ # range of models with different capabilities, performance characteristics, and
648
+ # price points. Refer to the
649
+ # [model guide](https://platform.openai.com/docs/models) to browse and compare
650
+ # available models.
651
+ model: nil,
652
+
653
+ # Configuration for running moderation on the input and output of this response.
654
+ moderation: nil,
655
+
656
+ # Whether to allow the model to run tool calls in parallel.
657
+ parallel_tool_calls: nil,
658
+
659
+ # The unique ID of the previous response to the model. Use this to create
660
+ # multi-turn conversations. Learn more about
661
+ # [conversation state](https://platform.openai.com/docs/guides/conversation-state).
662
+ # Cannot be used in conjunction with `conversation`.
663
+ previous_response_id: nil,
664
+
665
+ # Reference to a prompt template and its variables.
666
+ # [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts).
667
+ prompt: nil,
668
+
669
+ # Used by OpenAI to cache responses for similar requests to optimize your cache
670
+ # hit rates. Replaces the `user` field.
671
+ # [Learn more](https://platform.openai.com/docs/guides/prompt-caching).
672
+ prompt_cache_key: nil,
673
+
674
+ # Options for prompt caching. Supported for `gpt-5.6` and later models. By
675
+ # default, OpenAI automatically chooses one implicit cache breakpoint. You can add
676
+ # explicit breakpoints to content blocks with `prompt_cache_breakpoint`. Each
677
+ # request can write up to four breakpoints. For cache matching, OpenAI considers
678
+ # up to the latest 80 breakpoints in the conversation, without a content-block
679
+ # lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The
680
+ # `ttl` defaults to `30m`, which is currently the only supported value. See the
681
+ # [prompt caching guide](https://platform.openai.com/docs/guides/prompt-caching)
682
+ # for current details.
683
+ prompt_cache_options: nil,
684
+
685
+ # Deprecated. Use `prompt_cache_options.ttl` instead.
686
+ #
687
+ # The retention policy for the prompt cache. Set to `24h` to enable extended
688
+ # prompt caching, which keeps cached prefixes active for longer, up to a maximum
689
+ # of 24 hours.
690
+ # [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention).
691
+ # This field expresses a maximum retention policy, while
692
+ # `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two fields
693
+ # are independent and do not interact. For `gpt-5.5`, `gpt-5.5-pro`, and future
694
+ # models, only `24h` is supported.
695
+ #
696
+ # For older models that support both `in_memory` and `24h`, the default depends on
697
+ # your organization's data retention policy:
698
+ #
699
+ # - Organizations without ZDR enabled default to `24h`.
700
+ # - Organizations with ZDR enabled default to `in_memory` when
701
+ # `prompt_cache_retention` is not specified.
702
+ prompt_cache_retention: nil,
703
+
704
+ # Configuration options for
705
+ # [reasoning models](https://platform.openai.com/docs/guides/reasoning).
706
+ reasoning: nil,
707
+
708
+ # A stable identifier used to help detect users of your application that may be
709
+ # violating OpenAI's usage policies. The IDs should be a string that uniquely
710
+ # identifies each user, with a maximum length of 64 characters. We recommend
711
+ # hashing their username or email address, in order to avoid sending us any
712
+ # identifying information.
713
+ # [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers).
714
+ safety_identifier: nil,
715
+
716
+ # Specifies the processing type used for serving the request.
717
+ #
718
+ # - If set to 'auto', then the request will be processed with the service tier
719
+ # configured in the Project settings. Unless otherwise configured, the Project
720
+ # will use 'default'.
721
+ # - If set to 'default', then the request will be processed with the standard
722
+ # pricing and performance for the selected model.
723
+ # - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)',
724
+ # then the request will be processed with the Flex Processing service tier.
725
+ # - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level,
726
+ # include the `service_tier=fast` or `service_tier=priority` parameter for
727
+ # Responses or Chat Completions. The response will show `service_tier=priority`
728
+ # regardless of if you specify `service_tier=fast` or `priority` in your
729
+ # request.
730
+ # - If set to 'ultrafast', then the request will be processed with the
731
+ # access-controlled Ultrafast Processing service tier. This tier is currently
732
+ # available for `gpt-5.6-sol`; a response served through it will show
733
+ # `service_tier=ultrafast`.
734
+ # - When not set, the default behavior is 'auto'.
735
+ #
736
+ # When the `service_tier` parameter is set, the response body will include the
737
+ # `service_tier` value based on the processing mode actually used to serve the
738
+ # request. This response value may be different from the value set in the
739
+ # parameter.
740
+ service_tier: nil,
741
+
742
+ # Whether to store the generated model response for later retrieval via API.
743
+ store: nil,
744
+
745
+ # If set to true, the model response data will be streamed to the client as it is
746
+ # generated using
747
+ # [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format).
748
+ # See the
749
+ # [Streaming section below](https://platform.openai.com/docs/api-reference/responses-streaming)
750
+ # for more information.
751
+ stream: nil,
752
+
753
+ # The WebSocket lane for this response. Requests with the same `stream_id` are
754
+ # processed FIFO, and events for the response echo the same `stream_id`.
755
+ #
756
+ # `stream_id` controls routing; `previous_response_id` controls conversation
757
+ # lineage, so a new lane can fork from a response created on another lane.
758
+ stream_id: nil,
759
+
760
+ # Options for streaming responses. Only set this when you set `stream: true`.
761
+ stream_options: nil,
762
+
763
+ # What sampling temperature to use, between 0 and 2. Higher values like 0.8 will
764
+ # make the output more random, while lower values like 0.2 will make it more
765
+ # focused and deterministic. We generally recommend altering this or `top_p` but
766
+ # not both.
767
+ temperature: nil,
768
+
769
+ # Configuration options for a text response from the model. Can be plain text or
770
+ # structured JSON data. Learn more:
771
+ #
772
+ # - [Text inputs and outputs](https://platform.openai.com/docs/guides/text)
773
+ # - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs)
774
+ text: nil,
775
+
776
+ # How the model should select which tool (or tools) to use when generating a
777
+ # response. See the `tools` parameter to see how to specify which tools the model
778
+ # can call.
779
+ tool_choice: nil,
780
+
781
+ # An array of tools the model may call while generating a response. You can
782
+ # specify which tool to use by setting the `tool_choice` parameter.
783
+ #
784
+ # We support the following categories of tools:
785
+ #
786
+ # - **Built-in tools**: Tools that are provided by OpenAI that extend the model's
787
+ # capabilities, like
788
+ # [web search](https://platform.openai.com/docs/guides/tools-web-search) or
789
+ # [file search](https://platform.openai.com/docs/guides/tools-file-search).
790
+ # Learn more about
791
+ # [built-in tools](https://platform.openai.com/docs/guides/tools).
792
+ # - **MCP Tools**: Integrations with third-party systems via custom MCP servers or
793
+ # predefined connectors such as Google Drive and SharePoint. Learn more about
794
+ # [MCP Tools](https://platform.openai.com/docs/guides/tools-connectors-mcp).
795
+ # - **Function calls (custom tools)**: Functions that are defined by you, enabling
796
+ # the model to call your own code with strongly typed arguments and outputs.
797
+ # Learn more about
798
+ # [function calling](https://platform.openai.com/docs/guides/function-calling).
799
+ # You can also use custom tools to call your own code.
800
+ tools: nil,
801
+
802
+ # An integer between 0 and 20 specifying the maximum number of most likely tokens
803
+ # to return at each token position, each with an associated log probability. In
804
+ # some cases, the number of returned tokens may be fewer than requested.
805
+ top_logprobs: nil,
806
+
807
+ # An alternative to sampling with temperature, called nucleus sampling, where the
808
+ # model considers the results of the tokens with top_p probability mass. So 0.1
809
+ # means only the tokens comprising the top 10% probability mass are considered.
810
+ #
811
+ # We generally recommend altering this or `temperature` but not both.
812
+ top_p: nil,
813
+
814
+ # The truncation strategy to use for the model response.
815
+ #
816
+ # - `auto`: If the input to this Response exceeds the model's context window size,
817
+ # the model will truncate the response to fit the context window by dropping
818
+ # items from the beginning of the conversation.
819
+ # - `disabled` (default): If the input size will exceed the context window size
820
+ # for a model, the request will fail with a 400 error.
821
+ truncation: nil,
822
+
823
+ # This field is being replaced by `safety_identifier` and `prompt_cache_key`. Use
824
+ # `prompt_cache_key` instead to maintain caching optimizations. A stable
825
+ # identifier for your end-users. Used to boost cache hit rates by better bucketing
826
+ # similar requests and to help OpenAI detect and prevent abuse.
827
+ # [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers).
828
+ user: nil,
829
+
830
+ # The type of the client event. Always `response.create`.
831
+
832
+ type: :"response.create"
898
833
  )
899
834
  end
900
835
 
901
836
  sig do
902
837
  override.returns(
903
- {type: String, compact_threshold: T.nilable(Integer)}
838
+ {
839
+ type: Symbol,
840
+ background: T.nilable(T::Boolean),
841
+ context_management: T.nilable(
842
+ T::Array[OpenAI::Responses::ResponsesClientEvent::ResponseCreate::ContextManagement]
843
+ ),
844
+ conversation: T.nilable(T.any(String, OpenAI::Responses::ResponseConversationParam)),
845
+ include: T.nilable(T::Array[OpenAI::Responses::ResponseIncludable::OrSymbol]),
846
+ input: T.nilable(OpenAI::Responses::ResponsesClientEvent::ResponseCreate::Input::Variants),
847
+ instructions: T.nilable(String),
848
+ max_output_tokens: T.nilable(Integer),
849
+ max_tool_calls: T.nilable(Integer),
850
+ metadata: T.nilable(T::Hash[Symbol, String]),
851
+ model: T.nilable(
852
+ T.any(String, OpenAI::ChatModel::OrSymbol, OpenAI::ResponsesModel::ResponsesOnlyModel::OrSymbol)
853
+ ),
854
+ moderation: T.nilable(OpenAI::Responses::ResponsesClientEvent::ResponseCreate::Moderation),
855
+ parallel_tool_calls: T.nilable(T::Boolean),
856
+ previous_response_id: T.nilable(String),
857
+ prompt: T.nilable(OpenAI::Responses::ResponsePrompt),
858
+ prompt_cache_key: T.nilable(String),
859
+ prompt_cache_options: T.nilable(
860
+ OpenAI::Responses::ResponsesClientEvent::ResponseCreate::PromptCacheOptions
861
+ ),
862
+ prompt_cache_retention: T.nilable(
863
+ OpenAI::Responses::ResponsesClientEvent::ResponseCreate::PromptCacheRetention::OrSymbol
864
+ ),
865
+ reasoning: T.nilable(OpenAI::Reasoning),
866
+ safety_identifier: T.nilable(String),
867
+ service_tier: T.nilable(OpenAI::Responses::ResponsesClientEvent::ResponseCreate::ServiceTier::OrSymbol),
868
+ store: T.nilable(T::Boolean),
869
+ stream: T.nilable(T::Boolean),
870
+ stream_id: T.nilable(String),
871
+ stream_options: T.nilable(OpenAI::Responses::ResponsesClientEvent::ResponseCreate::StreamOptions),
872
+ temperature: T.nilable(Float),
873
+ text: T.nilable(OpenAI::Responses::ResponseTextConfig),
874
+ tool_choice: T.nilable(
875
+ T.any(
876
+ OpenAI::Responses::ToolChoiceOptions::OrSymbol,
877
+ OpenAI::Responses::ToolChoiceAllowed,
878
+ OpenAI::Responses::ToolChoiceTypes,
879
+ OpenAI::Responses::ToolChoiceFunction,
880
+ OpenAI::Responses::ToolChoiceMcp,
881
+ OpenAI::Responses::ToolChoiceCustom,
882
+ OpenAI::Responses::ResponsesClientEvent::ResponseCreate::ToolChoice::SpecificProgrammaticToolCallingParam,
883
+ OpenAI::Responses::ToolChoiceApplyPatch,
884
+ OpenAI::Responses::ToolChoiceShell
885
+ )
886
+ ),
887
+ tools: T.nilable(
888
+ T::Array[
889
+ T.any(
890
+ OpenAI::Responses::FunctionTool,
891
+ OpenAI::Responses::FileSearchTool,
892
+ OpenAI::Responses::ComputerTool,
893
+ OpenAI::Responses::ComputerUsePreviewTool,
894
+ OpenAI::Responses::Tool::Mcp,
895
+ OpenAI::Responses::Tool::CodeInterpreter,
896
+ OpenAI::Responses::Tool::ProgrammaticToolCalling,
897
+ OpenAI::Responses::Tool::ImageGeneration,
898
+ OpenAI::Responses::Tool::LocalShell,
899
+ OpenAI::Responses::FunctionShellTool,
900
+ OpenAI::Responses::CustomTool,
901
+ OpenAI::Responses::NamespaceTool,
902
+ OpenAI::Responses::ToolSearchTool,
903
+ OpenAI::Responses::ApplyPatchTool,
904
+ OpenAI::Responses::WebSearchTool,
905
+ OpenAI::Responses::WebSearchPreviewTool
906
+ )
907
+ ]
908
+ ),
909
+ top_logprobs: T.nilable(Integer),
910
+ top_p: T.nilable(Float),
911
+ truncation: T.nilable(OpenAI::Responses::ResponsesClientEvent::ResponseCreate::Truncation::OrSymbol),
912
+ user: T.nilable(String)
913
+ }
904
914
  )
905
915
  end
906
916
  def to_hash
907
917
  end
908
918
 
909
- end
919
+ class ContextManagement < OpenAI::Internal::Type::BaseModel
920
+ OrHash = T.type_alias do
921
+ T.any(
922
+ OpenAI::Responses::ResponsesClientEvent::ResponseCreate::ContextManagement,
923
+ OpenAI::Internal::AnyHash
924
+ )
925
+ end
910
926
 
911
- # The conversation that this response belongs to. Items from this conversation are
912
- # prepended to `input_items` for this response request. Input items and output
913
- # items from this response are automatically added to this conversation after this
914
- # response completes.
915
- module Conversation
916
- extend OpenAI::Internal::Type::Union
927
+ # The context management entry type. Currently only 'compaction' is supported.
928
+ sig { returns(String) }
929
+ attr_accessor :type
917
930
 
918
- Variants = T.type_alias { T.any(String, OpenAI::Responses::ResponseConversationParam) }
931
+ # Token threshold at which compaction should be triggered for this entry.
932
+ sig { returns(T.nilable(Integer)) }
933
+ attr_accessor :compact_threshold
919
934
 
920
- sig { override.returns(T::Array[OpenAI::Responses::ResponsesClientEvent::Conversation::Variants]) }
921
- def self.variants
922
- end
935
+ sig do
936
+ params(
923
937
 
924
- end
938
+ type: String,
925
939
 
926
- # Text, image, or file inputs to the model, used to generate a response.
927
- #
928
- # Learn more:
929
- #
930
- # - [Text inputs and outputs](https://platform.openai.com/docs/guides/text)
931
- # - [Image inputs](https://platform.openai.com/docs/guides/images)
932
- # - [File inputs](https://platform.openai.com/docs/guides/pdf-files)
933
- # - [Conversation state](https://platform.openai.com/docs/guides/conversation-state)
934
- # - [Function calling](https://platform.openai.com/docs/guides/function-calling)
935
- module Input
936
- extend OpenAI::Internal::Type::Union
937
-
938
- Variants = T.type_alias { T.any(String, T::Array[OpenAI::Responses::ResponseInputItem::Variants]) }
939
-
940
- sig { override.returns(T::Array[OpenAI::Responses::ResponsesClientEvent::Input::Variants]) }
941
- def self.variants
942
- end
940
+ compact_threshold: T.nilable(Integer)
941
+ )
942
+ .returns(T.attached_class)
943
+ end
944
+ def self.new(
943
945
 
944
- end
946
+ # The context management entry type. Currently only 'compaction' is supported.
947
+ type:,
945
948
 
946
- class Moderation < OpenAI::Internal::Type::BaseModel
947
- OrHash = T.type_alias do
948
- T.any(
949
- OpenAI::Responses::ResponsesClientEvent::Moderation,
950
- OpenAI::Internal::AnyHash
949
+ # Token threshold at which compaction should be triggered for this entry.
950
+
951
+ compact_threshold: nil
951
952
  )
952
- end
953
+ end
953
954
 
954
- # The moderation model to use for moderated completions, e.g.
955
- # 'omni-moderation-latest'.
956
- sig { returns(String) }
957
- attr_accessor :model
955
+ sig do
956
+ override.returns(
957
+ {type: String, compact_threshold: T.nilable(Integer)}
958
+ )
959
+ end
960
+ def to_hash
961
+ end
958
962
 
959
- # The policy to apply to moderated response input and output.
960
- sig { returns(T.nilable(OpenAI::Responses::ResponsesClientEvent::Moderation::Policy)) }
961
- attr_reader :policy
963
+ end
962
964
 
963
- sig { params(policy: T.nilable(OpenAI::Responses::ResponsesClientEvent::Moderation::Policy::OrHash)).void }
964
- attr_writer :policy
965
+ # The conversation that this response belongs to. Items from this conversation are
966
+ # prepended to `input_items` for this response request. Input items and output
967
+ # items from this response are automatically added to this conversation after this
968
+ # response completes.
969
+ module Conversation
970
+ extend OpenAI::Internal::Type::Union
965
971
 
966
- # Configuration for running moderation on the input and output of this response.
967
- sig do
968
- params(
972
+ Variants = T.type_alias { T.any(String, OpenAI::Responses::ResponseConversationParam) }
969
973
 
970
- model: String,
974
+ sig {
975
+ override.returns(
976
+ T::Array[OpenAI::Responses::ResponsesClientEvent::ResponseCreate::Conversation::Variants]
977
+ )
978
+ }
979
+ def self.variants
980
+ end
971
981
 
972
- policy: T.nilable(OpenAI::Responses::ResponsesClientEvent::Moderation::Policy::OrHash)
973
- )
974
- .returns(T.attached_class)
975
982
  end
976
- def self.new(
977
-
978
- # The moderation model to use for moderated completions, e.g.
979
- # 'omni-moderation-latest'.
980
- model:,
981
983
 
982
- # The policy to apply to moderated response input and output.
984
+ # Text, image, or file inputs to the model, used to generate a response.
985
+ #
986
+ # Learn more:
987
+ #
988
+ # - [Text inputs and outputs](https://platform.openai.com/docs/guides/text)
989
+ # - [Image inputs](https://platform.openai.com/docs/guides/images)
990
+ # - [File inputs](https://platform.openai.com/docs/guides/pdf-files)
991
+ # - [Conversation state](https://platform.openai.com/docs/guides/conversation-state)
992
+ # - [Function calling](https://platform.openai.com/docs/guides/function-calling)
993
+ module Input
994
+ extend OpenAI::Internal::Type::Union
983
995
 
984
- policy: nil
985
- )
986
- end
996
+ Variants = T.type_alias { T.any(String, T::Array[OpenAI::Responses::ResponseInputItem::Variants]) }
997
+
998
+ sig {
999
+ override.returns(T::Array[OpenAI::Responses::ResponsesClientEvent::ResponseCreate::Input::Variants])
1000
+ }
1001
+ def self.variants
1002
+ end
987
1003
 
988
- sig do
989
- override.returns(
990
- {model: String, policy: T.nilable(OpenAI::Responses::ResponsesClientEvent::Moderation::Policy)}
991
- )
992
- end
993
- def to_hash
994
1004
  end
995
1005
 
996
- class Policy < OpenAI::Internal::Type::BaseModel
1006
+ class Moderation < OpenAI::Internal::Type::BaseModel
997
1007
  OrHash = T.type_alias do
998
1008
  T.any(
999
- OpenAI::Responses::ResponsesClientEvent::Moderation::Policy,
1009
+ OpenAI::Responses::ResponsesClientEvent::ResponseCreate::Moderation,
1000
1010
  OpenAI::Internal::AnyHash
1001
1011
  )
1002
1012
  end
1003
1013
 
1004
- # The moderation policy for the response input.
1005
- sig { returns(T.nilable(OpenAI::Responses::ResponsesClientEvent::Moderation::Policy::Input)) }
1006
- attr_reader :input
1007
-
1008
- sig {
1009
- params(input: T.nilable(OpenAI::Responses::ResponsesClientEvent::Moderation::Policy::Input::OrHash)).void
1010
- }
1011
- attr_writer :input
1014
+ # The moderation model to use for moderated completions, e.g.
1015
+ # 'omni-moderation-latest'.
1016
+ sig { returns(String) }
1017
+ attr_accessor :model
1012
1018
 
1013
- # The moderation policy for the response output.
1014
- sig { returns(T.nilable(OpenAI::Responses::ResponsesClientEvent::Moderation::Policy::Output)) }
1015
- attr_reader :output
1019
+ # The policy to apply to moderated response input and output.
1020
+ sig { returns(T.nilable(OpenAI::Responses::ResponsesClientEvent::ResponseCreate::Moderation::Policy)) }
1021
+ attr_reader :policy
1016
1022
 
1017
1023
  sig {
1018
- params(output: T.nilable(OpenAI::Responses::ResponsesClientEvent::Moderation::Policy::Output::OrHash))
1024
+ params(
1025
+ policy: T.nilable(OpenAI::Responses::ResponsesClientEvent::ResponseCreate::Moderation::Policy::OrHash)
1026
+ )
1019
1027
  .void
1020
1028
  }
1021
- attr_writer :output
1029
+ attr_writer :policy
1022
1030
 
1023
- # The policy to apply to moderated response input and output.
1031
+ # Configuration for running moderation on the input and output of this response.
1024
1032
  sig do
1025
1033
  params(
1026
1034
 
1027
- input: T.nilable(OpenAI::Responses::ResponsesClientEvent::Moderation::Policy::Input::OrHash),
1035
+ model: String,
1028
1036
 
1029
- output: T.nilable(OpenAI::Responses::ResponsesClientEvent::Moderation::Policy::Output::OrHash)
1037
+ policy: T.nilable(OpenAI::Responses::ResponsesClientEvent::ResponseCreate::Moderation::Policy::OrHash)
1030
1038
  )
1031
1039
  .returns(T.attached_class)
1032
1040
  end
1033
1041
  def self.new(
1034
1042
 
1035
- # The moderation policy for the response input.
1036
- input: nil,
1043
+ # The moderation model to use for moderated completions, e.g.
1044
+ # 'omni-moderation-latest'.
1045
+ model:,
1037
1046
 
1038
- # The moderation policy for the response output.
1047
+ # The policy to apply to moderated response input and output.
1039
1048
 
1040
- output: nil
1049
+ policy: nil
1041
1050
  )
1042
1051
  end
1043
1052
 
1044
1053
  sig do
1045
1054
  override.returns(
1046
1055
  {
1047
- input: T.nilable(OpenAI::Responses::ResponsesClientEvent::Moderation::Policy::Input),
1048
- output: T.nilable(OpenAI::Responses::ResponsesClientEvent::Moderation::Policy::Output)
1056
+ model: String,
1057
+ policy: T.nilable(OpenAI::Responses::ResponsesClientEvent::ResponseCreate::Moderation::Policy)
1049
1058
  }
1050
1059
  )
1051
1060
  end
1052
1061
  def to_hash
1053
1062
  end
1054
1063
 
1055
- class Input < OpenAI::Internal::Type::BaseModel
1064
+ class Policy < OpenAI::Internal::Type::BaseModel
1056
1065
  OrHash = T.type_alias do
1057
1066
  T.any(
1058
- OpenAI::Responses::ResponsesClientEvent::Moderation::Policy::Input,
1067
+ OpenAI::Responses::ResponsesClientEvent::ResponseCreate::Moderation::Policy,
1059
1068
  OpenAI::Internal::AnyHash
1060
1069
  )
1061
1070
  end
1062
1071
 
1063
- sig { returns(OpenAI::Responses::ResponsesClientEvent::Moderation::Policy::Input::Mode::OrSymbol) }
1064
- attr_accessor :mode
1065
-
1066
1072
  # The moderation policy for the response input.
1073
+ sig {
1074
+ returns(T.nilable(OpenAI::Responses::ResponsesClientEvent::ResponseCreate::Moderation::Policy::Input))
1075
+ }
1076
+ attr_reader :input
1077
+
1078
+ sig {
1079
+ params(
1080
+ input: T.nilable(
1081
+ OpenAI::Responses::ResponsesClientEvent::ResponseCreate::Moderation::Policy::Input::OrHash
1082
+ )
1083
+ )
1084
+ .void
1085
+ }
1086
+ attr_writer :input
1087
+
1088
+ # The moderation policy for the response output.
1089
+ sig {
1090
+ returns(T.nilable(OpenAI::Responses::ResponsesClientEvent::ResponseCreate::Moderation::Policy::Output))
1091
+ }
1092
+ attr_reader :output
1093
+
1094
+ sig {
1095
+ params(
1096
+ output: T.nilable(
1097
+ OpenAI::Responses::ResponsesClientEvent::ResponseCreate::Moderation::Policy::Output::OrHash
1098
+ )
1099
+ )
1100
+ .void
1101
+ }
1102
+ attr_writer :output
1103
+
1104
+ # The policy to apply to moderated response input and output.
1067
1105
  sig do
1068
1106
  params(
1069
1107
 
1070
- mode: OpenAI::Responses::ResponsesClientEvent::Moderation::Policy::Input::Mode::OrSymbol
1108
+ input: T.nilable(
1109
+ OpenAI::Responses::ResponsesClientEvent::ResponseCreate::Moderation::Policy::Input::OrHash
1110
+ ),
1111
+
1112
+ output: T.nilable(
1113
+ OpenAI::Responses::ResponsesClientEvent::ResponseCreate::Moderation::Policy::Output::OrHash
1114
+ )
1071
1115
  )
1072
1116
  .returns(T.attached_class)
1073
1117
  end
1074
1118
  def self.new(
1075
1119
 
1076
- mode:
1120
+ # The moderation policy for the response input.
1121
+ input: nil,
1122
+
1123
+ # The moderation policy for the response output.
1124
+
1125
+ output: nil
1077
1126
  )
1078
1127
  end
1079
1128
 
1080
1129
  sig do
1081
1130
  override.returns(
1082
- {mode: OpenAI::Responses::ResponsesClientEvent::Moderation::Policy::Input::Mode::OrSymbol}
1131
+ {
1132
+ input: T.nilable(OpenAI::Responses::ResponsesClientEvent::ResponseCreate::Moderation::Policy::Input),
1133
+ output: T.nilable(
1134
+ OpenAI::Responses::ResponsesClientEvent::ResponseCreate::Moderation::Policy::Output
1135
+ )
1136
+ }
1083
1137
  )
1084
1138
  end
1085
1139
  def to_hash
1086
1140
  end
1087
1141
 
1088
- module Mode
1089
- extend OpenAI::Internal::Type::Enum
1142
+ class Input < OpenAI::Internal::Type::BaseModel
1143
+ OrHash = T.type_alias do
1144
+ T.any(
1145
+ OpenAI::Responses::ResponsesClientEvent::ResponseCreate::Moderation::Policy::Input,
1146
+ OpenAI::Internal::AnyHash
1147
+ )
1148
+ end
1090
1149
 
1091
- TaggedSymbol = T.type_alias {
1092
- T.all(Symbol, OpenAI::Responses::ResponsesClientEvent::Moderation::Policy::Input::Mode)
1150
+ sig {
1151
+ returns(
1152
+ OpenAI::Responses::ResponsesClientEvent::ResponseCreate::Moderation::Policy::Input::Mode::OrSymbol
1153
+ )
1093
1154
  }
1094
- OrSymbol = T.type_alias { T.any(Symbol, String) }
1155
+ attr_accessor :mode
1095
1156
 
1096
- SCORE = T.let(
1097
- :score,
1098
- OpenAI::Responses::ResponsesClientEvent::Moderation::Policy::Input::Mode::TaggedSymbol
1099
- )
1100
- BLOCK = T.let(
1101
- :block,
1102
- OpenAI::Responses::ResponsesClientEvent::Moderation::Policy::Input::Mode::TaggedSymbol
1103
- )
1157
+ # The moderation policy for the response input.
1158
+ sig do
1159
+ params(
1104
1160
 
1105
- sig {
1106
- override.returns(
1107
- T::Array[OpenAI::Responses::ResponsesClientEvent::Moderation::Policy::Input::Mode::TaggedSymbol]
1161
+ mode: OpenAI::Responses::ResponsesClientEvent::ResponseCreate::Moderation::Policy::Input::Mode::OrSymbol
1108
1162
  )
1109
- }
1110
- def self.values
1163
+ .returns(T.attached_class)
1111
1164
  end
1112
- end
1113
- end
1165
+ def self.new(
1114
1166
 
1115
- class Output < OpenAI::Internal::Type::BaseModel
1116
- OrHash = T.type_alias do
1117
- T.any(
1118
- OpenAI::Responses::ResponsesClientEvent::Moderation::Policy::Output,
1119
- OpenAI::Internal::AnyHash
1167
+ mode:
1120
1168
  )
1121
- end
1169
+ end
1122
1170
 
1123
- sig { returns(OpenAI::Responses::ResponsesClientEvent::Moderation::Policy::Output::Mode::OrSymbol) }
1124
- attr_accessor :mode
1171
+ sig do
1172
+ override.returns(
1173
+ {
1174
+ mode: OpenAI::Responses::ResponsesClientEvent::ResponseCreate::Moderation::Policy::Input::Mode::OrSymbol
1175
+ }
1176
+ )
1177
+ end
1178
+ def to_hash
1179
+ end
1125
1180
 
1126
- # The moderation policy for the response output.
1127
- sig do
1128
- params(
1181
+ module Mode
1182
+ extend OpenAI::Internal::Type::Enum
1129
1183
 
1130
- mode: OpenAI::Responses::ResponsesClientEvent::Moderation::Policy::Output::Mode::OrSymbol
1131
- )
1132
- .returns(T.attached_class)
1133
- end
1134
- def self.new(
1184
+ TaggedSymbol = T.type_alias {
1185
+ T.all(
1186
+ Symbol,
1187
+ OpenAI::Responses::ResponsesClientEvent::ResponseCreate::Moderation::Policy::Input::Mode
1188
+ )
1189
+ }
1190
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
1135
1191
 
1136
- mode:
1137
- )
1138
- end
1192
+ SCORE = T.let(
1193
+ :score,
1194
+ OpenAI::Responses::ResponsesClientEvent::ResponseCreate::Moderation::Policy::Input::Mode::TaggedSymbol
1195
+ )
1196
+ BLOCK = T.let(
1197
+ :block,
1198
+ OpenAI::Responses::ResponsesClientEvent::ResponseCreate::Moderation::Policy::Input::Mode::TaggedSymbol
1199
+ )
1139
1200
 
1140
- sig do
1141
- override.returns(
1142
- {mode: OpenAI::Responses::ResponsesClientEvent::Moderation::Policy::Output::Mode::OrSymbol}
1143
- )
1144
- end
1145
- def to_hash
1201
+ sig {
1202
+ override.returns(
1203
+ T::Array[
1204
+ OpenAI::Responses::ResponsesClientEvent::ResponseCreate::Moderation::Policy::Input::Mode::TaggedSymbol
1205
+ ]
1206
+ )
1207
+ }
1208
+ def self.values
1209
+ end
1210
+ end
1146
1211
  end
1147
1212
 
1148
- module Mode
1149
- extend OpenAI::Internal::Type::Enum
1213
+ class Output < OpenAI::Internal::Type::BaseModel
1214
+ OrHash = T.type_alias do
1215
+ T.any(
1216
+ OpenAI::Responses::ResponsesClientEvent::ResponseCreate::Moderation::Policy::Output,
1217
+ OpenAI::Internal::AnyHash
1218
+ )
1219
+ end
1150
1220
 
1151
- TaggedSymbol = T.type_alias {
1152
- T.all(Symbol, OpenAI::Responses::ResponsesClientEvent::Moderation::Policy::Output::Mode)
1221
+ sig {
1222
+ returns(
1223
+ OpenAI::Responses::ResponsesClientEvent::ResponseCreate::Moderation::Policy::Output::Mode::OrSymbol
1224
+ )
1153
1225
  }
1154
- OrSymbol = T.type_alias { T.any(Symbol, String) }
1226
+ attr_accessor :mode
1155
1227
 
1156
- SCORE = T.let(
1157
- :score,
1158
- OpenAI::Responses::ResponsesClientEvent::Moderation::Policy::Output::Mode::TaggedSymbol
1159
- )
1160
- BLOCK = T.let(
1161
- :block,
1162
- OpenAI::Responses::ResponsesClientEvent::Moderation::Policy::Output::Mode::TaggedSymbol
1228
+ # The moderation policy for the response output.
1229
+ sig do
1230
+ params(
1231
+
1232
+ mode: OpenAI::Responses::ResponsesClientEvent::ResponseCreate::Moderation::Policy::Output::Mode::OrSymbol
1233
+ )
1234
+ .returns(T.attached_class)
1235
+ end
1236
+ def self.new(
1237
+
1238
+ mode:
1163
1239
  )
1240
+ end
1164
1241
 
1165
- sig {
1242
+ sig do
1166
1243
  override.returns(
1167
- T::Array[OpenAI::Responses::ResponsesClientEvent::Moderation::Policy::Output::Mode::TaggedSymbol]
1244
+ {
1245
+ mode: OpenAI::Responses::ResponsesClientEvent::ResponseCreate::Moderation::Policy::Output::Mode::OrSymbol
1246
+ }
1168
1247
  )
1169
- }
1170
- def self.values
1248
+ end
1249
+ def to_hash
1250
+ end
1251
+
1252
+ module Mode
1253
+ extend OpenAI::Internal::Type::Enum
1254
+
1255
+ TaggedSymbol = T.type_alias {
1256
+ T.all(
1257
+ Symbol,
1258
+ OpenAI::Responses::ResponsesClientEvent::ResponseCreate::Moderation::Policy::Output::Mode
1259
+ )
1260
+ }
1261
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
1262
+
1263
+ SCORE = T.let(
1264
+ :score,
1265
+ OpenAI::Responses::ResponsesClientEvent::ResponseCreate::Moderation::Policy::Output::Mode::TaggedSymbol
1266
+ )
1267
+ BLOCK = T.let(
1268
+ :block,
1269
+ OpenAI::Responses::ResponsesClientEvent::ResponseCreate::Moderation::Policy::Output::Mode::TaggedSymbol
1270
+ )
1271
+
1272
+ sig {
1273
+ override.returns(
1274
+ T::Array[
1275
+ OpenAI::Responses::ResponsesClientEvent::ResponseCreate::Moderation::Policy::Output::Mode::TaggedSymbol
1276
+ ]
1277
+ )
1278
+ }
1279
+ def self.values
1280
+ end
1171
1281
  end
1172
1282
  end
1173
1283
  end
1174
1284
  end
1175
- end
1176
1285
 
1177
- class PromptCacheOptions < OpenAI::Internal::Type::BaseModel
1178
- OrHash = T.type_alias do
1179
- T.any(
1180
- OpenAI::Responses::ResponsesClientEvent::PromptCacheOptions,
1181
- OpenAI::Internal::AnyHash
1182
- )
1183
- end
1286
+ class PromptCacheOptions < OpenAI::Internal::Type::BaseModel
1287
+ OrHash = T.type_alias do
1288
+ T.any(
1289
+ OpenAI::Responses::ResponsesClientEvent::ResponseCreate::PromptCacheOptions,
1290
+ OpenAI::Internal::AnyHash
1291
+ )
1292
+ end
1184
1293
 
1185
- # Controls whether OpenAI automatically creates an implicit cache breakpoint.
1186
- # Defaults to `implicit`. With `implicit`, OpenAI creates one implicit breakpoint
1187
- # and writes up to the latest three explicit breakpoints in the request. With
1188
- # `explicit`, OpenAI does not create an implicit breakpoint and writes up to the
1189
- # latest four explicit breakpoints. If there are no explicit breakpoints, the
1190
- # request does not use prompt caching.
1191
- sig { returns(T.nilable(OpenAI::Responses::ResponsesClientEvent::PromptCacheOptions::Mode::OrSymbol)) }
1192
- attr_reader :mode
1294
+ # The ID of a response to compare when diagnosing prompt cache reuse. Supplying
1295
+ # this field requests prompt cache diagnostics when the feature is enabled.
1296
+ sig { returns(T.nilable(String)) }
1297
+ attr_accessor :comparison_response_id
1193
1298
 
1194
- sig { params(mode: OpenAI::Responses::ResponsesClientEvent::PromptCacheOptions::Mode::OrSymbol).void }
1195
- attr_writer :mode
1299
+ # Controls whether OpenAI automatically creates an implicit cache breakpoint.
1300
+ # Defaults to `implicit`. With `implicit`, OpenAI creates one implicit breakpoint
1301
+ # and writes up to the latest three explicit breakpoints in the request. With
1302
+ # `explicit`, OpenAI does not create an implicit breakpoint and writes up to the
1303
+ # latest four explicit breakpoints. If there are no explicit breakpoints, the
1304
+ # request does not use prompt caching.
1305
+ sig {
1306
+ returns(
1307
+ T.nilable(OpenAI::Responses::ResponsesClientEvent::ResponseCreate::PromptCacheOptions::Mode::OrSymbol)
1308
+ )
1309
+ }
1310
+ attr_reader :mode
1196
1311
 
1197
- # The minimum lifetime applied to every implicit and explicit cache breakpoint
1198
- # written by the request. Defaults to `30m`, which is currently the only supported
1199
- # value. The backend may retain cache entries for longer.
1200
- sig { returns(T.nilable(OpenAI::Responses::ResponsesClientEvent::PromptCacheOptions::Ttl::OrSymbol)) }
1201
- attr_reader :ttl
1312
+ sig {
1313
+ params(mode: OpenAI::Responses::ResponsesClientEvent::ResponseCreate::PromptCacheOptions::Mode::OrSymbol)
1314
+ .void
1315
+ }
1316
+ attr_writer :mode
1202
1317
 
1203
- sig { params(ttl: OpenAI::Responses::ResponsesClientEvent::PromptCacheOptions::Ttl::OrSymbol).void }
1204
- attr_writer :ttl
1318
+ # The minimum lifetime applied to every implicit and explicit cache breakpoint
1319
+ # written by the request. Defaults to `30m`, which is currently the only supported
1320
+ # value. The backend may retain cache entries for longer.
1321
+ sig {
1322
+ returns(
1323
+ T.nilable(OpenAI::Responses::ResponsesClientEvent::ResponseCreate::PromptCacheOptions::Ttl::OrSymbol)
1324
+ )
1325
+ }
1326
+ attr_reader :ttl
1205
1327
 
1206
- # Options for prompt caching. Supported for `gpt-5.6` and later models. By
1207
- # default, OpenAI automatically chooses one implicit cache breakpoint. You can add
1208
- # explicit breakpoints to content blocks with `prompt_cache_breakpoint`. Each
1209
- # request can write up to four breakpoints. For cache matching, OpenAI considers
1210
- # up to the latest 80 breakpoints in the conversation, without a content-block
1211
- # lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The
1212
- # `ttl` defaults to `30m`, which is currently the only supported value. See the
1213
- # [prompt caching guide](https://platform.openai.com/docs/guides/prompt-caching)
1214
- # for current details.
1215
- sig do
1216
- params(
1328
+ sig {
1329
+ params(ttl: OpenAI::Responses::ResponsesClientEvent::ResponseCreate::PromptCacheOptions::Ttl::OrSymbol)
1330
+ .void
1331
+ }
1332
+ attr_writer :ttl
1333
+
1334
+ # Options for prompt caching. Supported for `gpt-5.6` and later models. By
1335
+ # default, OpenAI automatically chooses one implicit cache breakpoint. You can add
1336
+ # explicit breakpoints to content blocks with `prompt_cache_breakpoint`. Each
1337
+ # request can write up to four breakpoints. For cache matching, OpenAI considers
1338
+ # up to the latest 80 breakpoints in the conversation, without a content-block
1339
+ # lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The
1340
+ # `ttl` defaults to `30m`, which is currently the only supported value. See the
1341
+ # [prompt caching guide](https://platform.openai.com/docs/guides/prompt-caching)
1342
+ # for current details.
1343
+ sig do
1344
+ params(
1345
+
1346
+ comparison_response_id: T.nilable(String),
1217
1347
 
1218
- mode: OpenAI::Responses::ResponsesClientEvent::PromptCacheOptions::Mode::OrSymbol,
1348
+ mode: OpenAI::Responses::ResponsesClientEvent::ResponseCreate::PromptCacheOptions::Mode::OrSymbol,
1219
1349
 
1220
- ttl: OpenAI::Responses::ResponsesClientEvent::PromptCacheOptions::Ttl::OrSymbol
1350
+ ttl: OpenAI::Responses::ResponsesClientEvent::ResponseCreate::PromptCacheOptions::Ttl::OrSymbol
1351
+ )
1352
+ .returns(T.attached_class)
1353
+ end
1354
+ def self.new(
1355
+
1356
+ # The ID of a response to compare when diagnosing prompt cache reuse. Supplying
1357
+ # this field requests prompt cache diagnostics when the feature is enabled.
1358
+ comparison_response_id: nil,
1359
+
1360
+ # Controls whether OpenAI automatically creates an implicit cache breakpoint.
1361
+ # Defaults to `implicit`. With `implicit`, OpenAI creates one implicit breakpoint
1362
+ # and writes up to the latest three explicit breakpoints in the request. With
1363
+ # `explicit`, OpenAI does not create an implicit breakpoint and writes up to the
1364
+ # latest four explicit breakpoints. If there are no explicit breakpoints, the
1365
+ # request does not use prompt caching.
1366
+ mode: nil,
1367
+
1368
+ # The minimum lifetime applied to every implicit and explicit cache breakpoint
1369
+ # written by the request. Defaults to `30m`, which is currently the only supported
1370
+ # value. The backend may retain cache entries for longer.
1371
+
1372
+ ttl: nil
1221
1373
  )
1222
- .returns(T.attached_class)
1223
- end
1224
- def self.new(
1374
+ end
1375
+
1376
+ sig do
1377
+ override.returns(
1378
+ {
1379
+ comparison_response_id: T.nilable(String),
1380
+ mode: T.nilable(
1381
+ OpenAI::Responses::ResponsesClientEvent::ResponseCreate::PromptCacheOptions::Mode::OrSymbol
1382
+ ),
1383
+ ttl: T.nilable(
1384
+ OpenAI::Responses::ResponsesClientEvent::ResponseCreate::PromptCacheOptions::Ttl::OrSymbol
1385
+ )
1386
+ }
1387
+ )
1388
+ end
1389
+ def to_hash
1390
+ end
1225
1391
 
1226
1392
  # Controls whether OpenAI automatically creates an implicit cache breakpoint.
1227
1393
  # Defaults to `implicit`. With `implicit`, OpenAI creates one implicit breakpoint
@@ -1229,182 +1395,170 @@ module OpenAI
1229
1395
  # `explicit`, OpenAI does not create an implicit breakpoint and writes up to the
1230
1396
  # latest four explicit breakpoints. If there are no explicit breakpoints, the
1231
1397
  # request does not use prompt caching.
1232
- mode: nil,
1398
+ module Mode
1399
+ extend OpenAI::Internal::Type::Enum
1400
+
1401
+ TaggedSymbol = T.type_alias {
1402
+ T.all(Symbol, OpenAI::Responses::ResponsesClientEvent::ResponseCreate::PromptCacheOptions::Mode)
1403
+ }
1404
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
1405
+
1406
+ IMPLICIT = T.let(
1407
+ :implicit,
1408
+ OpenAI::Responses::ResponsesClientEvent::ResponseCreate::PromptCacheOptions::Mode::TaggedSymbol
1409
+ )
1410
+ EXPLICIT = T.let(
1411
+ :explicit,
1412
+ OpenAI::Responses::ResponsesClientEvent::ResponseCreate::PromptCacheOptions::Mode::TaggedSymbol
1413
+ )
1414
+
1415
+ sig {
1416
+ override.returns(
1417
+ T::Array[
1418
+ OpenAI::Responses::ResponsesClientEvent::ResponseCreate::PromptCacheOptions::Mode::TaggedSymbol
1419
+ ]
1420
+ )
1421
+ }
1422
+ def self.values
1423
+ end
1424
+ end
1233
1425
 
1234
1426
  # The minimum lifetime applied to every implicit and explicit cache breakpoint
1235
1427
  # written by the request. Defaults to `30m`, which is currently the only supported
1236
1428
  # value. The backend may retain cache entries for longer.
1429
+ module Ttl
1430
+ extend OpenAI::Internal::Type::Enum
1237
1431
 
1238
- ttl: nil
1239
- )
1240
- end
1432
+ TaggedSymbol = T.type_alias {
1433
+ T.all(Symbol, OpenAI::Responses::ResponsesClientEvent::ResponseCreate::PromptCacheOptions::Ttl)
1434
+ }
1435
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
1241
1436
 
1242
- sig do
1243
- override.returns(
1244
- {
1245
- mode: OpenAI::Responses::ResponsesClientEvent::PromptCacheOptions::Mode::OrSymbol,
1246
- ttl: OpenAI::Responses::ResponsesClientEvent::PromptCacheOptions::Ttl::OrSymbol
1437
+ TTL_30M = T.let(
1438
+ :"30m",
1439
+ OpenAI::Responses::ResponsesClientEvent::ResponseCreate::PromptCacheOptions::Ttl::TaggedSymbol
1440
+ )
1441
+
1442
+ sig {
1443
+ override.returns(
1444
+ T::Array[
1445
+ OpenAI::Responses::ResponsesClientEvent::ResponseCreate::PromptCacheOptions::Ttl::TaggedSymbol
1446
+ ]
1447
+ )
1247
1448
  }
1248
- )
1249
- end
1250
- def to_hash
1449
+ def self.values
1450
+ end
1451
+ end
1251
1452
  end
1252
1453
 
1253
- # Controls whether OpenAI automatically creates an implicit cache breakpoint.
1254
- # Defaults to `implicit`. With `implicit`, OpenAI creates one implicit breakpoint
1255
- # and writes up to the latest three explicit breakpoints in the request. With
1256
- # `explicit`, OpenAI does not create an implicit breakpoint and writes up to the
1257
- # latest four explicit breakpoints. If there are no explicit breakpoints, the
1258
- # request does not use prompt caching.
1259
- module Mode
1454
+ # Deprecated. Use `prompt_cache_options.ttl` instead.
1455
+ #
1456
+ # The retention policy for the prompt cache. Set to `24h` to enable extended
1457
+ # prompt caching, which keeps cached prefixes active for longer, up to a maximum
1458
+ # of 24 hours.
1459
+ # [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention).
1460
+ # This field expresses a maximum retention policy, while
1461
+ # `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two fields
1462
+ # are independent and do not interact. For `gpt-5.5`, `gpt-5.5-pro`, and future
1463
+ # models, only `24h` is supported.
1464
+ #
1465
+ # For older models that support both `in_memory` and `24h`, the default depends on
1466
+ # your organization's data retention policy:
1467
+ #
1468
+ # - Organizations without ZDR enabled default to `24h`.
1469
+ # - Organizations with ZDR enabled default to `in_memory` when
1470
+ # `prompt_cache_retention` is not specified.
1471
+ module PromptCacheRetention
1260
1472
  extend OpenAI::Internal::Type::Enum
1261
1473
 
1262
1474
  TaggedSymbol = T.type_alias {
1263
- T.all(Symbol, OpenAI::Responses::ResponsesClientEvent::PromptCacheOptions::Mode)
1475
+ T.all(Symbol, OpenAI::Responses::ResponsesClientEvent::ResponseCreate::PromptCacheRetention)
1264
1476
  }
1265
1477
  OrSymbol = T.type_alias { T.any(Symbol, String) }
1266
1478
 
1267
- IMPLICIT = T.let(:implicit, OpenAI::Responses::ResponsesClientEvent::PromptCacheOptions::Mode::TaggedSymbol)
1268
- EXPLICIT = T.let(:explicit, OpenAI::Responses::ResponsesClientEvent::PromptCacheOptions::Mode::TaggedSymbol)
1479
+ IN_MEMORY = T.let(
1480
+ :in_memory,
1481
+ OpenAI::Responses::ResponsesClientEvent::ResponseCreate::PromptCacheRetention::TaggedSymbol
1482
+ )
1483
+ PROMPT_CACHE_RETENTION_24H = T.let(
1484
+ :"24h",
1485
+ OpenAI::Responses::ResponsesClientEvent::ResponseCreate::PromptCacheRetention::TaggedSymbol
1486
+ )
1269
1487
 
1270
1488
  sig {
1271
1489
  override.returns(
1272
- T::Array[OpenAI::Responses::ResponsesClientEvent::PromptCacheOptions::Mode::TaggedSymbol]
1490
+ T::Array[OpenAI::Responses::ResponsesClientEvent::ResponseCreate::PromptCacheRetention::TaggedSymbol]
1273
1491
  )
1274
1492
  }
1275
1493
  def self.values
1276
1494
  end
1277
1495
  end
1278
1496
 
1279
- # The minimum lifetime applied to every implicit and explicit cache breakpoint
1280
- # written by the request. Defaults to `30m`, which is currently the only supported
1281
- # value. The backend may retain cache entries for longer.
1282
- module Ttl
1497
+ # Specifies the processing type used for serving the request.
1498
+ #
1499
+ # - If set to 'auto', then the request will be processed with the service tier
1500
+ # configured in the Project settings. Unless otherwise configured, the Project
1501
+ # will use 'default'.
1502
+ # - If set to 'default', then the request will be processed with the standard
1503
+ # pricing and performance for the selected model.
1504
+ # - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)',
1505
+ # then the request will be processed with the Flex Processing service tier.
1506
+ # - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level,
1507
+ # include the `service_tier=fast` or `service_tier=priority` parameter for
1508
+ # Responses or Chat Completions. The response will show `service_tier=priority`
1509
+ # regardless of if you specify `service_tier=fast` or `priority` in your
1510
+ # request.
1511
+ # - If set to 'ultrafast', then the request will be processed with the
1512
+ # access-controlled Ultrafast Processing service tier. This tier is currently
1513
+ # available for `gpt-5.6-sol`; a response served through it will show
1514
+ # `service_tier=ultrafast`.
1515
+ # - When not set, the default behavior is 'auto'.
1516
+ #
1517
+ # When the `service_tier` parameter is set, the response body will include the
1518
+ # `service_tier` value based on the processing mode actually used to serve the
1519
+ # request. This response value may be different from the value set in the
1520
+ # parameter.
1521
+ module ServiceTier
1283
1522
  extend OpenAI::Internal::Type::Enum
1284
1523
 
1285
1524
  TaggedSymbol = T.type_alias {
1286
- T.all(Symbol, OpenAI::Responses::ResponsesClientEvent::PromptCacheOptions::Ttl)
1525
+ T.all(Symbol, OpenAI::Responses::ResponsesClientEvent::ResponseCreate::ServiceTier)
1287
1526
  }
1288
1527
  OrSymbol = T.type_alias { T.any(Symbol, String) }
1289
1528
 
1290
- TTL_30M = T.let(:"30m", OpenAI::Responses::ResponsesClientEvent::PromptCacheOptions::Ttl::TaggedSymbol)
1529
+ AUTO = T.let(:auto, OpenAI::Responses::ResponsesClientEvent::ResponseCreate::ServiceTier::TaggedSymbol)
1530
+ DEFAULT = T.let(
1531
+ :default,
1532
+ OpenAI::Responses::ResponsesClientEvent::ResponseCreate::ServiceTier::TaggedSymbol
1533
+ )
1534
+ FLEX = T.let(:flex, OpenAI::Responses::ResponsesClientEvent::ResponseCreate::ServiceTier::TaggedSymbol)
1535
+ SCALE = T.let(:scale, OpenAI::Responses::ResponsesClientEvent::ResponseCreate::ServiceTier::TaggedSymbol)
1536
+ PRIORITY = T.let(
1537
+ :priority,
1538
+ OpenAI::Responses::ResponsesClientEvent::ResponseCreate::ServiceTier::TaggedSymbol
1539
+ )
1540
+ FAST = T.let(:fast, OpenAI::Responses::ResponsesClientEvent::ResponseCreate::ServiceTier::TaggedSymbol)
1541
+ ULTRAFAST = T.let(
1542
+ :ultrafast,
1543
+ OpenAI::Responses::ResponsesClientEvent::ResponseCreate::ServiceTier::TaggedSymbol
1544
+ )
1291
1545
 
1292
1546
  sig {
1293
- override.returns(T::Array[OpenAI::Responses::ResponsesClientEvent::PromptCacheOptions::Ttl::TaggedSymbol])
1547
+ override.returns(
1548
+ T::Array[OpenAI::Responses::ResponsesClientEvent::ResponseCreate::ServiceTier::TaggedSymbol]
1549
+ )
1294
1550
  }
1295
1551
  def self.values
1296
1552
  end
1297
1553
  end
1298
- end
1299
-
1300
- # Deprecated. Use `prompt_cache_options.ttl` instead.
1301
- #
1302
- # The retention policy for the prompt cache. Set to `24h` to enable extended
1303
- # prompt caching, which keeps cached prefixes active for longer, up to a maximum
1304
- # of 24 hours.
1305
- # [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention).
1306
- # This field expresses a maximum retention policy, while
1307
- # `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two fields
1308
- # are independent and do not interact. For `gpt-5.5`, `gpt-5.5-pro`, and future
1309
- # models, only `24h` is supported.
1310
- #
1311
- # For older models that support both `in_memory` and `24h`, the default depends on
1312
- # your organization's data retention policy:
1313
- #
1314
- # - Organizations without ZDR enabled default to `24h`.
1315
- # - Organizations with ZDR enabled default to `in_memory` when
1316
- # `prompt_cache_retention` is not specified.
1317
- module PromptCacheRetention
1318
- extend OpenAI::Internal::Type::Enum
1319
-
1320
- TaggedSymbol = T.type_alias { T.all(Symbol, OpenAI::Responses::ResponsesClientEvent::PromptCacheRetention) }
1321
- OrSymbol = T.type_alias { T.any(Symbol, String) }
1322
-
1323
- IN_MEMORY = T.let(:in_memory, OpenAI::Responses::ResponsesClientEvent::PromptCacheRetention::TaggedSymbol)
1324
- PROMPT_CACHE_RETENTION_24H = T.let(
1325
- :"24h",
1326
- OpenAI::Responses::ResponsesClientEvent::PromptCacheRetention::TaggedSymbol
1327
- )
1328
-
1329
- sig {
1330
- override.returns(T::Array[OpenAI::Responses::ResponsesClientEvent::PromptCacheRetention::TaggedSymbol])
1331
- }
1332
- def self.values
1333
- end
1334
- end
1335
-
1336
- # Specifies the processing type used for serving the request.
1337
- #
1338
- # - If set to 'auto', then the request will be processed with the service tier
1339
- # configured in the Project settings. Unless otherwise configured, the Project
1340
- # will use 'default'.
1341
- # - If set to 'default', then the request will be processed with the standard
1342
- # pricing and performance for the selected model.
1343
- # - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)',
1344
- # then the request will be processed with the Flex Processing service tier.
1345
- # - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level,
1346
- # include the `service_tier=fast` or `service_tier=priority` parameter for
1347
- # Responses or Chat Completions. The response will show `service_tier=priority`
1348
- # regardless of if you specify `service_tier=fast` or `priority` in your
1349
- # request.
1350
- # - If set to 'ultrafast', then the request will be processed with the
1351
- # access-controlled Ultrafast Processing service tier. This tier is currently
1352
- # available for `gpt-5.6-sol`; a response served through it will show
1353
- # `service_tier=ultrafast`.
1354
- # - When not set, the default behavior is 'auto'.
1355
- #
1356
- # When the `service_tier` parameter is set, the response body will include the
1357
- # `service_tier` value based on the processing mode actually used to serve the
1358
- # request. This response value may be different from the value set in the
1359
- # parameter.
1360
- module ServiceTier
1361
- extend OpenAI::Internal::Type::Enum
1362
-
1363
- TaggedSymbol = T.type_alias { T.all(Symbol, OpenAI::Responses::ResponsesClientEvent::ServiceTier) }
1364
- OrSymbol = T.type_alias { T.any(Symbol, String) }
1365
-
1366
- AUTO = T.let(:auto, OpenAI::Responses::ResponsesClientEvent::ServiceTier::TaggedSymbol)
1367
- DEFAULT = T.let(:default, OpenAI::Responses::ResponsesClientEvent::ServiceTier::TaggedSymbol)
1368
- FLEX = T.let(:flex, OpenAI::Responses::ResponsesClientEvent::ServiceTier::TaggedSymbol)
1369
- SCALE = T.let(:scale, OpenAI::Responses::ResponsesClientEvent::ServiceTier::TaggedSymbol)
1370
- PRIORITY = T.let(:priority, OpenAI::Responses::ResponsesClientEvent::ServiceTier::TaggedSymbol)
1371
- FAST = T.let(:fast, OpenAI::Responses::ResponsesClientEvent::ServiceTier::TaggedSymbol)
1372
- ULTRAFAST = T.let(:ultrafast, OpenAI::Responses::ResponsesClientEvent::ServiceTier::TaggedSymbol)
1373
-
1374
- sig { override.returns(T::Array[OpenAI::Responses::ResponsesClientEvent::ServiceTier::TaggedSymbol]) }
1375
- def self.values
1376
- end
1377
- end
1378
1554
 
1379
- class StreamOptions < OpenAI::Internal::Type::BaseModel
1380
- OrHash = T.type_alias do
1381
- T.any(
1382
- OpenAI::Responses::ResponsesClientEvent::StreamOptions,
1383
- OpenAI::Internal::AnyHash
1384
- )
1385
- end
1386
-
1387
- # When true, stream obfuscation will be enabled. Stream obfuscation adds random
1388
- # characters to an `obfuscation` field on streaming delta events to normalize
1389
- # payload sizes as a mitigation to certain side-channel attacks. These obfuscation
1390
- # fields are included by default, but add a small amount of overhead to the data
1391
- # stream. You can set `include_obfuscation` to false to optimize for bandwidth if
1392
- # you trust the network links between your application and the OpenAI API.
1393
- sig { returns(T.nilable(T::Boolean)) }
1394
- attr_reader :include_obfuscation
1395
-
1396
- sig { params(include_obfuscation: T::Boolean).void }
1397
- attr_writer :include_obfuscation
1398
-
1399
- # Options for streaming responses. Only set this when you set `stream: true`.
1400
- sig do
1401
- params(
1402
-
1403
- include_obfuscation: T::Boolean
1404
- )
1405
- .returns(T.attached_class)
1406
- end
1407
- def self.new(
1555
+ class StreamOptions < OpenAI::Internal::Type::BaseModel
1556
+ OrHash = T.type_alias do
1557
+ T.any(
1558
+ OpenAI::Responses::ResponsesClientEvent::ResponseCreate::StreamOptions,
1559
+ OpenAI::Internal::AnyHash
1560
+ )
1561
+ end
1408
1562
 
1409
1563
  # When true, stream obfuscation will be enabled. Stream obfuscation adds random
1410
1564
  # characters to an `obfuscation` field on streaming delta events to normalize
@@ -1412,71 +1566,36 @@ module OpenAI
1412
1566
  # fields are included by default, but add a small amount of overhead to the data
1413
1567
  # stream. You can set `include_obfuscation` to false to optimize for bandwidth if
1414
1568
  # you trust the network links between your application and the OpenAI API.
1569
+ sig { returns(T.nilable(T::Boolean)) }
1570
+ attr_reader :include_obfuscation
1415
1571
 
1416
- include_obfuscation: nil
1417
- )
1418
- end
1419
-
1420
- sig do
1421
- override.returns(
1422
- {include_obfuscation: T::Boolean}
1423
- )
1424
- end
1425
- def to_hash
1426
- end
1427
-
1428
- end
1429
-
1430
- # How the model should select which tool (or tools) to use when generating a
1431
- # response. See the `tools` parameter to see how to specify which tools the model
1432
- # can call.
1433
- module ToolChoice
1434
- extend OpenAI::Internal::Type::Union
1435
-
1436
- Variants = T.type_alias {
1437
- T.any(
1438
- OpenAI::Responses::ToolChoiceOptions::TaggedSymbol,
1439
- OpenAI::Responses::ToolChoiceAllowed,
1440
- OpenAI::Responses::ToolChoiceTypes,
1441
- OpenAI::Responses::ToolChoiceFunction,
1442
- OpenAI::Responses::ToolChoiceMcp,
1443
- OpenAI::Responses::ToolChoiceCustom,
1444
- OpenAI::Responses::ResponsesClientEvent::ToolChoice::SpecificProgrammaticToolCallingParam,
1445
- OpenAI::Responses::ToolChoiceApplyPatch,
1446
- OpenAI::Responses::ToolChoiceShell
1447
- )
1448
- }
1449
-
1450
- class SpecificProgrammaticToolCallingParam < OpenAI::Internal::Type::BaseModel
1451
- OrHash = T.type_alias do
1452
- T.any(
1453
- OpenAI::Responses::ResponsesClientEvent::ToolChoice::SpecificProgrammaticToolCallingParam,
1454
- OpenAI::Internal::AnyHash
1455
- )
1456
- end
1457
-
1458
- # The tool to call. Always `programmatic_tool_calling`.
1459
- sig { returns(Symbol) }
1460
- attr_accessor :type
1572
+ sig { params(include_obfuscation: T::Boolean).void }
1573
+ attr_writer :include_obfuscation
1461
1574
 
1575
+ # Options for streaming responses. Only set this when you set `stream: true`.
1462
1576
  sig do
1463
1577
  params(
1464
1578
 
1465
- type: Symbol
1579
+ include_obfuscation: T::Boolean
1466
1580
  )
1467
1581
  .returns(T.attached_class)
1468
1582
  end
1469
1583
  def self.new(
1470
1584
 
1471
- # The tool to call. Always `programmatic_tool_calling`.
1585
+ # When true, stream obfuscation will be enabled. Stream obfuscation adds random
1586
+ # characters to an `obfuscation` field on streaming delta events to normalize
1587
+ # payload sizes as a mitigation to certain side-channel attacks. These obfuscation
1588
+ # fields are included by default, but add a small amount of overhead to the data
1589
+ # stream. You can set `include_obfuscation` to false to optimize for bandwidth if
1590
+ # you trust the network links between your application and the OpenAI API.
1472
1591
 
1473
- type: :programmatic_tool_calling
1592
+ include_obfuscation: nil
1474
1593
  )
1475
1594
  end
1476
1595
 
1477
1596
  sig do
1478
1597
  override.returns(
1479
- {type: Symbol}
1598
+ {include_obfuscation: T.nilable(T::Boolean)}
1480
1599
  )
1481
1600
  end
1482
1601
  def to_hash
@@ -1484,31 +1603,104 @@ module OpenAI
1484
1603
 
1485
1604
  end
1486
1605
 
1487
- sig { override.returns(T::Array[OpenAI::Responses::ResponsesClientEvent::ToolChoice::Variants]) }
1488
- def self.variants
1489
- end
1606
+ # How the model should select which tool (or tools) to use when generating a
1607
+ # response. See the `tools` parameter to see how to specify which tools the model
1608
+ # can call.
1609
+ module ToolChoice
1610
+ extend OpenAI::Internal::Type::Union
1490
1611
 
1491
- end
1612
+ Variants = T.type_alias {
1613
+ T.any(
1614
+ OpenAI::Responses::ToolChoiceOptions::TaggedSymbol,
1615
+ OpenAI::Responses::ToolChoiceAllowed,
1616
+ OpenAI::Responses::ToolChoiceTypes,
1617
+ OpenAI::Responses::ToolChoiceFunction,
1618
+ OpenAI::Responses::ToolChoiceMcp,
1619
+ OpenAI::Responses::ToolChoiceCustom,
1620
+ OpenAI::Responses::ResponsesClientEvent::ResponseCreate::ToolChoice::SpecificProgrammaticToolCallingParam,
1621
+ OpenAI::Responses::ToolChoiceApplyPatch,
1622
+ OpenAI::Responses::ToolChoiceShell
1623
+ )
1624
+ }
1625
+
1626
+ class SpecificProgrammaticToolCallingParam < OpenAI::Internal::Type::BaseModel
1627
+ OrHash = T.type_alias do
1628
+ T.any(
1629
+ OpenAI::Responses::ResponsesClientEvent::ResponseCreate::ToolChoice::SpecificProgrammaticToolCallingParam,
1630
+ OpenAI::Internal::AnyHash
1631
+ )
1632
+ end
1633
+
1634
+ # The tool to call. Always `programmatic_tool_calling`.
1635
+ sig { returns(Symbol) }
1636
+ attr_accessor :type
1492
1637
 
1493
- # The truncation strategy to use for the model response.
1494
- #
1495
- # - `auto`: If the input to this Response exceeds the model's context window size,
1496
- # the model will truncate the response to fit the context window by dropping
1497
- # items from the beginning of the conversation.
1498
- # - `disabled` (default): If the input size will exceed the context window size
1499
- # for a model, the request will fail with a 400 error.
1500
- module Truncation
1501
- extend OpenAI::Internal::Type::Enum
1638
+ sig do
1639
+ params(
1640
+
1641
+ type: Symbol
1642
+ )
1643
+ .returns(T.attached_class)
1644
+ end
1645
+ def self.new(
1646
+
1647
+ # The tool to call. Always `programmatic_tool_calling`.
1648
+
1649
+ type: :programmatic_tool_calling
1650
+ )
1651
+ end
1652
+
1653
+ sig do
1654
+ override.returns(
1655
+ {type: Symbol}
1656
+ )
1657
+ end
1658
+ def to_hash
1659
+ end
1502
1660
 
1503
- TaggedSymbol = T.type_alias { T.all(Symbol, OpenAI::Responses::ResponsesClientEvent::Truncation) }
1504
- OrSymbol = T.type_alias { T.any(Symbol, String) }
1661
+ end
1505
1662
 
1506
- AUTO = T.let(:auto, OpenAI::Responses::ResponsesClientEvent::Truncation::TaggedSymbol)
1507
- DISABLED = T.let(:disabled, OpenAI::Responses::ResponsesClientEvent::Truncation::TaggedSymbol)
1663
+ sig {
1664
+ override.returns(T::Array[OpenAI::Responses::ResponsesClientEvent::ResponseCreate::ToolChoice::Variants])
1665
+ }
1666
+ def self.variants
1667
+ end
1508
1668
 
1509
- sig { override.returns(T::Array[OpenAI::Responses::ResponsesClientEvent::Truncation::TaggedSymbol]) }
1510
- def self.values
1511
1669
  end
1670
+
1671
+ # The truncation strategy to use for the model response.
1672
+ #
1673
+ # - `auto`: If the input to this Response exceeds the model's context window size,
1674
+ # the model will truncate the response to fit the context window by dropping
1675
+ # items from the beginning of the conversation.
1676
+ # - `disabled` (default): If the input size will exceed the context window size
1677
+ # for a model, the request will fail with a 400 error.
1678
+ module Truncation
1679
+ extend OpenAI::Internal::Type::Enum
1680
+
1681
+ TaggedSymbol = T.type_alias {
1682
+ T.all(Symbol, OpenAI::Responses::ResponsesClientEvent::ResponseCreate::Truncation)
1683
+ }
1684
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
1685
+
1686
+ AUTO = T.let(:auto, OpenAI::Responses::ResponsesClientEvent::ResponseCreate::Truncation::TaggedSymbol)
1687
+ DISABLED = T.let(
1688
+ :disabled,
1689
+ OpenAI::Responses::ResponsesClientEvent::ResponseCreate::Truncation::TaggedSymbol
1690
+ )
1691
+
1692
+ sig {
1693
+ override.returns(
1694
+ T::Array[OpenAI::Responses::ResponsesClientEvent::ResponseCreate::Truncation::TaggedSymbol]
1695
+ )
1696
+ }
1697
+ def self.values
1698
+ end
1699
+ end
1700
+ end
1701
+
1702
+ sig { override.returns(T::Array[OpenAI::Responses::ResponsesClientEvent::Variants]) }
1703
+ def self.variants
1512
1704
  end
1513
1705
 
1514
1706
  end