openai 0.114.0 → 0.115.1

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 (226) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +43 -0
  3. data/README.md +17 -2
  4. data/docs/architecture/security-model.md +11 -16
  5. data/examples/responses/websocket_workflows.rb +78 -3
  6. data/lib/openai/helpers/chat/tool_runner.rb +1 -1
  7. data/lib/openai/helpers/live/websocket.rb +31 -0
  8. data/lib/openai/helpers/realtime/connection.rb +33 -0
  9. data/lib/openai/helpers/realtime/connection_manager.rb +1 -0
  10. data/lib/openai/helpers/realtime/conversation_item_variant_resolver.rb +5 -0
  11. data/lib/openai/helpers/realtime/recovery.rb +5 -1
  12. data/lib/openai/helpers/realtime/translation.rb +5 -0
  13. data/lib/openai/helpers/realtime/transports/async_websocket.rb +19 -0
  14. data/lib/openai/helpers/responses_websocket/connection.rb +53 -15
  15. data/lib/openai/helpers/responses_websocket/connection_manager.rb +1 -0
  16. data/lib/openai/helpers/responses_websocket/connection_resources.rb +1 -1
  17. data/lib/openai/helpers/structured_output/response_parser.rb +1 -0
  18. data/lib/openai/helpers/structured_output.rb +58 -0
  19. data/lib/openai/helpers/websocket/connection_manager.rb +11 -0
  20. data/lib/openai/helpers/websocket/resource.rb +1 -0
  21. data/lib/openai/helpers/websocket/typed_connection.rb +1 -0
  22. data/lib/openai/internal/type/array_of.rb +1 -1
  23. data/lib/openai/internal/type/hash_of.rb +1 -1
  24. data/lib/openai/internal/type/request_parameters.rb +2 -1
  25. data/lib/openai/internal/type/union.rb +18 -6
  26. data/lib/openai/models/admin/organization/external_key.rb +169 -0
  27. data/lib/openai/models/admin/organization/external_key_create_params.rb +311 -0
  28. data/lib/openai/models/admin/organization/external_key_delete_params.rb +24 -0
  29. data/lib/openai/models/admin/organization/external_key_list_params.rb +69 -0
  30. data/lib/openai/models/admin/organization/external_key_retrieve_params.rb +24 -0
  31. data/lib/openai/models/admin/organization/external_key_validate_params.rb +24 -0
  32. data/lib/openai/models/admin/organization/external_key_validate_response.rb +20 -0
  33. data/lib/openai/models/audio/speech_model.rb +12 -0
  34. data/lib/openai/models/audio_model.rb +15 -0
  35. data/lib/openai/models/beta/agent.rb +49 -1
  36. data/lib/openai/models/beta/agent_create_params.rb +51 -1
  37. data/lib/openai/models/beta/agent_session.rb +75 -2
  38. data/lib/openai/models/beta/agent_update_params.rb +62 -1
  39. data/lib/openai/models/beta/agents/session_create_params.rb +94 -2
  40. data/lib/openai/models/beta/agents/session_list_params.rb +16 -1
  41. data/lib/openai/models/beta/agents/session_update_params.rb +50 -5
  42. data/lib/openai/models/beta/assistant_update_params.rb +18 -0
  43. data/lib/openai/models/beta/beta_response.rb +224 -1
  44. data/lib/openai/models/beta/beta_response_configuration_update_item.rb +64 -3
  45. data/lib/openai/models/beta/beta_response_configuration_update_item_param.rb +64 -4
  46. data/lib/openai/models/beta/beta_response_input_item.rb +2 -3
  47. data/lib/openai/models/beta/beta_response_item.rb +2 -2
  48. data/lib/openai/models/beta/beta_response_tool_search_output_item_param.rb +6 -6
  49. data/lib/openai/models/beta/beta_responses_client_event.rb +20 -1
  50. data/lib/openai/models/beta/beta_tool.rb +6 -6
  51. data/lib/openai/models/beta/response_compact_params.rb +6 -0
  52. data/lib/openai/models/beta/response_create_params.rb +6 -0
  53. data/lib/openai/models/chat_model.rb +6 -0
  54. data/lib/openai/models/conversations/conversation_item.rb +2 -2
  55. data/lib/openai/models/image_edit_params.rb +46 -25
  56. data/lib/openai/models/live/fork_server_event.rb +43 -3
  57. data/lib/openai/models/live/server_event.rb +43 -3
  58. data/lib/openai/models/live/sideband_client_event.rb +40 -1
  59. data/lib/openai/models/live/sideband_server_event.rb +43 -3
  60. data/lib/openai/models/realtime/audio_transcription.rb +15 -0
  61. data/lib/openai/models/realtime/conversation_item_added.rb +2 -2
  62. data/lib/openai/models/realtime/conversation_item_create_event.rb +2 -2
  63. data/lib/openai/models/realtime/conversation_item_created_event.rb +2 -2
  64. data/lib/openai/models/realtime/conversation_item_done.rb +2 -2
  65. data/lib/openai/models/realtime/realtime_response.rb +2 -2
  66. data/lib/openai/models/realtime/realtime_response_create_params.rb +2 -2
  67. data/lib/openai/models/realtime/realtime_server_event.rb +2 -2
  68. data/lib/openai/models/realtime/realtime_session.rb +18 -0
  69. data/lib/openai/models/realtime/realtime_session_create_request.rb +18 -0
  70. data/lib/openai/models/realtime/realtime_session_create_response.rb +18 -0
  71. data/lib/openai/models/realtime/response_output_item_added_event.rb +2 -2
  72. data/lib/openai/models/realtime/response_output_item_done_event.rb +2 -2
  73. data/lib/openai/models/responses/response.rb +221 -1
  74. data/lib/openai/models/responses/response_compact_params.rb +6 -0
  75. data/lib/openai/models/responses/response_configuration_update_item.rb +50 -3
  76. data/lib/openai/models/responses/response_configuration_update_item_param.rb +50 -4
  77. data/lib/openai/models/responses/response_input_item.rb +2 -3
  78. data/lib/openai/models/responses/response_item.rb +2 -2
  79. data/lib/openai/models/responses/response_tool_search_output_item_param.rb +6 -6
  80. data/lib/openai/models/responses/responses_client_event.rb +14 -1
  81. data/lib/openai/models/responses/tool.rb +6 -6
  82. data/lib/openai/net_http_client.rb +6 -0
  83. data/lib/openai/providers/vertex.rb +0 -10
  84. data/lib/openai/resources/admin/organization/external_keys.rb +132 -0
  85. data/lib/openai/resources/admin/organization.rb +4 -0
  86. data/lib/openai/resources/audio/speech.rb +8 -0
  87. data/lib/openai/resources/audio/translations.rb +8 -0
  88. data/lib/openai/resources/beta/agents/sessions.rb +22 -6
  89. data/lib/openai/resources/beta/agents.rb +17 -2
  90. data/lib/openai/resources/images.rb +36 -18
  91. data/lib/openai/version.rb +1 -1
  92. data/lib/openai.rb +8 -0
  93. data/rbi/openai/helpers/live/websocket.rbi +1 -12
  94. data/rbi/openai/helpers/realtime/connection.rbi +5 -0
  95. data/rbi/openai/helpers/realtime/transports/async_websocket.rbi +5 -0
  96. data/rbi/openai/helpers/responses_websocket/connection.rbi +7 -2
  97. data/rbi/openai/helpers/structured_output.rbi +10 -0
  98. data/rbi/openai/internal/type/array_of.rbi +1 -1
  99. data/rbi/openai/internal/type/hash_of.rbi +1 -1
  100. data/rbi/openai/internal/type/union.rbi +5 -0
  101. data/rbi/openai/models/admin/organization/external_key.rbi +301 -0
  102. data/rbi/openai/models/admin/organization/external_key_create_params.rbi +532 -0
  103. data/rbi/openai/models/admin/organization/external_key_delete_params.rbi +57 -0
  104. data/rbi/openai/models/admin/organization/external_key_list_params.rbi +129 -0
  105. data/rbi/openai/models/admin/organization/external_key_retrieve_params.rbi +57 -0
  106. data/rbi/openai/models/admin/organization/external_key_validate_params.rbi +57 -0
  107. data/rbi/openai/models/admin/organization/external_key_validate_response.rbi +50 -0
  108. data/rbi/openai/models/beta/agent.rbi +103 -1
  109. data/rbi/openai/models/beta/agent_create_params.rbi +109 -0
  110. data/rbi/openai/models/beta/agent_session.rbi +136 -3
  111. data/rbi/openai/models/beta/agent_update_params.rbi +120 -0
  112. data/rbi/openai/models/beta/agents/session_create_params.rbi +153 -0
  113. data/rbi/openai/models/beta/agents/session_list_params.rbi +19 -0
  114. data/rbi/openai/models/beta/agents/session_update_params.rbi +94 -6
  115. data/rbi/openai/models/beta/beta_response.rbi +394 -0
  116. data/rbi/openai/models/beta/beta_response_configuration_update_item.rbi +113 -3
  117. data/rbi/openai/models/beta/beta_response_configuration_update_item_param.rbi +125 -4
  118. data/rbi/openai/models/beta/beta_response_tool_search_output_item_param.rbi +6 -6
  119. data/rbi/openai/models/beta/beta_responses_client_event.rbi +17 -0
  120. data/rbi/openai/models/beta/beta_tool.rbi +6 -6
  121. data/rbi/openai/models/decision_create_params.rbi +4 -1
  122. data/rbi/openai/models/image_edit_params.rbi +49 -24
  123. data/rbi/openai/models/live/fork_server_event.rbi +65 -1
  124. data/rbi/openai/models/live/server_event.rbi +65 -1
  125. data/rbi/openai/models/live/sideband_client_event.rbi +60 -0
  126. data/rbi/openai/models/live/sideband_server_event.rbi +65 -1
  127. data/rbi/openai/models/realtime/conversation_item_added.rbi +6 -3
  128. data/rbi/openai/models/realtime/conversation_item_create_event.rbi +6 -3
  129. data/rbi/openai/models/realtime/conversation_item_created_event.rbi +6 -3
  130. data/rbi/openai/models/realtime/conversation_item_done.rbi +6 -3
  131. data/rbi/openai/models/realtime/realtime_response.rbi +8 -4
  132. data/rbi/openai/models/realtime/realtime_response_create_params.rbi +8 -4
  133. data/rbi/openai/models/realtime/realtime_server_event.rbi +6 -3
  134. data/rbi/openai/models/realtime/response_output_item_added_event.rbi +6 -3
  135. data/rbi/openai/models/realtime/response_output_item_done_event.rbi +6 -3
  136. data/rbi/openai/models/responses/response.rbi +394 -0
  137. data/rbi/openai/models/responses/response_configuration_update_item.rbi +76 -3
  138. data/rbi/openai/models/responses/response_configuration_update_item_param.rbi +74 -4
  139. data/rbi/openai/models/responses/response_tool_search_output_item_param.rbi +6 -6
  140. data/rbi/openai/models/responses/responses_client_event.rbi +17 -0
  141. data/rbi/openai/models/responses/tool.rbi +6 -6
  142. data/rbi/openai/net_http_client.rbi +5 -0
  143. data/rbi/openai/resources/admin/organization/external_keys.rbi +86 -0
  144. data/rbi/openai/resources/admin/organization.rbi +3 -0
  145. data/rbi/openai/resources/audio/speech.rbi +8 -0
  146. data/rbi/openai/resources/audio/translations.rbi +6 -0
  147. data/rbi/openai/resources/beta/agents/sessions.rbi +18 -2
  148. data/rbi/openai/resources/beta/agents.rbi +15 -0
  149. data/rbi/openai/resources/images.rbi +34 -16
  150. data/rbi/openai/resources/responses.rbi +2 -0
  151. data/realtime.md +6 -0
  152. data/responses-websocket.md +53 -0
  153. data/sig/openai/helpers/live/websocket.rbs +1 -9
  154. data/sig/openai/helpers/realtime/connection.rbs +3 -0
  155. data/sig/openai/helpers/realtime/transports/async_websocket.rbs +3 -0
  156. data/sig/openai/helpers/responses_websocket/connection.rbs +7 -1
  157. data/sig/openai/helpers/structured_output.rbs +9 -0
  158. data/sig/openai/internal/type/union.rbs +4 -0
  159. data/sig/openai/models/admin/organization/external_key.rbs +186 -0
  160. data/sig/openai/models/admin/organization/external_key_create_params.rbs +423 -0
  161. data/sig/openai/models/admin/organization/external_key_delete_params.rbs +27 -0
  162. data/sig/openai/models/admin/organization/external_key_list_params.rbs +81 -0
  163. data/sig/openai/models/admin/organization/external_key_retrieve_params.rbs +27 -0
  164. data/sig/openai/models/admin/organization/external_key_validate_params.rbs +27 -0
  165. data/sig/openai/models/admin/organization/external_key_validate_response.rbs +17 -0
  166. data/sig/openai/models/admin/organization/external_storage_create_params.rbs +72 -2
  167. data/sig/openai/models/audio/speech_create_params.rbs +15 -2
  168. data/sig/openai/models/audio/transcription_create_params.rbs +30 -2
  169. data/sig/openai/models/audio/voice_create_params.rbs +47 -2
  170. data/sig/openai/models/beta/agent.rbs +54 -2
  171. data/sig/openai/models/beta/agent_create_params.rbs +54 -0
  172. data/sig/openai/models/beta/agent_session.rbs +82 -3
  173. data/sig/openai/models/beta/agent_update_params.rbs +64 -0
  174. data/sig/openai/models/beta/agents/session_create_params.rbs +91 -0
  175. data/sig/openai/models/beta/agents/session_list_params.rbs +20 -0
  176. data/sig/openai/models/beta/agents/session_update_params.rbs +48 -6
  177. data/sig/openai/models/beta/assistant_create_params.rbs +5 -2
  178. data/sig/openai/models/beta/beta_response.rbs +223 -0
  179. data/sig/openai/models/beta/beta_response_configuration_update_item.rbs +58 -2
  180. data/sig/openai/models/beta/beta_response_configuration_update_item_param.rbs +58 -2
  181. data/sig/openai/models/beta/beta_response_tool_search_output_item_param.rbs +4 -4
  182. data/sig/openai/models/beta/beta_responses_client_event.rbs +17 -0
  183. data/sig/openai/models/beta/beta_tool.rbs +4 -4
  184. data/sig/openai/models/beta/response_create_params.rbs +5 -2
  185. data/sig/openai/models/beta/responses/input_token_count_params.rbs +10 -2
  186. data/sig/openai/models/beta/thread_create_and_run_params.rbs +11 -5
  187. data/sig/openai/models/beta/thread_create_params.rbs +11 -5
  188. data/sig/openai/models/beta/threads/message_create_params.rbs +6 -3
  189. data/sig/openai/models/beta/threads/run_create_params.rbs +6 -3
  190. data/sig/openai/models/decision_create_params.rbs +27 -2
  191. data/sig/openai/models/eval_create_params.rbs +25 -4
  192. data/sig/openai/models/evals/run_create_params.rbs +52 -8
  193. data/sig/openai/models/image_edit_params.rbs +47 -16
  194. data/sig/openai/models/live/fork_server_event.rbs +39 -0
  195. data/sig/openai/models/live/server_event.rbs +39 -0
  196. data/sig/openai/models/live/session_accept_params.rbs +39 -2
  197. data/sig/openai/models/live/sideband_client_event.rbs +32 -0
  198. data/sig/openai/models/live/sideband_server_event.rbs +39 -0
  199. data/sig/openai/models/realtime/conversation_item.rbs +1 -0
  200. data/sig/openai/models/responses/input_token_count_params.rbs +10 -2
  201. data/sig/openai/models/responses/response.rbs +223 -0
  202. data/sig/openai/models/responses/response_configuration_update_item.rbs +45 -2
  203. data/sig/openai/models/responses/response_configuration_update_item_param.rbs +45 -2
  204. data/sig/openai/models/responses/response_create_params.rbs +5 -2
  205. data/sig/openai/models/responses/response_tool_search_output_item_param.rbs +4 -4
  206. data/sig/openai/models/responses/responses_client_event.rbs +17 -0
  207. data/sig/openai/models/responses/tool.rbs +4 -4
  208. data/sig/openai/models/video_edit_params.rbs +11 -2
  209. data/sig/openai/models/video_extend_params.rbs +11 -2
  210. data/sig/openai/net_http_client.rbs +3 -0
  211. data/sig/openai/resources/admin/organization/external_keys.rbs +70 -0
  212. data/sig/openai/resources/admin/organization/external_storage.rbs +23 -1
  213. data/sig/openai/resources/admin/organization.rbs +2 -0
  214. data/sig/openai/resources/audio/speech.rbs +2 -1
  215. data/sig/openai/resources/audio/transcriptions.rbs +14 -2
  216. data/sig/openai/resources/audio/voices.rbs +14 -1
  217. data/sig/openai/resources/beta/agents/sessions.rbs +4 -0
  218. data/sig/openai/resources/beta/agents.rbs +4 -0
  219. data/sig/openai/resources/beta/responses/input_tokens.rbs +2 -1
  220. data/sig/openai/resources/beta/responses.rbs +4 -2
  221. data/sig/openai/resources/decisions.rbs +7 -1
  222. data/sig/openai/resources/images.rbs +2 -0
  223. data/sig/openai/resources/responses/input_tokens.rbs +2 -1
  224. data/sig/openai/resources/responses.rbs +5 -2
  225. data/sig/openai/resources/videos.rbs +2 -2
  226. metadata +43 -1
@@ -319,6 +319,23 @@ module OpenAI
319
319
  # @return [OpenAI::Models::Beta::BetaResponseTextConfig, nil]
320
320
  optional :text, -> { OpenAI::Beta::BetaResponseTextConfig }
321
321
 
322
+ # @!attribute tool_usage
323
+ # Usage reported by hosted tools, separate from base model `usage`. The field can
324
+ # be omitted when tool usage is unavailable. When present, tool families with no
325
+ # recorded usage have zero counts.
326
+ #
327
+ # `image_gen` sums available token counts across image generation calls. Calls
328
+ # with missing or incomplete usage records may be skipped. Output token details
329
+ # and cached input counts can be omitted. An omitted cache count means cache usage
330
+ # is unknown.
331
+ #
332
+ # `web_search.num_requests` counts billable searches. Discounted searches and
333
+ # actions such as opening a page are excluded. Use billing records to reconcile
334
+ # final charges.
335
+ #
336
+ # @return [OpenAI::Models::Beta::BetaResponse::ToolUsage, nil]
337
+ optional :tool_usage, -> { OpenAI::Beta::BetaResponse::ToolUsage }
338
+
322
339
  # @!attribute top_logprobs
323
340
  # An integer between 0 and 20 specifying the maximum number of most likely tokens
324
341
  # to return at each token position, each with an associated log probability. In
@@ -358,7 +375,7 @@ module OpenAI
358
375
  # @return [String, nil]
359
376
  optional :user, String
360
377
 
361
- # @!method initialize(id:, access_programs:, created_at:, error:, incomplete_details:, instructions:, metadata:, model:, output:, parallel_tool_calls:, temperature:, tool_choice:, tools:, top_p:, background: nil, completed_at: nil, conversation: nil, max_output_tokens: nil, max_tool_calls: nil, moderation: nil, previous_response_id: nil, prompt: nil, prompt_cache_diagnostics: nil, prompt_cache_key: nil, prompt_cache_options: nil, prompt_cache_retention: nil, reasoning: nil, safety_identifier: nil, service_tier: nil, status: nil, text: nil, top_logprobs: nil, truncation: nil, usage: nil, user: nil, object: :response)
378
+ # @!method initialize(id:, access_programs:, created_at:, error:, incomplete_details:, instructions:, metadata:, model:, output:, parallel_tool_calls:, temperature:, tool_choice:, tools:, top_p:, background: nil, completed_at: nil, conversation: nil, max_output_tokens: nil, max_tool_calls: nil, moderation: nil, previous_response_id: nil, prompt: nil, prompt_cache_diagnostics: nil, prompt_cache_key: nil, prompt_cache_options: nil, prompt_cache_retention: nil, reasoning: nil, safety_identifier: nil, service_tier: nil, status: nil, text: nil, tool_usage: nil, top_logprobs: nil, truncation: nil, usage: nil, user: nil, object: :response)
362
379
  # @param id [String]
363
380
  # Unique identifier for this Response.
364
381
  #
@@ -566,6 +583,20 @@ module OpenAI
566
583
  # - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text)
567
584
  # - [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs)
568
585
  #
586
+ # @param tool_usage [OpenAI::Models::Beta::BetaResponse::ToolUsage]
587
+ # Usage reported by hosted tools, separate from base model `usage`. The field can
588
+ # be omitted when tool usage is unavailable. When present, tool families with no
589
+ # recorded usage have zero counts.
590
+ #
591
+ # `image_gen` sums available token counts across image generation calls. Calls
592
+ # with missing or incomplete usage records may be skipped. Output token details
593
+ # and cached input counts can be omitted. An omitted cache count means cache usage
594
+ # is unknown.
595
+ #
596
+ # `web_search.num_requests` counts billable searches. Discounted searches and
597
+ # actions such as opening a page are excluded. Use billing records to reconcile
598
+ # final charges.
599
+ #
569
600
  # @param top_logprobs [Integer, nil]
570
601
  # An integer between 0 and 20 specifying the maximum number of most likely tokens
571
602
  # to return at each token position, each with an associated log probability. In
@@ -942,6 +973,9 @@ module OpenAI
942
973
  # replacements.
943
974
  GPT_5_4_NANO = :"gpt-5.4-nano"
944
975
  GPT_5_4_MINI_2026_03_17 = :"gpt-5.4-mini-2026-03-17"
976
+ # @deprecated Announced shutdown date: 2027-04-01. See
977
+ # https://developers.openai.com/api/docs/deprecations for details and recommended
978
+ # replacements.
945
979
  GPT_5_4_NANO_2026_03_17 = :"gpt-5.4-nano-2026-03-17"
946
980
  # @deprecated Announced shutdown date: 2026-08-10. See
947
981
  # https://developers.openai.com/api/docs/deprecations for details and recommended
@@ -959,6 +993,9 @@ module OpenAI
959
993
  # https://developers.openai.com/api/docs/deprecations for details and recommended
960
994
  # replacements.
961
995
  GPT_5_1 = :"gpt-5.1"
996
+ # @deprecated Announced shutdown date: 2027-04-01. See
997
+ # https://developers.openai.com/api/docs/deprecations for details and recommended
998
+ # replacements.
962
999
  GPT_5_1_2025_11_13 = :"gpt-5.1-2025-11-13"
963
1000
  # @deprecated Announced shutdown date: 2026-07-23. See
964
1001
  # https://developers.openai.com/api/docs/deprecations for details and recommended
@@ -2108,6 +2145,192 @@ module OpenAI
2108
2145
  # @return [Array<Symbol>]
2109
2146
  end
2110
2147
 
2148
+ # @see OpenAI::Models::Beta::BetaResponse#tool_usage
2149
+ class ToolUsage < OpenAI::Internal::Type::BaseModel
2150
+ # @!attribute image_gen
2151
+ # Aggregated usage statistics for image generation tool calls.
2152
+ #
2153
+ # @return [OpenAI::Models::Beta::BetaResponse::ToolUsage::ImageGen]
2154
+ required :image_gen, -> { OpenAI::Beta::BetaResponse::ToolUsage::ImageGen }
2155
+
2156
+ # @!attribute web_search
2157
+ # Aggregated billable usage statistics for web search tool calls.
2158
+ #
2159
+ # @return [OpenAI::Models::Beta::BetaResponse::ToolUsage::WebSearch]
2160
+ required :web_search, -> { OpenAI::Beta::BetaResponse::ToolUsage::WebSearch }
2161
+
2162
+ # @!method initialize(image_gen:, web_search:)
2163
+ # Usage reported by hosted tools, separate from base model `usage`. The field can
2164
+ # be omitted when tool usage is unavailable. When present, tool families with no
2165
+ # recorded usage have zero counts.
2166
+ #
2167
+ # `image_gen` sums available token counts across image generation calls. Calls
2168
+ # with missing or incomplete usage records may be skipped. Output token details
2169
+ # and cached input counts can be omitted. An omitted cache count means cache usage
2170
+ # is unknown.
2171
+ #
2172
+ # `web_search.num_requests` counts billable searches. Discounted searches and
2173
+ # actions such as opening a page are excluded. Use billing records to reconcile
2174
+ # final charges.
2175
+ #
2176
+ # @param image_gen [OpenAI::Models::Beta::BetaResponse::ToolUsage::ImageGen]
2177
+ # Aggregated usage statistics for image generation tool calls.
2178
+ #
2179
+ # @param web_search [OpenAI::Models::Beta::BetaResponse::ToolUsage::WebSearch]
2180
+ # Aggregated billable usage statistics for web search tool calls.
2181
+
2182
+ # @see OpenAI::Models::Beta::BetaResponse::ToolUsage#image_gen
2183
+ class ImageGen < OpenAI::Internal::Type::BaseModel
2184
+ # @!attribute input_tokens
2185
+ # The number of tokens (images and text) in the input prompt.
2186
+ #
2187
+ # @return [Integer]
2188
+ required :input_tokens, Integer
2189
+
2190
+ # @!attribute input_tokens_details
2191
+ # The input tokens detailed information for the image generation.
2192
+ #
2193
+ # @return [OpenAI::Models::Beta::BetaResponse::ToolUsage::ImageGen::InputTokensDetails]
2194
+ required :input_tokens_details, -> { OpenAI::Beta::BetaResponse::ToolUsage::ImageGen::InputTokensDetails }
2195
+
2196
+ # @!attribute output_tokens
2197
+ # The number of output tokens generated by the model.
2198
+ #
2199
+ # @return [Integer]
2200
+ required :output_tokens, Integer
2201
+
2202
+ # @!attribute total_tokens
2203
+ # The total number of tokens (images and text) used for the image generation.
2204
+ #
2205
+ # @return [Integer]
2206
+ required :total_tokens, Integer
2207
+
2208
+ # @!attribute cached_tokens
2209
+ #
2210
+ # @return [Integer, nil]
2211
+ optional :cached_tokens, Integer
2212
+
2213
+ # @!attribute cached_tokens_details
2214
+ #
2215
+ # @return [OpenAI::Models::Beta::BetaResponse::ToolUsage::ImageGen::CachedTokensDetails, nil]
2216
+ optional(
2217
+ :cached_tokens_details,
2218
+ -> { OpenAI::Beta::BetaResponse::ToolUsage::ImageGen::CachedTokensDetails }
2219
+ )
2220
+
2221
+ # @!attribute output_tokens_details
2222
+ # The output token details for the image generation.
2223
+ #
2224
+ # @return [OpenAI::Models::Beta::BetaResponse::ToolUsage::ImageGen::OutputTokensDetails, nil]
2225
+ optional(
2226
+ :output_tokens_details,
2227
+ -> { OpenAI::Beta::BetaResponse::ToolUsage::ImageGen::OutputTokensDetails }
2228
+ )
2229
+
2230
+ # @!method initialize(input_tokens:, input_tokens_details:, output_tokens:, total_tokens:, cached_tokens: nil, cached_tokens_details: nil, output_tokens_details: nil)
2231
+ # Aggregated usage statistics for image generation tool calls.
2232
+ #
2233
+ # @param input_tokens [Integer]
2234
+ # The number of tokens (images and text) in the input prompt.
2235
+ #
2236
+ # @param input_tokens_details [OpenAI::Models::Beta::BetaResponse::ToolUsage::ImageGen::InputTokensDetails]
2237
+ # The input tokens detailed information for the image generation.
2238
+ #
2239
+ # @param output_tokens [Integer]
2240
+ # The number of output tokens generated by the model.
2241
+ #
2242
+ # @param total_tokens [Integer]
2243
+ # The total number of tokens (images and text) used for the image generation.
2244
+ #
2245
+ # @param cached_tokens [Integer]
2246
+ #
2247
+ # @param cached_tokens_details [OpenAI::Models::Beta::BetaResponse::ToolUsage::ImageGen::CachedTokensDetails]
2248
+ #
2249
+ # @param output_tokens_details [OpenAI::Models::Beta::BetaResponse::ToolUsage::ImageGen::OutputTokensDetails]
2250
+ # The output token details for the image generation.
2251
+
2252
+ # @see OpenAI::Models::Beta::BetaResponse::ToolUsage::ImageGen#input_tokens_details
2253
+ class InputTokensDetails < OpenAI::Internal::Type::BaseModel
2254
+ # @!attribute image_tokens
2255
+ # The number of image tokens in the input prompt.
2256
+ #
2257
+ # @return [Integer]
2258
+ required :image_tokens, Integer
2259
+
2260
+ # @!attribute text_tokens
2261
+ # The number of text tokens in the input prompt.
2262
+ #
2263
+ # @return [Integer]
2264
+ required :text_tokens, Integer
2265
+
2266
+ # @!method initialize(image_tokens:, text_tokens:)
2267
+ # The input tokens detailed information for the image generation.
2268
+ #
2269
+ # @param image_tokens [Integer]
2270
+ # The number of image tokens in the input prompt.
2271
+ #
2272
+ # @param text_tokens [Integer]
2273
+ # The number of text tokens in the input prompt.
2274
+ end
2275
+
2276
+ # @see OpenAI::Models::Beta::BetaResponse::ToolUsage::ImageGen#cached_tokens_details
2277
+ class CachedTokensDetails < OpenAI::Internal::Type::BaseModel
2278
+ # @!attribute cached_image_tokens
2279
+ #
2280
+ # @return [Integer]
2281
+ required :cached_image_tokens, Integer
2282
+
2283
+ # @!attribute cached_text_tokens
2284
+ #
2285
+ # @return [Integer]
2286
+ required :cached_text_tokens, Integer
2287
+
2288
+ # @!method initialize(cached_image_tokens:, cached_text_tokens:)
2289
+ # @param cached_image_tokens [Integer]
2290
+ # @param cached_text_tokens [Integer]
2291
+ end
2292
+
2293
+ # @see OpenAI::Models::Beta::BetaResponse::ToolUsage::ImageGen#output_tokens_details
2294
+ class OutputTokensDetails < OpenAI::Internal::Type::BaseModel
2295
+ # @!attribute image_tokens
2296
+ # The number of image output tokens generated by the model.
2297
+ #
2298
+ # @return [Integer]
2299
+ required :image_tokens, Integer
2300
+
2301
+ # @!attribute text_tokens
2302
+ # The number of text output tokens generated by the model.
2303
+ #
2304
+ # @return [Integer]
2305
+ required :text_tokens, Integer
2306
+
2307
+ # @!method initialize(image_tokens:, text_tokens:)
2308
+ # The output token details for the image generation.
2309
+ #
2310
+ # @param image_tokens [Integer]
2311
+ # The number of image output tokens generated by the model.
2312
+ #
2313
+ # @param text_tokens [Integer]
2314
+ # The number of text output tokens generated by the model.
2315
+ end
2316
+ end
2317
+
2318
+ # @see OpenAI::Models::Beta::BetaResponse::ToolUsage#web_search
2319
+ class WebSearch < OpenAI::Internal::Type::BaseModel
2320
+ # @!attribute num_requests
2321
+ # The number of billable web search requests issued.
2322
+ #
2323
+ # @return [Integer]
2324
+ required :num_requests, Integer
2325
+
2326
+ # @!method initialize(num_requests:)
2327
+ # Aggregated billable usage statistics for web search tool calls.
2328
+ #
2329
+ # @param num_requests [Integer]
2330
+ # The number of billable web search requests issued.
2331
+ end
2332
+ end
2333
+
2111
2334
  # The truncation strategy to use for the model response.
2112
2335
  #
2113
2336
  # - `auto`: If the input to this Response exceeds the model's context window size,
@@ -28,9 +28,15 @@ module OpenAI
28
28
  # @return [OpenAI::Models::Beta::BetaResponseConfigurationUpdateItem::Reasoning, nil]
29
29
  optional :reasoning, -> { OpenAI::Beta::BetaResponseConfigurationUpdateItem::Reasoning }
30
30
 
31
- # @!method initialize(id:, agent: nil, reasoning: nil, type: :configuration_update)
32
- # A configuration update that applies to subsequent responses until it is replaced
33
- # by another configuration update.
31
+ # @!attribute text
32
+ # The text output configuration for subsequent responses.
33
+ #
34
+ # @return [OpenAI::Models::Beta::BetaResponseConfigurationUpdateItem::Text, nil]
35
+ optional :text, -> { OpenAI::Beta::BetaResponseConfigurationUpdateItem::Text }
36
+
37
+ # @!method initialize(id:, agent: nil, reasoning: nil, text: nil, type: :configuration_update)
38
+ # A configuration update for subsequent responses. Each setting stays in effect
39
+ # until a later update replaces that setting.
34
40
  #
35
41
  # @param id [String]
36
42
  # The unique ID of the configuration update item.
@@ -41,6 +47,9 @@ module OpenAI
41
47
  # @param reasoning [OpenAI::Models::Beta::BetaResponseConfigurationUpdateItem::Reasoning]
42
48
  # The reasoning configuration applied by this update.
43
49
  #
50
+ # @param text [OpenAI::Models::Beta::BetaResponseConfigurationUpdateItem::Text]
51
+ # The text output configuration for subsequent responses.
52
+ #
44
53
  # @param type [Symbol, :configuration_update]
45
54
  # The item type. Always `configuration_update`.
46
55
 
@@ -98,6 +107,58 @@ module OpenAI
98
107
  # @return [Array<Symbol>]
99
108
  end
100
109
  end
110
+
111
+ # @see OpenAI::Models::Beta::BetaResponseConfigurationUpdateItem#text
112
+ class Text < OpenAI::Internal::Type::BaseModel
113
+ # @!attribute format_
114
+ # Use a JSON schema for structured output or text to return to plain text.
115
+ #
116
+ # @return [OpenAI::Models::Beta::BetaResponseConfigurationUpdateItem::Text::Format::Text, OpenAI::Models::Beta::BetaResponseFormatTextJSONSchemaConfig]
117
+ required(
118
+ :format_,
119
+ union: -> { OpenAI::Beta::BetaResponseConfigurationUpdateItem::Text::Format },
120
+ api_name: :format
121
+ )
122
+
123
+ # @!method initialize(format_:)
124
+ # The text output configuration for subsequent responses.
125
+ #
126
+ # @param format_ [OpenAI::Models::Beta::BetaResponseConfigurationUpdateItem::Text::Format::Text, OpenAI::Models::Beta::BetaResponseFormatTextJSONSchemaConfig]
127
+ # Use a JSON schema for structured output or text to return to plain text.
128
+
129
+ # Use a JSON schema for structured output or text to return to plain text.
130
+ #
131
+ # @see OpenAI::Models::Beta::BetaResponseConfigurationUpdateItem::Text#format_
132
+ module Format
133
+ extend OpenAI::Internal::Type::Union
134
+
135
+ discriminator :type
136
+
137
+ # Default response format. Used to generate text responses.
138
+ variant :text, -> { OpenAI::Beta::BetaResponseConfigurationUpdateItem::Text::Format::Text }
139
+
140
+ # JSON Schema response format. Used to generate structured JSON responses.
141
+ # Learn more about [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs).
142
+ variant :json_schema, -> { OpenAI::Beta::BetaResponseFormatTextJSONSchemaConfig }
143
+
144
+ class Text < OpenAI::Internal::Type::BaseModel
145
+ # @!attribute type
146
+ # The type of response format being defined. Always `text`.
147
+ #
148
+ # @return [Symbol, :text]
149
+ required :type, const: :text
150
+
151
+ # @!method initialize(type: :text)
152
+ # Default response format. Used to generate text responses.
153
+ #
154
+ # @param type [Symbol, :text]
155
+ # The type of response format being defined. Always `text`.
156
+ end
157
+
158
+ # @!method self.variants
159
+ # @return [Array(OpenAI::Models::Beta::BetaResponseConfigurationUpdateItem::Text::Format::Text, OpenAI::Models::Beta::BetaResponseFormatTextJSONSchemaConfig)]
160
+ end
161
+ end
101
162
  end
102
163
  end
103
164
 
@@ -28,10 +28,15 @@ module OpenAI
28
28
  # @return [OpenAI::Models::Beta::BetaResponseConfigurationUpdateItemParam::Reasoning, nil]
29
29
  optional :reasoning, -> { OpenAI::Beta::BetaResponseConfigurationUpdateItemParam::Reasoning }
30
30
 
31
- # @!method initialize(id: nil, agent: nil, reasoning: nil, type: :configuration_update)
32
- # An update to the conversation's response configuration. The configuration
33
- # remains in effect for subsequent responses until it is replaced by another
34
- # configuration update.
31
+ # @!attribute text
32
+ # The text output configuration for subsequent responses.
33
+ #
34
+ # @return [OpenAI::Models::Beta::BetaResponseConfigurationUpdateItemParam::Text, nil]
35
+ optional :text, -> { OpenAI::Beta::BetaResponseConfigurationUpdateItemParam::Text }
36
+
37
+ # @!method initialize(id: nil, agent: nil, reasoning: nil, text: nil, type: :configuration_update)
38
+ # An update to the conversation's response configuration. Supply reasoning, text,
39
+ # or both. Each setting stays in effect until a later update replaces it.
35
40
  #
36
41
  # @param id [String, nil]
37
42
  # The unique ID of the configuration update item.
@@ -42,6 +47,9 @@ module OpenAI
42
47
  # @param reasoning [OpenAI::Models::Beta::BetaResponseConfigurationUpdateItemParam::Reasoning]
43
48
  # Updates to reasoning configuration. Only effort is supported.
44
49
  #
50
+ # @param text [OpenAI::Models::Beta::BetaResponseConfigurationUpdateItemParam::Text]
51
+ # The text output configuration for subsequent responses.
52
+ #
45
53
  # @param type [Symbol, :configuration_update]
46
54
  # The item type. Always `configuration_update`.
47
55
 
@@ -99,6 +107,58 @@ module OpenAI
99
107
  # @return [Array<Symbol>]
100
108
  end
101
109
  end
110
+
111
+ # @see OpenAI::Models::Beta::BetaResponseConfigurationUpdateItemParam#text
112
+ class Text < OpenAI::Internal::Type::BaseModel
113
+ # @!attribute format_
114
+ # Use a JSON schema for structured output or text to return to plain text.
115
+ #
116
+ # @return [OpenAI::Models::Beta::BetaResponseConfigurationUpdateItemParam::Text::Format::Text, OpenAI::Models::Beta::BetaResponseFormatTextJSONSchemaConfig]
117
+ required(
118
+ :format_,
119
+ union: -> { OpenAI::Beta::BetaResponseConfigurationUpdateItemParam::Text::Format },
120
+ api_name: :format
121
+ )
122
+
123
+ # @!method initialize(format_:)
124
+ # The text output configuration for subsequent responses.
125
+ #
126
+ # @param format_ [OpenAI::Models::Beta::BetaResponseConfigurationUpdateItemParam::Text::Format::Text, OpenAI::Models::Beta::BetaResponseFormatTextJSONSchemaConfig]
127
+ # Use a JSON schema for structured output or text to return to plain text.
128
+
129
+ # Use a JSON schema for structured output or text to return to plain text.
130
+ #
131
+ # @see OpenAI::Models::Beta::BetaResponseConfigurationUpdateItemParam::Text#format_
132
+ module Format
133
+ extend OpenAI::Internal::Type::Union
134
+
135
+ discriminator :type
136
+
137
+ # Default response format. Used to generate text responses.
138
+ variant :text, -> { OpenAI::Beta::BetaResponseConfigurationUpdateItemParam::Text::Format::Text }
139
+
140
+ # JSON Schema response format. Used to generate structured JSON responses.
141
+ # Learn more about [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs).
142
+ variant :json_schema, -> { OpenAI::Beta::BetaResponseFormatTextJSONSchemaConfig }
143
+
144
+ class Text < OpenAI::Internal::Type::BaseModel
145
+ # @!attribute type
146
+ # The type of response format being defined. Always `text`.
147
+ #
148
+ # @return [Symbol, :text]
149
+ required :type, const: :text
150
+
151
+ # @!method initialize(type: :text)
152
+ # Default response format. Used to generate text responses.
153
+ #
154
+ # @param type [Symbol, :text]
155
+ # The type of response format being defined. Always `text`.
156
+ end
157
+
158
+ # @!method self.variants
159
+ # @return [Array(OpenAI::Models::Beta::BetaResponseConfigurationUpdateItemParam::Text::Format::Text, OpenAI::Models::Beta::BetaResponseFormatTextJSONSchemaConfig)]
160
+ end
161
+ end
102
162
  end
103
163
  end
104
164
 
@@ -63,9 +63,8 @@ module OpenAI
63
63
 
64
64
  variant :additional_tools, -> { OpenAI::Beta::BetaResponseInputItem::AdditionalTools }
65
65
 
66
- # An update to the conversation's response configuration. The configuration
67
- # remains in effect for subsequent responses until it is replaced by another
68
- # configuration update.
66
+ # An update to the conversation's response configuration. Supply reasoning,
67
+ # text, or both. Each setting stays in effect until a later update replaces it.
69
68
  variant :configuration_update, -> { OpenAI::Beta::BetaResponseConfigurationUpdateItemParam }
70
69
 
71
70
  # A description of the chain of thought used by a reasoning model while generating
@@ -46,8 +46,8 @@ module OpenAI
46
46
 
47
47
  variant :additional_tools, -> { OpenAI::Beta::BetaResponseItem::AdditionalTools }
48
48
 
49
- # A configuration update that applies to subsequent responses until it is
50
- # replaced by another configuration update.
49
+ # A configuration update for subsequent responses. Each setting stays in effect
50
+ # until a later update replaces that setting.
51
51
  variant :configuration_update, -> { OpenAI::Beta::BetaResponseConfigurationUpdateItem }
52
52
 
53
53
  # A description of the chain of thought used by a reasoning model while generating
@@ -758,8 +758,8 @@ module OpenAI
758
758
  # @!attribute input_fidelity
759
759
  # Control how much effort the model will exert to match the style and features,
760
760
  # especially facial features, of input images. Supports `high` and `low` on
761
- # `gpt-image-1` and `gpt-image-1.5`; `gpt-image-1-mini` supports only `low`. For
762
- # `gpt-image-2`, omit this parameter. Defaults to `low` on supported models.
761
+ # `gpt-image-1.5`; `gpt-image-1-mini` supports only `low`. For `gpt-image-2`, omit
762
+ # this parameter. Defaults to `low` on supported models.
763
763
  #
764
764
  # @return [Symbol, OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Tool::ImageGeneration::InputFidelity, nil]
765
765
  optional(
@@ -878,8 +878,8 @@ module OpenAI
878
878
  # @param input_fidelity [Symbol, OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Tool::ImageGeneration::InputFidelity, nil]
879
879
  # Control how much effort the model will exert to match the style and features,
880
880
  # especially facial features, of input images. Supports `high` and `low` on
881
- # `gpt-image-1` and `gpt-image-1.5`; `gpt-image-1-mini` supports only `low`. For
882
- # `gpt-image-2`, omit this parameter. Defaults to `low` on supported models.
881
+ # `gpt-image-1.5`; `gpt-image-1-mini` supports only `low`. For `gpt-image-2`, omit
882
+ # this parameter. Defaults to `low` on supported models.
883
883
  #
884
884
  # @param input_image_mask [OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Tool::ImageGeneration::InputImageMask]
885
885
  # Optional mask for inpainting. Contains `image_url` (string, optional) and
@@ -968,8 +968,8 @@ module OpenAI
968
968
 
969
969
  # Control how much effort the model will exert to match the style and features,
970
970
  # especially facial features, of input images. Supports `high` and `low` on
971
- # `gpt-image-1` and `gpt-image-1.5`; `gpt-image-1-mini` supports only `low`. For
972
- # `gpt-image-2`, omit this parameter. Defaults to `low` on supported models.
971
+ # `gpt-image-1.5`; `gpt-image-1-mini` supports only `low`. For `gpt-image-2`, omit
972
+ # this parameter. Defaults to `low` on supported models.
973
973
  #
974
974
  # @see OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Tool::ImageGeneration#input_fidelity
975
975
  module InputFidelity
@@ -99,6 +99,14 @@ module OpenAI
99
99
  nil?: true
100
100
  )
101
101
 
102
+ # @!attribute generate
103
+ # Whether to generate output for this response. Defaults to true when omitted. Set
104
+ # to false to prepare request state without model output; the response ID can be
105
+ # used as previous_response_id on a later turn.
106
+ #
107
+ # @return [Boolean, nil]
108
+ optional :generate, OpenAI::Internal::Type::Boolean
109
+
102
110
  # @!attribute include
103
111
  # Specify additional output data to include in the model response. Currently
104
112
  # supported values are:
@@ -482,7 +490,7 @@ module OpenAI
482
490
  # @return [String, nil]
483
491
  optional :user, String
484
492
 
485
- # @!method initialize(access_programs: nil, background: nil, context_management: nil, conversation: nil, include: nil, input: nil, instructions: nil, max_output_tokens: nil, max_tool_calls: nil, metadata: nil, model: nil, moderation: nil, multi_agent: nil, parallel_tool_calls: nil, previous_response_id: nil, prompt: nil, prompt_cache_key: nil, prompt_cache_options: nil, prompt_cache_retention: nil, reasoning: nil, safety_identifier: nil, service_tier: nil, store: nil, stream: nil, stream_id: nil, stream_options: nil, temperature: nil, text: nil, tool_choice: nil, tools: nil, top_logprobs: nil, top_p: nil, truncation: nil, user: nil, type: :"response.create")
493
+ # @!method initialize(access_programs: nil, background: nil, context_management: nil, conversation: nil, generate: nil, include: nil, input: nil, instructions: nil, max_output_tokens: nil, max_tool_calls: nil, metadata: nil, model: nil, moderation: nil, multi_agent: nil, parallel_tool_calls: nil, previous_response_id: nil, prompt: nil, prompt_cache_key: nil, prompt_cache_options: nil, prompt_cache_retention: nil, reasoning: nil, safety_identifier: nil, service_tier: nil, store: nil, stream: nil, stream_id: nil, stream_options: nil, temperature: nil, text: nil, tool_choice: nil, tools: nil, top_logprobs: nil, top_p: nil, truncation: nil, user: nil, type: :"response.create")
486
494
  # Client event for creating a response over a persistent WebSocket connection.
487
495
  # This payload uses the same top-level fields as `POST /v1/responses`, plus
488
496
  # WebSocket-only envelope metadata.
@@ -509,6 +517,11 @@ module OpenAI
509
517
  # items from this response are automatically added to this conversation after this
510
518
  # response completes.
511
519
  #
520
+ # @param generate [Boolean]
521
+ # Whether to generate output for this response. Defaults to true when omitted. Set
522
+ # to false to prepare request state without model output; the response ID can be
523
+ # used as previous_response_id on a later turn.
524
+ #
512
525
  # @param include [Array<Symbol, OpenAI::Models::Beta::BetaResponseIncludable>, nil]
513
526
  # Specify additional output data to include in the model response. Currently
514
527
  # supported values are:
@@ -1329,6 +1342,9 @@ module OpenAI
1329
1342
  # replacements.
1330
1343
  GPT_5_4_NANO = :"gpt-5.4-nano"
1331
1344
  GPT_5_4_MINI_2026_03_17 = :"gpt-5.4-mini-2026-03-17"
1345
+ # @deprecated Announced shutdown date: 2027-04-01. See
1346
+ # https://developers.openai.com/api/docs/deprecations for details and recommended
1347
+ # replacements.
1332
1348
  GPT_5_4_NANO_2026_03_17 = :"gpt-5.4-nano-2026-03-17"
1333
1349
  # @deprecated Announced shutdown date: 2026-08-10. See
1334
1350
  # https://developers.openai.com/api/docs/deprecations for details and recommended
@@ -1346,6 +1362,9 @@ module OpenAI
1346
1362
  # https://developers.openai.com/api/docs/deprecations for details and recommended
1347
1363
  # replacements.
1348
1364
  GPT_5_1 = :"gpt-5.1"
1365
+ # @deprecated Announced shutdown date: 2027-04-01. See
1366
+ # https://developers.openai.com/api/docs/deprecations for details and recommended
1367
+ # replacements.
1349
1368
  GPT_5_1_2025_11_13 = :"gpt-5.1-2025-11-13"
1350
1369
  # @deprecated Announced shutdown date: 2026-07-23. See
1351
1370
  # https://developers.openai.com/api/docs/deprecations for details and recommended
@@ -634,8 +634,8 @@ module OpenAI
634
634
  # @!attribute input_fidelity
635
635
  # Control how much effort the model will exert to match the style and features,
636
636
  # especially facial features, of input images. Supports `high` and `low` on
637
- # `gpt-image-1` and `gpt-image-1.5`; `gpt-image-1-mini` supports only `low`. For
638
- # `gpt-image-2`, omit this parameter. Defaults to `low` on supported models.
637
+ # `gpt-image-1.5`; `gpt-image-1-mini` supports only `low`. For `gpt-image-2`, omit
638
+ # this parameter. Defaults to `low` on supported models.
639
639
  #
640
640
  # @return [Symbol, OpenAI::Models::Beta::BetaTool::ImageGeneration::InputFidelity, nil]
641
641
  optional(
@@ -736,8 +736,8 @@ module OpenAI
736
736
  # @param input_fidelity [Symbol, OpenAI::Models::Beta::BetaTool::ImageGeneration::InputFidelity, nil]
737
737
  # Control how much effort the model will exert to match the style and features,
738
738
  # especially facial features, of input images. Supports `high` and `low` on
739
- # `gpt-image-1` and `gpt-image-1.5`; `gpt-image-1-mini` supports only `low`. For
740
- # `gpt-image-2`, omit this parameter. Defaults to `low` on supported models.
739
+ # `gpt-image-1.5`; `gpt-image-1-mini` supports only `low`. For `gpt-image-2`, omit
740
+ # this parameter. Defaults to `low` on supported models.
741
741
  #
742
742
  # @param input_image_mask [OpenAI::Models::Beta::BetaTool::ImageGeneration::InputImageMask]
743
743
  # Optional mask for inpainting. Contains `image_url` (string, optional) and
@@ -826,8 +826,8 @@ module OpenAI
826
826
 
827
827
  # Control how much effort the model will exert to match the style and features,
828
828
  # especially facial features, of input images. Supports `high` and `low` on
829
- # `gpt-image-1` and `gpt-image-1.5`; `gpt-image-1-mini` supports only `low`. For
830
- # `gpt-image-2`, omit this parameter. Defaults to `low` on supported models.
829
+ # `gpt-image-1.5`; `gpt-image-1-mini` supports only `low`. For `gpt-image-2`, omit
830
+ # this parameter. Defaults to `low` on supported models.
831
831
  #
832
832
  # @see OpenAI::Models::Beta::BetaTool::ImageGeneration#input_fidelity
833
833
  module InputFidelity
@@ -428,6 +428,9 @@ module OpenAI
428
428
  # replacements.
429
429
  GPT_5_4_NANO = :"gpt-5.4-nano"
430
430
  GPT_5_4_MINI_2026_03_17 = :"gpt-5.4-mini-2026-03-17"
431
+ # @deprecated Announced shutdown date: 2027-04-01. See
432
+ # https://developers.openai.com/api/docs/deprecations for details and recommended
433
+ # replacements.
431
434
  GPT_5_4_NANO_2026_03_17 = :"gpt-5.4-nano-2026-03-17"
432
435
  # @deprecated Announced shutdown date: 2026-08-10. See
433
436
  # https://developers.openai.com/api/docs/deprecations for details and recommended
@@ -445,6 +448,9 @@ module OpenAI
445
448
  # https://developers.openai.com/api/docs/deprecations for details and recommended
446
449
  # replacements.
447
450
  GPT_5_1 = :"gpt-5.1"
451
+ # @deprecated Announced shutdown date: 2027-04-01. See
452
+ # https://developers.openai.com/api/docs/deprecations for details and recommended
453
+ # replacements.
448
454
  GPT_5_1_2025_11_13 = :"gpt-5.1-2025-11-13"
449
455
  # @deprecated Announced shutdown date: 2026-07-23. See
450
456
  # https://developers.openai.com/api/docs/deprecations for details and recommended
@@ -1013,6 +1013,9 @@ module OpenAI
1013
1013
  # replacements.
1014
1014
  GPT_5_4_NANO = :"gpt-5.4-nano"
1015
1015
  GPT_5_4_MINI_2026_03_17 = :"gpt-5.4-mini-2026-03-17"
1016
+ # @deprecated Announced shutdown date: 2027-04-01. See
1017
+ # https://developers.openai.com/api/docs/deprecations for details and recommended
1018
+ # replacements.
1016
1019
  GPT_5_4_NANO_2026_03_17 = :"gpt-5.4-nano-2026-03-17"
1017
1020
  # @deprecated Announced shutdown date: 2026-08-10. See
1018
1021
  # https://developers.openai.com/api/docs/deprecations for details and recommended
@@ -1030,6 +1033,9 @@ module OpenAI
1030
1033
  # https://developers.openai.com/api/docs/deprecations for details and recommended
1031
1034
  # replacements.
1032
1035
  GPT_5_1 = :"gpt-5.1"
1036
+ # @deprecated Announced shutdown date: 2027-04-01. See
1037
+ # https://developers.openai.com/api/docs/deprecations for details and recommended
1038
+ # replacements.
1033
1039
  GPT_5_1_2025_11_13 = :"gpt-5.1-2025-11-13"
1034
1040
  # @deprecated Announced shutdown date: 2026-07-23. See
1035
1041
  # https://developers.openai.com/api/docs/deprecations for details and recommended
@@ -22,6 +22,9 @@ module OpenAI
22
22
  # replacements.
23
23
  GPT_5_4_NANO = :"gpt-5.4-nano"
24
24
  GPT_5_4_MINI_2026_03_17 = :"gpt-5.4-mini-2026-03-17"
25
+ # @deprecated Announced shutdown date: 2027-04-01. See
26
+ # https://developers.openai.com/api/docs/deprecations for details and recommended
27
+ # replacements.
25
28
  GPT_5_4_NANO_2026_03_17 = :"gpt-5.4-nano-2026-03-17"
26
29
  # @deprecated Announced shutdown date: 2026-08-10. See
27
30
  # https://developers.openai.com/api/docs/deprecations for details and recommended
@@ -39,6 +42,9 @@ module OpenAI
39
42
  # https://developers.openai.com/api/docs/deprecations for details and recommended
40
43
  # replacements.
41
44
  GPT_5_1 = :"gpt-5.1"
45
+ # @deprecated Announced shutdown date: 2027-04-01. See
46
+ # https://developers.openai.com/api/docs/deprecations for details and recommended
47
+ # replacements.
42
48
  GPT_5_1_2025_11_13 = :"gpt-5.1-2025-11-13"
43
49
  # @deprecated Announced shutdown date: 2026-07-23. See
44
50
  # https://developers.openai.com/api/docs/deprecations for details and recommended