openai 0.68.0 → 0.69.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 (701) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +23 -0
  3. data/README.md +7 -7
  4. data/lib/openai/internal/type/enum.rb +6 -6
  5. data/lib/openai/internal/util.rb +14 -2
  6. data/lib/openai/models/beta/assistant_create_params.rb +7 -14
  7. data/lib/openai/models/beta/assistant_update_params.rb +7 -14
  8. data/lib/openai/models/beta/beta_apply_patch_tool.rb +44 -0
  9. data/lib/openai/models/beta/beta_compacted_response.rb +58 -0
  10. data/lib/openai/models/beta/beta_computer_action.rb +398 -0
  11. data/lib/openai/models/beta/beta_computer_action_list.rb +13 -0
  12. data/lib/openai/models/beta/beta_computer_tool.rb +23 -0
  13. data/lib/openai/models/beta/beta_computer_use_preview_tool.rb +63 -0
  14. data/lib/openai/models/beta/beta_container_auto.rb +96 -0
  15. data/lib/openai/models/beta/beta_container_network_policy_allowlist.rb +37 -0
  16. data/lib/openai/models/beta/beta_container_network_policy_disabled.rb +20 -0
  17. data/lib/openai/models/beta/beta_container_network_policy_domain_secret.rb +36 -0
  18. data/lib/openai/models/beta/beta_container_reference.rb +28 -0
  19. data/lib/openai/models/beta/beta_custom_tool.rb +148 -0
  20. data/lib/openai/models/beta/beta_easy_input_message.rb +120 -0
  21. data/lib/openai/models/beta/beta_file_search_tool.rb +424 -0
  22. data/lib/openai/models/beta/beta_function_shell_tool.rb +67 -0
  23. data/lib/openai/models/beta/beta_function_tool.rb +97 -0
  24. data/lib/openai/models/beta/beta_inline_skill.rb +44 -0
  25. data/lib/openai/models/beta/beta_inline_skill_source.rb +38 -0
  26. data/lib/openai/models/beta/beta_local_environment.rb +28 -0
  27. data/lib/openai/models/beta/beta_local_skill.rb +36 -0
  28. data/lib/openai/models/beta/beta_namespace_tool.rb +146 -0
  29. data/lib/openai/models/beta/beta_response.rb +1425 -0
  30. data/lib/openai/models/beta/beta_response_apply_patch_tool_call.rb +258 -0
  31. data/lib/openai/models/beta/beta_response_apply_patch_tool_call_output.rb +156 -0
  32. data/lib/openai/models/beta/beta_response_audio_delta_event.rb +63 -0
  33. data/lib/openai/models/beta/beta_response_audio_done_event.rb +55 -0
  34. data/lib/openai/models/beta/beta_response_audio_transcript_delta_event.rb +63 -0
  35. data/lib/openai/models/beta/beta_response_audio_transcript_done_event.rb +55 -0
  36. data/lib/openai/models/beta/beta_response_code_interpreter_call_code_delta_event.rb +81 -0
  37. data/lib/openai/models/beta/beta_response_code_interpreter_call_code_done_event.rb +76 -0
  38. data/lib/openai/models/beta/beta_response_code_interpreter_call_completed_event.rb +73 -0
  39. data/lib/openai/models/beta/beta_response_code_interpreter_call_in_progress_event.rb +77 -0
  40. data/lib/openai/models/beta/beta_response_code_interpreter_call_interpreting_event.rb +77 -0
  41. data/lib/openai/models/beta/beta_response_code_interpreter_tool_call.rb +168 -0
  42. data/lib/openai/models/beta/beta_response_compaction_item.rb +69 -0
  43. data/lib/openai/models/beta/beta_response_compaction_item_param.rb +61 -0
  44. data/lib/openai/models/beta/beta_response_completed_event.rb +63 -0
  45. data/lib/openai/models/beta/beta_response_computer_tool_call.rb +156 -0
  46. data/lib/openai/models/beta/beta_response_computer_tool_call_output_item.rb +141 -0
  47. data/lib/openai/models/beta/beta_response_computer_tool_call_output_screenshot.rb +43 -0
  48. data/lib/openai/models/beta/beta_response_container_reference.rb +29 -0
  49. data/lib/openai/models/beta/beta_response_content.rb +56 -0
  50. data/lib/openai/models/beta/beta_response_content_part_added_event.rb +129 -0
  51. data/lib/openai/models/beta/beta_response_content_part_done_event.rb +129 -0
  52. data/lib/openai/models/beta/beta_response_conversation_param.rb +22 -0
  53. data/lib/openai/models/beta/beta_response_created_event.rb +63 -0
  54. data/lib/openai/models/beta/beta_response_custom_tool_call.rb +142 -0
  55. data/lib/openai/models/beta/beta_response_custom_tool_call_input_delta_event.rb +76 -0
  56. data/lib/openai/models/beta/beta_response_custom_tool_call_input_done_event.rb +76 -0
  57. data/lib/openai/models/beta/beta_response_custom_tool_call_item.rb +55 -0
  58. data/lib/openai/models/beta/beta_response_custom_tool_call_output.rb +171 -0
  59. data/lib/openai/models/beta/beta_response_custom_tool_call_output_item.rb +55 -0
  60. data/lib/openai/models/beta/beta_response_error.rb +63 -0
  61. data/lib/openai/models/beta/beta_response_error_event.rb +79 -0
  62. data/lib/openai/models/beta/beta_response_failed_event.rb +63 -0
  63. data/lib/openai/models/beta/beta_response_file_search_call_completed_event.rb +72 -0
  64. data/lib/openai/models/beta/beta_response_file_search_call_in_progress_event.rb +72 -0
  65. data/lib/openai/models/beta/beta_response_file_search_call_searching_event.rb +72 -0
  66. data/lib/openai/models/beta/beta_response_file_search_tool_call.rb +168 -0
  67. data/lib/openai/models/beta/beta_response_format_text_config.rb +72 -0
  68. data/lib/openai/models/beta/beta_response_format_text_json_schema_config.rb +66 -0
  69. data/lib/openai/models/beta/beta_response_function_call_arguments_delta_event.rb +80 -0
  70. data/lib/openai/models/beta/beta_response_function_call_arguments_done_event.rb +83 -0
  71. data/lib/openai/models/beta/beta_response_function_call_output_item.rb +28 -0
  72. data/lib/openai/models/beta/beta_response_function_call_output_item_list.rb +14 -0
  73. data/lib/openai/models/beta/beta_response_function_shell_call_output_content.rb +90 -0
  74. data/lib/openai/models/beta/beta_response_function_shell_tool_call.rb +216 -0
  75. data/lib/openai/models/beta/beta_response_function_shell_tool_call_output.rb +265 -0
  76. data/lib/openai/models/beta/beta_response_function_tool_call.rb +168 -0
  77. data/lib/openai/models/beta/beta_response_function_tool_call_item.rb +57 -0
  78. data/lib/openai/models/beta/beta_response_function_tool_call_output_item.rb +201 -0
  79. data/lib/openai/models/beta/beta_response_function_web_search.rb +238 -0
  80. data/lib/openai/models/beta/beta_response_image_gen_call_completed_event.rb +69 -0
  81. data/lib/openai/models/beta/beta_response_image_gen_call_generating_event.rb +69 -0
  82. data/lib/openai/models/beta/beta_response_image_gen_call_in_progress_event.rb +68 -0
  83. data/lib/openai/models/beta/beta_response_image_gen_call_partial_image_event.rb +89 -0
  84. data/lib/openai/models/beta/beta_response_in_progress_event.rb +63 -0
  85. data/lib/openai/models/beta/beta_response_includable.rb +45 -0
  86. data/lib/openai/models/beta/beta_response_incomplete_event.rb +63 -0
  87. data/lib/openai/models/beta/beta_response_inject_created_event.rb +51 -0
  88. data/lib/openai/models/beta/beta_response_inject_event.rb +40 -0
  89. data/lib/openai/models/beta/beta_response_inject_failed_event.rb +103 -0
  90. data/lib/openai/models/beta/beta_response_input.rb +13 -0
  91. data/lib/openai/models/beta/beta_response_input_audio.rb +70 -0
  92. data/lib/openai/models/beta/beta_response_input_content.rb +28 -0
  93. data/lib/openai/models/beta/beta_response_input_file.rb +113 -0
  94. data/lib/openai/models/beta/beta_response_input_file_content.rb +115 -0
  95. data/lib/openai/models/beta/beta_response_input_image.rb +94 -0
  96. data/lib/openai/models/beta/beta_response_input_image_content.rb +96 -0
  97. data/lib/openai/models/beta/beta_response_input_item.rb +2819 -0
  98. data/lib/openai/models/beta/beta_response_input_message_content_list.rb +14 -0
  99. data/lib/openai/models/beta/beta_response_input_message_item.rb +108 -0
  100. data/lib/openai/models/beta/beta_response_input_text.rb +59 -0
  101. data/lib/openai/models/beta/beta_response_input_text_content.rb +61 -0
  102. data/lib/openai/models/beta/beta_response_item.rb +1438 -0
  103. data/lib/openai/models/beta/beta_response_local_environment.rb +22 -0
  104. data/lib/openai/models/beta/beta_response_mcp_call_arguments_delta_event.rb +81 -0
  105. data/lib/openai/models/beta/beta_response_mcp_call_arguments_done_event.rb +79 -0
  106. data/lib/openai/models/beta/beta_response_mcp_call_completed_event.rb +68 -0
  107. data/lib/openai/models/beta/beta_response_mcp_call_failed_event.rb +68 -0
  108. data/lib/openai/models/beta/beta_response_mcp_call_in_progress_event.rb +68 -0
  109. data/lib/openai/models/beta/beta_response_mcp_list_tools_completed_event.rb +68 -0
  110. data/lib/openai/models/beta/beta_response_mcp_list_tools_failed_event.rb +68 -0
  111. data/lib/openai/models/beta/beta_response_mcp_list_tools_in_progress_event.rb +69 -0
  112. data/lib/openai/models/beta/beta_response_output_audio.rb +41 -0
  113. data/lib/openai/models/beta/beta_response_output_item.rb +1444 -0
  114. data/lib/openai/models/beta/beta_response_output_item_added_event.rb +71 -0
  115. data/lib/openai/models/beta/beta_response_output_item_done_event.rb +71 -0
  116. data/lib/openai/models/beta/beta_response_output_message.rb +139 -0
  117. data/lib/openai/models/beta/beta_response_output_refusal.rb +30 -0
  118. data/lib/openai/models/beta/beta_response_output_text.rb +292 -0
  119. data/lib/openai/models/beta/beta_response_output_text_annotation_added_event.rb +92 -0
  120. data/lib/openai/models/beta/beta_response_prompt.rb +65 -0
  121. data/lib/openai/models/beta/beta_response_queued_event.rb +60 -0
  122. data/lib/openai/models/beta/beta_response_reasoning_item.rb +151 -0
  123. data/lib/openai/models/beta/beta_response_reasoning_summary_part_added_event.rb +110 -0
  124. data/lib/openai/models/beta/beta_response_reasoning_summary_part_done_event.rb +132 -0
  125. data/lib/openai/models/beta/beta_response_reasoning_summary_text_delta_event.rb +88 -0
  126. data/lib/openai/models/beta/beta_response_reasoning_summary_text_done_event.rb +88 -0
  127. data/lib/openai/models/beta/beta_response_reasoning_text_delta_event.rb +87 -0
  128. data/lib/openai/models/beta/beta_response_reasoning_text_done_event.rb +87 -0
  129. data/lib/openai/models/beta/beta_response_refusal_delta_event.rb +87 -0
  130. data/lib/openai/models/beta/beta_response_refusal_done_event.rb +87 -0
  131. data/lib/openai/models/beta/beta_response_status.rb +25 -0
  132. data/lib/openai/models/beta/beta_response_stream_event.rb +203 -0
  133. data/lib/openai/models/beta/beta_response_text_config.rb +67 -0
  134. data/lib/openai/models/beta/beta_response_text_delta_event.rb +150 -0
  135. data/lib/openai/models/beta/beta_response_text_done_event.rb +150 -0
  136. data/lib/openai/models/beta/beta_response_tool_search_call.rb +117 -0
  137. data/lib/openai/models/beta/beta_response_tool_search_output_item.rb +117 -0
  138. data/lib/openai/models/beta/beta_response_tool_search_output_item_param.rb +109 -0
  139. data/lib/openai/models/beta/beta_response_usage.rb +95 -0
  140. data/lib/openai/models/beta/beta_response_web_search_call_completed_event.rb +72 -0
  141. data/lib/openai/models/beta/beta_response_web_search_call_in_progress_event.rb +72 -0
  142. data/lib/openai/models/beta/beta_response_web_search_call_searching_event.rb +72 -0
  143. data/lib/openai/models/beta/beta_responses_client_event.rb +1432 -0
  144. data/lib/openai/models/beta/beta_responses_server_event.rb +212 -0
  145. data/lib/openai/models/beta/beta_skill_reference.rb +36 -0
  146. data/lib/openai/models/beta/beta_tool.rb +910 -0
  147. data/lib/openai/models/beta/beta_tool_choice_allowed.rb +75 -0
  148. data/lib/openai/models/beta/beta_tool_choice_apply_patch.rb +22 -0
  149. data/lib/openai/models/beta/beta_tool_choice_custom.rb +30 -0
  150. data/lib/openai/models/beta/beta_tool_choice_function.rb +30 -0
  151. data/lib/openai/models/beta/beta_tool_choice_mcp.rb +42 -0
  152. data/lib/openai/models/beta/beta_tool_choice_options.rb +28 -0
  153. data/lib/openai/models/beta/beta_tool_choice_shell.rb +22 -0
  154. data/lib/openai/models/beta/beta_tool_choice_types.rb +67 -0
  155. data/lib/openai/models/beta/beta_tool_search_tool.rb +59 -0
  156. data/lib/openai/models/beta/beta_web_search_preview_tool.rb +143 -0
  157. data/lib/openai/models/beta/beta_web_search_tool.rb +162 -0
  158. data/lib/openai/models/beta/response_cancel_params.rb +37 -0
  159. data/lib/openai/models/beta/response_compact_params.rb +549 -0
  160. data/lib/openai/models/beta/response_create_params.rb +1343 -0
  161. data/lib/openai/models/beta/response_delete_params.rb +37 -0
  162. data/lib/openai/models/beta/response_retrieve_params.rb +74 -0
  163. data/lib/openai/models/beta/responses/beta_response_item_list.rb +54 -0
  164. data/lib/openai/models/beta/responses/input_item_list_params.rb +96 -0
  165. data/lib/openai/models/beta/responses/input_token_count_params.rb +542 -0
  166. data/lib/openai/models/beta/responses/input_token_count_response.rb +26 -0
  167. data/lib/openai/models/beta/threads/run_create_params.rb +7 -14
  168. data/lib/openai/models/chat/chat_completion_content_part.rb +31 -1
  169. data/lib/openai/models/chat/chat_completion_content_part_image.rb +31 -1
  170. data/lib/openai/models/chat/chat_completion_content_part_input_audio.rb +31 -1
  171. data/lib/openai/models/chat/chat_completion_content_part_text.rb +31 -1
  172. data/lib/openai/models/chat/completion_create_params.rb +200 -19
  173. data/lib/openai/models/chat_model.rb +3 -0
  174. data/lib/openai/models/completion_usage.rb +9 -1
  175. data/lib/openai/models/conversations/computer_screenshot_content.rb +28 -1
  176. data/lib/openai/models/conversations/conversation_create_params.rb +2 -2
  177. data/lib/openai/models/conversations/conversation_item.rb +106 -3
  178. data/lib/openai/models/conversations/conversation_item_list.rb +2 -2
  179. data/lib/openai/models/conversations/item_create_params.rb +2 -2
  180. data/lib/openai/models/evals/create_eval_completions_run_data_source.rb +7 -14
  181. data/lib/openai/models/evals/run_cancel_response.rb +16 -30
  182. data/lib/openai/models/evals/run_create_params.rb +16 -30
  183. data/lib/openai/models/evals/run_create_response.rb +16 -30
  184. data/lib/openai/models/evals/run_list_response.rb +16 -30
  185. data/lib/openai/models/evals/run_retrieve_response.rb +16 -30
  186. data/lib/openai/models/graders/score_model_grader.rb +7 -14
  187. data/lib/openai/models/realtime/realtime_response_create_mcp_tool.rb +23 -1
  188. data/lib/openai/models/realtime/realtime_session_create_request.rb +6 -0
  189. data/lib/openai/models/realtime/realtime_session_create_response.rb +29 -1
  190. data/lib/openai/models/realtime/realtime_tools_config_union.rb +23 -1
  191. data/lib/openai/models/reasoning.rb +47 -15
  192. data/lib/openai/models/reasoning_effort.rb +7 -13
  193. data/lib/openai/models/responses/apply_patch_tool.rb +23 -1
  194. data/lib/openai/models/responses/compacted_response.rb +2 -2
  195. data/lib/openai/models/responses/custom_tool.rb +21 -1
  196. data/lib/openai/models/responses/function_shell_tool.rb +23 -1
  197. data/lib/openai/models/responses/function_tool.rb +32 -3
  198. data/lib/openai/models/responses/input_token_count_params.rb +21 -8
  199. data/lib/openai/models/responses/namespace_tool.rb +41 -2
  200. data/lib/openai/models/responses/response.rb +98 -14
  201. data/lib/openai/models/responses/response_apply_patch_tool_call.rb +56 -1
  202. data/lib/openai/models/responses/response_apply_patch_tool_call_output.rb +56 -1
  203. data/lib/openai/models/responses/response_compact_params.rb +107 -4
  204. data/lib/openai/models/responses/response_create_params.rb +214 -13
  205. data/lib/openai/models/responses/response_custom_tool_call.rb +56 -1
  206. data/lib/openai/models/responses/response_custom_tool_call_output.rb +58 -1
  207. data/lib/openai/models/responses/response_error.rb +1 -0
  208. data/lib/openai/models/responses/response_function_shell_tool_call.rb +56 -1
  209. data/lib/openai/models/responses/response_function_shell_tool_call_output.rb +56 -1
  210. data/lib/openai/models/responses/response_function_tool_call.rb +56 -1
  211. data/lib/openai/models/responses/response_function_tool_call_output_item.rb +58 -1
  212. data/lib/openai/models/responses/response_input_file.rb +39 -8
  213. data/lib/openai/models/responses/response_input_file_content.rb +41 -8
  214. data/lib/openai/models/responses/response_input_image.rb +27 -1
  215. data/lib/openai/models/responses/response_input_image_content.rb +29 -1
  216. data/lib/openai/models/responses/response_input_item.rb +396 -8
  217. data/lib/openai/models/responses/response_input_text.rb +30 -1
  218. data/lib/openai/models/responses/response_input_text_content.rb +32 -1
  219. data/lib/openai/models/responses/response_item.rb +106 -3
  220. data/lib/openai/models/responses/response_item_list.rb +2 -2
  221. data/lib/openai/models/responses/response_output_item.rb +106 -3
  222. data/lib/openai/models/responses/response_output_item_added_event.rb +2 -2
  223. data/lib/openai/models/responses/response_output_item_done_event.rb +2 -2
  224. data/lib/openai/models/responses/response_reasoning_summary_part_done_event.rb +23 -1
  225. data/lib/openai/models/responses/response_tool_search_output_item.rb +2 -2
  226. data/lib/openai/models/responses/response_tool_search_output_item_param.rb +2 -2
  227. data/lib/openai/models/responses/response_usage.rb +9 -1
  228. data/lib/openai/models/responses/responses_client_event.rb +215 -13
  229. data/lib/openai/models/responses/tool.rb +58 -3
  230. data/lib/openai/models/webhooks/safety_identifier_blocked_webhook_event.rb +118 -0
  231. data/lib/openai/models/webhooks/unwrap_webhook_event.rb +4 -1
  232. data/lib/openai/resources/beta/assistants.rb +2 -2
  233. data/lib/openai/resources/beta/responses/input_items.rb +58 -0
  234. data/lib/openai/resources/beta/responses/input_tokens.rb +73 -0
  235. data/lib/openai/resources/beta/responses.rb +440 -0
  236. data/lib/openai/resources/beta/threads/runs.rb +2 -2
  237. data/lib/openai/resources/beta.rb +4 -0
  238. data/lib/openai/resources/chat/completions.rb +10 -6
  239. data/lib/openai/resources/conversations/items.rb +3 -3
  240. data/lib/openai/resources/conversations.rb +1 -1
  241. data/lib/openai/resources/responses/input_items.rb +1 -1
  242. data/lib/openai/resources/responses/input_tokens.rb +3 -3
  243. data/lib/openai/resources/responses.rb +22 -12
  244. data/lib/openai/resources/webhooks.rb +1 -1
  245. data/lib/openai/version.rb +1 -1
  246. data/lib/openai.rb +163 -0
  247. data/rbi/openai/models/beta/assistant_create_params.rbi +12 -26
  248. data/rbi/openai/models/beta/assistant_update_params.rbi +12 -26
  249. data/rbi/openai/models/beta/beta_apply_patch_tool.rbi +99 -0
  250. data/rbi/openai/models/beta/beta_compacted_response.rbi +120 -0
  251. data/rbi/openai/models/beta/beta_computer_action.rbi +593 -0
  252. data/rbi/openai/models/beta/beta_computer_action_list.rbi +18 -0
  253. data/rbi/openai/models/beta/beta_computer_tool.rbi +33 -0
  254. data/rbi/openai/models/beta/beta_computer_use_preview_tool.rbi +126 -0
  255. data/rbi/openai/models/beta/beta_container_auto.rbi +231 -0
  256. data/rbi/openai/models/beta/beta_container_network_policy_allowlist.rbi +81 -0
  257. data/rbi/openai/models/beta/beta_container_network_policy_disabled.rbi +35 -0
  258. data/rbi/openai/models/beta/beta_container_network_policy_domain_secret.rbi +53 -0
  259. data/rbi/openai/models/beta/beta_container_reference.rbi +42 -0
  260. data/rbi/openai/models/beta/beta_custom_tool.rbi +302 -0
  261. data/rbi/openai/models/beta/beta_easy_input_message.rbi +211 -0
  262. data/rbi/openai/models/beta/beta_file_search_tool.rbi +863 -0
  263. data/rbi/openai/models/beta/beta_function_shell_tool.rbi +155 -0
  264. data/rbi/openai/models/beta/beta_function_tool.rbi +154 -0
  265. data/rbi/openai/models/beta/beta_inline_skill.rbi +68 -0
  266. data/rbi/openai/models/beta/beta_inline_skill_source.rbi +53 -0
  267. data/rbi/openai/models/beta/beta_local_environment.rbi +51 -0
  268. data/rbi/openai/models/beta/beta_local_skill.rbi +49 -0
  269. data/rbi/openai/models/beta/beta_namespace_tool.rbi +252 -0
  270. data/rbi/openai/models/beta/beta_response.rbi +2495 -0
  271. data/rbi/openai/models/beta/beta_response_apply_patch_tool_call.rbi +431 -0
  272. data/rbi/openai/models/beta/beta_response_apply_patch_tool_call_output.rbi +277 -0
  273. data/rbi/openai/models/beta/beta_response_audio_delta_event.rbi +110 -0
  274. data/rbi/openai/models/beta/beta_response_audio_done_event.rbi +100 -0
  275. data/rbi/openai/models/beta/beta_response_audio_transcript_delta_event.rbi +118 -0
  276. data/rbi/openai/models/beta/beta_response_audio_transcript_done_event.rbi +108 -0
  277. data/rbi/openai/models/beta/beta_response_code_interpreter_call_code_delta_event.rbi +136 -0
  278. data/rbi/openai/models/beta/beta_response_code_interpreter_call_code_done_event.rbi +134 -0
  279. data/rbi/openai/models/beta/beta_response_code_interpreter_call_completed_event.rbi +128 -0
  280. data/rbi/openai/models/beta/beta_response_code_interpreter_call_in_progress_event.rbi +128 -0
  281. data/rbi/openai/models/beta/beta_response_code_interpreter_call_interpreting_event.rbi +128 -0
  282. data/rbi/openai/models/beta/beta_response_code_interpreter_tool_call.rbi +315 -0
  283. data/rbi/openai/models/beta/beta_response_compaction_item.rbi +116 -0
  284. data/rbi/openai/models/beta/beta_response_compaction_item_param.rbi +114 -0
  285. data/rbi/openai/models/beta/beta_response_completed_event.rbi +111 -0
  286. data/rbi/openai/models/beta/beta_response_computer_tool_call.rbi +404 -0
  287. data/rbi/openai/models/beta/beta_response_computer_tool_call_output_item.rbi +296 -0
  288. data/rbi/openai/models/beta/beta_response_computer_tool_call_output_screenshot.rbi +62 -0
  289. data/rbi/openai/models/beta/beta_response_container_reference.rbi +41 -0
  290. data/rbi/openai/models/beta/beta_response_content.rbi +66 -0
  291. data/rbi/openai/models/beta/beta_response_content_part_added_event.rbi +205 -0
  292. data/rbi/openai/models/beta/beta_response_content_part_done_event.rbi +203 -0
  293. data/rbi/openai/models/beta/beta_response_conversation_param.rbi +35 -0
  294. data/rbi/openai/models/beta/beta_response_created_event.rbi +109 -0
  295. data/rbi/openai/models/beta/beta_response_custom_tool_call.rbi +242 -0
  296. data/rbi/openai/models/beta/beta_response_custom_tool_call_input_delta_event.rbi +134 -0
  297. data/rbi/openai/models/beta/beta_response_custom_tool_call_input_done_event.rbi +134 -0
  298. data/rbi/openai/models/beta/beta_response_custom_tool_call_item.rbi +113 -0
  299. data/rbi/openai/models/beta/beta_response_custom_tool_call_output.rbi +303 -0
  300. data/rbi/openai/models/beta/beta_response_custom_tool_call_output_item.rbi +114 -0
  301. data/rbi/openai/models/beta/beta_response_error.rbi +165 -0
  302. data/rbi/openai/models/beta/beta_response_error_event.rbi +120 -0
  303. data/rbi/openai/models/beta/beta_response_failed_event.rbi +107 -0
  304. data/rbi/openai/models/beta/beta_response_file_search_call_completed_event.rbi +126 -0
  305. data/rbi/openai/models/beta/beta_response_file_search_call_in_progress_event.rbi +126 -0
  306. data/rbi/openai/models/beta/beta_response_file_search_call_searching_event.rbi +126 -0
  307. data/rbi/openai/models/beta/beta_response_file_search_tool_call.rbi +328 -0
  308. data/rbi/openai/models/beta/beta_response_format_text_config.rbi +97 -0
  309. data/rbi/openai/models/beta/beta_response_format_text_json_schema_config.rbi +97 -0
  310. data/rbi/openai/models/beta/beta_response_function_call_arguments_delta_event.rbi +134 -0
  311. data/rbi/openai/models/beta/beta_response_function_call_arguments_done_event.rbi +140 -0
  312. data/rbi/openai/models/beta/beta_response_function_call_output_item.rbi +32 -0
  313. data/rbi/openai/models/beta/beta_response_function_call_output_item_list.rbi +21 -0
  314. data/rbi/openai/models/beta/beta_response_function_shell_call_output_content.rbi +160 -0
  315. data/rbi/openai/models/beta/beta_response_function_shell_tool_call.rbi +389 -0
  316. data/rbi/openai/models/beta/beta_response_function_shell_tool_call_output.rbi +470 -0
  317. data/rbi/openai/models/beta/beta_response_function_tool_call.rbi +310 -0
  318. data/rbi/openai/models/beta/beta_response_function_tool_call_item.rbi +115 -0
  319. data/rbi/openai/models/beta/beta_response_function_tool_call_output_item.rbi +364 -0
  320. data/rbi/openai/models/beta/beta_response_function_web_search.rbi +416 -0
  321. data/rbi/openai/models/beta/beta_response_image_gen_call_completed_event.rbi +127 -0
  322. data/rbi/openai/models/beta/beta_response_image_gen_call_generating_event.rbi +127 -0
  323. data/rbi/openai/models/beta/beta_response_image_gen_call_in_progress_event.rbi +126 -0
  324. data/rbi/openai/models/beta/beta_response_image_gen_call_partial_image_event.rbi +144 -0
  325. data/rbi/openai/models/beta/beta_response_in_progress_event.rbi +113 -0
  326. data/rbi/openai/models/beta/beta_response_includable.rbi +86 -0
  327. data/rbi/openai/models/beta/beta_response_incomplete_event.rbi +113 -0
  328. data/rbi/openai/models/beta/beta_response_inject_created_event.rbi +75 -0
  329. data/rbi/openai/models/beta/beta_response_inject_event.rbi +183 -0
  330. data/rbi/openai/models/beta/beta_response_inject_failed_event.rbi +304 -0
  331. data/rbi/openai/models/beta/beta_response_input.rbi +18 -0
  332. data/rbi/openai/models/beta/beta_response_input_audio.rbi +144 -0
  333. data/rbi/openai/models/beta/beta_response_input_content.rbi +31 -0
  334. data/rbi/openai/models/beta/beta_response_input_file.rbi +210 -0
  335. data/rbi/openai/models/beta/beta_response_input_file_content.rbi +211 -0
  336. data/rbi/openai/models/beta/beta_response_input_image.rbi +173 -0
  337. data/rbi/openai/models/beta/beta_response_input_image_content.rbi +191 -0
  338. data/rbi/openai/models/beta/beta_response_input_item.rbi +5505 -0
  339. data/rbi/openai/models/beta/beta_response_input_message_content_list.rbi +21 -0
  340. data/rbi/openai/models/beta/beta_response_input_message_item.rbi +235 -0
  341. data/rbi/openai/models/beta/beta_response_input_text.rbi +109 -0
  342. data/rbi/openai/models/beta/beta_response_input_text_content.rbi +115 -0
  343. data/rbi/openai/models/beta/beta_response_item.rbi +2592 -0
  344. data/rbi/openai/models/beta/beta_response_local_environment.rbi +35 -0
  345. data/rbi/openai/models/beta/beta_response_mcp_call_arguments_delta_event.rbi +137 -0
  346. data/rbi/openai/models/beta/beta_response_mcp_call_arguments_done_event.rbi +134 -0
  347. data/rbi/openai/models/beta/beta_response_mcp_call_completed_event.rbi +123 -0
  348. data/rbi/openai/models/beta/beta_response_mcp_call_failed_event.rbi +121 -0
  349. data/rbi/openai/models/beta/beta_response_mcp_call_in_progress_event.rbi +124 -0
  350. data/rbi/openai/models/beta/beta_response_mcp_list_tools_completed_event.rbi +126 -0
  351. data/rbi/openai/models/beta/beta_response_mcp_list_tools_failed_event.rbi +124 -0
  352. data/rbi/openai/models/beta/beta_response_mcp_list_tools_in_progress_event.rbi +127 -0
  353. data/rbi/openai/models/beta/beta_response_output_audio.rbi +53 -0
  354. data/rbi/openai/models/beta/beta_response_output_item.rbi +2627 -0
  355. data/rbi/openai/models/beta/beta_response_output_item_added_event.rbi +154 -0
  356. data/rbi/openai/models/beta/beta_response_output_item_done_event.rbi +154 -0
  357. data/rbi/openai/models/beta/beta_response_output_message.rbi +267 -0
  358. data/rbi/openai/models/beta/beta_response_output_refusal.rbi +41 -0
  359. data/rbi/openai/models/beta/beta_response_output_text.rbi +479 -0
  360. data/rbi/openai/models/beta/beta_response_output_text_annotation_added_event.rbi +150 -0
  361. data/rbi/openai/models/beta/beta_response_prompt.rbi +122 -0
  362. data/rbi/openai/models/beta/beta_response_queued_event.rbi +107 -0
  363. data/rbi/openai/models/beta/beta_response_reasoning_item.rbi +274 -0
  364. data/rbi/openai/models/beta/beta_response_reasoning_summary_part_added_event.rbi +188 -0
  365. data/rbi/openai/models/beta/beta_response_reasoning_summary_part_done_event.rbi +243 -0
  366. data/rbi/openai/models/beta/beta_response_reasoning_summary_text_delta_event.rbi +142 -0
  367. data/rbi/openai/models/beta/beta_response_reasoning_summary_text_done_event.rbi +142 -0
  368. data/rbi/openai/models/beta/beta_response_reasoning_text_delta_event.rbi +140 -0
  369. data/rbi/openai/models/beta/beta_response_reasoning_text_done_event.rbi +140 -0
  370. data/rbi/openai/models/beta/beta_response_refusal_delta_event.rbi +135 -0
  371. data/rbi/openai/models/beta/beta_response_refusal_done_event.rbi +135 -0
  372. data/rbi/openai/models/beta/beta_response_status.rbi +38 -0
  373. data/rbi/openai/models/beta/beta_response_stream_event.rbi +81 -0
  374. data/rbi/openai/models/beta/beta_response_text_config.rbi +166 -0
  375. data/rbi/openai/models/beta/beta_response_text_delta_event.rbi +263 -0
  376. data/rbi/openai/models/beta/beta_response_text_done_event.rbi +261 -0
  377. data/rbi/openai/models/beta/beta_response_tool_search_call.rbi +218 -0
  378. data/rbi/openai/models/beta/beta_response_tool_search_output_item.rbi +248 -0
  379. data/rbi/openai/models/beta/beta_response_tool_search_output_item_param.rbi +307 -0
  380. data/rbi/openai/models/beta/beta_response_usage.rbi +163 -0
  381. data/rbi/openai/models/beta/beta_response_web_search_call_completed_event.rbi +126 -0
  382. data/rbi/openai/models/beta/beta_response_web_search_call_in_progress_event.rbi +126 -0
  383. data/rbi/openai/models/beta/beta_response_web_search_call_searching_event.rbi +126 -0
  384. data/rbi/openai/models/beta/beta_responses_client_event.rbi +2831 -0
  385. data/rbi/openai/models/beta/beta_responses_server_event.rbi +83 -0
  386. data/rbi/openai/models/beta/beta_skill_reference.rbi +52 -0
  387. data/rbi/openai/models/beta/beta_tool.rbi +1835 -0
  388. data/rbi/openai/models/beta/beta_tool_choice_allowed.rbi +126 -0
  389. data/rbi/openai/models/beta/beta_tool_choice_apply_patch.rbi +35 -0
  390. data/rbi/openai/models/beta/beta_tool_choice_custom.rbi +38 -0
  391. data/rbi/openai/models/beta/beta_tool_choice_function.rbi +41 -0
  392. data/rbi/openai/models/beta/beta_tool_choice_mcp.rbi +55 -0
  393. data/rbi/openai/models/beta/beta_tool_choice_options.rbi +38 -0
  394. data/rbi/openai/models/beta/beta_tool_choice_shell.rbi +32 -0
  395. data/rbi/openai/models/beta/beta_tool_choice_types.rbi +134 -0
  396. data/rbi/openai/models/beta/beta_tool_search_tool.rbi +109 -0
  397. data/rbi/openai/models/beta/beta_web_search_preview_tool.rbi +311 -0
  398. data/rbi/openai/models/beta/beta_web_search_tool.rbi +329 -0
  399. data/rbi/openai/models/beta/response_cancel_params.rbi +83 -0
  400. data/rbi/openai/models/beta/response_compact_params.rbi +1033 -0
  401. data/rbi/openai/models/beta/response_create_params.rbi +2739 -0
  402. data/rbi/openai/models/beta/response_delete_params.rbi +83 -0
  403. data/rbi/openai/models/beta/response_retrieve_params.rbi +145 -0
  404. data/rbi/openai/models/beta/responses/beta_response_item_list.rbi +113 -0
  405. data/rbi/openai/models/beta/responses/input_item_list_params.rbi +223 -0
  406. data/rbi/openai/models/beta/responses/input_token_count_params.rbi +1248 -0
  407. data/rbi/openai/models/beta/responses/input_token_count_response.rbi +37 -0
  408. data/rbi/openai/models/beta/threads/run_create_params.rbi +12 -26
  409. data/rbi/openai/models/chat/chat_completion_content_part.rbi +57 -1
  410. data/rbi/openai/models/chat/chat_completion_content_part_image.rbi +57 -1
  411. data/rbi/openai/models/chat/chat_completion_content_part_input_audio.rbi +57 -1
  412. data/rbi/openai/models/chat/chat_completion_content_part_text.rbi +70 -2
  413. data/rbi/openai/models/chat/completion_create_params.rbi +513 -32
  414. data/rbi/openai/models/chat_model.rbi +3 -0
  415. data/rbi/openai/models/completion_usage.rbi +21 -4
  416. data/rbi/openai/models/conversations/computer_screenshot_content.rbi +57 -1
  417. data/rbi/openai/models/conversations/conversation_create_params.rbi +9 -3
  418. data/rbi/openai/models/conversations/conversation_item.rbi +178 -0
  419. data/rbi/openai/models/conversations/conversation_item_list.rbi +2 -0
  420. data/rbi/openai/models/conversations/item_create_params.rbi +9 -3
  421. data/rbi/openai/models/evals/create_eval_completions_run_data_source.rbi +12 -26
  422. data/rbi/openai/models/evals/run_cancel_response.rbi +26 -52
  423. data/rbi/openai/models/evals/run_create_params.rbi +28 -52
  424. data/rbi/openai/models/evals/run_create_response.rbi +26 -52
  425. data/rbi/openai/models/evals/run_list_response.rbi +26 -52
  426. data/rbi/openai/models/evals/run_retrieve_response.rbi +26 -52
  427. data/rbi/openai/models/graders/score_model_grader.rbi +12 -26
  428. data/rbi/openai/models/realtime/realtime_response_create_mcp_tool.rbi +60 -0
  429. data/rbi/openai/models/realtime/realtime_session_create_request.rbi +10 -0
  430. data/rbi/openai/models/realtime/realtime_session_create_response.rbi +70 -0
  431. data/rbi/openai/models/realtime/realtime_tools_config_union.rbi +60 -0
  432. data/rbi/openai/models/reasoning.rbi +51 -26
  433. data/rbi/openai/models/reasoning_effort.rbi +7 -13
  434. data/rbi/openai/models/responses/apply_patch_tool.rbi +69 -2
  435. data/rbi/openai/models/responses/compacted_response.rbi +2 -0
  436. data/rbi/openai/models/responses/custom_tool.rbi +53 -0
  437. data/rbi/openai/models/responses/function_shell_tool.rbi +57 -0
  438. data/rbi/openai/models/responses/function_tool.rbi +68 -3
  439. data/rbi/openai/models/responses/input_token_count_params.rbi +32 -0
  440. data/rbi/openai/models/responses/namespace_tool.rbi +76 -0
  441. data/rbi/openai/models/responses/response.rbi +192 -3
  442. data/rbi/openai/models/responses/response_apply_patch_tool_call.rbi +98 -0
  443. data/rbi/openai/models/responses/response_apply_patch_tool_call_output.rbi +98 -0
  444. data/rbi/openai/models/responses/response_compact_params.rbi +231 -0
  445. data/rbi/openai/models/responses/response_create_params.rbi +537 -6
  446. data/rbi/openai/models/responses/response_custom_tool_call.rbi +104 -0
  447. data/rbi/openai/models/responses/response_custom_tool_call_output.rbi +111 -1
  448. data/rbi/openai/models/responses/response_error.rbi +5 -0
  449. data/rbi/openai/models/responses/response_function_shell_tool_call.rbi +98 -0
  450. data/rbi/openai/models/responses/response_function_shell_tool_call_output.rbi +98 -0
  451. data/rbi/openai/models/responses/response_function_tool_call.rbi +104 -0
  452. data/rbi/openai/models/responses/response_function_tool_call_output_item.rbi +104 -0
  453. data/rbi/openai/models/responses/response_input_file.rbi +77 -10
  454. data/rbi/openai/models/responses/response_input_file_content.rbi +83 -10
  455. data/rbi/openai/models/responses/response_input_image.rbi +57 -1
  456. data/rbi/openai/models/responses/response_input_image_content.rbi +63 -1
  457. data/rbi/openai/models/responses/response_input_item.rbi +748 -8
  458. data/rbi/openai/models/responses/response_input_text.rbi +70 -2
  459. data/rbi/openai/models/responses/response_input_text_content.rbi +76 -2
  460. data/rbi/openai/models/responses/response_item.rbi +178 -0
  461. data/rbi/openai/models/responses/response_item_list.rbi +2 -0
  462. data/rbi/openai/models/responses/response_output_item.rbi +178 -0
  463. data/rbi/openai/models/responses/response_output_item_added_event.rbi +2 -0
  464. data/rbi/openai/models/responses/response_output_item_done_event.rbi +2 -0
  465. data/rbi/openai/models/responses/response_reasoning_summary_part_done_event.rbi +58 -1
  466. data/rbi/openai/models/responses/response_tool_search_output_item.rbi +1 -0
  467. data/rbi/openai/models/responses/response_tool_search_output_item_param.rbi +3 -0
  468. data/rbi/openai/models/responses/response_usage.rbi +16 -2
  469. data/rbi/openai/models/responses/responses_client_event.rbi +537 -6
  470. data/rbi/openai/models/responses/tool.rbi +142 -1
  471. data/rbi/openai/models/webhooks/safety_identifier_blocked_webhook_event.rbi +209 -0
  472. data/rbi/openai/models/webhooks/unwrap_webhook_event.rbi +2 -1
  473. data/rbi/openai/resources/beta/assistants.rbi +12 -26
  474. data/rbi/openai/resources/beta/responses/input_items.rbi +58 -0
  475. data/rbi/openai/resources/beta/responses/input_tokens.rbi +154 -0
  476. data/rbi/openai/resources/beta/responses.rbi +903 -0
  477. data/rbi/openai/resources/beta/threads/runs.rbi +12 -26
  478. data/rbi/openai/resources/beta.rbi +3 -0
  479. data/rbi/openai/resources/chat/completions.rbi +48 -28
  480. data/rbi/openai/resources/conversations/items.rbi +3 -1
  481. data/rbi/openai/resources/conversations.rbi +3 -1
  482. data/rbi/openai/resources/responses/input_tokens.rbi +2 -0
  483. data/rbi/openai/resources/responses.rbi +54 -2
  484. data/rbi/openai/resources/webhooks.rbi +2 -1
  485. data/sig/openai/client.rbs +1 -1
  486. data/sig/openai/internal/transport/base_client.rbs +2 -2
  487. data/sig/openai/models/beta/beta_apply_patch_tool.rbs +40 -0
  488. data/sig/openai/models/beta/beta_compacted_response.rbs +44 -0
  489. data/sig/openai/models/beta/beta_computer_action.rbs +259 -0
  490. data/sig/openai/models/beta/beta_computer_action_list.rbs +12 -0
  491. data/sig/openai/models/beta/beta_computer_tool.rbs +17 -0
  492. data/sig/openai/models/beta/beta_computer_use_preview_tool.rbs +53 -0
  493. data/sig/openai/models/beta/beta_container_auto.rbs +86 -0
  494. data/sig/openai/models/beta/beta_container_network_policy_allowlist.rbs +38 -0
  495. data/sig/openai/models/beta/beta_container_network_policy_disabled.rbs +17 -0
  496. data/sig/openai/models/beta/beta_container_network_policy_domain_secret.rbs +22 -0
  497. data/sig/openai/models/beta/beta_container_reference.rbs +23 -0
  498. data/sig/openai/models/beta/beta_custom_tool.rbs +126 -0
  499. data/sig/openai/models/beta/beta_easy_input_message.rbs +87 -0
  500. data/sig/openai/models/beta/beta_file_search_tool.rbs +298 -0
  501. data/sig/openai/models/beta/beta_function_shell_tool.rbs +56 -0
  502. data/sig/openai/models/beta/beta_function_tool.rbs +72 -0
  503. data/sig/openai/models/beta/beta_inline_skill.rbs +39 -0
  504. data/sig/openai/models/beta/beta_inline_skill_source.rbs +30 -0
  505. data/sig/openai/models/beta/beta_local_environment.rbs +30 -0
  506. data/sig/openai/models/beta/beta_local_skill.rbs +26 -0
  507. data/sig/openai/models/beta/beta_namespace_tool.rbs +114 -0
  508. data/sig/openai/models/beta/beta_response.rbs +860 -0
  509. data/sig/openai/models/beta/beta_response_apply_patch_tool_call.rbs +177 -0
  510. data/sig/openai/models/beta/beta_response_apply_patch_tool_call_output.rbs +118 -0
  511. data/sig/openai/models/beta/beta_response_audio_delta_event.rbs +49 -0
  512. data/sig/openai/models/beta/beta_response_audio_done_event.rbs +44 -0
  513. data/sig/openai/models/beta/beta_response_audio_transcript_delta_event.rbs +49 -0
  514. data/sig/openai/models/beta/beta_response_audio_transcript_done_event.rbs +44 -0
  515. data/sig/openai/models/beta/beta_response_code_interpreter_call_code_delta_event.rbs +59 -0
  516. data/sig/openai/models/beta/beta_response_code_interpreter_call_code_done_event.rbs +59 -0
  517. data/sig/openai/models/beta/beta_response_code_interpreter_call_completed_event.rbs +54 -0
  518. data/sig/openai/models/beta/beta_response_code_interpreter_call_in_progress_event.rbs +54 -0
  519. data/sig/openai/models/beta/beta_response_code_interpreter_call_interpreting_event.rbs +54 -0
  520. data/sig/openai/models/beta/beta_response_code_interpreter_tool_call.rbs +113 -0
  521. data/sig/openai/models/beta/beta_response_compaction_item.rbs +60 -0
  522. data/sig/openai/models/beta/beta_response_compaction_item_param.rbs +49 -0
  523. data/sig/openai/models/beta/beta_response_completed_event.rbs +49 -0
  524. data/sig/openai/models/beta/beta_response_computer_tool_call.rbs +118 -0
  525. data/sig/openai/models/beta/beta_response_computer_tool_call_output_item.rbs +107 -0
  526. data/sig/openai/models/beta/beta_response_computer_tool_call_output_screenshot.rbs +34 -0
  527. data/sig/openai/models/beta/beta_response_container_reference.rbs +23 -0
  528. data/sig/openai/models/beta/beta_response_content.rbs +33 -0
  529. data/sig/openai/models/beta/beta_response_content_part_added_event.rbs +87 -0
  530. data/sig/openai/models/beta/beta_response_content_part_done_event.rbs +87 -0
  531. data/sig/openai/models/beta/beta_response_conversation_param.rbs +17 -0
  532. data/sig/openai/models/beta/beta_response_created_event.rbs +49 -0
  533. data/sig/openai/models/beta/beta_response_custom_tool_call.rbs +105 -0
  534. data/sig/openai/models/beta/beta_response_custom_tool_call_input_delta_event.rbs +59 -0
  535. data/sig/openai/models/beta/beta_response_custom_tool_call_input_done_event.rbs +59 -0
  536. data/sig/openai/models/beta/beta_response_custom_tool_call_item.rbs +54 -0
  537. data/sig/openai/models/beta/beta_response_custom_tool_call_output.rbs +116 -0
  538. data/sig/openai/models/beta/beta_response_custom_tool_call_output_item.rbs +54 -0
  539. data/sig/openai/models/beta/beta_response_error.rbs +73 -0
  540. data/sig/openai/models/beta/beta_response_error_event.rbs +59 -0
  541. data/sig/openai/models/beta/beta_response_failed_event.rbs +49 -0
  542. data/sig/openai/models/beta/beta_response_file_search_call_completed_event.rbs +54 -0
  543. data/sig/openai/models/beta/beta_response_file_search_call_in_progress_event.rbs +54 -0
  544. data/sig/openai/models/beta/beta_response_file_search_call_searching_event.rbs +54 -0
  545. data/sig/openai/models/beta/beta_response_file_search_tool_call.rbs +127 -0
  546. data/sig/openai/models/beta/beta_response_format_text_config.rbs +38 -0
  547. data/sig/openai/models/beta/beta_response_format_text_json_schema_config.rbs +46 -0
  548. data/sig/openai/models/beta/beta_response_function_call_arguments_delta_event.rbs +59 -0
  549. data/sig/openai/models/beta/beta_response_function_call_arguments_done_event.rbs +64 -0
  550. data/sig/openai/models/beta/beta_response_function_call_output_item.rbs +18 -0
  551. data/sig/openai/models/beta/beta_response_function_call_output_item_list.rbs +12 -0
  552. data/sig/openai/models/beta/beta_response_function_shell_call_output_content.rbs +66 -0
  553. data/sig/openai/models/beta/beta_response_function_shell_tool_call.rbs +161 -0
  554. data/sig/openai/models/beta/beta_response_function_shell_tool_call_output.rbs +190 -0
  555. data/sig/openai/models/beta/beta_response_function_tool_call.rbs +126 -0
  556. data/sig/openai/models/beta/beta_response_function_tool_call_item.rbs +54 -0
  557. data/sig/openai/models/beta/beta_response_function_tool_call_output_item.rbs +138 -0
  558. data/sig/openai/models/beta/beta_response_function_web_search.rbs +165 -0
  559. data/sig/openai/models/beta/beta_response_image_gen_call_completed_event.rbs +54 -0
  560. data/sig/openai/models/beta/beta_response_image_gen_call_generating_event.rbs +54 -0
  561. data/sig/openai/models/beta/beta_response_image_gen_call_in_progress_event.rbs +54 -0
  562. data/sig/openai/models/beta/beta_response_image_gen_call_partial_image_event.rbs +64 -0
  563. data/sig/openai/models/beta/beta_response_in_progress_event.rbs +49 -0
  564. data/sig/openai/models/beta/beta_response_includable.rbs +32 -0
  565. data/sig/openai/models/beta/beta_response_incomplete_event.rbs +49 -0
  566. data/sig/openai/models/beta/beta_response_inject_created_event.rbs +41 -0
  567. data/sig/openai/models/beta/beta_response_inject_event.rbs +34 -0
  568. data/sig/openai/models/beta/beta_response_inject_failed_event.rbs +84 -0
  569. data/sig/openai/models/beta/beta_response_input.rbs +12 -0
  570. data/sig/openai/models/beta/beta_response_input_audio.rbs +62 -0
  571. data/sig/openai/models/beta/beta_response_input_content.rbs +18 -0
  572. data/sig/openai/models/beta/beta_response_input_file.rbs +90 -0
  573. data/sig/openai/models/beta/beta_response_input_file_content.rbs +80 -0
  574. data/sig/openai/models/beta/beta_response_input_image.rbs +71 -0
  575. data/sig/openai/models/beta/beta_response_input_image_content.rbs +67 -0
  576. data/sig/openai/models/beta/beta_response_input_item.rbs +2064 -0
  577. data/sig/openai/models/beta/beta_response_input_message_content_list.rbs +12 -0
  578. data/sig/openai/models/beta/beta_response_input_message_item.rbs +87 -0
  579. data/sig/openai/models/beta/beta_response_input_text.rbs +48 -0
  580. data/sig/openai/models/beta/beta_response_input_text_content.rbs +44 -0
  581. data/sig/openai/models/beta/beta_response_item.rbs +1097 -0
  582. data/sig/openai/models/beta/beta_response_local_environment.rbs +17 -0
  583. data/sig/openai/models/beta/beta_response_mcp_call_arguments_delta_event.rbs +59 -0
  584. data/sig/openai/models/beta/beta_response_mcp_call_arguments_done_event.rbs +59 -0
  585. data/sig/openai/models/beta/beta_response_mcp_call_completed_event.rbs +54 -0
  586. data/sig/openai/models/beta/beta_response_mcp_call_failed_event.rbs +54 -0
  587. data/sig/openai/models/beta/beta_response_mcp_call_in_progress_event.rbs +54 -0
  588. data/sig/openai/models/beta/beta_response_mcp_list_tools_completed_event.rbs +54 -0
  589. data/sig/openai/models/beta/beta_response_mcp_list_tools_failed_event.rbs +54 -0
  590. data/sig/openai/models/beta/beta_response_mcp_list_tools_in_progress_event.rbs +54 -0
  591. data/sig/openai/models/beta/beta_response_output_audio.rbs +30 -0
  592. data/sig/openai/models/beta/beta_response_output_item.rbs +1096 -0
  593. data/sig/openai/models/beta/beta_response_output_item_added_event.rbs +54 -0
  594. data/sig/openai/models/beta/beta_response_output_item_done_event.rbs +54 -0
  595. data/sig/openai/models/beta/beta_response_output_message.rbs +97 -0
  596. data/sig/openai/models/beta/beta_response_output_refusal.rbs +19 -0
  597. data/sig/openai/models/beta/beta_response_output_text.rbs +243 -0
  598. data/sig/openai/models/beta/beta_response_output_text_annotation_added_event.rbs +69 -0
  599. data/sig/openai/models/beta/beta_response_prompt.rbs +46 -0
  600. data/sig/openai/models/beta/beta_response_queued_event.rbs +49 -0
  601. data/sig/openai/models/beta/beta_response_reasoning_item.rbs +108 -0
  602. data/sig/openai/models/beta/beta_response_reasoning_summary_part_added_event.rbs +76 -0
  603. data/sig/openai/models/beta/beta_response_reasoning_summary_part_done_event.rbs +95 -0
  604. data/sig/openai/models/beta/beta_response_reasoning_summary_text_delta_event.rbs +64 -0
  605. data/sig/openai/models/beta/beta_response_reasoning_summary_text_done_event.rbs +64 -0
  606. data/sig/openai/models/beta/beta_response_reasoning_text_delta_event.rbs +64 -0
  607. data/sig/openai/models/beta/beta_response_reasoning_text_done_event.rbs +64 -0
  608. data/sig/openai/models/beta/beta_response_refusal_delta_event.rbs +64 -0
  609. data/sig/openai/models/beta/beta_response_refusal_done_event.rbs +64 -0
  610. data/sig/openai/models/beta/beta_response_status.rbs +23 -0
  611. data/sig/openai/models/beta/beta_response_stream_event.rbs +68 -0
  612. data/sig/openai/models/beta/beta_response_text_config.rbs +45 -0
  613. data/sig/openai/models/beta/beta_response_text_delta_event.rbs +116 -0
  614. data/sig/openai/models/beta/beta_response_text_done_event.rbs +116 -0
  615. data/sig/openai/models/beta/beta_response_tool_search_call.rbs +98 -0
  616. data/sig/openai/models/beta/beta_response_tool_search_output_item.rbs +98 -0
  617. data/sig/openai/models/beta/beta_response_tool_search_output_item_param.rbs +91 -0
  618. data/sig/openai/models/beta/beta_response_usage.rbs +73 -0
  619. data/sig/openai/models/beta/beta_response_web_search_call_completed_event.rbs +54 -0
  620. data/sig/openai/models/beta/beta_response_web_search_call_in_progress_event.rbs +54 -0
  621. data/sig/openai/models/beta/beta_response_web_search_call_searching_event.rbs +54 -0
  622. data/sig/openai/models/beta/beta_responses_client_event.rbs +804 -0
  623. data/sig/openai/models/beta/beta_responses_server_event.rbs +70 -0
  624. data/sig/openai/models/beta/beta_skill_reference.rbs +32 -0
  625. data/sig/openai/models/beta/beta_tool.rbs +634 -0
  626. data/sig/openai/models/beta/beta_tool_choice_allowed.rbs +45 -0
  627. data/sig/openai/models/beta/beta_tool_choice_apply_patch.rbs +17 -0
  628. data/sig/openai/models/beta/beta_tool_choice_custom.rbs +19 -0
  629. data/sig/openai/models/beta/beta_tool_choice_function.rbs +19 -0
  630. data/sig/openai/models/beta/beta_tool_choice_mcp.rbs +26 -0
  631. data/sig/openai/models/beta/beta_tool_choice_options.rbs +19 -0
  632. data/sig/openai/models/beta/beta_tool_choice_shell.rbs +17 -0
  633. data/sig/openai/models/beta/beta_tool_choice_types.rbs +47 -0
  634. data/sig/openai/models/beta/beta_tool_search_tool.rbs +54 -0
  635. data/sig/openai/models/beta/beta_web_search_preview_tool.rbs +118 -0
  636. data/sig/openai/models/beta/beta_web_search_tool.rbs +127 -0
  637. data/sig/openai/models/beta/response_cancel_params.rbs +47 -0
  638. data/sig/openai/models/beta/response_compact_params.rbs +368 -0
  639. data/sig/openai/models/beta/response_create_params.rbs +804 -0
  640. data/sig/openai/models/beta/response_delete_params.rbs +47 -0
  641. data/sig/openai/models/beta/response_retrieve_params.rbs +70 -0
  642. data/sig/openai/models/beta/responses/beta_response_item_list.rbs +44 -0
  643. data/sig/openai/models/beta/responses/input_item_list_params.rbs +92 -0
  644. data/sig/openai/models/beta/responses/input_token_count_params.rbs +325 -0
  645. data/sig/openai/models/beta/responses/input_token_count_response.rbs +26 -0
  646. data/sig/openai/models/chat/chat_completion_content_part.rbs +21 -2
  647. data/sig/openai/models/chat/chat_completion_content_part_image.rbs +21 -2
  648. data/sig/openai/models/chat/chat_completion_content_part_input_audio.rbs +21 -2
  649. data/sig/openai/models/chat/chat_completion_content_part_text.rbs +32 -3
  650. data/sig/openai/models/chat/completion_create_params.rbs +153 -3
  651. data/sig/openai/models/chat_model.rbs +7 -1
  652. data/sig/openai/models/completion_usage.rbs +15 -2
  653. data/sig/openai/models/conversations/computer_screenshot_content.rbs +21 -2
  654. data/sig/openai/models/conversations/conversation_item.rbs +87 -0
  655. data/sig/openai/models/realtime/realtime_response_create_mcp_tool.rbs +16 -0
  656. data/sig/openai/models/realtime/realtime_session_create_request.rbs +4 -0
  657. data/sig/openai/models/realtime/realtime_session_create_response.rbs +20 -0
  658. data/sig/openai/models/realtime/realtime_tools_config_union.rbs +16 -0
  659. data/sig/openai/models/reasoning.rbs +20 -0
  660. data/sig/openai/models/reasoning_effort.rbs +3 -1
  661. data/sig/openai/models/responses/apply_patch_tool.rbs +26 -3
  662. data/sig/openai/models/responses/custom_tool.rbs +16 -0
  663. data/sig/openai/models/responses/function_shell_tool.rbs +16 -0
  664. data/sig/openai/models/responses/function_tool.rbs +23 -2
  665. data/sig/openai/models/responses/input_token_count_params.rbs +12 -0
  666. data/sig/openai/models/responses/namespace_tool.rbs +21 -0
  667. data/sig/openai/models/responses/response.rbs +64 -0
  668. data/sig/openai/models/responses/response_apply_patch_tool_call.rbs +37 -0
  669. data/sig/openai/models/responses/response_apply_patch_tool_call_output.rbs +37 -0
  670. data/sig/openai/models/responses/response_compact_params.rbs +63 -1
  671. data/sig/openai/models/responses/response_create_params.rbs +165 -3
  672. data/sig/openai/models/responses/response_custom_tool_call.rbs +37 -0
  673. data/sig/openai/models/responses/response_custom_tool_call_output.rbs +39 -2
  674. data/sig/openai/models/responses/response_error.rbs +2 -0
  675. data/sig/openai/models/responses/response_function_shell_tool_call.rbs +37 -0
  676. data/sig/openai/models/responses/response_function_shell_tool_call_output.rbs +37 -0
  677. data/sig/openai/models/responses/response_function_tool_call.rbs +37 -0
  678. data/sig/openai/models/responses/response_function_tool_call_output_item.rbs +37 -0
  679. data/sig/openai/models/responses/response_input_file.rbs +23 -3
  680. data/sig/openai/models/responses/response_input_file_content.rbs +19 -3
  681. data/sig/openai/models/responses/response_input_image.rbs +21 -2
  682. data/sig/openai/models/responses/response_input_image_content.rbs +17 -2
  683. data/sig/openai/models/responses/response_input_item.rbs +274 -2
  684. data/sig/openai/models/responses/response_input_text.rbs +32 -3
  685. data/sig/openai/models/responses/response_input_text_content.rbs +28 -3
  686. data/sig/openai/models/responses/response_item.rbs +87 -0
  687. data/sig/openai/models/responses/response_output_item.rbs +87 -0
  688. data/sig/openai/models/responses/response_reasoning_summary_part_done_event.rbs +21 -2
  689. data/sig/openai/models/responses/response_usage.rbs +12 -3
  690. data/sig/openai/models/responses/responses_client_event.rbs +165 -3
  691. data/sig/openai/models/responses/tool.rbs +45 -2
  692. data/sig/openai/models/webhooks/safety_identifier_blocked_webhook_event.rbs +99 -0
  693. data/sig/openai/models/webhooks/unwrap_webhook_event.rbs +1 -0
  694. data/sig/openai/resources/beta/responses/input_items.rbs +21 -0
  695. data/sig/openai/resources/beta/responses/input_tokens.rbs +28 -0
  696. data/sig/openai/resources/beta/responses.rbs +128 -0
  697. data/sig/openai/resources/beta.rbs +2 -0
  698. data/sig/openai/resources/chat/completions.rbs +2 -0
  699. data/sig/openai/resources/responses.rbs +3 -0
  700. data/sig/openai/resources/webhooks.rbs +2 -1
  701. metadata +491 -2
@@ -0,0 +1,2831 @@
1
+ # typed: strong
2
+
3
+ module OpenAI
4
+ module Models
5
+ BetaResponsesClientEvent = Beta::BetaResponsesClientEvent
6
+
7
+ module Beta
8
+ # Client events accepted by the Responses WebSocket server.
9
+ module BetaResponsesClientEvent
10
+ extend OpenAI::Internal::Type::Union
11
+
12
+ Variants =
13
+ T.type_alias do
14
+ T.any(
15
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate,
16
+ OpenAI::Beta::BetaResponseInjectEvent
17
+ )
18
+ end
19
+
20
+ class ResponseCreate < OpenAI::Internal::Type::BaseModel
21
+ OrHash =
22
+ T.type_alias do
23
+ T.any(
24
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate,
25
+ OpenAI::Internal::AnyHash
26
+ )
27
+ end
28
+
29
+ # The type of the client event. Always `response.create`.
30
+ sig { returns(Symbol) }
31
+ attr_accessor :type
32
+
33
+ # Whether to run the model response in the background.
34
+ # [Learn more](https://platform.openai.com/docs/guides/background).
35
+ sig { returns(T.nilable(T::Boolean)) }
36
+ attr_accessor :background
37
+
38
+ # Context management configuration for this request.
39
+ sig do
40
+ returns(
41
+ T.nilable(
42
+ T::Array[
43
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::ContextManagement
44
+ ]
45
+ )
46
+ )
47
+ end
48
+ attr_accessor :context_management
49
+
50
+ # The conversation that this response belongs to. Items from this conversation are
51
+ # prepended to `input_items` for this response request. Input items and output
52
+ # items from this response are automatically added to this conversation after this
53
+ # response completes.
54
+ sig do
55
+ returns(
56
+ T.nilable(
57
+ T.any(String, OpenAI::Beta::BetaResponseConversationParam)
58
+ )
59
+ )
60
+ end
61
+ attr_accessor :conversation
62
+
63
+ # Specify additional output data to include in the model response. Currently
64
+ # supported values are:
65
+ #
66
+ # - `web_search_call.action.sources`: Include the sources of the web search tool
67
+ # call.
68
+ # - `code_interpreter_call.outputs`: Includes the outputs of python code execution
69
+ # in code interpreter tool call items.
70
+ # - `computer_call_output.output.image_url`: Include image urls from the computer
71
+ # call output.
72
+ # - `file_search_call.results`: Include the search results of the file search tool
73
+ # call.
74
+ # - `message.input_image.image_url`: Include image urls from the input message.
75
+ # - `message.output_text.logprobs`: Include logprobs with assistant messages.
76
+ # - `reasoning.encrypted_content`: Includes an encrypted version of reasoning
77
+ # tokens in reasoning item outputs. This enables reasoning items to be used in
78
+ # multi-turn conversations when using the Responses API statelessly (like when
79
+ # the `store` parameter is set to `false`, or when an organization is enrolled
80
+ # in the zero data retention program).
81
+ sig do
82
+ returns(
83
+ T.nilable(
84
+ T::Array[OpenAI::Beta::BetaResponseIncludable::OrSymbol]
85
+ )
86
+ )
87
+ end
88
+ attr_accessor :include
89
+
90
+ # Text, image, or file inputs to the model, used to generate a response.
91
+ #
92
+ # Learn more:
93
+ #
94
+ # - [Text inputs and outputs](https://platform.openai.com/docs/guides/text)
95
+ # - [Image inputs](https://platform.openai.com/docs/guides/images)
96
+ # - [File inputs](https://platform.openai.com/docs/guides/pdf-files)
97
+ # - [Conversation state](https://platform.openai.com/docs/guides/conversation-state)
98
+ # - [Function calling](https://platform.openai.com/docs/guides/function-calling)
99
+ sig do
100
+ returns(
101
+ T.nilable(
102
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Input::Variants
103
+ )
104
+ )
105
+ end
106
+ attr_reader :input
107
+
108
+ sig do
109
+ params(
110
+ input:
111
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Input::Variants
112
+ ).void
113
+ end
114
+ attr_writer :input
115
+
116
+ # A system (or developer) message inserted into the model's context.
117
+ #
118
+ # When using along with `previous_response_id`, the instructions from a previous
119
+ # response will not be carried over to the next response. This makes it simple to
120
+ # swap out system (or developer) messages in new responses.
121
+ sig { returns(T.nilable(String)) }
122
+ attr_accessor :instructions
123
+
124
+ # An upper bound for the number of tokens that can be generated for a response,
125
+ # including visible output tokens and
126
+ # [reasoning tokens](https://platform.openai.com/docs/guides/reasoning).
127
+ sig { returns(T.nilable(Integer)) }
128
+ attr_accessor :max_output_tokens
129
+
130
+ # The maximum number of total calls to built-in tools that can be processed in a
131
+ # response. This maximum number applies across all built-in tool calls, not per
132
+ # individual tool. Any further attempts to call a tool by the model will be
133
+ # ignored.
134
+ sig { returns(T.nilable(Integer)) }
135
+ attr_accessor :max_tool_calls
136
+
137
+ # Set of 16 key-value pairs that can be attached to an object. This can be useful
138
+ # for storing additional information about the object in a structured format, and
139
+ # querying for objects via API or the dashboard.
140
+ #
141
+ # Keys are strings with a maximum length of 64 characters. Values are strings with
142
+ # a maximum length of 512 characters.
143
+ sig { returns(T.nilable(T::Hash[Symbol, String])) }
144
+ attr_accessor :metadata
145
+
146
+ # Model ID used to generate the response, like `gpt-4o` or `o3`. OpenAI offers a
147
+ # wide range of models with different capabilities, performance characteristics,
148
+ # and price points. Refer to the
149
+ # [model guide](https://platform.openai.com/docs/models) to browse and compare
150
+ # available models.
151
+ sig do
152
+ returns(
153
+ T.nilable(
154
+ T.any(
155
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Model::OrSymbol,
156
+ String
157
+ )
158
+ )
159
+ )
160
+ end
161
+ attr_reader :model
162
+
163
+ sig do
164
+ params(
165
+ model:
166
+ T.any(
167
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Model::OrSymbol,
168
+ String
169
+ )
170
+ ).void
171
+ end
172
+ attr_writer :model
173
+
174
+ # Configuration for running moderation on the input and output of this response.
175
+ sig do
176
+ returns(
177
+ T.nilable(
178
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Moderation
179
+ )
180
+ )
181
+ end
182
+ attr_reader :moderation
183
+
184
+ sig do
185
+ params(
186
+ moderation:
187
+ T.nilable(
188
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Moderation::OrHash
189
+ )
190
+ ).void
191
+ end
192
+ attr_writer :moderation
193
+
194
+ # Configuration for server-hosted multi-agent execution.
195
+ sig do
196
+ returns(
197
+ T.nilable(
198
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::MultiAgent
199
+ )
200
+ )
201
+ end
202
+ attr_reader :multi_agent
203
+
204
+ sig do
205
+ params(
206
+ multi_agent:
207
+ T.nilable(
208
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::MultiAgent::OrHash
209
+ )
210
+ ).void
211
+ end
212
+ attr_writer :multi_agent
213
+
214
+ # Whether to allow the model to run tool calls in parallel.
215
+ sig { returns(T.nilable(T::Boolean)) }
216
+ attr_accessor :parallel_tool_calls
217
+
218
+ # The unique ID of the previous response to the model. Use this to create
219
+ # multi-turn conversations. Learn more about
220
+ # [conversation state](https://platform.openai.com/docs/guides/conversation-state).
221
+ # Cannot be used in conjunction with `conversation`.
222
+ sig { returns(T.nilable(String)) }
223
+ attr_accessor :previous_response_id
224
+
225
+ # Reference to a prompt template and its variables.
226
+ # [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts).
227
+ sig { returns(T.nilable(OpenAI::Beta::BetaResponsePrompt)) }
228
+ attr_reader :prompt
229
+
230
+ sig do
231
+ params(
232
+ prompt: T.nilable(OpenAI::Beta::BetaResponsePrompt::OrHash)
233
+ ).void
234
+ end
235
+ attr_writer :prompt
236
+
237
+ # Used by OpenAI to cache responses for similar requests to optimize your cache
238
+ # hit rates. Replaces the `user` field.
239
+ # [Learn more](https://platform.openai.com/docs/guides/prompt-caching).
240
+ sig { returns(T.nilable(String)) }
241
+ attr_reader :prompt_cache_key
242
+
243
+ sig { params(prompt_cache_key: String).void }
244
+ attr_writer :prompt_cache_key
245
+
246
+ # Options for prompt caching. Supported for `gpt-5.6` and later models. By
247
+ # default, OpenAI automatically chooses one implicit cache breakpoint. You can add
248
+ # explicit breakpoints to content blocks with `prompt_cache_breakpoint`. Each
249
+ # request can write up to four breakpoints. For cache matching, OpenAI considers
250
+ # up to the latest 80 breakpoints in the conversation, without a content-block
251
+ # lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The
252
+ # `ttl` defaults to `30m`, which is currently the only supported value. See the
253
+ # [prompt caching guide](https://platform.openai.com/docs/guides/prompt-caching)
254
+ # for current details.
255
+ sig do
256
+ returns(
257
+ T.nilable(
258
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::PromptCacheOptions
259
+ )
260
+ )
261
+ end
262
+ attr_reader :prompt_cache_options
263
+
264
+ sig do
265
+ params(
266
+ prompt_cache_options:
267
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::PromptCacheOptions::OrHash
268
+ ).void
269
+ end
270
+ attr_writer :prompt_cache_options
271
+
272
+ # Deprecated. Use `prompt_cache_options.ttl` instead.
273
+ #
274
+ # The retention policy for the prompt cache. Set to `24h` to enable extended
275
+ # prompt caching, which keeps cached prefixes active for longer, up to a maximum
276
+ # of 24 hours.
277
+ # [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention).
278
+ # This field expresses a maximum retention policy, while
279
+ # `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two fields
280
+ # are independent and do not interact. For `gpt-5.5`, `gpt-5.5-pro`, and future
281
+ # models, only `24h` is supported.
282
+ #
283
+ # For older models that support both `in_memory` and `24h`, the default depends on
284
+ # your organization's data retention policy:
285
+ #
286
+ # - Organizations without ZDR enabled default to `24h`.
287
+ # - Organizations with ZDR enabled default to `in_memory` when
288
+ # `prompt_cache_retention` is not specified.
289
+ sig do
290
+ returns(
291
+ T.nilable(
292
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::PromptCacheRetention::OrSymbol
293
+ )
294
+ )
295
+ end
296
+ attr_accessor :prompt_cache_retention
297
+
298
+ # **gpt-5 and o-series models only**
299
+ #
300
+ # Configuration options for
301
+ # [reasoning models](https://platform.openai.com/docs/guides/reasoning).
302
+ sig do
303
+ returns(
304
+ T.nilable(
305
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Reasoning
306
+ )
307
+ )
308
+ end
309
+ attr_reader :reasoning
310
+
311
+ sig do
312
+ params(
313
+ reasoning:
314
+ T.nilable(
315
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Reasoning::OrHash
316
+ )
317
+ ).void
318
+ end
319
+ attr_writer :reasoning
320
+
321
+ # A stable identifier used to help detect users of your application that may be
322
+ # violating OpenAI's usage policies. The IDs should be a string that uniquely
323
+ # identifies each user, with a maximum length of 64 characters. We recommend
324
+ # hashing their username or email address, in order to avoid sending us any
325
+ # identifying information.
326
+ # [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers).
327
+ sig { returns(T.nilable(String)) }
328
+ attr_reader :safety_identifier
329
+
330
+ sig { params(safety_identifier: String).void }
331
+ attr_writer :safety_identifier
332
+
333
+ # Specifies the processing type used for serving the request.
334
+ #
335
+ # - If set to 'auto', then the request will be processed with the service tier
336
+ # configured in the Project settings. Unless otherwise configured, the Project
337
+ # will use 'default'.
338
+ # - If set to 'default', then the request will be processed with the standard
339
+ # pricing and performance for the selected model.
340
+ # - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)' or
341
+ # '[priority](https://openai.com/api-priority-processing/)', then the request
342
+ # will be processed with the corresponding service tier.
343
+ # - When not set, the default behavior is 'auto'.
344
+ #
345
+ # When the `service_tier` parameter is set, the response body will include the
346
+ # `service_tier` value based on the processing mode actually used to serve the
347
+ # request. This response value may be different from the value set in the
348
+ # parameter.
349
+ sig do
350
+ returns(
351
+ T.nilable(
352
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::ServiceTier::OrSymbol
353
+ )
354
+ )
355
+ end
356
+ attr_accessor :service_tier
357
+
358
+ # Whether to store the generated model response for later retrieval via API.
359
+ sig { returns(T.nilable(T::Boolean)) }
360
+ attr_accessor :store
361
+
362
+ # If set to true, the model response data will be streamed to the client as it is
363
+ # generated using
364
+ # [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format).
365
+ # See the
366
+ # [Streaming section below](https://platform.openai.com/docs/api-reference/responses-streaming)
367
+ # for more information.
368
+ sig { returns(T.nilable(T::Boolean)) }
369
+ attr_accessor :stream
370
+
371
+ # Options for streaming responses. Only set this when you set `stream: true`.
372
+ sig do
373
+ returns(
374
+ T.nilable(
375
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::StreamOptions
376
+ )
377
+ )
378
+ end
379
+ attr_reader :stream_options
380
+
381
+ sig do
382
+ params(
383
+ stream_options:
384
+ T.nilable(
385
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::StreamOptions::OrHash
386
+ )
387
+ ).void
388
+ end
389
+ attr_writer :stream_options
390
+
391
+ # What sampling temperature to use, between 0 and 2. Higher values like 0.8 will
392
+ # make the output more random, while lower values like 0.2 will make it more
393
+ # focused and deterministic. We generally recommend altering this or `top_p` but
394
+ # not both.
395
+ sig { returns(T.nilable(Float)) }
396
+ attr_accessor :temperature
397
+
398
+ # Configuration options for a text response from the model. Can be plain text or
399
+ # structured JSON data. Learn more:
400
+ #
401
+ # - [Text inputs and outputs](https://platform.openai.com/docs/guides/text)
402
+ # - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs)
403
+ sig { returns(T.nilable(OpenAI::Beta::BetaResponseTextConfig)) }
404
+ attr_reader :text
405
+
406
+ sig do
407
+ params(text: OpenAI::Beta::BetaResponseTextConfig::OrHash).void
408
+ end
409
+ attr_writer :text
410
+
411
+ # How the model should select which tool (or tools) to use when generating a
412
+ # response. See the `tools` parameter to see how to specify which tools the model
413
+ # can call.
414
+ sig do
415
+ returns(
416
+ T.nilable(
417
+ T.any(
418
+ OpenAI::Beta::BetaToolChoiceOptions::OrSymbol,
419
+ OpenAI::Beta::BetaToolChoiceAllowed,
420
+ OpenAI::Beta::BetaToolChoiceTypes,
421
+ OpenAI::Beta::BetaToolChoiceFunction,
422
+ OpenAI::Beta::BetaToolChoiceMcp,
423
+ OpenAI::Beta::BetaToolChoiceCustom,
424
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::ToolChoice::BetaSpecificProgrammaticToolCallingParam,
425
+ OpenAI::Beta::BetaToolChoiceApplyPatch,
426
+ OpenAI::Beta::BetaToolChoiceShell
427
+ )
428
+ )
429
+ )
430
+ end
431
+ attr_reader :tool_choice
432
+
433
+ sig do
434
+ params(
435
+ tool_choice:
436
+ T.any(
437
+ OpenAI::Beta::BetaToolChoiceOptions::OrSymbol,
438
+ OpenAI::Beta::BetaToolChoiceAllowed::OrHash,
439
+ OpenAI::Beta::BetaToolChoiceTypes::OrHash,
440
+ OpenAI::Beta::BetaToolChoiceFunction::OrHash,
441
+ OpenAI::Beta::BetaToolChoiceMcp::OrHash,
442
+ OpenAI::Beta::BetaToolChoiceCustom::OrHash,
443
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::ToolChoice::BetaSpecificProgrammaticToolCallingParam::OrHash,
444
+ OpenAI::Beta::BetaToolChoiceApplyPatch::OrHash,
445
+ OpenAI::Beta::BetaToolChoiceShell::OrHash
446
+ )
447
+ ).void
448
+ end
449
+ attr_writer :tool_choice
450
+
451
+ # An array of tools the model may call while generating a response. You can
452
+ # specify which tool to use by setting the `tool_choice` parameter.
453
+ #
454
+ # We support the following categories of tools:
455
+ #
456
+ # - **Built-in tools**: Tools that are provided by OpenAI that extend the model's
457
+ # capabilities, like
458
+ # [web search](https://platform.openai.com/docs/guides/tools-web-search) or
459
+ # [file search](https://platform.openai.com/docs/guides/tools-file-search).
460
+ # Learn more about
461
+ # [built-in tools](https://platform.openai.com/docs/guides/tools).
462
+ # - **MCP Tools**: Integrations with third-party systems via custom MCP servers or
463
+ # predefined connectors such as Google Drive and SharePoint. Learn more about
464
+ # [MCP Tools](https://platform.openai.com/docs/guides/tools-connectors-mcp).
465
+ # - **Function calls (custom tools)**: Functions that are defined by you, enabling
466
+ # the model to call your own code with strongly typed arguments and outputs.
467
+ # Learn more about
468
+ # [function calling](https://platform.openai.com/docs/guides/function-calling).
469
+ # You can also use custom tools to call your own code.
470
+ sig do
471
+ returns(
472
+ T.nilable(
473
+ T::Array[
474
+ T.any(
475
+ OpenAI::Beta::BetaFunctionTool,
476
+ OpenAI::Beta::BetaFileSearchTool,
477
+ OpenAI::Beta::BetaComputerTool,
478
+ OpenAI::Beta::BetaComputerUsePreviewTool,
479
+ OpenAI::Beta::BetaTool::Mcp,
480
+ OpenAI::Beta::BetaTool::CodeInterpreter,
481
+ OpenAI::Beta::BetaTool::ProgrammaticToolCalling,
482
+ OpenAI::Beta::BetaTool::ImageGeneration,
483
+ OpenAI::Beta::BetaTool::LocalShell,
484
+ OpenAI::Beta::BetaFunctionShellTool,
485
+ OpenAI::Beta::BetaCustomTool,
486
+ OpenAI::Beta::BetaNamespaceTool,
487
+ OpenAI::Beta::BetaToolSearchTool,
488
+ OpenAI::Beta::BetaApplyPatchTool,
489
+ OpenAI::Beta::BetaWebSearchTool,
490
+ OpenAI::Beta::BetaWebSearchPreviewTool
491
+ )
492
+ ]
493
+ )
494
+ )
495
+ end
496
+ attr_reader :tools
497
+
498
+ sig do
499
+ params(
500
+ tools:
501
+ T::Array[
502
+ T.any(
503
+ OpenAI::Beta::BetaFunctionTool::OrHash,
504
+ OpenAI::Beta::BetaFileSearchTool::OrHash,
505
+ OpenAI::Beta::BetaComputerTool::OrHash,
506
+ OpenAI::Beta::BetaComputerUsePreviewTool::OrHash,
507
+ OpenAI::Beta::BetaTool::Mcp::OrHash,
508
+ OpenAI::Beta::BetaTool::CodeInterpreter::OrHash,
509
+ OpenAI::Beta::BetaTool::ProgrammaticToolCalling::OrHash,
510
+ OpenAI::Beta::BetaTool::ImageGeneration::OrHash,
511
+ OpenAI::Beta::BetaTool::LocalShell::OrHash,
512
+ OpenAI::Beta::BetaFunctionShellTool::OrHash,
513
+ OpenAI::Beta::BetaCustomTool::OrHash,
514
+ OpenAI::Beta::BetaNamespaceTool::OrHash,
515
+ OpenAI::Beta::BetaToolSearchTool::OrHash,
516
+ OpenAI::Beta::BetaApplyPatchTool::OrHash,
517
+ OpenAI::Beta::BetaWebSearchTool::OrHash,
518
+ OpenAI::Beta::BetaWebSearchPreviewTool::OrHash
519
+ )
520
+ ]
521
+ ).void
522
+ end
523
+ attr_writer :tools
524
+
525
+ # An integer between 0 and 20 specifying the maximum number of most likely tokens
526
+ # to return at each token position, each with an associated log probability. In
527
+ # some cases, the number of returned tokens may be fewer than requested.
528
+ sig { returns(T.nilable(Integer)) }
529
+ attr_accessor :top_logprobs
530
+
531
+ # An alternative to sampling with temperature, called nucleus sampling, where the
532
+ # model considers the results of the tokens with top_p probability mass. So 0.1
533
+ # means only the tokens comprising the top 10% probability mass are considered.
534
+ #
535
+ # We generally recommend altering this or `temperature` but not both.
536
+ sig { returns(T.nilable(Float)) }
537
+ attr_accessor :top_p
538
+
539
+ # The truncation strategy to use for the model response.
540
+ #
541
+ # - `auto`: If the input to this Response exceeds the model's context window size,
542
+ # the model will truncate the response to fit the context window by dropping
543
+ # items from the beginning of the conversation.
544
+ # - `disabled` (default): If the input size will exceed the context window size
545
+ # for a model, the request will fail with a 400 error.
546
+ sig do
547
+ returns(
548
+ T.nilable(
549
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Truncation::OrSymbol
550
+ )
551
+ )
552
+ end
553
+ attr_accessor :truncation
554
+
555
+ # This field is being replaced by `safety_identifier` and `prompt_cache_key`. Use
556
+ # `prompt_cache_key` instead to maintain caching optimizations. A stable
557
+ # identifier for your end-users. Used to boost cache hit rates by better bucketing
558
+ # similar requests and to help OpenAI detect and prevent abuse.
559
+ # [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers).
560
+ sig { returns(T.nilable(String)) }
561
+ attr_reader :user
562
+
563
+ sig { params(user: String).void }
564
+ attr_writer :user
565
+
566
+ # Client event for creating a response over a persistent WebSocket connection.
567
+ # This payload uses the same top-level fields as `POST /v1/responses`.
568
+ #
569
+ # Notes:
570
+ #
571
+ # - `stream` is implicit over WebSocket and should not be sent.
572
+ # - `background` is not supported over WebSocket.
573
+ sig do
574
+ params(
575
+ background: T.nilable(T::Boolean),
576
+ context_management:
577
+ T.nilable(
578
+ T::Array[
579
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::ContextManagement::OrHash
580
+ ]
581
+ ),
582
+ conversation:
583
+ T.nilable(
584
+ T.any(
585
+ String,
586
+ OpenAI::Beta::BetaResponseConversationParam::OrHash
587
+ )
588
+ ),
589
+ include:
590
+ T.nilable(
591
+ T::Array[OpenAI::Beta::BetaResponseIncludable::OrSymbol]
592
+ ),
593
+ input:
594
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Input::Variants,
595
+ instructions: T.nilable(String),
596
+ max_output_tokens: T.nilable(Integer),
597
+ max_tool_calls: T.nilable(Integer),
598
+ metadata: T.nilable(T::Hash[Symbol, String]),
599
+ model:
600
+ T.any(
601
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Model::OrSymbol,
602
+ String
603
+ ),
604
+ moderation:
605
+ T.nilable(
606
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Moderation::OrHash
607
+ ),
608
+ multi_agent:
609
+ T.nilable(
610
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::MultiAgent::OrHash
611
+ ),
612
+ parallel_tool_calls: T.nilable(T::Boolean),
613
+ previous_response_id: T.nilable(String),
614
+ prompt: T.nilable(OpenAI::Beta::BetaResponsePrompt::OrHash),
615
+ prompt_cache_key: String,
616
+ prompt_cache_options:
617
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::PromptCacheOptions::OrHash,
618
+ prompt_cache_retention:
619
+ T.nilable(
620
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::PromptCacheRetention::OrSymbol
621
+ ),
622
+ reasoning:
623
+ T.nilable(
624
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Reasoning::OrHash
625
+ ),
626
+ safety_identifier: String,
627
+ service_tier:
628
+ T.nilable(
629
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::ServiceTier::OrSymbol
630
+ ),
631
+ store: T.nilable(T::Boolean),
632
+ stream: T.nilable(T::Boolean),
633
+ stream_options:
634
+ T.nilable(
635
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::StreamOptions::OrHash
636
+ ),
637
+ temperature: T.nilable(Float),
638
+ text: OpenAI::Beta::BetaResponseTextConfig::OrHash,
639
+ tool_choice:
640
+ T.any(
641
+ OpenAI::Beta::BetaToolChoiceOptions::OrSymbol,
642
+ OpenAI::Beta::BetaToolChoiceAllowed::OrHash,
643
+ OpenAI::Beta::BetaToolChoiceTypes::OrHash,
644
+ OpenAI::Beta::BetaToolChoiceFunction::OrHash,
645
+ OpenAI::Beta::BetaToolChoiceMcp::OrHash,
646
+ OpenAI::Beta::BetaToolChoiceCustom::OrHash,
647
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::ToolChoice::BetaSpecificProgrammaticToolCallingParam::OrHash,
648
+ OpenAI::Beta::BetaToolChoiceApplyPatch::OrHash,
649
+ OpenAI::Beta::BetaToolChoiceShell::OrHash
650
+ ),
651
+ tools:
652
+ T::Array[
653
+ T.any(
654
+ OpenAI::Beta::BetaFunctionTool::OrHash,
655
+ OpenAI::Beta::BetaFileSearchTool::OrHash,
656
+ OpenAI::Beta::BetaComputerTool::OrHash,
657
+ OpenAI::Beta::BetaComputerUsePreviewTool::OrHash,
658
+ OpenAI::Beta::BetaTool::Mcp::OrHash,
659
+ OpenAI::Beta::BetaTool::CodeInterpreter::OrHash,
660
+ OpenAI::Beta::BetaTool::ProgrammaticToolCalling::OrHash,
661
+ OpenAI::Beta::BetaTool::ImageGeneration::OrHash,
662
+ OpenAI::Beta::BetaTool::LocalShell::OrHash,
663
+ OpenAI::Beta::BetaFunctionShellTool::OrHash,
664
+ OpenAI::Beta::BetaCustomTool::OrHash,
665
+ OpenAI::Beta::BetaNamespaceTool::OrHash,
666
+ OpenAI::Beta::BetaToolSearchTool::OrHash,
667
+ OpenAI::Beta::BetaApplyPatchTool::OrHash,
668
+ OpenAI::Beta::BetaWebSearchTool::OrHash,
669
+ OpenAI::Beta::BetaWebSearchPreviewTool::OrHash
670
+ )
671
+ ],
672
+ top_logprobs: T.nilable(Integer),
673
+ top_p: T.nilable(Float),
674
+ truncation:
675
+ T.nilable(
676
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Truncation::OrSymbol
677
+ ),
678
+ user: String,
679
+ type: Symbol
680
+ ).returns(T.attached_class)
681
+ end
682
+ def self.new(
683
+ # Whether to run the model response in the background.
684
+ # [Learn more](https://platform.openai.com/docs/guides/background).
685
+ background: nil,
686
+ # Context management configuration for this request.
687
+ context_management: nil,
688
+ # The conversation that this response belongs to. Items from this conversation are
689
+ # prepended to `input_items` for this response request. Input items and output
690
+ # items from this response are automatically added to this conversation after this
691
+ # response completes.
692
+ conversation: nil,
693
+ # Specify additional output data to include in the model response. Currently
694
+ # supported values are:
695
+ #
696
+ # - `web_search_call.action.sources`: Include the sources of the web search tool
697
+ # call.
698
+ # - `code_interpreter_call.outputs`: Includes the outputs of python code execution
699
+ # in code interpreter tool call items.
700
+ # - `computer_call_output.output.image_url`: Include image urls from the computer
701
+ # call output.
702
+ # - `file_search_call.results`: Include the search results of the file search tool
703
+ # call.
704
+ # - `message.input_image.image_url`: Include image urls from the input message.
705
+ # - `message.output_text.logprobs`: Include logprobs with assistant messages.
706
+ # - `reasoning.encrypted_content`: Includes an encrypted version of reasoning
707
+ # tokens in reasoning item outputs. This enables reasoning items to be used in
708
+ # multi-turn conversations when using the Responses API statelessly (like when
709
+ # the `store` parameter is set to `false`, or when an organization is enrolled
710
+ # in the zero data retention program).
711
+ include: nil,
712
+ # Text, image, or file inputs to the model, used to generate a response.
713
+ #
714
+ # Learn more:
715
+ #
716
+ # - [Text inputs and outputs](https://platform.openai.com/docs/guides/text)
717
+ # - [Image inputs](https://platform.openai.com/docs/guides/images)
718
+ # - [File inputs](https://platform.openai.com/docs/guides/pdf-files)
719
+ # - [Conversation state](https://platform.openai.com/docs/guides/conversation-state)
720
+ # - [Function calling](https://platform.openai.com/docs/guides/function-calling)
721
+ input: nil,
722
+ # A system (or developer) message inserted into the model's context.
723
+ #
724
+ # When using along with `previous_response_id`, the instructions from a previous
725
+ # response will not be carried over to the next response. This makes it simple to
726
+ # swap out system (or developer) messages in new responses.
727
+ instructions: nil,
728
+ # An upper bound for the number of tokens that can be generated for a response,
729
+ # including visible output tokens and
730
+ # [reasoning tokens](https://platform.openai.com/docs/guides/reasoning).
731
+ max_output_tokens: nil,
732
+ # The maximum number of total calls to built-in tools that can be processed in a
733
+ # response. This maximum number applies across all built-in tool calls, not per
734
+ # individual tool. Any further attempts to call a tool by the model will be
735
+ # ignored.
736
+ max_tool_calls: nil,
737
+ # Set of 16 key-value pairs that can be attached to an object. This can be useful
738
+ # for storing additional information about the object in a structured format, and
739
+ # querying for objects via API or the dashboard.
740
+ #
741
+ # Keys are strings with a maximum length of 64 characters. Values are strings with
742
+ # a maximum length of 512 characters.
743
+ metadata: nil,
744
+ # Model ID used to generate the response, like `gpt-4o` or `o3`. OpenAI offers a
745
+ # wide range of models with different capabilities, performance characteristics,
746
+ # and price points. Refer to the
747
+ # [model guide](https://platform.openai.com/docs/models) to browse and compare
748
+ # available models.
749
+ model: nil,
750
+ # Configuration for running moderation on the input and output of this response.
751
+ moderation: nil,
752
+ # Configuration for server-hosted multi-agent execution.
753
+ multi_agent: nil,
754
+ # Whether to allow the model to run tool calls in parallel.
755
+ parallel_tool_calls: nil,
756
+ # The unique ID of the previous response to the model. Use this to create
757
+ # multi-turn conversations. Learn more about
758
+ # [conversation state](https://platform.openai.com/docs/guides/conversation-state).
759
+ # Cannot be used in conjunction with `conversation`.
760
+ previous_response_id: nil,
761
+ # Reference to a prompt template and its variables.
762
+ # [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts).
763
+ prompt: nil,
764
+ # Used by OpenAI to cache responses for similar requests to optimize your cache
765
+ # hit rates. Replaces the `user` field.
766
+ # [Learn more](https://platform.openai.com/docs/guides/prompt-caching).
767
+ prompt_cache_key: nil,
768
+ # Options for prompt caching. Supported for `gpt-5.6` and later models. By
769
+ # default, OpenAI automatically chooses one implicit cache breakpoint. You can add
770
+ # explicit breakpoints to content blocks with `prompt_cache_breakpoint`. Each
771
+ # request can write up to four breakpoints. For cache matching, OpenAI considers
772
+ # up to the latest 80 breakpoints in the conversation, without a content-block
773
+ # lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The
774
+ # `ttl` defaults to `30m`, which is currently the only supported value. See the
775
+ # [prompt caching guide](https://platform.openai.com/docs/guides/prompt-caching)
776
+ # for current details.
777
+ prompt_cache_options: nil,
778
+ # Deprecated. Use `prompt_cache_options.ttl` instead.
779
+ #
780
+ # The retention policy for the prompt cache. Set to `24h` to enable extended
781
+ # prompt caching, which keeps cached prefixes active for longer, up to a maximum
782
+ # of 24 hours.
783
+ # [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention).
784
+ # This field expresses a maximum retention policy, while
785
+ # `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two fields
786
+ # are independent and do not interact. For `gpt-5.5`, `gpt-5.5-pro`, and future
787
+ # models, only `24h` is supported.
788
+ #
789
+ # For older models that support both `in_memory` and `24h`, the default depends on
790
+ # your organization's data retention policy:
791
+ #
792
+ # - Organizations without ZDR enabled default to `24h`.
793
+ # - Organizations with ZDR enabled default to `in_memory` when
794
+ # `prompt_cache_retention` is not specified.
795
+ prompt_cache_retention: nil,
796
+ # **gpt-5 and o-series models only**
797
+ #
798
+ # Configuration options for
799
+ # [reasoning models](https://platform.openai.com/docs/guides/reasoning).
800
+ reasoning: nil,
801
+ # A stable identifier used to help detect users of your application that may be
802
+ # violating OpenAI's usage policies. The IDs should be a string that uniquely
803
+ # identifies each user, with a maximum length of 64 characters. We recommend
804
+ # hashing their username or email address, in order to avoid sending us any
805
+ # identifying information.
806
+ # [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers).
807
+ safety_identifier: nil,
808
+ # Specifies the processing type used for serving the request.
809
+ #
810
+ # - If set to 'auto', then the request will be processed with the service tier
811
+ # configured in the Project settings. Unless otherwise configured, the Project
812
+ # will use 'default'.
813
+ # - If set to 'default', then the request will be processed with the standard
814
+ # pricing and performance for the selected model.
815
+ # - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)' or
816
+ # '[priority](https://openai.com/api-priority-processing/)', then the request
817
+ # will be processed with the corresponding service tier.
818
+ # - When not set, the default behavior is 'auto'.
819
+ #
820
+ # When the `service_tier` parameter is set, the response body will include the
821
+ # `service_tier` value based on the processing mode actually used to serve the
822
+ # request. This response value may be different from the value set in the
823
+ # parameter.
824
+ service_tier: nil,
825
+ # Whether to store the generated model response for later retrieval via API.
826
+ store: nil,
827
+ # If set to true, the model response data will be streamed to the client as it is
828
+ # generated using
829
+ # [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format).
830
+ # See the
831
+ # [Streaming section below](https://platform.openai.com/docs/api-reference/responses-streaming)
832
+ # for more information.
833
+ stream: nil,
834
+ # Options for streaming responses. Only set this when you set `stream: true`.
835
+ stream_options: nil,
836
+ # What sampling temperature to use, between 0 and 2. Higher values like 0.8 will
837
+ # make the output more random, while lower values like 0.2 will make it more
838
+ # focused and deterministic. We generally recommend altering this or `top_p` but
839
+ # not both.
840
+ temperature: nil,
841
+ # Configuration options for a text response from the model. Can be plain text or
842
+ # structured JSON data. Learn more:
843
+ #
844
+ # - [Text inputs and outputs](https://platform.openai.com/docs/guides/text)
845
+ # - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs)
846
+ text: nil,
847
+ # How the model should select which tool (or tools) to use when generating a
848
+ # response. See the `tools` parameter to see how to specify which tools the model
849
+ # can call.
850
+ tool_choice: nil,
851
+ # An array of tools the model may call while generating a response. You can
852
+ # specify which tool to use by setting the `tool_choice` parameter.
853
+ #
854
+ # We support the following categories of tools:
855
+ #
856
+ # - **Built-in tools**: Tools that are provided by OpenAI that extend the model's
857
+ # capabilities, like
858
+ # [web search](https://platform.openai.com/docs/guides/tools-web-search) or
859
+ # [file search](https://platform.openai.com/docs/guides/tools-file-search).
860
+ # Learn more about
861
+ # [built-in tools](https://platform.openai.com/docs/guides/tools).
862
+ # - **MCP Tools**: Integrations with third-party systems via custom MCP servers or
863
+ # predefined connectors such as Google Drive and SharePoint. Learn more about
864
+ # [MCP Tools](https://platform.openai.com/docs/guides/tools-connectors-mcp).
865
+ # - **Function calls (custom tools)**: Functions that are defined by you, enabling
866
+ # the model to call your own code with strongly typed arguments and outputs.
867
+ # Learn more about
868
+ # [function calling](https://platform.openai.com/docs/guides/function-calling).
869
+ # You can also use custom tools to call your own code.
870
+ tools: nil,
871
+ # An integer between 0 and 20 specifying the maximum number of most likely tokens
872
+ # to return at each token position, each with an associated log probability. In
873
+ # some cases, the number of returned tokens may be fewer than requested.
874
+ top_logprobs: nil,
875
+ # An alternative to sampling with temperature, called nucleus sampling, where the
876
+ # model considers the results of the tokens with top_p probability mass. So 0.1
877
+ # means only the tokens comprising the top 10% probability mass are considered.
878
+ #
879
+ # We generally recommend altering this or `temperature` but not both.
880
+ top_p: nil,
881
+ # The truncation strategy to use for the model response.
882
+ #
883
+ # - `auto`: If the input to this Response exceeds the model's context window size,
884
+ # the model will truncate the response to fit the context window by dropping
885
+ # items from the beginning of the conversation.
886
+ # - `disabled` (default): If the input size will exceed the context window size
887
+ # for a model, the request will fail with a 400 error.
888
+ truncation: nil,
889
+ # This field is being replaced by `safety_identifier` and `prompt_cache_key`. Use
890
+ # `prompt_cache_key` instead to maintain caching optimizations. A stable
891
+ # identifier for your end-users. Used to boost cache hit rates by better bucketing
892
+ # similar requests and to help OpenAI detect and prevent abuse.
893
+ # [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers).
894
+ user: nil,
895
+ # The type of the client event. Always `response.create`.
896
+ type: :"response.create"
897
+ )
898
+ end
899
+
900
+ sig do
901
+ override.returns(
902
+ {
903
+ type: Symbol,
904
+ background: T.nilable(T::Boolean),
905
+ context_management:
906
+ T.nilable(
907
+ T::Array[
908
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::ContextManagement
909
+ ]
910
+ ),
911
+ conversation:
912
+ T.nilable(
913
+ T.any(String, OpenAI::Beta::BetaResponseConversationParam)
914
+ ),
915
+ include:
916
+ T.nilable(
917
+ T::Array[OpenAI::Beta::BetaResponseIncludable::OrSymbol]
918
+ ),
919
+ input:
920
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Input::Variants,
921
+ instructions: T.nilable(String),
922
+ max_output_tokens: T.nilable(Integer),
923
+ max_tool_calls: T.nilable(Integer),
924
+ metadata: T.nilable(T::Hash[Symbol, String]),
925
+ model:
926
+ T.any(
927
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Model::OrSymbol,
928
+ String
929
+ ),
930
+ moderation:
931
+ T.nilable(
932
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Moderation
933
+ ),
934
+ multi_agent:
935
+ T.nilable(
936
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::MultiAgent
937
+ ),
938
+ parallel_tool_calls: T.nilable(T::Boolean),
939
+ previous_response_id: T.nilable(String),
940
+ prompt: T.nilable(OpenAI::Beta::BetaResponsePrompt),
941
+ prompt_cache_key: String,
942
+ prompt_cache_options:
943
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::PromptCacheOptions,
944
+ prompt_cache_retention:
945
+ T.nilable(
946
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::PromptCacheRetention::OrSymbol
947
+ ),
948
+ reasoning:
949
+ T.nilable(
950
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Reasoning
951
+ ),
952
+ safety_identifier: String,
953
+ service_tier:
954
+ T.nilable(
955
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::ServiceTier::OrSymbol
956
+ ),
957
+ store: T.nilable(T::Boolean),
958
+ stream: T.nilable(T::Boolean),
959
+ stream_options:
960
+ T.nilable(
961
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::StreamOptions
962
+ ),
963
+ temperature: T.nilable(Float),
964
+ text: OpenAI::Beta::BetaResponseTextConfig,
965
+ tool_choice:
966
+ T.any(
967
+ OpenAI::Beta::BetaToolChoiceOptions::OrSymbol,
968
+ OpenAI::Beta::BetaToolChoiceAllowed,
969
+ OpenAI::Beta::BetaToolChoiceTypes,
970
+ OpenAI::Beta::BetaToolChoiceFunction,
971
+ OpenAI::Beta::BetaToolChoiceMcp,
972
+ OpenAI::Beta::BetaToolChoiceCustom,
973
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::ToolChoice::BetaSpecificProgrammaticToolCallingParam,
974
+ OpenAI::Beta::BetaToolChoiceApplyPatch,
975
+ OpenAI::Beta::BetaToolChoiceShell
976
+ ),
977
+ tools:
978
+ T::Array[
979
+ T.any(
980
+ OpenAI::Beta::BetaFunctionTool,
981
+ OpenAI::Beta::BetaFileSearchTool,
982
+ OpenAI::Beta::BetaComputerTool,
983
+ OpenAI::Beta::BetaComputerUsePreviewTool,
984
+ OpenAI::Beta::BetaTool::Mcp,
985
+ OpenAI::Beta::BetaTool::CodeInterpreter,
986
+ OpenAI::Beta::BetaTool::ProgrammaticToolCalling,
987
+ OpenAI::Beta::BetaTool::ImageGeneration,
988
+ OpenAI::Beta::BetaTool::LocalShell,
989
+ OpenAI::Beta::BetaFunctionShellTool,
990
+ OpenAI::Beta::BetaCustomTool,
991
+ OpenAI::Beta::BetaNamespaceTool,
992
+ OpenAI::Beta::BetaToolSearchTool,
993
+ OpenAI::Beta::BetaApplyPatchTool,
994
+ OpenAI::Beta::BetaWebSearchTool,
995
+ OpenAI::Beta::BetaWebSearchPreviewTool
996
+ )
997
+ ],
998
+ top_logprobs: T.nilable(Integer),
999
+ top_p: T.nilable(Float),
1000
+ truncation:
1001
+ T.nilable(
1002
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Truncation::OrSymbol
1003
+ ),
1004
+ user: String
1005
+ }
1006
+ )
1007
+ end
1008
+ def to_hash
1009
+ end
1010
+
1011
+ class ContextManagement < OpenAI::Internal::Type::BaseModel
1012
+ OrHash =
1013
+ T.type_alias do
1014
+ T.any(
1015
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::ContextManagement,
1016
+ OpenAI::Internal::AnyHash
1017
+ )
1018
+ end
1019
+
1020
+ # The context management entry type. Currently only 'compaction' is supported.
1021
+ sig { returns(String) }
1022
+ attr_accessor :type
1023
+
1024
+ # Token threshold at which compaction should be triggered for this entry.
1025
+ sig { returns(T.nilable(Integer)) }
1026
+ attr_accessor :compact_threshold
1027
+
1028
+ sig do
1029
+ params(
1030
+ type: String,
1031
+ compact_threshold: T.nilable(Integer)
1032
+ ).returns(T.attached_class)
1033
+ end
1034
+ def self.new(
1035
+ # The context management entry type. Currently only 'compaction' is supported.
1036
+ type:,
1037
+ # Token threshold at which compaction should be triggered for this entry.
1038
+ compact_threshold: nil
1039
+ )
1040
+ end
1041
+
1042
+ sig do
1043
+ override.returns(
1044
+ { type: String, compact_threshold: T.nilable(Integer) }
1045
+ )
1046
+ end
1047
+ def to_hash
1048
+ end
1049
+ end
1050
+
1051
+ # The conversation that this response belongs to. Items from this conversation are
1052
+ # prepended to `input_items` for this response request. Input items and output
1053
+ # items from this response are automatically added to this conversation after this
1054
+ # response completes.
1055
+ module Conversation
1056
+ extend OpenAI::Internal::Type::Union
1057
+
1058
+ Variants =
1059
+ T.type_alias do
1060
+ T.any(String, OpenAI::Beta::BetaResponseConversationParam)
1061
+ end
1062
+
1063
+ sig do
1064
+ override.returns(
1065
+ T::Array[
1066
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Conversation::Variants
1067
+ ]
1068
+ )
1069
+ end
1070
+ def self.variants
1071
+ end
1072
+ end
1073
+
1074
+ # Text, image, or file inputs to the model, used to generate a response.
1075
+ #
1076
+ # Learn more:
1077
+ #
1078
+ # - [Text inputs and outputs](https://platform.openai.com/docs/guides/text)
1079
+ # - [Image inputs](https://platform.openai.com/docs/guides/images)
1080
+ # - [File inputs](https://platform.openai.com/docs/guides/pdf-files)
1081
+ # - [Conversation state](https://platform.openai.com/docs/guides/conversation-state)
1082
+ # - [Function calling](https://platform.openai.com/docs/guides/function-calling)
1083
+ module Input
1084
+ extend OpenAI::Internal::Type::Union
1085
+
1086
+ Variants =
1087
+ T.type_alias do
1088
+ T.any(
1089
+ String,
1090
+ T::Array[OpenAI::Beta::BetaResponseInputItem::Variants]
1091
+ )
1092
+ end
1093
+
1094
+ sig do
1095
+ override.returns(
1096
+ T::Array[
1097
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Input::Variants
1098
+ ]
1099
+ )
1100
+ end
1101
+ def self.variants
1102
+ end
1103
+ end
1104
+
1105
+ # Model ID used to generate the response, like `gpt-4o` or `o3`. OpenAI offers a
1106
+ # wide range of models with different capabilities, performance characteristics,
1107
+ # and price points. Refer to the
1108
+ # [model guide](https://platform.openai.com/docs/models) to browse and compare
1109
+ # available models.
1110
+ module Model
1111
+ extend OpenAI::Internal::Type::Union
1112
+
1113
+ Variants =
1114
+ T.type_alias do
1115
+ T.any(
1116
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Model::TaggedSymbol,
1117
+ String
1118
+ )
1119
+ end
1120
+
1121
+ sig do
1122
+ override.returns(
1123
+ T::Array[
1124
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Model::Variants
1125
+ ]
1126
+ )
1127
+ end
1128
+ def self.variants
1129
+ end
1130
+
1131
+ TaggedSymbol =
1132
+ T.type_alias do
1133
+ T.all(
1134
+ Symbol,
1135
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Model
1136
+ )
1137
+ end
1138
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
1139
+
1140
+ GPT_5_6_SOL =
1141
+ T.let(
1142
+ :"gpt-5.6-sol",
1143
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Model::TaggedSymbol
1144
+ )
1145
+ GPT_5_6_TERRA =
1146
+ T.let(
1147
+ :"gpt-5.6-terra",
1148
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Model::TaggedSymbol
1149
+ )
1150
+ GPT_5_6_LUNA =
1151
+ T.let(
1152
+ :"gpt-5.6-luna",
1153
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Model::TaggedSymbol
1154
+ )
1155
+ GPT_5_4 =
1156
+ T.let(
1157
+ :"gpt-5.4",
1158
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Model::TaggedSymbol
1159
+ )
1160
+ GPT_5_4_MINI =
1161
+ T.let(
1162
+ :"gpt-5.4-mini",
1163
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Model::TaggedSymbol
1164
+ )
1165
+ GPT_5_4_NANO =
1166
+ T.let(
1167
+ :"gpt-5.4-nano",
1168
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Model::TaggedSymbol
1169
+ )
1170
+ GPT_5_4_MINI_2026_03_17 =
1171
+ T.let(
1172
+ :"gpt-5.4-mini-2026-03-17",
1173
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Model::TaggedSymbol
1174
+ )
1175
+ GPT_5_4_NANO_2026_03_17 =
1176
+ T.let(
1177
+ :"gpt-5.4-nano-2026-03-17",
1178
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Model::TaggedSymbol
1179
+ )
1180
+ GPT_5_3_CHAT_LATEST =
1181
+ T.let(
1182
+ :"gpt-5.3-chat-latest",
1183
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Model::TaggedSymbol
1184
+ )
1185
+ GPT_5_2 =
1186
+ T.let(
1187
+ :"gpt-5.2",
1188
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Model::TaggedSymbol
1189
+ )
1190
+ GPT_5_2_2025_12_11 =
1191
+ T.let(
1192
+ :"gpt-5.2-2025-12-11",
1193
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Model::TaggedSymbol
1194
+ )
1195
+ GPT_5_2_CHAT_LATEST =
1196
+ T.let(
1197
+ :"gpt-5.2-chat-latest",
1198
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Model::TaggedSymbol
1199
+ )
1200
+ GPT_5_2_PRO =
1201
+ T.let(
1202
+ :"gpt-5.2-pro",
1203
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Model::TaggedSymbol
1204
+ )
1205
+ GPT_5_2_PRO_2025_12_11 =
1206
+ T.let(
1207
+ :"gpt-5.2-pro-2025-12-11",
1208
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Model::TaggedSymbol
1209
+ )
1210
+ GPT_5_1 =
1211
+ T.let(
1212
+ :"gpt-5.1",
1213
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Model::TaggedSymbol
1214
+ )
1215
+ GPT_5_1_2025_11_13 =
1216
+ T.let(
1217
+ :"gpt-5.1-2025-11-13",
1218
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Model::TaggedSymbol
1219
+ )
1220
+ GPT_5_1_CODEX =
1221
+ T.let(
1222
+ :"gpt-5.1-codex",
1223
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Model::TaggedSymbol
1224
+ )
1225
+ GPT_5_1_MINI =
1226
+ T.let(
1227
+ :"gpt-5.1-mini",
1228
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Model::TaggedSymbol
1229
+ )
1230
+ GPT_5_1_CHAT_LATEST =
1231
+ T.let(
1232
+ :"gpt-5.1-chat-latest",
1233
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Model::TaggedSymbol
1234
+ )
1235
+ GPT_5 =
1236
+ T.let(
1237
+ :"gpt-5",
1238
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Model::TaggedSymbol
1239
+ )
1240
+ GPT_5_MINI =
1241
+ T.let(
1242
+ :"gpt-5-mini",
1243
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Model::TaggedSymbol
1244
+ )
1245
+ GPT_5_NANO =
1246
+ T.let(
1247
+ :"gpt-5-nano",
1248
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Model::TaggedSymbol
1249
+ )
1250
+ GPT_5_2025_08_07 =
1251
+ T.let(
1252
+ :"gpt-5-2025-08-07",
1253
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Model::TaggedSymbol
1254
+ )
1255
+ GPT_5_MINI_2025_08_07 =
1256
+ T.let(
1257
+ :"gpt-5-mini-2025-08-07",
1258
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Model::TaggedSymbol
1259
+ )
1260
+ GPT_5_NANO_2025_08_07 =
1261
+ T.let(
1262
+ :"gpt-5-nano-2025-08-07",
1263
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Model::TaggedSymbol
1264
+ )
1265
+ GPT_5_CHAT_LATEST =
1266
+ T.let(
1267
+ :"gpt-5-chat-latest",
1268
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Model::TaggedSymbol
1269
+ )
1270
+ GPT_4_1 =
1271
+ T.let(
1272
+ :"gpt-4.1",
1273
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Model::TaggedSymbol
1274
+ )
1275
+ GPT_4_1_MINI =
1276
+ T.let(
1277
+ :"gpt-4.1-mini",
1278
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Model::TaggedSymbol
1279
+ )
1280
+ GPT_4_1_NANO =
1281
+ T.let(
1282
+ :"gpt-4.1-nano",
1283
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Model::TaggedSymbol
1284
+ )
1285
+ GPT_4_1_2025_04_14 =
1286
+ T.let(
1287
+ :"gpt-4.1-2025-04-14",
1288
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Model::TaggedSymbol
1289
+ )
1290
+ GPT_4_1_MINI_2025_04_14 =
1291
+ T.let(
1292
+ :"gpt-4.1-mini-2025-04-14",
1293
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Model::TaggedSymbol
1294
+ )
1295
+ GPT_4_1_NANO_2025_04_14 =
1296
+ T.let(
1297
+ :"gpt-4.1-nano-2025-04-14",
1298
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Model::TaggedSymbol
1299
+ )
1300
+ O4_MINI =
1301
+ T.let(
1302
+ :"o4-mini",
1303
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Model::TaggedSymbol
1304
+ )
1305
+ O4_MINI_2025_04_16 =
1306
+ T.let(
1307
+ :"o4-mini-2025-04-16",
1308
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Model::TaggedSymbol
1309
+ )
1310
+ O3 =
1311
+ T.let(
1312
+ :o3,
1313
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Model::TaggedSymbol
1314
+ )
1315
+ O3_2025_04_16 =
1316
+ T.let(
1317
+ :"o3-2025-04-16",
1318
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Model::TaggedSymbol
1319
+ )
1320
+ O3_MINI =
1321
+ T.let(
1322
+ :"o3-mini",
1323
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Model::TaggedSymbol
1324
+ )
1325
+ O3_MINI_2025_01_31 =
1326
+ T.let(
1327
+ :"o3-mini-2025-01-31",
1328
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Model::TaggedSymbol
1329
+ )
1330
+ O1 =
1331
+ T.let(
1332
+ :o1,
1333
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Model::TaggedSymbol
1334
+ )
1335
+ O1_2024_12_17 =
1336
+ T.let(
1337
+ :"o1-2024-12-17",
1338
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Model::TaggedSymbol
1339
+ )
1340
+ O1_PREVIEW =
1341
+ T.let(
1342
+ :"o1-preview",
1343
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Model::TaggedSymbol
1344
+ )
1345
+ O1_PREVIEW_2024_09_12 =
1346
+ T.let(
1347
+ :"o1-preview-2024-09-12",
1348
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Model::TaggedSymbol
1349
+ )
1350
+ O1_MINI =
1351
+ T.let(
1352
+ :"o1-mini",
1353
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Model::TaggedSymbol
1354
+ )
1355
+ O1_MINI_2024_09_12 =
1356
+ T.let(
1357
+ :"o1-mini-2024-09-12",
1358
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Model::TaggedSymbol
1359
+ )
1360
+ GPT_4O =
1361
+ T.let(
1362
+ :"gpt-4o",
1363
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Model::TaggedSymbol
1364
+ )
1365
+ GPT_4O_2024_11_20 =
1366
+ T.let(
1367
+ :"gpt-4o-2024-11-20",
1368
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Model::TaggedSymbol
1369
+ )
1370
+ GPT_4O_2024_08_06 =
1371
+ T.let(
1372
+ :"gpt-4o-2024-08-06",
1373
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Model::TaggedSymbol
1374
+ )
1375
+ GPT_4O_2024_05_13 =
1376
+ T.let(
1377
+ :"gpt-4o-2024-05-13",
1378
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Model::TaggedSymbol
1379
+ )
1380
+ GPT_4O_AUDIO_PREVIEW =
1381
+ T.let(
1382
+ :"gpt-4o-audio-preview",
1383
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Model::TaggedSymbol
1384
+ )
1385
+ GPT_4O_AUDIO_PREVIEW_2024_10_01 =
1386
+ T.let(
1387
+ :"gpt-4o-audio-preview-2024-10-01",
1388
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Model::TaggedSymbol
1389
+ )
1390
+ GPT_4O_AUDIO_PREVIEW_2024_12_17 =
1391
+ T.let(
1392
+ :"gpt-4o-audio-preview-2024-12-17",
1393
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Model::TaggedSymbol
1394
+ )
1395
+ GPT_4O_AUDIO_PREVIEW_2025_06_03 =
1396
+ T.let(
1397
+ :"gpt-4o-audio-preview-2025-06-03",
1398
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Model::TaggedSymbol
1399
+ )
1400
+ GPT_4O_MINI_AUDIO_PREVIEW =
1401
+ T.let(
1402
+ :"gpt-4o-mini-audio-preview",
1403
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Model::TaggedSymbol
1404
+ )
1405
+ GPT_4O_MINI_AUDIO_PREVIEW_2024_12_17 =
1406
+ T.let(
1407
+ :"gpt-4o-mini-audio-preview-2024-12-17",
1408
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Model::TaggedSymbol
1409
+ )
1410
+ GPT_4O_SEARCH_PREVIEW =
1411
+ T.let(
1412
+ :"gpt-4o-search-preview",
1413
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Model::TaggedSymbol
1414
+ )
1415
+ GPT_4O_MINI_SEARCH_PREVIEW =
1416
+ T.let(
1417
+ :"gpt-4o-mini-search-preview",
1418
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Model::TaggedSymbol
1419
+ )
1420
+ GPT_4O_SEARCH_PREVIEW_2025_03_11 =
1421
+ T.let(
1422
+ :"gpt-4o-search-preview-2025-03-11",
1423
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Model::TaggedSymbol
1424
+ )
1425
+ GPT_4O_MINI_SEARCH_PREVIEW_2025_03_11 =
1426
+ T.let(
1427
+ :"gpt-4o-mini-search-preview-2025-03-11",
1428
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Model::TaggedSymbol
1429
+ )
1430
+ CHATGPT_4O_LATEST =
1431
+ T.let(
1432
+ :"chatgpt-4o-latest",
1433
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Model::TaggedSymbol
1434
+ )
1435
+ CODEX_MINI_LATEST =
1436
+ T.let(
1437
+ :"codex-mini-latest",
1438
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Model::TaggedSymbol
1439
+ )
1440
+ GPT_4O_MINI =
1441
+ T.let(
1442
+ :"gpt-4o-mini",
1443
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Model::TaggedSymbol
1444
+ )
1445
+ GPT_4O_MINI_2024_07_18 =
1446
+ T.let(
1447
+ :"gpt-4o-mini-2024-07-18",
1448
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Model::TaggedSymbol
1449
+ )
1450
+ GPT_4_TURBO =
1451
+ T.let(
1452
+ :"gpt-4-turbo",
1453
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Model::TaggedSymbol
1454
+ )
1455
+ GPT_4_TURBO_2024_04_09 =
1456
+ T.let(
1457
+ :"gpt-4-turbo-2024-04-09",
1458
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Model::TaggedSymbol
1459
+ )
1460
+ GPT_4_0125_PREVIEW =
1461
+ T.let(
1462
+ :"gpt-4-0125-preview",
1463
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Model::TaggedSymbol
1464
+ )
1465
+ GPT_4_TURBO_PREVIEW =
1466
+ T.let(
1467
+ :"gpt-4-turbo-preview",
1468
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Model::TaggedSymbol
1469
+ )
1470
+ GPT_4_1106_PREVIEW =
1471
+ T.let(
1472
+ :"gpt-4-1106-preview",
1473
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Model::TaggedSymbol
1474
+ )
1475
+ GPT_4_VISION_PREVIEW =
1476
+ T.let(
1477
+ :"gpt-4-vision-preview",
1478
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Model::TaggedSymbol
1479
+ )
1480
+ GPT_4 =
1481
+ T.let(
1482
+ :"gpt-4",
1483
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Model::TaggedSymbol
1484
+ )
1485
+ GPT_4_0314 =
1486
+ T.let(
1487
+ :"gpt-4-0314",
1488
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Model::TaggedSymbol
1489
+ )
1490
+ GPT_4_0613 =
1491
+ T.let(
1492
+ :"gpt-4-0613",
1493
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Model::TaggedSymbol
1494
+ )
1495
+ GPT_4_32K =
1496
+ T.let(
1497
+ :"gpt-4-32k",
1498
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Model::TaggedSymbol
1499
+ )
1500
+ GPT_4_32K_0314 =
1501
+ T.let(
1502
+ :"gpt-4-32k-0314",
1503
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Model::TaggedSymbol
1504
+ )
1505
+ GPT_4_32K_0613 =
1506
+ T.let(
1507
+ :"gpt-4-32k-0613",
1508
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Model::TaggedSymbol
1509
+ )
1510
+ GPT_3_5_TURBO =
1511
+ T.let(
1512
+ :"gpt-3.5-turbo",
1513
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Model::TaggedSymbol
1514
+ )
1515
+ GPT_3_5_TURBO_16K =
1516
+ T.let(
1517
+ :"gpt-3.5-turbo-16k",
1518
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Model::TaggedSymbol
1519
+ )
1520
+ GPT_3_5_TURBO_0301 =
1521
+ T.let(
1522
+ :"gpt-3.5-turbo-0301",
1523
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Model::TaggedSymbol
1524
+ )
1525
+ GPT_3_5_TURBO_0613 =
1526
+ T.let(
1527
+ :"gpt-3.5-turbo-0613",
1528
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Model::TaggedSymbol
1529
+ )
1530
+ GPT_3_5_TURBO_1106 =
1531
+ T.let(
1532
+ :"gpt-3.5-turbo-1106",
1533
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Model::TaggedSymbol
1534
+ )
1535
+ GPT_3_5_TURBO_0125 =
1536
+ T.let(
1537
+ :"gpt-3.5-turbo-0125",
1538
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Model::TaggedSymbol
1539
+ )
1540
+ GPT_3_5_TURBO_16K_0613 =
1541
+ T.let(
1542
+ :"gpt-3.5-turbo-16k-0613",
1543
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Model::TaggedSymbol
1544
+ )
1545
+ O1_PRO =
1546
+ T.let(
1547
+ :"o1-pro",
1548
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Model::TaggedSymbol
1549
+ )
1550
+ O1_PRO_2025_03_19 =
1551
+ T.let(
1552
+ :"o1-pro-2025-03-19",
1553
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Model::TaggedSymbol
1554
+ )
1555
+ O3_PRO =
1556
+ T.let(
1557
+ :"o3-pro",
1558
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Model::TaggedSymbol
1559
+ )
1560
+ O3_PRO_2025_06_10 =
1561
+ T.let(
1562
+ :"o3-pro-2025-06-10",
1563
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Model::TaggedSymbol
1564
+ )
1565
+ O3_DEEP_RESEARCH =
1566
+ T.let(
1567
+ :"o3-deep-research",
1568
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Model::TaggedSymbol
1569
+ )
1570
+ O3_DEEP_RESEARCH_2025_06_26 =
1571
+ T.let(
1572
+ :"o3-deep-research-2025-06-26",
1573
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Model::TaggedSymbol
1574
+ )
1575
+ O4_MINI_DEEP_RESEARCH =
1576
+ T.let(
1577
+ :"o4-mini-deep-research",
1578
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Model::TaggedSymbol
1579
+ )
1580
+ O4_MINI_DEEP_RESEARCH_2025_06_26 =
1581
+ T.let(
1582
+ :"o4-mini-deep-research-2025-06-26",
1583
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Model::TaggedSymbol
1584
+ )
1585
+ COMPUTER_USE_PREVIEW =
1586
+ T.let(
1587
+ :"computer-use-preview",
1588
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Model::TaggedSymbol
1589
+ )
1590
+ COMPUTER_USE_PREVIEW_2025_03_11 =
1591
+ T.let(
1592
+ :"computer-use-preview-2025-03-11",
1593
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Model::TaggedSymbol
1594
+ )
1595
+ GPT_5_CODEX =
1596
+ T.let(
1597
+ :"gpt-5-codex",
1598
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Model::TaggedSymbol
1599
+ )
1600
+ GPT_5_PRO =
1601
+ T.let(
1602
+ :"gpt-5-pro",
1603
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Model::TaggedSymbol
1604
+ )
1605
+ GPT_5_PRO_2025_10_06 =
1606
+ T.let(
1607
+ :"gpt-5-pro-2025-10-06",
1608
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Model::TaggedSymbol
1609
+ )
1610
+ GPT_5_1_CODEX_MAX =
1611
+ T.let(
1612
+ :"gpt-5.1-codex-max",
1613
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Model::TaggedSymbol
1614
+ )
1615
+ end
1616
+
1617
+ class Moderation < OpenAI::Internal::Type::BaseModel
1618
+ OrHash =
1619
+ T.type_alias do
1620
+ T.any(
1621
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Moderation,
1622
+ OpenAI::Internal::AnyHash
1623
+ )
1624
+ end
1625
+
1626
+ # The moderation model to use for moderated completions, e.g.
1627
+ # 'omni-moderation-latest'.
1628
+ sig { returns(String) }
1629
+ attr_accessor :model
1630
+
1631
+ # The policy to apply to moderated response input and output.
1632
+ sig do
1633
+ returns(
1634
+ T.nilable(
1635
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Moderation::Policy
1636
+ )
1637
+ )
1638
+ end
1639
+ attr_reader :policy
1640
+
1641
+ sig do
1642
+ params(
1643
+ policy:
1644
+ T.nilable(
1645
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Moderation::Policy::OrHash
1646
+ )
1647
+ ).void
1648
+ end
1649
+ attr_writer :policy
1650
+
1651
+ # Configuration for running moderation on the input and output of this response.
1652
+ sig do
1653
+ params(
1654
+ model: String,
1655
+ policy:
1656
+ T.nilable(
1657
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Moderation::Policy::OrHash
1658
+ )
1659
+ ).returns(T.attached_class)
1660
+ end
1661
+ def self.new(
1662
+ # The moderation model to use for moderated completions, e.g.
1663
+ # 'omni-moderation-latest'.
1664
+ model:,
1665
+ # The policy to apply to moderated response input and output.
1666
+ policy: nil
1667
+ )
1668
+ end
1669
+
1670
+ sig do
1671
+ override.returns(
1672
+ {
1673
+ model: String,
1674
+ policy:
1675
+ T.nilable(
1676
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Moderation::Policy
1677
+ )
1678
+ }
1679
+ )
1680
+ end
1681
+ def to_hash
1682
+ end
1683
+
1684
+ class Policy < OpenAI::Internal::Type::BaseModel
1685
+ OrHash =
1686
+ T.type_alias do
1687
+ T.any(
1688
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Moderation::Policy,
1689
+ OpenAI::Internal::AnyHash
1690
+ )
1691
+ end
1692
+
1693
+ # The moderation policy for the response input.
1694
+ sig do
1695
+ returns(
1696
+ T.nilable(
1697
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Moderation::Policy::Input
1698
+ )
1699
+ )
1700
+ end
1701
+ attr_reader :input
1702
+
1703
+ sig do
1704
+ params(
1705
+ input:
1706
+ T.nilable(
1707
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Moderation::Policy::Input::OrHash
1708
+ )
1709
+ ).void
1710
+ end
1711
+ attr_writer :input
1712
+
1713
+ # The moderation policy for the response output.
1714
+ sig do
1715
+ returns(
1716
+ T.nilable(
1717
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Moderation::Policy::Output
1718
+ )
1719
+ )
1720
+ end
1721
+ attr_reader :output
1722
+
1723
+ sig do
1724
+ params(
1725
+ output:
1726
+ T.nilable(
1727
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Moderation::Policy::Output::OrHash
1728
+ )
1729
+ ).void
1730
+ end
1731
+ attr_writer :output
1732
+
1733
+ # The policy to apply to moderated response input and output.
1734
+ sig do
1735
+ params(
1736
+ input:
1737
+ T.nilable(
1738
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Moderation::Policy::Input::OrHash
1739
+ ),
1740
+ output:
1741
+ T.nilable(
1742
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Moderation::Policy::Output::OrHash
1743
+ )
1744
+ ).returns(T.attached_class)
1745
+ end
1746
+ def self.new(
1747
+ # The moderation policy for the response input.
1748
+ input: nil,
1749
+ # The moderation policy for the response output.
1750
+ output: nil
1751
+ )
1752
+ end
1753
+
1754
+ sig do
1755
+ override.returns(
1756
+ {
1757
+ input:
1758
+ T.nilable(
1759
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Moderation::Policy::Input
1760
+ ),
1761
+ output:
1762
+ T.nilable(
1763
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Moderation::Policy::Output
1764
+ )
1765
+ }
1766
+ )
1767
+ end
1768
+ def to_hash
1769
+ end
1770
+
1771
+ class Input < OpenAI::Internal::Type::BaseModel
1772
+ OrHash =
1773
+ T.type_alias do
1774
+ T.any(
1775
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Moderation::Policy::Input,
1776
+ OpenAI::Internal::AnyHash
1777
+ )
1778
+ end
1779
+
1780
+ sig do
1781
+ returns(
1782
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Moderation::Policy::Input::Mode::OrSymbol
1783
+ )
1784
+ end
1785
+ attr_accessor :mode
1786
+
1787
+ # The moderation policy for the response input.
1788
+ sig do
1789
+ params(
1790
+ mode:
1791
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Moderation::Policy::Input::Mode::OrSymbol
1792
+ ).returns(T.attached_class)
1793
+ end
1794
+ def self.new(mode:)
1795
+ end
1796
+
1797
+ sig do
1798
+ override.returns(
1799
+ {
1800
+ mode:
1801
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Moderation::Policy::Input::Mode::OrSymbol
1802
+ }
1803
+ )
1804
+ end
1805
+ def to_hash
1806
+ end
1807
+
1808
+ module Mode
1809
+ extend OpenAI::Internal::Type::Enum
1810
+
1811
+ TaggedSymbol =
1812
+ T.type_alias do
1813
+ T.all(
1814
+ Symbol,
1815
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Moderation::Policy::Input::Mode
1816
+ )
1817
+ end
1818
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
1819
+
1820
+ SCORE =
1821
+ T.let(
1822
+ :score,
1823
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Moderation::Policy::Input::Mode::TaggedSymbol
1824
+ )
1825
+ BLOCK =
1826
+ T.let(
1827
+ :block,
1828
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Moderation::Policy::Input::Mode::TaggedSymbol
1829
+ )
1830
+
1831
+ sig do
1832
+ override.returns(
1833
+ T::Array[
1834
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Moderation::Policy::Input::Mode::TaggedSymbol
1835
+ ]
1836
+ )
1837
+ end
1838
+ def self.values
1839
+ end
1840
+ end
1841
+ end
1842
+
1843
+ class Output < OpenAI::Internal::Type::BaseModel
1844
+ OrHash =
1845
+ T.type_alias do
1846
+ T.any(
1847
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Moderation::Policy::Output,
1848
+ OpenAI::Internal::AnyHash
1849
+ )
1850
+ end
1851
+
1852
+ sig do
1853
+ returns(
1854
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Moderation::Policy::Output::Mode::OrSymbol
1855
+ )
1856
+ end
1857
+ attr_accessor :mode
1858
+
1859
+ # The moderation policy for the response output.
1860
+ sig do
1861
+ params(
1862
+ mode:
1863
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Moderation::Policy::Output::Mode::OrSymbol
1864
+ ).returns(T.attached_class)
1865
+ end
1866
+ def self.new(mode:)
1867
+ end
1868
+
1869
+ sig do
1870
+ override.returns(
1871
+ {
1872
+ mode:
1873
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Moderation::Policy::Output::Mode::OrSymbol
1874
+ }
1875
+ )
1876
+ end
1877
+ def to_hash
1878
+ end
1879
+
1880
+ module Mode
1881
+ extend OpenAI::Internal::Type::Enum
1882
+
1883
+ TaggedSymbol =
1884
+ T.type_alias do
1885
+ T.all(
1886
+ Symbol,
1887
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Moderation::Policy::Output::Mode
1888
+ )
1889
+ end
1890
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
1891
+
1892
+ SCORE =
1893
+ T.let(
1894
+ :score,
1895
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Moderation::Policy::Output::Mode::TaggedSymbol
1896
+ )
1897
+ BLOCK =
1898
+ T.let(
1899
+ :block,
1900
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Moderation::Policy::Output::Mode::TaggedSymbol
1901
+ )
1902
+
1903
+ sig do
1904
+ override.returns(
1905
+ T::Array[
1906
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Moderation::Policy::Output::Mode::TaggedSymbol
1907
+ ]
1908
+ )
1909
+ end
1910
+ def self.values
1911
+ end
1912
+ end
1913
+ end
1914
+ end
1915
+ end
1916
+
1917
+ class MultiAgent < OpenAI::Internal::Type::BaseModel
1918
+ OrHash =
1919
+ T.type_alias do
1920
+ T.any(
1921
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::MultiAgent,
1922
+ OpenAI::Internal::AnyHash
1923
+ )
1924
+ end
1925
+
1926
+ # Whether to enable server-hosted multi-agent execution for this response.
1927
+ sig { returns(T::Boolean) }
1928
+ attr_accessor :enabled
1929
+
1930
+ # `max_concurrent_subagents` sets the maximum number of subagents that can be
1931
+ # active simultaneously across the entire agent tree. It includes all
1932
+ # descendants—children, grandchildren, and deeper subagents—but excludes the root
1933
+ # agent. The API does not impose a fixed upper bound on this setting. The default
1934
+ # is `3`, which is recommended for most workloads. Multi-agent runs also have no
1935
+ # fixed limit on tree depth or the total number of subagents created during a run.
1936
+ sig { returns(T.nilable(Integer)) }
1937
+ attr_reader :max_concurrent_subagents
1938
+
1939
+ sig { params(max_concurrent_subagents: Integer).void }
1940
+ attr_writer :max_concurrent_subagents
1941
+
1942
+ # Configuration for server-hosted multi-agent execution.
1943
+ sig do
1944
+ params(
1945
+ enabled: T::Boolean,
1946
+ max_concurrent_subagents: Integer
1947
+ ).returns(T.attached_class)
1948
+ end
1949
+ def self.new(
1950
+ # Whether to enable server-hosted multi-agent execution for this response.
1951
+ enabled:,
1952
+ # `max_concurrent_subagents` sets the maximum number of subagents that can be
1953
+ # active simultaneously across the entire agent tree. It includes all
1954
+ # descendants—children, grandchildren, and deeper subagents—but excludes the root
1955
+ # agent. The API does not impose a fixed upper bound on this setting. The default
1956
+ # is `3`, which is recommended for most workloads. Multi-agent runs also have no
1957
+ # fixed limit on tree depth or the total number of subagents created during a run.
1958
+ max_concurrent_subagents: nil
1959
+ )
1960
+ end
1961
+
1962
+ sig do
1963
+ override.returns(
1964
+ { enabled: T::Boolean, max_concurrent_subagents: Integer }
1965
+ )
1966
+ end
1967
+ def to_hash
1968
+ end
1969
+ end
1970
+
1971
+ class PromptCacheOptions < OpenAI::Internal::Type::BaseModel
1972
+ OrHash =
1973
+ T.type_alias do
1974
+ T.any(
1975
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::PromptCacheOptions,
1976
+ OpenAI::Internal::AnyHash
1977
+ )
1978
+ end
1979
+
1980
+ # Controls whether OpenAI automatically creates an implicit cache breakpoint.
1981
+ # Defaults to `implicit`. With `implicit`, OpenAI creates one implicit breakpoint
1982
+ # and writes up to the latest three explicit breakpoints in the request. With
1983
+ # `explicit`, OpenAI does not create an implicit breakpoint and writes up to the
1984
+ # latest four explicit breakpoints. If there are no explicit breakpoints, the
1985
+ # request does not use prompt caching.
1986
+ sig do
1987
+ returns(
1988
+ T.nilable(
1989
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::PromptCacheOptions::Mode::OrSymbol
1990
+ )
1991
+ )
1992
+ end
1993
+ attr_reader :mode
1994
+
1995
+ sig do
1996
+ params(
1997
+ mode:
1998
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::PromptCacheOptions::Mode::OrSymbol
1999
+ ).void
2000
+ end
2001
+ attr_writer :mode
2002
+
2003
+ # The minimum lifetime applied to every implicit and explicit cache breakpoint
2004
+ # written by the request. Defaults to `30m`, which is currently the only supported
2005
+ # value. The backend may retain cache entries for longer.
2006
+ sig do
2007
+ returns(
2008
+ T.nilable(
2009
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::PromptCacheOptions::Ttl::OrSymbol
2010
+ )
2011
+ )
2012
+ end
2013
+ attr_reader :ttl
2014
+
2015
+ sig do
2016
+ params(
2017
+ ttl:
2018
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::PromptCacheOptions::Ttl::OrSymbol
2019
+ ).void
2020
+ end
2021
+ attr_writer :ttl
2022
+
2023
+ # Options for prompt caching. Supported for `gpt-5.6` and later models. By
2024
+ # default, OpenAI automatically chooses one implicit cache breakpoint. You can add
2025
+ # explicit breakpoints to content blocks with `prompt_cache_breakpoint`. Each
2026
+ # request can write up to four breakpoints. For cache matching, OpenAI considers
2027
+ # up to the latest 80 breakpoints in the conversation, without a content-block
2028
+ # lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The
2029
+ # `ttl` defaults to `30m`, which is currently the only supported value. See the
2030
+ # [prompt caching guide](https://platform.openai.com/docs/guides/prompt-caching)
2031
+ # for current details.
2032
+ sig do
2033
+ params(
2034
+ mode:
2035
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::PromptCacheOptions::Mode::OrSymbol,
2036
+ ttl:
2037
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::PromptCacheOptions::Ttl::OrSymbol
2038
+ ).returns(T.attached_class)
2039
+ end
2040
+ def self.new(
2041
+ # Controls whether OpenAI automatically creates an implicit cache breakpoint.
2042
+ # Defaults to `implicit`. With `implicit`, OpenAI creates one implicit breakpoint
2043
+ # and writes up to the latest three explicit breakpoints in the request. With
2044
+ # `explicit`, OpenAI does not create an implicit breakpoint and writes up to the
2045
+ # latest four explicit breakpoints. If there are no explicit breakpoints, the
2046
+ # request does not use prompt caching.
2047
+ mode: nil,
2048
+ # The minimum lifetime applied to every implicit and explicit cache breakpoint
2049
+ # written by the request. Defaults to `30m`, which is currently the only supported
2050
+ # value. The backend may retain cache entries for longer.
2051
+ ttl: nil
2052
+ )
2053
+ end
2054
+
2055
+ sig do
2056
+ override.returns(
2057
+ {
2058
+ mode:
2059
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::PromptCacheOptions::Mode::OrSymbol,
2060
+ ttl:
2061
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::PromptCacheOptions::Ttl::OrSymbol
2062
+ }
2063
+ )
2064
+ end
2065
+ def to_hash
2066
+ end
2067
+
2068
+ # Controls whether OpenAI automatically creates an implicit cache breakpoint.
2069
+ # Defaults to `implicit`. With `implicit`, OpenAI creates one implicit breakpoint
2070
+ # and writes up to the latest three explicit breakpoints in the request. With
2071
+ # `explicit`, OpenAI does not create an implicit breakpoint and writes up to the
2072
+ # latest four explicit breakpoints. If there are no explicit breakpoints, the
2073
+ # request does not use prompt caching.
2074
+ module Mode
2075
+ extend OpenAI::Internal::Type::Enum
2076
+
2077
+ TaggedSymbol =
2078
+ T.type_alias do
2079
+ T.all(
2080
+ Symbol,
2081
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::PromptCacheOptions::Mode
2082
+ )
2083
+ end
2084
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
2085
+
2086
+ IMPLICIT =
2087
+ T.let(
2088
+ :implicit,
2089
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::PromptCacheOptions::Mode::TaggedSymbol
2090
+ )
2091
+ EXPLICIT =
2092
+ T.let(
2093
+ :explicit,
2094
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::PromptCacheOptions::Mode::TaggedSymbol
2095
+ )
2096
+
2097
+ sig do
2098
+ override.returns(
2099
+ T::Array[
2100
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::PromptCacheOptions::Mode::TaggedSymbol
2101
+ ]
2102
+ )
2103
+ end
2104
+ def self.values
2105
+ end
2106
+ end
2107
+
2108
+ # The minimum lifetime applied to every implicit and explicit cache breakpoint
2109
+ # written by the request. Defaults to `30m`, which is currently the only supported
2110
+ # value. The backend may retain cache entries for longer.
2111
+ module Ttl
2112
+ extend OpenAI::Internal::Type::Enum
2113
+
2114
+ TaggedSymbol =
2115
+ T.type_alias do
2116
+ T.all(
2117
+ Symbol,
2118
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::PromptCacheOptions::Ttl
2119
+ )
2120
+ end
2121
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
2122
+
2123
+ TTL_30M =
2124
+ T.let(
2125
+ :"30m",
2126
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::PromptCacheOptions::Ttl::TaggedSymbol
2127
+ )
2128
+
2129
+ sig do
2130
+ override.returns(
2131
+ T::Array[
2132
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::PromptCacheOptions::Ttl::TaggedSymbol
2133
+ ]
2134
+ )
2135
+ end
2136
+ def self.values
2137
+ end
2138
+ end
2139
+ end
2140
+
2141
+ # Deprecated. Use `prompt_cache_options.ttl` instead.
2142
+ #
2143
+ # The retention policy for the prompt cache. Set to `24h` to enable extended
2144
+ # prompt caching, which keeps cached prefixes active for longer, up to a maximum
2145
+ # of 24 hours.
2146
+ # [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention).
2147
+ # This field expresses a maximum retention policy, while
2148
+ # `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two fields
2149
+ # are independent and do not interact. For `gpt-5.5`, `gpt-5.5-pro`, and future
2150
+ # models, only `24h` is supported.
2151
+ #
2152
+ # For older models that support both `in_memory` and `24h`, the default depends on
2153
+ # your organization's data retention policy:
2154
+ #
2155
+ # - Organizations without ZDR enabled default to `24h`.
2156
+ # - Organizations with ZDR enabled default to `in_memory` when
2157
+ # `prompt_cache_retention` is not specified.
2158
+ module PromptCacheRetention
2159
+ extend OpenAI::Internal::Type::Enum
2160
+
2161
+ TaggedSymbol =
2162
+ T.type_alias do
2163
+ T.all(
2164
+ Symbol,
2165
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::PromptCacheRetention
2166
+ )
2167
+ end
2168
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
2169
+
2170
+ IN_MEMORY =
2171
+ T.let(
2172
+ :in_memory,
2173
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::PromptCacheRetention::TaggedSymbol
2174
+ )
2175
+ PROMPT_CACHE_RETENTION_24H =
2176
+ T.let(
2177
+ :"24h",
2178
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::PromptCacheRetention::TaggedSymbol
2179
+ )
2180
+
2181
+ sig do
2182
+ override.returns(
2183
+ T::Array[
2184
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::PromptCacheRetention::TaggedSymbol
2185
+ ]
2186
+ )
2187
+ end
2188
+ def self.values
2189
+ end
2190
+ end
2191
+
2192
+ class Reasoning < OpenAI::Internal::Type::BaseModel
2193
+ OrHash =
2194
+ T.type_alias do
2195
+ T.any(
2196
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Reasoning,
2197
+ OpenAI::Internal::AnyHash
2198
+ )
2199
+ end
2200
+
2201
+ # Controls which reasoning items are rendered back to the model on later turns.
2202
+ # When returned on a response, this is the effective reasoning context mode used
2203
+ # for the response.
2204
+ sig do
2205
+ returns(
2206
+ T.nilable(
2207
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Reasoning::Context::OrSymbol
2208
+ )
2209
+ )
2210
+ end
2211
+ attr_accessor :context
2212
+
2213
+ # Constrains effort on reasoning for reasoning models. Currently supported values
2214
+ # are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing
2215
+ # reasoning effort can result in faster responses and fewer tokens used on
2216
+ # reasoning in a response. Not all reasoning models support every value. See the
2217
+ # [reasoning guide](https://platform.openai.com/docs/guides/reasoning) for
2218
+ # model-specific support.
2219
+ sig do
2220
+ returns(
2221
+ T.nilable(
2222
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Reasoning::Effort::OrSymbol
2223
+ )
2224
+ )
2225
+ end
2226
+ attr_accessor :effort
2227
+
2228
+ # **Deprecated:** use `summary` instead.
2229
+ #
2230
+ # A summary of the reasoning performed by the model. This can be useful for
2231
+ # debugging and understanding the model's reasoning process. One of `auto`,
2232
+ # `concise`, or `detailed`.
2233
+ sig do
2234
+ returns(
2235
+ T.nilable(
2236
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Reasoning::GenerateSummary::OrSymbol
2237
+ )
2238
+ )
2239
+ end
2240
+ attr_accessor :generate_summary
2241
+
2242
+ # Controls the reasoning execution mode for the request.
2243
+ #
2244
+ # When returned on a response, this is the effective execution mode.
2245
+ sig do
2246
+ returns(
2247
+ T.nilable(
2248
+ T.any(
2249
+ String,
2250
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Reasoning::Mode::OrSymbol
2251
+ )
2252
+ )
2253
+ )
2254
+ end
2255
+ attr_reader :mode
2256
+
2257
+ sig do
2258
+ params(
2259
+ mode:
2260
+ T.any(
2261
+ String,
2262
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Reasoning::Mode::OrSymbol
2263
+ )
2264
+ ).void
2265
+ end
2266
+ attr_writer :mode
2267
+
2268
+ # A summary of the reasoning performed by the model. This can be useful for
2269
+ # debugging and understanding the model's reasoning process. One of `auto`,
2270
+ # `concise`, or `detailed`.
2271
+ #
2272
+ # `concise` is supported for `computer-use-preview` models and all reasoning
2273
+ # models after `gpt-5`.
2274
+ sig do
2275
+ returns(
2276
+ T.nilable(
2277
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Reasoning::Summary::OrSymbol
2278
+ )
2279
+ )
2280
+ end
2281
+ attr_accessor :summary
2282
+
2283
+ # **gpt-5 and o-series models only**
2284
+ #
2285
+ # Configuration options for
2286
+ # [reasoning models](https://platform.openai.com/docs/guides/reasoning).
2287
+ sig do
2288
+ params(
2289
+ context:
2290
+ T.nilable(
2291
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Reasoning::Context::OrSymbol
2292
+ ),
2293
+ effort:
2294
+ T.nilable(
2295
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Reasoning::Effort::OrSymbol
2296
+ ),
2297
+ generate_summary:
2298
+ T.nilable(
2299
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Reasoning::GenerateSummary::OrSymbol
2300
+ ),
2301
+ mode:
2302
+ T.any(
2303
+ String,
2304
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Reasoning::Mode::OrSymbol
2305
+ ),
2306
+ summary:
2307
+ T.nilable(
2308
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Reasoning::Summary::OrSymbol
2309
+ )
2310
+ ).returns(T.attached_class)
2311
+ end
2312
+ def self.new(
2313
+ # Controls which reasoning items are rendered back to the model on later turns.
2314
+ # When returned on a response, this is the effective reasoning context mode used
2315
+ # for the response.
2316
+ context: nil,
2317
+ # Constrains effort on reasoning for reasoning models. Currently supported values
2318
+ # are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing
2319
+ # reasoning effort can result in faster responses and fewer tokens used on
2320
+ # reasoning in a response. Not all reasoning models support every value. See the
2321
+ # [reasoning guide](https://platform.openai.com/docs/guides/reasoning) for
2322
+ # model-specific support.
2323
+ effort: nil,
2324
+ # **Deprecated:** use `summary` instead.
2325
+ #
2326
+ # A summary of the reasoning performed by the model. This can be useful for
2327
+ # debugging and understanding the model's reasoning process. One of `auto`,
2328
+ # `concise`, or `detailed`.
2329
+ generate_summary: nil,
2330
+ # Controls the reasoning execution mode for the request.
2331
+ #
2332
+ # When returned on a response, this is the effective execution mode.
2333
+ mode: nil,
2334
+ # A summary of the reasoning performed by the model. This can be useful for
2335
+ # debugging and understanding the model's reasoning process. One of `auto`,
2336
+ # `concise`, or `detailed`.
2337
+ #
2338
+ # `concise` is supported for `computer-use-preview` models and all reasoning
2339
+ # models after `gpt-5`.
2340
+ summary: nil
2341
+ )
2342
+ end
2343
+
2344
+ sig do
2345
+ override.returns(
2346
+ {
2347
+ context:
2348
+ T.nilable(
2349
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Reasoning::Context::OrSymbol
2350
+ ),
2351
+ effort:
2352
+ T.nilable(
2353
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Reasoning::Effort::OrSymbol
2354
+ ),
2355
+ generate_summary:
2356
+ T.nilable(
2357
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Reasoning::GenerateSummary::OrSymbol
2358
+ ),
2359
+ mode:
2360
+ T.any(
2361
+ String,
2362
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Reasoning::Mode::OrSymbol
2363
+ ),
2364
+ summary:
2365
+ T.nilable(
2366
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Reasoning::Summary::OrSymbol
2367
+ )
2368
+ }
2369
+ )
2370
+ end
2371
+ def to_hash
2372
+ end
2373
+
2374
+ # Controls which reasoning items are rendered back to the model on later turns.
2375
+ # When returned on a response, this is the effective reasoning context mode used
2376
+ # for the response.
2377
+ module Context
2378
+ extend OpenAI::Internal::Type::Enum
2379
+
2380
+ TaggedSymbol =
2381
+ T.type_alias do
2382
+ T.all(
2383
+ Symbol,
2384
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Reasoning::Context
2385
+ )
2386
+ end
2387
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
2388
+
2389
+ AUTO =
2390
+ T.let(
2391
+ :auto,
2392
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Reasoning::Context::TaggedSymbol
2393
+ )
2394
+ CURRENT_TURN =
2395
+ T.let(
2396
+ :current_turn,
2397
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Reasoning::Context::TaggedSymbol
2398
+ )
2399
+ ALL_TURNS =
2400
+ T.let(
2401
+ :all_turns,
2402
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Reasoning::Context::TaggedSymbol
2403
+ )
2404
+
2405
+ sig do
2406
+ override.returns(
2407
+ T::Array[
2408
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Reasoning::Context::TaggedSymbol
2409
+ ]
2410
+ )
2411
+ end
2412
+ def self.values
2413
+ end
2414
+ end
2415
+
2416
+ # Constrains effort on reasoning for reasoning models. Currently supported values
2417
+ # are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing
2418
+ # reasoning effort can result in faster responses and fewer tokens used on
2419
+ # reasoning in a response. Not all reasoning models support every value. See the
2420
+ # [reasoning guide](https://platform.openai.com/docs/guides/reasoning) for
2421
+ # model-specific support.
2422
+ module Effort
2423
+ extend OpenAI::Internal::Type::Enum
2424
+
2425
+ TaggedSymbol =
2426
+ T.type_alias do
2427
+ T.all(
2428
+ Symbol,
2429
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Reasoning::Effort
2430
+ )
2431
+ end
2432
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
2433
+
2434
+ NONE =
2435
+ T.let(
2436
+ :none,
2437
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Reasoning::Effort::TaggedSymbol
2438
+ )
2439
+ MINIMAL =
2440
+ T.let(
2441
+ :minimal,
2442
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Reasoning::Effort::TaggedSymbol
2443
+ )
2444
+ LOW =
2445
+ T.let(
2446
+ :low,
2447
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Reasoning::Effort::TaggedSymbol
2448
+ )
2449
+ MEDIUM =
2450
+ T.let(
2451
+ :medium,
2452
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Reasoning::Effort::TaggedSymbol
2453
+ )
2454
+ HIGH =
2455
+ T.let(
2456
+ :high,
2457
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Reasoning::Effort::TaggedSymbol
2458
+ )
2459
+ XHIGH =
2460
+ T.let(
2461
+ :xhigh,
2462
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Reasoning::Effort::TaggedSymbol
2463
+ )
2464
+ MAX =
2465
+ T.let(
2466
+ :max,
2467
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Reasoning::Effort::TaggedSymbol
2468
+ )
2469
+
2470
+ sig do
2471
+ override.returns(
2472
+ T::Array[
2473
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Reasoning::Effort::TaggedSymbol
2474
+ ]
2475
+ )
2476
+ end
2477
+ def self.values
2478
+ end
2479
+ end
2480
+
2481
+ # **Deprecated:** use `summary` instead.
2482
+ #
2483
+ # A summary of the reasoning performed by the model. This can be useful for
2484
+ # debugging and understanding the model's reasoning process. One of `auto`,
2485
+ # `concise`, or `detailed`.
2486
+ module GenerateSummary
2487
+ extend OpenAI::Internal::Type::Enum
2488
+
2489
+ TaggedSymbol =
2490
+ T.type_alias do
2491
+ T.all(
2492
+ Symbol,
2493
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Reasoning::GenerateSummary
2494
+ )
2495
+ end
2496
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
2497
+
2498
+ AUTO =
2499
+ T.let(
2500
+ :auto,
2501
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Reasoning::GenerateSummary::TaggedSymbol
2502
+ )
2503
+ CONCISE =
2504
+ T.let(
2505
+ :concise,
2506
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Reasoning::GenerateSummary::TaggedSymbol
2507
+ )
2508
+ DETAILED =
2509
+ T.let(
2510
+ :detailed,
2511
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Reasoning::GenerateSummary::TaggedSymbol
2512
+ )
2513
+
2514
+ sig do
2515
+ override.returns(
2516
+ T::Array[
2517
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Reasoning::GenerateSummary::TaggedSymbol
2518
+ ]
2519
+ )
2520
+ end
2521
+ def self.values
2522
+ end
2523
+ end
2524
+
2525
+ # Controls the reasoning execution mode for the request.
2526
+ #
2527
+ # When returned on a response, this is the effective execution mode.
2528
+ module Mode
2529
+ extend OpenAI::Internal::Type::Union
2530
+
2531
+ Variants =
2532
+ T.type_alias do
2533
+ T.any(
2534
+ String,
2535
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Reasoning::Mode::TaggedSymbol
2536
+ )
2537
+ end
2538
+
2539
+ sig do
2540
+ override.returns(
2541
+ T::Array[
2542
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Reasoning::Mode::Variants
2543
+ ]
2544
+ )
2545
+ end
2546
+ def self.variants
2547
+ end
2548
+
2549
+ TaggedSymbol =
2550
+ T.type_alias do
2551
+ T.all(
2552
+ Symbol,
2553
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Reasoning::Mode
2554
+ )
2555
+ end
2556
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
2557
+
2558
+ STANDARD =
2559
+ T.let(
2560
+ :standard,
2561
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Reasoning::Mode::TaggedSymbol
2562
+ )
2563
+ PRO =
2564
+ T.let(
2565
+ :pro,
2566
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Reasoning::Mode::TaggedSymbol
2567
+ )
2568
+ end
2569
+
2570
+ # A summary of the reasoning performed by the model. This can be useful for
2571
+ # debugging and understanding the model's reasoning process. One of `auto`,
2572
+ # `concise`, or `detailed`.
2573
+ #
2574
+ # `concise` is supported for `computer-use-preview` models and all reasoning
2575
+ # models after `gpt-5`.
2576
+ module Summary
2577
+ extend OpenAI::Internal::Type::Enum
2578
+
2579
+ TaggedSymbol =
2580
+ T.type_alias do
2581
+ T.all(
2582
+ Symbol,
2583
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Reasoning::Summary
2584
+ )
2585
+ end
2586
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
2587
+
2588
+ AUTO =
2589
+ T.let(
2590
+ :auto,
2591
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Reasoning::Summary::TaggedSymbol
2592
+ )
2593
+ CONCISE =
2594
+ T.let(
2595
+ :concise,
2596
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Reasoning::Summary::TaggedSymbol
2597
+ )
2598
+ DETAILED =
2599
+ T.let(
2600
+ :detailed,
2601
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Reasoning::Summary::TaggedSymbol
2602
+ )
2603
+
2604
+ sig do
2605
+ override.returns(
2606
+ T::Array[
2607
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Reasoning::Summary::TaggedSymbol
2608
+ ]
2609
+ )
2610
+ end
2611
+ def self.values
2612
+ end
2613
+ end
2614
+ end
2615
+
2616
+ # Specifies the processing type used for serving the request.
2617
+ #
2618
+ # - If set to 'auto', then the request will be processed with the service tier
2619
+ # configured in the Project settings. Unless otherwise configured, the Project
2620
+ # will use 'default'.
2621
+ # - If set to 'default', then the request will be processed with the standard
2622
+ # pricing and performance for the selected model.
2623
+ # - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)' or
2624
+ # '[priority](https://openai.com/api-priority-processing/)', then the request
2625
+ # will be processed with the corresponding service tier.
2626
+ # - When not set, the default behavior is 'auto'.
2627
+ #
2628
+ # When the `service_tier` parameter is set, the response body will include the
2629
+ # `service_tier` value based on the processing mode actually used to serve the
2630
+ # request. This response value may be different from the value set in the
2631
+ # parameter.
2632
+ module ServiceTier
2633
+ extend OpenAI::Internal::Type::Enum
2634
+
2635
+ TaggedSymbol =
2636
+ T.type_alias do
2637
+ T.all(
2638
+ Symbol,
2639
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::ServiceTier
2640
+ )
2641
+ end
2642
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
2643
+
2644
+ AUTO =
2645
+ T.let(
2646
+ :auto,
2647
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::ServiceTier::TaggedSymbol
2648
+ )
2649
+ DEFAULT =
2650
+ T.let(
2651
+ :default,
2652
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::ServiceTier::TaggedSymbol
2653
+ )
2654
+ FLEX =
2655
+ T.let(
2656
+ :flex,
2657
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::ServiceTier::TaggedSymbol
2658
+ )
2659
+ SCALE =
2660
+ T.let(
2661
+ :scale,
2662
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::ServiceTier::TaggedSymbol
2663
+ )
2664
+ PRIORITY =
2665
+ T.let(
2666
+ :priority,
2667
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::ServiceTier::TaggedSymbol
2668
+ )
2669
+
2670
+ sig do
2671
+ override.returns(
2672
+ T::Array[
2673
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::ServiceTier::TaggedSymbol
2674
+ ]
2675
+ )
2676
+ end
2677
+ def self.values
2678
+ end
2679
+ end
2680
+
2681
+ class StreamOptions < OpenAI::Internal::Type::BaseModel
2682
+ OrHash =
2683
+ T.type_alias do
2684
+ T.any(
2685
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::StreamOptions,
2686
+ OpenAI::Internal::AnyHash
2687
+ )
2688
+ end
2689
+
2690
+ # When true, stream obfuscation will be enabled. Stream obfuscation adds random
2691
+ # characters to an `obfuscation` field on streaming delta events to normalize
2692
+ # payload sizes as a mitigation to certain side-channel attacks. These obfuscation
2693
+ # fields are included by default, but add a small amount of overhead to the data
2694
+ # stream. You can set `include_obfuscation` to false to optimize for bandwidth if
2695
+ # you trust the network links between your application and the OpenAI API.
2696
+ sig { returns(T.nilable(T::Boolean)) }
2697
+ attr_reader :include_obfuscation
2698
+
2699
+ sig { params(include_obfuscation: T::Boolean).void }
2700
+ attr_writer :include_obfuscation
2701
+
2702
+ # Options for streaming responses. Only set this when you set `stream: true`.
2703
+ sig do
2704
+ params(include_obfuscation: T::Boolean).returns(T.attached_class)
2705
+ end
2706
+ def self.new(
2707
+ # When true, stream obfuscation will be enabled. Stream obfuscation adds random
2708
+ # characters to an `obfuscation` field on streaming delta events to normalize
2709
+ # payload sizes as a mitigation to certain side-channel attacks. These obfuscation
2710
+ # fields are included by default, but add a small amount of overhead to the data
2711
+ # stream. You can set `include_obfuscation` to false to optimize for bandwidth if
2712
+ # you trust the network links between your application and the OpenAI API.
2713
+ include_obfuscation: nil
2714
+ )
2715
+ end
2716
+
2717
+ sig { override.returns({ include_obfuscation: T::Boolean }) }
2718
+ def to_hash
2719
+ end
2720
+ end
2721
+
2722
+ # How the model should select which tool (or tools) to use when generating a
2723
+ # response. See the `tools` parameter to see how to specify which tools the model
2724
+ # can call.
2725
+ module ToolChoice
2726
+ extend OpenAI::Internal::Type::Union
2727
+
2728
+ Variants =
2729
+ T.type_alias do
2730
+ T.any(
2731
+ OpenAI::Beta::BetaToolChoiceOptions::TaggedSymbol,
2732
+ OpenAI::Beta::BetaToolChoiceAllowed,
2733
+ OpenAI::Beta::BetaToolChoiceTypes,
2734
+ OpenAI::Beta::BetaToolChoiceFunction,
2735
+ OpenAI::Beta::BetaToolChoiceMcp,
2736
+ OpenAI::Beta::BetaToolChoiceCustom,
2737
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::ToolChoice::BetaSpecificProgrammaticToolCallingParam,
2738
+ OpenAI::Beta::BetaToolChoiceApplyPatch,
2739
+ OpenAI::Beta::BetaToolChoiceShell
2740
+ )
2741
+ end
2742
+
2743
+ class BetaSpecificProgrammaticToolCallingParam < OpenAI::Internal::Type::BaseModel
2744
+ OrHash =
2745
+ T.type_alias do
2746
+ T.any(
2747
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::ToolChoice::BetaSpecificProgrammaticToolCallingParam,
2748
+ OpenAI::Internal::AnyHash
2749
+ )
2750
+ end
2751
+
2752
+ # The tool to call. Always `programmatic_tool_calling`.
2753
+ sig { returns(Symbol) }
2754
+ attr_accessor :type
2755
+
2756
+ sig { params(type: Symbol).returns(T.attached_class) }
2757
+ def self.new(
2758
+ # The tool to call. Always `programmatic_tool_calling`.
2759
+ type: :programmatic_tool_calling
2760
+ )
2761
+ end
2762
+
2763
+ sig { override.returns({ type: Symbol }) }
2764
+ def to_hash
2765
+ end
2766
+ end
2767
+
2768
+ sig do
2769
+ override.returns(
2770
+ T::Array[
2771
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::ToolChoice::Variants
2772
+ ]
2773
+ )
2774
+ end
2775
+ def self.variants
2776
+ end
2777
+ end
2778
+
2779
+ # The truncation strategy to use for the model response.
2780
+ #
2781
+ # - `auto`: If the input to this Response exceeds the model's context window size,
2782
+ # the model will truncate the response to fit the context window by dropping
2783
+ # items from the beginning of the conversation.
2784
+ # - `disabled` (default): If the input size will exceed the context window size
2785
+ # for a model, the request will fail with a 400 error.
2786
+ module Truncation
2787
+ extend OpenAI::Internal::Type::Enum
2788
+
2789
+ TaggedSymbol =
2790
+ T.type_alias do
2791
+ T.all(
2792
+ Symbol,
2793
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Truncation
2794
+ )
2795
+ end
2796
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
2797
+
2798
+ AUTO =
2799
+ T.let(
2800
+ :auto,
2801
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Truncation::TaggedSymbol
2802
+ )
2803
+ DISABLED =
2804
+ T.let(
2805
+ :disabled,
2806
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Truncation::TaggedSymbol
2807
+ )
2808
+
2809
+ sig do
2810
+ override.returns(
2811
+ T::Array[
2812
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Truncation::TaggedSymbol
2813
+ ]
2814
+ )
2815
+ end
2816
+ def self.values
2817
+ end
2818
+ end
2819
+ end
2820
+
2821
+ sig do
2822
+ override.returns(
2823
+ T::Array[OpenAI::Beta::BetaResponsesClientEvent::Variants]
2824
+ )
2825
+ end
2826
+ def self.variants
2827
+ end
2828
+ end
2829
+ end
2830
+ end
2831
+ end