openai 0.98.0 → 0.100.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 (245) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +26 -0
  3. data/README.md +1 -1
  4. data/bedrock.md +17 -1
  5. data/lib/openai/client.rb +9 -0
  6. data/lib/openai/helpers/agents/session_stream.rb +11 -36
  7. data/lib/openai/helpers/agents/tools.rb +34 -4
  8. data/lib/openai/helpers/beta/agents/creation_stream.rb +26 -0
  9. data/lib/openai/helpers/beta/agents/function_tool.rb +11 -4
  10. data/lib/openai/helpers/beta/agents/tool_dispatcher.rb +74 -0
  11. data/lib/openai/helpers/beta/agents/tool_error.rb +28 -0
  12. data/lib/openai/models/admin/organization/usage_audio_speeches_response.rb +140 -5
  13. data/lib/openai/models/admin/organization/usage_audio_transcriptions_response.rb +140 -5
  14. data/lib/openai/models/admin/organization/usage_code_interpreter_sessions_response.rb +140 -5
  15. data/lib/openai/models/admin/organization/usage_completions_params.rb +9 -4
  16. data/lib/openai/models/admin/organization/usage_completions_response.rb +140 -5
  17. data/lib/openai/models/admin/organization/usage_costs_params.rb +16 -4
  18. data/lib/openai/models/admin/organization/usage_costs_response.rb +140 -5
  19. data/lib/openai/models/admin/organization/usage_embeddings_response.rb +140 -5
  20. data/lib/openai/models/admin/organization/usage_file_search_calls_response.rb +140 -5
  21. data/lib/openai/models/admin/organization/usage_images_response.rb +140 -5
  22. data/lib/openai/models/admin/organization/usage_moderations_response.rb +140 -5
  23. data/lib/openai/models/admin/organization/usage_vector_stores_response.rb +140 -5
  24. data/lib/openai/models/admin/organization/usage_web_search_calls_params.rb +9 -4
  25. data/lib/openai/models/admin/organization/usage_web_search_calls_response.rb +140 -5
  26. data/lib/openai/models/all_models.rb +42 -0
  27. data/lib/openai/models/audio/speech_create_params.rb +6 -0
  28. data/lib/openai/models/audio/voice.rb +75 -0
  29. data/lib/openai/models/audio/voice_create_params.rb +217 -0
  30. data/lib/openai/models/beta/agent_create_params.rb +0 -3
  31. data/lib/openai/models/beta/agent_update_params.rb +0 -3
  32. data/lib/openai/models/beta/agents/environments/template_create_params.rb +6 -6
  33. data/lib/openai/models/beta/agents/environments/template_update_params.rb +3 -6
  34. data/lib/openai/models/beta/agents/session_create_params.rb +0 -3
  35. data/lib/openai/models/beta/agents/session_update_params.rb +0 -3
  36. data/lib/openai/models/beta/agents/sessions/turns/item_list_params.rb +79 -0
  37. data/lib/openai/models/beta/beta_response.rb +220 -0
  38. data/lib/openai/models/beta/beta_response_computer_tool_call_output_item.rb +2 -2
  39. data/lib/openai/models/beta/beta_response_error.rb +12 -1
  40. data/lib/openai/models/beta/beta_responses_client_event.rb +220 -0
  41. data/lib/openai/models/beta/beta_responses_server_event.rb +12 -1
  42. data/lib/openai/models/beta/beta_tool.rb +15 -18
  43. data/lib/openai/models/beta/environment_param.rb +6 -6
  44. data/lib/openai/models/beta/response_compact_params.rb +220 -0
  45. data/lib/openai/models/beta/response_create_params.rb +220 -0
  46. data/lib/openai/models/beta/session_turn_error.rb +9 -0
  47. data/lib/openai/models/chat/chat_completion_audio_param.rb +6 -3
  48. data/lib/openai/models/chat/chat_completion_chunk.rb +85 -18
  49. data/lib/openai/models/chat_model.rb +178 -0
  50. data/lib/openai/models/error_object.rb +12 -1
  51. data/lib/openai/models/eval_create_params.rb +1 -1
  52. data/lib/openai/models/eval_create_response.rb +1 -1
  53. data/lib/openai/models/eval_list_response.rb +1 -1
  54. data/lib/openai/models/eval_retrieve_response.rb +1 -1
  55. data/lib/openai/models/eval_update_response.rb +1 -1
  56. data/lib/openai/models/fine_tuning/job_list_params.rb +14 -4
  57. data/lib/openai/models/graders/score_model_grader.rb +2 -2
  58. data/lib/openai/models/image.rb +14 -14
  59. data/lib/openai/models/image_create_variation_params.rb +7 -7
  60. data/lib/openai/models/image_edit_params.rb +88 -96
  61. data/lib/openai/models/image_generate_params.rb +51 -62
  62. data/lib/openai/models/image_model.rb +5 -3
  63. data/lib/openai/models/realtime/realtime_audio_config_output.rb +9 -6
  64. data/lib/openai/models/realtime/realtime_client_event.rb +9 -0
  65. data/lib/openai/models/realtime/realtime_response_create_audio_output.rb +9 -6
  66. data/lib/openai/models/realtime/session_update_event.rb +16 -0
  67. data/lib/openai/models/responses/response_compact_params.rb +220 -0
  68. data/lib/openai/models/responses/response_computer_tool_call_output_item.rb +2 -2
  69. data/lib/openai/models/responses/response_error.rb +12 -1
  70. data/lib/openai/models/responses/responses_server_event.rb +12 -1
  71. data/lib/openai/models/responses/tool.rb +15 -18
  72. data/lib/openai/models/responses_model.rb +42 -0
  73. data/lib/openai/models/video_create_error.rb +12 -1
  74. data/lib/openai/models/webhooks/agent_session_action_required_webhook_event.rb +109 -0
  75. data/lib/openai/models/webhooks/agent_session_created_webhook_event.rb +106 -0
  76. data/lib/openai/models/webhooks/agent_session_failed_webhook_event.rb +86 -0
  77. data/lib/openai/models/webhooks/agent_session_idle_webhook_event.rb +86 -0
  78. data/lib/openai/models/webhooks/agent_session_in_progress_webhook_event.rb +86 -0
  79. data/lib/openai/models/webhooks/unwrap_webhook_event.rb +18 -2
  80. data/lib/openai/models/webhooks/webhook_create_params.rb +5 -0
  81. data/lib/openai/models/webhooks/webhook_test_params.rb +5 -0
  82. data/lib/openai/models/webhooks/webhook_update_params.rb +5 -0
  83. data/lib/openai/providers/bedrock.rb +20 -1
  84. data/lib/openai/resources/admin/organization/usage.rb +15 -6
  85. data/lib/openai/resources/audio/speech.rb +2 -0
  86. data/lib/openai/resources/audio/voices.rb +53 -0
  87. data/lib/openai/resources/audio.rb +5 -0
  88. data/lib/openai/resources/beta/agents/environments/templates.rb +3 -4
  89. data/lib/openai/resources/beta/agents/sessions/turns/items.rb +68 -0
  90. data/lib/openai/resources/beta/agents/sessions/turns.rb +4 -0
  91. data/lib/openai/resources/beta/agents/sessions.rb +22 -2
  92. data/lib/openai/resources/fine_tuning/jobs.rb +7 -2
  93. data/lib/openai/resources/images.rb +79 -109
  94. data/lib/openai/resources/webhooks.rb +1 -1
  95. data/lib/openai/version.rb +1 -1
  96. data/lib/openai.rb +10 -0
  97. data/rbi/openai/helpers/agents.rbi +2 -0
  98. data/rbi/openai/helpers/beta/agents/function_tool.rbi +8 -3
  99. data/rbi/openai/helpers/beta/agents/tool_error.rbi +19 -0
  100. data/rbi/openai/helpers/beta/agents.rbi +12 -0
  101. data/rbi/openai/models/admin/organization/usage_audio_speeches_response.rbi +213 -3
  102. data/rbi/openai/models/admin/organization/usage_audio_transcriptions_response.rbi +213 -3
  103. data/rbi/openai/models/admin/organization/usage_code_interpreter_sessions_response.rbi +213 -3
  104. data/rbi/openai/models/admin/organization/usage_completions_params.rbi +9 -4
  105. data/rbi/openai/models/admin/organization/usage_completions_response.rbi +213 -3
  106. data/rbi/openai/models/admin/organization/usage_costs_params.rbi +16 -4
  107. data/rbi/openai/models/admin/organization/usage_costs_response.rbi +213 -3
  108. data/rbi/openai/models/admin/organization/usage_embeddings_response.rbi +213 -3
  109. data/rbi/openai/models/admin/organization/usage_file_search_calls_response.rbi +213 -3
  110. data/rbi/openai/models/admin/organization/usage_images_response.rbi +213 -3
  111. data/rbi/openai/models/admin/organization/usage_moderations_response.rbi +213 -3
  112. data/rbi/openai/models/admin/organization/usage_vector_stores_response.rbi +213 -3
  113. data/rbi/openai/models/admin/organization/usage_web_search_calls_params.rbi +12 -4
  114. data/rbi/openai/models/admin/organization/usage_web_search_calls_response.rbi +213 -3
  115. data/rbi/openai/models/audio/speech_create_params.rbi +6 -0
  116. data/rbi/openai/models/audio/voice.rbi +111 -0
  117. data/rbi/openai/models/audio/voice_create_params.rbi +321 -0
  118. data/rbi/openai/models/beta/agent_create_params.rbi +0 -3
  119. data/rbi/openai/models/beta/agent_update_params.rbi +0 -3
  120. data/rbi/openai/models/beta/agents/environments/template_create_params.rbi +6 -6
  121. data/rbi/openai/models/beta/agents/environments/template_update_params.rbi +3 -6
  122. data/rbi/openai/models/beta/agents/session_create_params.rbi +0 -3
  123. data/rbi/openai/models/beta/agents/session_update_params.rbi +0 -3
  124. data/rbi/openai/models/beta/agents/sessions/turns/item_list_params.rbi +139 -0
  125. data/rbi/openai/models/beta/beta_response_computer_tool_call_output_item.rbi +2 -2
  126. data/rbi/openai/models/beta/beta_response_error.rbi +12 -0
  127. data/rbi/openai/models/beta/beta_responses_server_event.rbi +12 -0
  128. data/rbi/openai/models/beta/beta_tool.rbi +15 -18
  129. data/rbi/openai/models/beta/environment_param.rbi +6 -6
  130. data/rbi/openai/models/beta/session_turn_error.rbi +18 -0
  131. data/rbi/openai/models/chat/chat_completion_audio_param.rbi +6 -3
  132. data/rbi/openai/models/chat/chat_completion_chunk.rbi +123 -17
  133. data/rbi/openai/models/error_object.rbi +12 -0
  134. data/rbi/openai/models/eval_create_params.rbi +1 -1
  135. data/rbi/openai/models/eval_create_response.rbi +1 -1
  136. data/rbi/openai/models/eval_list_response.rbi +1 -1
  137. data/rbi/openai/models/eval_retrieve_response.rbi +1 -1
  138. data/rbi/openai/models/eval_update_response.rbi +1 -1
  139. data/rbi/openai/models/fine_tuning/job_list_params.rbi +14 -4
  140. data/rbi/openai/models/graders/score_model_grader.rbi +2 -2
  141. data/rbi/openai/models/image.rbi +14 -14
  142. data/rbi/openai/models/image_create_variation_params.rbi +6 -6
  143. data/rbi/openai/models/image_edit_params.rbi +73 -91
  144. data/rbi/openai/models/image_generate_params.rbi +30 -61
  145. data/rbi/openai/models/image_model.rbi +3 -3
  146. data/rbi/openai/models/realtime/realtime_audio_config_output.rbi +9 -6
  147. data/rbi/openai/models/realtime/realtime_response_create_audio_output.rbi +9 -6
  148. data/rbi/openai/models/realtime/session_update_event.rbi +16 -0
  149. data/rbi/openai/models/responses/response_computer_tool_call_output_item.rbi +2 -2
  150. data/rbi/openai/models/responses/response_error.rbi +12 -0
  151. data/rbi/openai/models/responses/responses_server_event.rbi +12 -0
  152. data/rbi/openai/models/responses/tool.rbi +15 -18
  153. data/rbi/openai/models/video_create_error.rbi +12 -0
  154. data/rbi/openai/models/webhooks/agent_session_action_required_webhook_event.rbi +222 -0
  155. data/rbi/openai/models/webhooks/agent_session_created_webhook_event.rbi +202 -0
  156. data/rbi/openai/models/webhooks/agent_session_failed_webhook_event.rbi +151 -0
  157. data/rbi/openai/models/webhooks/agent_session_idle_webhook_event.rbi +151 -0
  158. data/rbi/openai/models/webhooks/agent_session_in_progress_webhook_event.rbi +151 -0
  159. data/rbi/openai/models/webhooks/unwrap_webhook_event.rbi +7 -1
  160. data/rbi/openai/models/webhooks/webhook_create_params.rbi +20 -0
  161. data/rbi/openai/models/webhooks/webhook_test_params.rbi +20 -0
  162. data/rbi/openai/models/webhooks/webhook_update_params.rbi +20 -0
  163. data/rbi/openai/resources/admin/organization/usage.rbi +15 -6
  164. data/rbi/openai/resources/audio/speech.rbi +2 -0
  165. data/rbi/openai/resources/audio/voices.rbi +49 -0
  166. data/rbi/openai/resources/audio.rbi +4 -0
  167. data/rbi/openai/resources/beta/agents/environments/templates.rbi +3 -4
  168. data/rbi/openai/resources/beta/agents/sessions/turns/items.rbi +62 -0
  169. data/rbi/openai/resources/beta/agents/sessions/turns.rbi +3 -0
  170. data/rbi/openai/resources/beta/agents/sessions.rbi +2 -0
  171. data/rbi/openai/resources/fine_tuning/jobs.rbi +7 -2
  172. data/rbi/openai/resources/images.rbi +77 -109
  173. data/rbi/openai/resources/webhooks.rbi +5 -0
  174. data/sig/openai/helpers/agents.rbs +3 -0
  175. data/sig/openai/helpers/beta/agents/function_tool.rbs +5 -2
  176. data/sig/openai/helpers/beta/agents/tool_error.rbs +17 -0
  177. data/sig/openai/helpers/beta/agents.rbs +5 -0
  178. data/sig/openai/models/admin/organization/usage_audio_speeches_response.rbs +107 -5
  179. data/sig/openai/models/admin/organization/usage_audio_transcriptions_response.rbs +107 -5
  180. data/sig/openai/models/admin/organization/usage_code_interpreter_sessions_response.rbs +107 -5
  181. data/sig/openai/models/admin/organization/usage_completions_params.rbs +14 -6
  182. data/sig/openai/models/admin/organization/usage_completions_response.rbs +107 -5
  183. data/sig/openai/models/admin/organization/usage_costs_params.rbs +25 -7
  184. data/sig/openai/models/admin/organization/usage_costs_response.rbs +107 -5
  185. data/sig/openai/models/admin/organization/usage_embeddings_response.rbs +107 -5
  186. data/sig/openai/models/admin/organization/usage_file_search_calls_response.rbs +107 -5
  187. data/sig/openai/models/admin/organization/usage_images_response.rbs +107 -5
  188. data/sig/openai/models/admin/organization/usage_moderations_response.rbs +107 -5
  189. data/sig/openai/models/admin/organization/usage_vector_stores_response.rbs +107 -5
  190. data/sig/openai/models/admin/organization/usage_web_search_calls_params.rbs +19 -7
  191. data/sig/openai/models/admin/organization/usage_web_search_calls_response.rbs +107 -5
  192. data/sig/openai/models/audio/speech_create_params.rbs +4 -0
  193. data/sig/openai/models/audio/voice.rbs +70 -0
  194. data/sig/openai/models/audio/voice_create_params.rbs +203 -0
  195. data/sig/openai/models/beta/agent_create_params.rbs +1 -5
  196. data/sig/openai/models/beta/agent_update_params.rbs +1 -5
  197. data/sig/openai/models/beta/agents/environments/template_create_params.rbs +4 -4
  198. data/sig/openai/models/beta/agents/environments/template_update_params.rbs +2 -4
  199. data/sig/openai/models/beta/agents/session_create_params.rbs +1 -5
  200. data/sig/openai/models/beta/agents/session_update_params.rbs +1 -5
  201. data/sig/openai/models/beta/agents/sessions/turns/item_list_params.rbs +91 -0
  202. data/sig/openai/models/beta/beta_response_computer_tool_call_output_item.rbs +2 -2
  203. data/sig/openai/models/beta/beta_response_error.rbs +10 -0
  204. data/sig/openai/models/beta/beta_responses_server_event.rbs +10 -0
  205. data/sig/openai/models/beta/beta_tool.rbs +11 -15
  206. data/sig/openai/models/beta/environment_param.rbs +4 -4
  207. data/sig/openai/models/beta/session_turn_error.rbs +12 -0
  208. data/sig/openai/models/chat/chat_completion_audio_param.rbs +4 -2
  209. data/sig/openai/models/chat/chat_completion_chunk.rbs +96 -12
  210. data/sig/openai/models/error_object.rbs +10 -0
  211. data/sig/openai/models/eval_create_params.rbs +1 -1
  212. data/sig/openai/models/eval_create_response.rbs +1 -1
  213. data/sig/openai/models/eval_list_response.rbs +1 -1
  214. data/sig/openai/models/eval_retrieve_response.rbs +1 -1
  215. data/sig/openai/models/eval_update_response.rbs +1 -1
  216. data/sig/openai/models/fine_tuning/job_list_params.rbs +14 -4
  217. data/sig/openai/models/graders/score_model_grader.rbs +3 -3
  218. data/sig/openai/models/image.rbs +21 -21
  219. data/sig/openai/models/image_create_variation_params.rbs +4 -4
  220. data/sig/openai/models/image_edit_params.rbs +54 -66
  221. data/sig/openai/models/image_generate_params.rbs +23 -45
  222. data/sig/openai/models/image_model.rbs +6 -6
  223. data/sig/openai/models/realtime/realtime_audio_config_output.rbs +9 -6
  224. data/sig/openai/models/realtime/realtime_response_create_audio_output.rbs +9 -6
  225. data/sig/openai/models/responses/response_computer_tool_call_output_item.rbs +2 -2
  226. data/sig/openai/models/responses/response_error.rbs +10 -0
  227. data/sig/openai/models/responses/responses_server_event.rbs +10 -0
  228. data/sig/openai/models/responses/tool.rbs +11 -15
  229. data/sig/openai/models/video_create_error.rbs +10 -0
  230. data/sig/openai/models/webhooks/agent_session_action_required_webhook_event.rbs +114 -0
  231. data/sig/openai/models/webhooks/agent_session_created_webhook_event.rbs +115 -0
  232. data/sig/openai/models/webhooks/agent_session_failed_webhook_event.rbs +89 -0
  233. data/sig/openai/models/webhooks/agent_session_idle_webhook_event.rbs +89 -0
  234. data/sig/openai/models/webhooks/agent_session_in_progress_webhook_event.rbs +89 -0
  235. data/sig/openai/models/webhooks/unwrap_webhook_event.rbs +6 -1
  236. data/sig/openai/models/webhooks/webhook_create_params.rbs +10 -0
  237. data/sig/openai/models/webhooks/webhook_test_params.rbs +10 -0
  238. data/sig/openai/models/webhooks/webhook_update_params.rbs +10 -0
  239. data/sig/openai/resources/audio/voices.rbs +14 -0
  240. data/sig/openai/resources/audio.rbs +2 -0
  241. data/sig/openai/resources/beta/agents/sessions/turns/items.rbs +24 -0
  242. data/sig/openai/resources/beta/agents/sessions/turns.rbs +2 -0
  243. data/sig/openai/resources/beta/agents/sessions.rbs +1 -0
  244. data/sig/openai/resources/webhooks.rbs +6 -1
  245. metadata +35 -1
@@ -14,7 +14,7 @@ module OpenAI
14
14
  )
15
15
  end
16
16
 
17
- # The unique ID of the computer call tool output.
17
+ # The ID of the computer tool call output.
18
18
  sig { returns(String) }
19
19
  attr_accessor :id
20
20
 
@@ -85,7 +85,7 @@ module OpenAI
85
85
  end
86
86
  def self.new(
87
87
 
88
- # The unique ID of the computer call tool output.
88
+ # The ID of the computer tool call output.
89
89
  id:,
90
90
 
91
91
  # The ID of the computer tool call that produced the output.
@@ -137,6 +137,11 @@ module OpenAI
137
137
  }
138
138
  attr_writer :error_type
139
139
 
140
+ # An opaque target for explicitly continuing this review, or null when
141
+ # unavailable.
142
+ sig { returns(T.nilable(String)) }
143
+ attr_accessor :review_target
144
+
140
145
  # An optional public continuation instruction.
141
146
  sig { returns(T.nilable(OpenAI::Responses::ResponseError::Misalignment::Steer)) }
142
147
  attr_reader :steer
@@ -151,6 +156,8 @@ module OpenAI
151
156
 
152
157
  error_type: T.any(String, OpenAI::Responses::ResponseError::Misalignment::ErrorType::OrSymbol),
153
158
 
159
+ review_target: T.nilable(String),
160
+
154
161
  steer: OpenAI::Responses::ResponseError::Misalignment::Steer::OrHash
155
162
  )
156
163
  .returns(T.attached_class)
@@ -163,6 +170,10 @@ module OpenAI
163
170
  # An optional classification; clients must accept additional values.
164
171
  error_type: nil,
165
172
 
173
+ # An opaque target for explicitly continuing this review, or null when
174
+ # unavailable.
175
+ review_target: nil,
176
+
166
177
  # An optional public continuation instruction.
167
178
 
168
179
  steer: nil
@@ -174,6 +185,7 @@ module OpenAI
174
185
  {
175
186
  detailed_explanation: String,
176
187
  error_type: OpenAI::Responses::ResponseError::Misalignment::ErrorType::Variants,
188
+ review_target: T.nilable(String),
177
189
  steer: OpenAI::Responses::ResponseError::Misalignment::Steer
178
190
  }
179
191
  )
@@ -4614,6 +4614,11 @@ module OpenAI
4614
4614
  }
4615
4615
  attr_writer :error_type
4616
4616
 
4617
+ # An opaque target for explicitly continuing this review, or null when
4618
+ # unavailable.
4619
+ sig { returns(T.nilable(String)) }
4620
+ attr_accessor :review_target
4621
+
4617
4622
  # An optional public continuation instruction.
4618
4623
  sig {
4619
4624
  returns(T.nilable(OpenAI::Responses::ResponsesServerEvent::ResponseWsError::Error::Misalignment::Steer))
@@ -4638,6 +4643,8 @@ module OpenAI
4638
4643
  OpenAI::Responses::ResponsesServerEvent::ResponseWsError::Error::Misalignment::ErrorType::OrSymbol
4639
4644
  ),
4640
4645
 
4646
+ review_target: T.nilable(String),
4647
+
4641
4648
  steer: OpenAI::Responses::ResponsesServerEvent::ResponseWsError::Error::Misalignment::Steer::OrHash
4642
4649
  )
4643
4650
  .returns(T.attached_class)
@@ -4650,6 +4657,10 @@ module OpenAI
4650
4657
  # An optional classification; clients must accept additional values.
4651
4658
  error_type: nil,
4652
4659
 
4660
+ # An opaque target for explicitly continuing this review, or null when
4661
+ # unavailable.
4662
+ review_target: nil,
4663
+
4653
4664
  # An optional public continuation instruction.
4654
4665
 
4655
4666
  steer: nil
@@ -4663,6 +4674,7 @@ module OpenAI
4663
4674
  error_type: T.nilable(
4664
4675
  OpenAI::Responses::ResponsesServerEvent::ResponseWsError::Error::Misalignment::ErrorType::Variants
4665
4676
  ),
4677
+ review_target: T.nilable(String),
4666
4678
  steer: T.nilable(
4667
4679
  OpenAI::Responses::ResponsesServerEvent::ResponseWsError::Error::Misalignment::Steer
4668
4680
  )
@@ -977,9 +977,10 @@ module OpenAI
977
977
  sig { params(background: OpenAI::Responses::Tool::ImageGeneration::Background::OrSymbol).void }
978
978
  attr_writer :background
979
979
 
980
- # Controls fidelity to the original input image(s). This parameter is supported
981
- # for GPT image models that support input fidelity. `gpt-image-2` and
982
- # `gpt-image-2-2026-04-21` ignore this parameter.
980
+ # Control how much effort the model will exert to match the style and features,
981
+ # especially facial features, of input images. Supports `high` and `low` on
982
+ # `gpt-image-1` and `gpt-image-1.5`; `gpt-image-1-mini` supports only `low`. For
983
+ # `gpt-image-2`, omit this parameter. Defaults to `low` on supported models.
983
984
  sig { returns(T.nilable(OpenAI::Responses::Tool::ImageGeneration::InputFidelity::OrSymbol)) }
984
985
  attr_accessor :input_fidelity
985
986
 
@@ -1051,9 +1052,7 @@ module OpenAI
1051
1052
  # the maximum supported resolution is `3840x2160`. The requested size must also
1052
1053
  # satisfy the model's current pixel and edge limits. The standard sizes
1053
1054
  # `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models;
1054
- # `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use
1055
- # one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of
1056
- # `1024x1024`, `1792x1024`, or `1024x1792`.
1055
+ # `auto` is supported for models that allow automatic sizing.
1057
1056
  sig { returns(T.nilable(T.any(String, OpenAI::Responses::Tool::ImageGeneration::Size::OrSymbol))) }
1058
1057
  attr_reader :size
1059
1058
 
@@ -1106,9 +1105,10 @@ module OpenAI
1106
1105
  # set the output format to `png` or `webp`.
1107
1106
  background: nil,
1108
1107
 
1109
- # Controls fidelity to the original input image(s). This parameter is supported
1110
- # for GPT image models that support input fidelity. `gpt-image-2` and
1111
- # `gpt-image-2-2026-04-21` ignore this parameter.
1108
+ # Control how much effort the model will exert to match the style and features,
1109
+ # especially facial features, of input images. Supports `high` and `low` on
1110
+ # `gpt-image-1` and `gpt-image-1.5`; `gpt-image-1-mini` supports only `low`. For
1111
+ # `gpt-image-2`, omit this parameter. Defaults to `low` on supported models.
1112
1112
  input_fidelity: nil,
1113
1113
 
1114
1114
  # Optional mask for inpainting. Contains `image_url` (string, optional) and
@@ -1151,9 +1151,7 @@ module OpenAI
1151
1151
  # the maximum supported resolution is `3840x2160`. The requested size must also
1152
1152
  # satisfy the model's current pixel and edge limits. The standard sizes
1153
1153
  # `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models;
1154
- # `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use
1155
- # one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of
1156
- # `1024x1024`, `1792x1024`, or `1024x1792`.
1154
+ # `auto` is supported for models that allow automatic sizing.
1157
1155
  size: nil,
1158
1156
 
1159
1157
  # The type of the image generation tool. Always `image_generation`.
@@ -1223,9 +1221,10 @@ module OpenAI
1223
1221
  end
1224
1222
  end
1225
1223
 
1226
- # Controls fidelity to the original input image(s). This parameter is supported
1227
- # for GPT image models that support input fidelity. `gpt-image-2` and
1228
- # `gpt-image-2-2026-04-21` ignore this parameter.
1224
+ # Control how much effort the model will exert to match the style and features,
1225
+ # especially facial features, of input images. Supports `high` and `low` on
1226
+ # `gpt-image-1` and `gpt-image-1.5`; `gpt-image-1-mini` supports only `low`. For
1227
+ # `gpt-image-2`, omit this parameter. Defaults to `low` on supported models.
1229
1228
  module InputFidelity
1230
1229
  extend OpenAI::Internal::Type::Enum
1231
1230
 
@@ -1408,9 +1407,7 @@ module OpenAI
1408
1407
  # the maximum supported resolution is `3840x2160`. The requested size must also
1409
1408
  # satisfy the model's current pixel and edge limits. The standard sizes
1410
1409
  # `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models;
1411
- # `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use
1412
- # one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of
1413
- # `1024x1024`, `1792x1024`, or `1024x1792`.
1410
+ # `auto` is supported for models that allow automatic sizing.
1414
1411
  module Size
1415
1412
  extend OpenAI::Internal::Type::Union
1416
1413
 
@@ -99,6 +99,11 @@ module OpenAI
99
99
  sig { params(error_type: T.any(String, OpenAI::VideoCreateError::Misalignment::ErrorType::OrSymbol)).void }
100
100
  attr_writer :error_type
101
101
 
102
+ # An opaque target for explicitly continuing this review, or null when
103
+ # unavailable.
104
+ sig { returns(T.nilable(String)) }
105
+ attr_accessor :review_target
106
+
102
107
  # An optional public continuation instruction.
103
108
  sig { returns(T.nilable(OpenAI::VideoCreateError::Misalignment::Steer)) }
104
109
  attr_reader :steer
@@ -113,6 +118,8 @@ module OpenAI
113
118
 
114
119
  error_type: T.any(String, OpenAI::VideoCreateError::Misalignment::ErrorType::OrSymbol),
115
120
 
121
+ review_target: T.nilable(String),
122
+
116
123
  steer: OpenAI::VideoCreateError::Misalignment::Steer::OrHash
117
124
  )
118
125
  .returns(T.attached_class)
@@ -125,6 +132,10 @@ module OpenAI
125
132
  # An optional classification; clients must accept additional values.
126
133
  error_type: nil,
127
134
 
135
+ # An opaque target for explicitly continuing this review, or null when
136
+ # unavailable.
137
+ review_target: nil,
138
+
128
139
  # An optional public continuation instruction.
129
140
 
130
141
  steer: nil
@@ -136,6 +147,7 @@ module OpenAI
136
147
  {
137
148
  detailed_explanation: String,
138
149
  error_type: OpenAI::VideoCreateError::Misalignment::ErrorType::Variants,
150
+ review_target: T.nilable(String),
139
151
  steer: OpenAI::VideoCreateError::Misalignment::Steer
140
152
  }
141
153
  )
@@ -0,0 +1,222 @@
1
+ # typed: strong
2
+
3
+ module OpenAI
4
+ module Models
5
+
6
+ module Webhooks
7
+
8
+ class AgentSessionActionRequiredWebhookEvent < OpenAI::Internal::Type::BaseModel
9
+
10
+ OrHash = T.type_alias do
11
+ T.any(
12
+ OpenAI::Webhooks::AgentSessionActionRequiredWebhookEvent,
13
+ OpenAI::Internal::AnyHash
14
+ )
15
+ end
16
+
17
+ # The unique ID of the event.
18
+ sig { returns(String) }
19
+ attr_accessor :id
20
+
21
+ # The Unix timestamp, in seconds, when the event was created.
22
+ sig { returns(Integer) }
23
+ attr_accessor :created_at
24
+
25
+ sig { returns(OpenAI::Webhooks::AgentSessionActionRequiredWebhookEvent::Data) }
26
+ attr_reader :data
27
+
28
+ sig { params(data: OpenAI::Webhooks::AgentSessionActionRequiredWebhookEvent::Data::OrHash).void }
29
+ attr_writer :data
30
+
31
+ # The object type. Always `event`.
32
+ sig { returns(Symbol) }
33
+ attr_accessor :object
34
+
35
+ # The event type. Always `agent.session.action_required`.
36
+ sig { returns(Symbol) }
37
+ attr_accessor :type
38
+
39
+ # Sent when an agent session requires an action. Retrieve the session for action
40
+ # details.
41
+ sig do
42
+ params(
43
+
44
+ id: String,
45
+
46
+ created_at: Integer,
47
+
48
+ data: OpenAI::Webhooks::AgentSessionActionRequiredWebhookEvent::Data::OrHash,
49
+
50
+ object: Symbol,
51
+
52
+ type: Symbol
53
+ )
54
+ .returns(T.attached_class)
55
+ end
56
+ def self.new(
57
+
58
+ # The unique ID of the event.
59
+ id:,
60
+
61
+ # The Unix timestamp, in seconds, when the event was created.
62
+ created_at:,
63
+
64
+ data:,
65
+
66
+ # The object type. Always `event`.
67
+ object: :event,
68
+
69
+ # The event type. Always `agent.session.action_required`.
70
+
71
+ type: :"agent.session.action_required"
72
+ )
73
+ end
74
+
75
+ sig do
76
+ override.returns(
77
+ {
78
+ id: String,
79
+ created_at: Integer,
80
+ data: OpenAI::Webhooks::AgentSessionActionRequiredWebhookEvent::Data,
81
+ object: Symbol,
82
+ type: Symbol
83
+ }
84
+ )
85
+ end
86
+ def to_hash
87
+ end
88
+
89
+ class Data < OpenAI::Internal::Type::BaseModel
90
+ OrHash = T.type_alias do
91
+ T.any(
92
+ OpenAI::Webhooks::AgentSessionActionRequiredWebhookEvent::Data,
93
+ OpenAI::Internal::AnyHash
94
+ )
95
+ end
96
+
97
+ # The ID of the session.
98
+ sig { returns(String) }
99
+ attr_accessor :id
100
+
101
+ # The action type. Retrieve the session for action details.
102
+ sig { returns(OpenAI::Webhooks::AgentSessionActionRequiredWebhookEvent::Data::RequiredAction) }
103
+ attr_reader :required_action
104
+
105
+ sig {
106
+ params(
107
+ required_action: OpenAI::Webhooks::AgentSessionActionRequiredWebhookEvent::Data::RequiredAction::OrHash
108
+ )
109
+ .void
110
+ }
111
+ attr_writer :required_action
112
+
113
+ sig do
114
+ params(
115
+
116
+ id: String,
117
+
118
+ required_action: OpenAI::Webhooks::AgentSessionActionRequiredWebhookEvent::Data::RequiredAction::OrHash
119
+ )
120
+ .returns(T.attached_class)
121
+ end
122
+ def self.new(
123
+
124
+ # The ID of the session.
125
+ id:,
126
+
127
+ # The action type. Retrieve the session for action details.
128
+
129
+ required_action:
130
+ )
131
+ end
132
+
133
+ sig do
134
+ override.returns(
135
+ {
136
+ id: String,
137
+ required_action: OpenAI::Webhooks::AgentSessionActionRequiredWebhookEvent::Data::RequiredAction
138
+ }
139
+ )
140
+ end
141
+ def to_hash
142
+ end
143
+
144
+ class RequiredAction < OpenAI::Internal::Type::BaseModel
145
+ OrHash = T.type_alias do
146
+ T.any(
147
+ OpenAI::Webhooks::AgentSessionActionRequiredWebhookEvent::Data::RequiredAction,
148
+ OpenAI::Internal::AnyHash
149
+ )
150
+ end
151
+
152
+ sig {
153
+ returns(
154
+ OpenAI::Webhooks::AgentSessionActionRequiredWebhookEvent::Data::RequiredAction::Type::TaggedSymbol
155
+ )
156
+ }
157
+ attr_accessor :type
158
+
159
+ # The action type. Retrieve the session for action details.
160
+ sig do
161
+ params(
162
+
163
+ type: OpenAI::Webhooks::AgentSessionActionRequiredWebhookEvent::Data::RequiredAction::Type::OrSymbol
164
+ )
165
+ .returns(T.attached_class)
166
+ end
167
+ def self.new(
168
+
169
+ type:
170
+ )
171
+ end
172
+
173
+ sig do
174
+ override.returns(
175
+ {
176
+ type: OpenAI::Webhooks::AgentSessionActionRequiredWebhookEvent::Data::RequiredAction::Type::TaggedSymbol
177
+ }
178
+ )
179
+ end
180
+ def to_hash
181
+ end
182
+
183
+ module Type
184
+ extend OpenAI::Internal::Type::Enum
185
+
186
+ TaggedSymbol = T.type_alias {
187
+ T.all(Symbol, OpenAI::Webhooks::AgentSessionActionRequiredWebhookEvent::Data::RequiredAction::Type)
188
+ }
189
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
190
+
191
+ COMPUTER_USE_APPROVAL_REQUEST = T.let(
192
+ :computer_use_approval_request,
193
+ OpenAI::Webhooks::AgentSessionActionRequiredWebhookEvent::Data::RequiredAction::Type::TaggedSymbol
194
+ )
195
+ FUNCTION_CALL = T.let(
196
+ :function_call,
197
+ OpenAI::Webhooks::AgentSessionActionRequiredWebhookEvent::Data::RequiredAction::Type::TaggedSymbol
198
+ )
199
+ ENVIRONMENT_CONNECTION = T.let(
200
+ :environment_connection,
201
+ OpenAI::Webhooks::AgentSessionActionRequiredWebhookEvent::Data::RequiredAction::Type::TaggedSymbol
202
+ )
203
+
204
+ sig {
205
+ override.returns(
206
+ T::Array[
207
+ OpenAI::Webhooks::AgentSessionActionRequiredWebhookEvent::Data::RequiredAction::Type::TaggedSymbol
208
+ ]
209
+ )
210
+ }
211
+ def self.values
212
+ end
213
+ end
214
+ end
215
+ end
216
+
217
+ end
218
+
219
+ end
220
+
221
+ end
222
+ end
@@ -0,0 +1,202 @@
1
+ # typed: strong
2
+
3
+ module OpenAI
4
+ module Models
5
+
6
+ module Webhooks
7
+
8
+ class AgentSessionCreatedWebhookEvent < OpenAI::Internal::Type::BaseModel
9
+
10
+ OrHash = T.type_alias do
11
+ T.any(
12
+ OpenAI::Webhooks::AgentSessionCreatedWebhookEvent,
13
+ OpenAI::Internal::AnyHash
14
+ )
15
+ end
16
+
17
+ # The unique ID of the event.
18
+ sig { returns(String) }
19
+ attr_accessor :id
20
+
21
+ # The Unix timestamp, in seconds, when the event was created.
22
+ sig { returns(Integer) }
23
+ attr_accessor :created_at
24
+
25
+ sig { returns(OpenAI::Webhooks::AgentSessionCreatedWebhookEvent::Data) }
26
+ attr_reader :data
27
+
28
+ sig { params(data: OpenAI::Webhooks::AgentSessionCreatedWebhookEvent::Data::OrHash).void }
29
+ attr_writer :data
30
+
31
+ # The object type. Always `event`.
32
+ sig { returns(Symbol) }
33
+ attr_accessor :object
34
+
35
+ # The event type. Always `agent.session.created`.
36
+ sig { returns(Symbol) }
37
+ attr_accessor :type
38
+
39
+ # Sent when an agent session is created.
40
+ sig do
41
+ params(
42
+
43
+ id: String,
44
+
45
+ created_at: Integer,
46
+
47
+ data: OpenAI::Webhooks::AgentSessionCreatedWebhookEvent::Data::OrHash,
48
+
49
+ object: Symbol,
50
+
51
+ type: Symbol
52
+ )
53
+ .returns(T.attached_class)
54
+ end
55
+ def self.new(
56
+
57
+ # The unique ID of the event.
58
+ id:,
59
+
60
+ # The Unix timestamp, in seconds, when the event was created.
61
+ created_at:,
62
+
63
+ data:,
64
+
65
+ # The object type. Always `event`.
66
+ object: :event,
67
+
68
+ # The event type. Always `agent.session.created`.
69
+
70
+ type: :"agent.session.created"
71
+ )
72
+ end
73
+
74
+ sig do
75
+ override.returns(
76
+ {
77
+ id: String,
78
+ created_at: Integer,
79
+ data: OpenAI::Webhooks::AgentSessionCreatedWebhookEvent::Data,
80
+ object: Symbol,
81
+ type: Symbol
82
+ }
83
+ )
84
+ end
85
+ def to_hash
86
+ end
87
+
88
+ class Data < OpenAI::Internal::Type::BaseModel
89
+ OrHash = T.type_alias do
90
+ T.any(
91
+ OpenAI::Webhooks::AgentSessionCreatedWebhookEvent::Data,
92
+ OpenAI::Internal::AnyHash
93
+ )
94
+ end
95
+
96
+ # The ID of the session.
97
+ sig { returns(String) }
98
+ attr_accessor :id
99
+
100
+ # The environment type: `none`, `openai_hosted`, or `self_hosted`.
101
+ sig { returns(String) }
102
+ attr_accessor :environment_type
103
+
104
+ sig { returns(T.nilable(OpenAI::Webhooks::AgentSessionCreatedWebhookEvent::Data::Connect)) }
105
+ attr_reader :connect
106
+
107
+ sig { params(connect: OpenAI::Webhooks::AgentSessionCreatedWebhookEvent::Data::Connect::OrHash).void }
108
+ attr_writer :connect
109
+
110
+ # The ID of the environment, when one exists.
111
+ sig { returns(T.nilable(String)) }
112
+ attr_reader :environment_id
113
+
114
+ sig { params(environment_id: String).void }
115
+ attr_writer :environment_id
116
+
117
+ sig do
118
+ params(
119
+
120
+ id: String,
121
+
122
+ environment_type: String,
123
+
124
+ connect: OpenAI::Webhooks::AgentSessionCreatedWebhookEvent::Data::Connect::OrHash,
125
+
126
+ environment_id: String
127
+ )
128
+ .returns(T.attached_class)
129
+ end
130
+ def self.new(
131
+
132
+ # The ID of the session.
133
+ id:,
134
+
135
+ # The environment type: `none`, `openai_hosted`, or `self_hosted`.
136
+ environment_type:,
137
+
138
+ connect: nil,
139
+
140
+ # The ID of the environment, when one exists.
141
+
142
+ environment_id: nil
143
+ )
144
+ end
145
+
146
+ sig do
147
+ override.returns(
148
+ {
149
+ id: String,
150
+ environment_type: String,
151
+ connect: OpenAI::Webhooks::AgentSessionCreatedWebhookEvent::Data::Connect,
152
+ environment_id: String
153
+ }
154
+ )
155
+ end
156
+ def to_hash
157
+ end
158
+
159
+ class Connect < OpenAI::Internal::Type::BaseModel
160
+ OrHash = T.type_alias do
161
+ T.any(
162
+ OpenAI::Webhooks::AgentSessionCreatedWebhookEvent::Data::Connect,
163
+ OpenAI::Internal::AnyHash
164
+ )
165
+ end
166
+
167
+ # The URL used to connect the self-hosted environment.
168
+ sig { returns(String) }
169
+ attr_accessor :remote_url
170
+
171
+ sig do
172
+ params(
173
+
174
+ remote_url: String
175
+ )
176
+ .returns(T.attached_class)
177
+ end
178
+ def self.new(
179
+
180
+ # The URL used to connect the self-hosted environment.
181
+
182
+ remote_url:
183
+ )
184
+ end
185
+
186
+ sig do
187
+ override.returns(
188
+ {remote_url: String}
189
+ )
190
+ end
191
+ def to_hash
192
+ end
193
+
194
+ end
195
+ end
196
+
197
+ end
198
+
199
+ end
200
+
201
+ end
202
+ end