openai 1.1.0 → 1.3.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 (208) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +35 -0
  3. data/README.md +4 -4
  4. data/lib/openai/models/admin/organization/organization_spend_limit.rb +38 -1
  5. data/lib/openai/models/admin/organization/projects/project_spend_limit.rb +38 -1
  6. data/lib/openai/models/admin/organization/projects/spend_limit_update_params.rb +51 -1
  7. data/lib/openai/models/admin/organization/spend_limit_update_params.rb +49 -1
  8. data/lib/openai/models/admin/organization/usage_costs_params.rb +2 -2
  9. data/lib/openai/models/all_models.rb +4 -0
  10. data/lib/openai/models/batch.rb +4 -6
  11. data/lib/openai/models/batch_create_params.rb +2 -4
  12. data/lib/openai/models/beta/agents/automation_target_param.rb +2 -2
  13. data/lib/openai/models/beta/agents/session_create_params.rb +2 -2
  14. data/lib/openai/models/beta/agents/session_update_params.rb +12 -1
  15. data/lib/openai/models/beta/beta_compacted_response.rb +19 -1
  16. data/lib/openai/models/beta/beta_container_auto.rb +8 -2
  17. data/lib/openai/models/beta/beta_response.rb +23 -13
  18. data/lib/openai/models/beta/beta_responses_client_event.rb +39 -13
  19. data/lib/openai/models/beta/response_compact_params.rb +31 -10
  20. data/lib/openai/models/beta/response_create_params.rb +23 -13
  21. data/lib/openai/models/chat/chat_completion.rb +2 -4
  22. data/lib/openai/models/chat/completion_create_params.rb +15 -17
  23. data/lib/openai/models/chat/completion_update_params.rb +2 -4
  24. data/lib/openai/models/completion_create_params.rb +3 -3
  25. data/lib/openai/models/conversations/conversation_create_params.rb +12 -5
  26. data/lib/openai/models/eval_create_params.rb +2 -4
  27. data/lib/openai/models/eval_create_response.rb +5 -9
  28. data/lib/openai/models/eval_list_response.rb +5 -9
  29. data/lib/openai/models/eval_retrieve_response.rb +5 -9
  30. data/lib/openai/models/eval_stored_completions_data_source_config.rb +2 -4
  31. data/lib/openai/models/eval_update_params.rb +2 -4
  32. data/lib/openai/models/eval_update_response.rb +5 -9
  33. data/lib/openai/models/evals/create_eval_completions_run_data_source.rb +6 -8
  34. data/lib/openai/models/evals/run_cancel_response.rb +4 -6
  35. data/lib/openai/models/evals/run_create_params.rb +4 -6
  36. data/lib/openai/models/evals/run_create_response.rb +4 -6
  37. data/lib/openai/models/evals/run_list_response.rb +4 -6
  38. data/lib/openai/models/evals/run_retrieve_response.rb +4 -6
  39. data/lib/openai/models/fine_tuning/fine_tuning_job.rb +2 -4
  40. data/lib/openai/models/fine_tuning/job_create_params.rb +7 -6
  41. data/lib/openai/models/live/fork_server_event.rb +4 -4
  42. data/lib/openai/models/live/media_session_config.rb +15 -16
  43. data/lib/openai/models/live/responses_delegation_config.rb +8 -2
  44. data/lib/openai/models/live/responses_delegation_update_config.rb +8 -2
  45. data/lib/openai/models/live/server_event.rb +4 -4
  46. data/lib/openai/models/live/sideband_server_event.rb +4 -4
  47. data/lib/openai/models/realtime/realtime_audio_config_input.rb +12 -9
  48. data/lib/openai/models/realtime/realtime_response.rb +2 -4
  49. data/lib/openai/models/realtime/realtime_response_create_params.rb +2 -4
  50. data/lib/openai/models/responses/compacted_response.rb +19 -1
  51. data/lib/openai/models/responses/container_auto.rb +8 -2
  52. data/lib/openai/models/responses/response.rb +8 -10
  53. data/lib/openai/models/responses/response_compact_params.rb +31 -10
  54. data/lib/openai/models/responses/response_create_params.rb +8 -10
  55. data/lib/openai/models/responses/responses_client_event.rb +8 -10
  56. data/lib/openai/models/responses_model.rb +4 -0
  57. data/lib/openai/models/vector_store.rb +2 -4
  58. data/lib/openai/models/vector_store_create_params.rb +2 -4
  59. data/lib/openai/models/vector_store_update_params.rb +2 -4
  60. data/lib/openai/resources/admin/organization/projects/spend_limit.rb +5 -1
  61. data/lib/openai/resources/admin/organization/spend_limit.rb +5 -1
  62. data/lib/openai/resources/admin/organization/usage.rb +1 -1
  63. data/lib/openai/resources/batches.rb +1 -2
  64. data/lib/openai/resources/beta/agents/sessions/events.rb +7 -2
  65. data/lib/openai/resources/beta/agents/sessions/traces.rb +4 -2
  66. data/lib/openai/resources/beta/agents/sessions.rb +8 -4
  67. data/lib/openai/resources/beta/responses.rb +9 -6
  68. data/lib/openai/resources/chat/completions.rb +11 -14
  69. data/lib/openai/resources/completions.rb +2 -2
  70. data/lib/openai/resources/conversations.rb +5 -3
  71. data/lib/openai/resources/evals/runs.rb +1 -2
  72. data/lib/openai/resources/evals.rb +2 -4
  73. data/lib/openai/resources/fine_tuning/jobs.rb +2 -3
  74. data/lib/openai/resources/responses.rb +15 -14
  75. data/lib/openai/resources/vector_stores.rb +2 -4
  76. data/lib/openai/version.rb +1 -1
  77. data/rbi/openai/models/admin/organization/organization_spend_limit.rbi +68 -1
  78. data/rbi/openai/models/admin/organization/projects/project_spend_limit.rbi +68 -1
  79. data/rbi/openai/models/admin/organization/projects/spend_limit_update_params.rbi +87 -0
  80. data/rbi/openai/models/admin/organization/spend_limit_update_params.rbi +85 -0
  81. data/rbi/openai/models/admin/organization/usage_costs_params.rbi +2 -2
  82. data/rbi/openai/models/all_models.rbi +7 -0
  83. data/rbi/openai/models/batch.rbi +4 -6
  84. data/rbi/openai/models/batch_create_params.rbi +2 -4
  85. data/rbi/openai/models/beta/agents/automation_target_param.rbi +2 -2
  86. data/rbi/openai/models/beta/agents/session_create_params.rbi +2 -2
  87. data/rbi/openai/models/beta/agents/session_update_params.rbi +12 -0
  88. data/rbi/openai/models/beta/beta_compacted_response.rbi +24 -1
  89. data/rbi/openai/models/beta/beta_container_auto.rbi +8 -2
  90. data/rbi/openai/models/beta/beta_response.rbi +15 -13
  91. data/rbi/openai/models/beta/beta_responses_client_event.rbi +27 -13
  92. data/rbi/openai/models/beta/response_compact_params.rbi +35 -9
  93. data/rbi/openai/models/beta/response_create_params.rbi +27 -13
  94. data/rbi/openai/models/chat/chat_completion.rbi +2 -4
  95. data/rbi/openai/models/chat/completion_create_params.rbi +14 -16
  96. data/rbi/openai/models/chat/completion_update_params.rbi +2 -4
  97. data/rbi/openai/models/completion_create_params.rbi +3 -3
  98. data/rbi/openai/models/conversations/conversation_create_params.rbi +12 -4
  99. data/rbi/openai/models/eval_create_params.rbi +2 -4
  100. data/rbi/openai/models/eval_create_response.rbi +5 -9
  101. data/rbi/openai/models/eval_list_response.rbi +5 -9
  102. data/rbi/openai/models/eval_retrieve_response.rbi +5 -9
  103. data/rbi/openai/models/eval_stored_completions_data_source_config.rbi +2 -4
  104. data/rbi/openai/models/eval_update_params.rbi +2 -4
  105. data/rbi/openai/models/eval_update_response.rbi +5 -9
  106. data/rbi/openai/models/evals/create_eval_completions_run_data_source.rbi +6 -8
  107. data/rbi/openai/models/evals/run_cancel_response.rbi +4 -6
  108. data/rbi/openai/models/evals/run_create_params.rbi +4 -6
  109. data/rbi/openai/models/evals/run_create_response.rbi +4 -6
  110. data/rbi/openai/models/evals/run_list_response.rbi +4 -6
  111. data/rbi/openai/models/evals/run_retrieve_response.rbi +4 -6
  112. data/rbi/openai/models/fine_tuning/fine_tuning_job.rbi +2 -4
  113. data/rbi/openai/models/fine_tuning/job_create_params.rbi +8 -6
  114. data/rbi/openai/models/live/fork_server_event.rbi +3 -3
  115. data/rbi/openai/models/live/media_session_config.rbi +15 -16
  116. data/rbi/openai/models/live/responses_delegation_config.rbi +8 -2
  117. data/rbi/openai/models/live/responses_delegation_update_config.rbi +8 -2
  118. data/rbi/openai/models/live/server_event.rbi +3 -3
  119. data/rbi/openai/models/live/sideband_server_event.rbi +3 -3
  120. data/rbi/openai/models/realtime/realtime_audio_config_input.rbi +12 -9
  121. data/rbi/openai/models/realtime/realtime_response.rbi +2 -4
  122. data/rbi/openai/models/realtime/realtime_response_create_params.rbi +2 -4
  123. data/rbi/openai/models/responses/compacted_response.rbi +24 -1
  124. data/rbi/openai/models/responses/container_auto.rbi +8 -2
  125. data/rbi/openai/models/responses/response.rbi +8 -10
  126. data/rbi/openai/models/responses/response_compact_params.rbi +35 -9
  127. data/rbi/openai/models/responses/response_create_params.rbi +8 -10
  128. data/rbi/openai/models/responses/responses_client_event.rbi +8 -10
  129. data/rbi/openai/models/responses_model.rbi +16 -0
  130. data/rbi/openai/models/vector_store.rbi +2 -4
  131. data/rbi/openai/models/vector_store_create_params.rbi +2 -4
  132. data/rbi/openai/models/vector_store_update_params.rbi +2 -4
  133. data/rbi/openai/resources/admin/organization/projects/spend_limit.rbi +6 -0
  134. data/rbi/openai/resources/admin/organization/spend_limit.rbi +6 -0
  135. data/rbi/openai/resources/admin/organization/usage.rbi +1 -1
  136. data/rbi/openai/resources/batches.rbi +1 -2
  137. data/rbi/openai/resources/beta/agents/sessions/events.rbi +7 -2
  138. data/rbi/openai/resources/beta/agents/sessions/traces.rbi +4 -2
  139. data/rbi/openai/resources/beta/agents/sessions.rbi +7 -3
  140. data/rbi/openai/resources/beta/responses.rbi +8 -5
  141. data/rbi/openai/resources/chat/completions.rbi +11 -14
  142. data/rbi/openai/resources/completions.rbi +2 -2
  143. data/rbi/openai/resources/conversations.rbi +4 -2
  144. data/rbi/openai/resources/evals/runs.rbi +1 -2
  145. data/rbi/openai/resources/evals.rbi +2 -4
  146. data/rbi/openai/resources/fine_tuning/jobs.rbi +2 -3
  147. data/rbi/openai/resources/responses.rbi +14 -13
  148. data/rbi/openai/resources/vector_stores.rbi +2 -4
  149. data/sig/openai/models/admin/organization/organization_spend_limit.rbs +42 -2
  150. data/sig/openai/models/admin/organization/projects/project_spend_limit.rbs +42 -2
  151. data/sig/openai/models/admin/organization/projects/spend_limit_update_params.rbs +48 -0
  152. data/sig/openai/models/admin/organization/spend_limit_update_params.rbs +48 -0
  153. data/sig/openai/models/admin/organization/usage_costs_params.rbs +3 -3
  154. data/sig/openai/models/all_models.rbs +8 -0
  155. data/sig/openai/models/batch.rbs +5 -7
  156. data/sig/openai/models/batch_create_params.rbs +2 -4
  157. data/sig/openai/models/beta/agents/automation_target_param.rbs +2 -2
  158. data/sig/openai/models/beta/agents/session_create_params.rbs +2 -2
  159. data/sig/openai/models/beta/agents/session_update_params.rbs +10 -0
  160. data/sig/openai/models/beta/beta_compacted_response.rbs +21 -2
  161. data/sig/openai/models/beta/beta_container_auto.rbs +12 -3
  162. data/sig/openai/models/beta/beta_response.rbs +16 -10
  163. data/sig/openai/models/beta/beta_responses_client_event.rbs +19 -13
  164. data/sig/openai/models/beta/response_compact_params.rbs +22 -6
  165. data/sig/openai/models/beta/response_create_params.rbs +19 -13
  166. data/sig/openai/models/chat/chat_completion.rbs +2 -4
  167. data/sig/openai/models/chat/completion_create_params.rbs +10 -12
  168. data/sig/openai/models/chat/completion_update_params.rbs +2 -4
  169. data/sig/openai/models/completion_create_params.rbs +2 -2
  170. data/sig/openai/models/conversations/conversation_create_params.rbs +10 -4
  171. data/sig/openai/models/eval_create_params.rbs +2 -4
  172. data/sig/openai/models/eval_create_response.rbs +4 -8
  173. data/sig/openai/models/eval_list_response.rbs +4 -8
  174. data/sig/openai/models/eval_retrieve_response.rbs +4 -8
  175. data/sig/openai/models/eval_stored_completions_data_source_config.rbs +2 -4
  176. data/sig/openai/models/eval_update_params.rbs +2 -4
  177. data/sig/openai/models/eval_update_response.rbs +4 -8
  178. data/sig/openai/models/evals/create_eval_completions_run_data_source.rbs +7 -9
  179. data/sig/openai/models/evals/run_cancel_response.rbs +5 -7
  180. data/sig/openai/models/evals/run_create_params.rbs +5 -7
  181. data/sig/openai/models/evals/run_create_response.rbs +5 -7
  182. data/sig/openai/models/evals/run_list_response.rbs +5 -7
  183. data/sig/openai/models/evals/run_retrieve_response.rbs +5 -7
  184. data/sig/openai/models/fine_tuning/fine_tuning_job.rbs +2 -4
  185. data/sig/openai/models/fine_tuning/job_create_params.rbs +6 -6
  186. data/sig/openai/models/live/media_session_config.rbs +21 -21
  187. data/sig/openai/models/live/responses_delegation_config.rbs +8 -2
  188. data/sig/openai/models/live/responses_delegation_update_config.rbs +8 -2
  189. data/sig/openai/models/realtime/realtime_audio_config_input.rbs +12 -9
  190. data/sig/openai/models/realtime/realtime_response.rbs +2 -4
  191. data/sig/openai/models/realtime/realtime_response_create_params.rbs +2 -4
  192. data/sig/openai/models/responses/compacted_response.rbs +21 -2
  193. data/sig/openai/models/responses/container_auto.rbs +12 -3
  194. data/sig/openai/models/responses/response.rbs +8 -10
  195. data/sig/openai/models/responses/response_compact_params.rbs +22 -6
  196. data/sig/openai/models/responses/response_create_params.rbs +11 -13
  197. data/sig/openai/models/responses/responses_client_event.rbs +11 -13
  198. data/sig/openai/models/responses_model.rbs +8 -0
  199. data/sig/openai/models/vector_store.rbs +2 -4
  200. data/sig/openai/models/vector_store_create_params.rbs +2 -4
  201. data/sig/openai/models/vector_store_update_params.rbs +2 -4
  202. data/sig/openai/resources/admin/organization/projects/spend_limit.rbs +1 -0
  203. data/sig/openai/resources/admin/organization/spend_limit.rbs +1 -0
  204. data/sig/openai/resources/beta/agents/sessions.rbs +1 -0
  205. data/sig/openai/resources/beta/responses.rbs +1 -0
  206. data/sig/openai/resources/conversations.rbs +1 -0
  207. data/sig/openai/resources/responses.rbs +1 -0
  208. metadata +1 -1
@@ -125,13 +125,13 @@ module OpenAI
125
125
  # @param metadata [Hash{Symbol=>String}, nil]
126
126
  # Body param: Set of 16 key-value pairs that can be attached to an object. This
127
127
  # can be useful for storing additional information about the object in a
128
- # structured format, and querying for objects via API or the dashboard.
128
+ # structured format.
129
129
  #
130
130
  # Keys are strings with a maximum length of 64 characters. Values are strings with
131
131
  # a maximum length of 512 characters.
132
132
  #
133
133
  # @param model [Symbol, String, OpenAI::Models::Beta::ResponseCreateParams::Model]
134
- # Body param: Model ID used to generate the response, like `gpt-6-astra`. OpenAI
134
+ # Body param: Model ID used to generate the response, like `gpt-6.2-astra`. OpenAI
135
135
  # offers a wide range of models with different capabilities, performance
136
136
  # characteristics, and price points. Refer to the
137
137
  # [model guide](https://developers.openai.com/api/docs/models) to browse and
@@ -436,13 +436,13 @@ module OpenAI
436
436
  # @param metadata [Hash{Symbol=>String}, nil]
437
437
  # Body param: Set of 16 key-value pairs that can be attached to an object. This
438
438
  # can be useful for storing additional information about the object in a
439
- # structured format, and querying for objects via API or the dashboard.
439
+ # structured format.
440
440
  #
441
441
  # Keys are strings with a maximum length of 64 characters. Values are strings with
442
442
  # a maximum length of 512 characters.
443
443
  #
444
444
  # @param model [Symbol, String, OpenAI::Models::Beta::ResponseCreateParams::Model]
445
- # Body param: Model ID used to generate the response, like `gpt-6-astra`. OpenAI
445
+ # Body param: Model ID used to generate the response, like `gpt-6.2-astra`. OpenAI
446
446
  # offers a wide range of models with different capabilities, performance
447
447
  # characteristics, and price points. Refer to the
448
448
  # [model guide](https://developers.openai.com/api/docs/models) to browse and
@@ -840,10 +840,10 @@ module OpenAI
840
840
  # For ZDR-compatible compaction details, see
841
841
  # [Compaction (advanced)](https://developers.openai.com/api/docs/guides/conversation-state#compaction-advanced).
842
842
  #
843
- # @overload compact(model:, image: nil, input: nil, instructions: nil, previous_response_id: nil, prompt_cache_key: nil, prompt_cache_options: nil, prompt_cache_retention: nil, service_tier: nil, betas: nil, request_options: {})
843
+ # @overload compact(model:, image: nil, input: nil, instructions: nil, previous_response_id: nil, prompt_cache_key: nil, prompt_cache_options: nil, prompt_cache_retention: nil, safety_identifier: nil, service_tier: nil, betas: nil, request_options: {})
844
844
  #
845
845
  # @param model [Symbol, String, OpenAI::Models::Beta::ResponseCompactParams::Model, nil]
846
- # Body param: Model ID used to generate the response, like `gpt-6-astra`. OpenAI
846
+ # Body param: Model ID used to generate the response, like `gpt-6.2-astra`. OpenAI
847
847
  # offers a wide range of models with different capabilities, performance
848
848
  # characteristics, and price points. Refer to the
849
849
  # [model guide](https://developers.openai.com/api/docs/models) to browse and
@@ -886,6 +886,9 @@ module OpenAI
886
886
  # @param prompt_cache_retention [Symbol, OpenAI::Models::Beta::ResponseCompactParams::PromptCacheRetention, nil]
887
887
  # Body param: How long to retain a prompt cache entry created by this request.
888
888
  #
889
+ # @param safety_identifier [String, nil]
890
+ # Body param: A stable identifier used for safety monitoring and abuse detection.
891
+ #
889
892
  # @param service_tier [Symbol, OpenAI::Models::Beta::ResponseCompactParams::ServiceTier, nil]
890
893
  # Body param: Specifies the processing type used for serving the request. - If set
891
894
  # to 'auto', then the request will be processed with the service tier configured
@@ -48,9 +48,9 @@ module OpenAI
48
48
  # [audio](https://developers.openai.com/api/docs/guides/audio).
49
49
  #
50
50
  # @param model [String, Symbol, OpenAI::Models::ChatModel]
51
- # Model ID used to generate the response, like `gpt-6-astra` or `o3`. OpenAI
52
- # offers a wide range of models with different capabilities, performance
53
- # characteristics, and price points. Refer to the
51
+ # Model ID used to generate the response, like `gpt-6.2-astra`. OpenAI offers a
52
+ # wide range of models with different capabilities, performance characteristics,
53
+ # and price points. Refer to the
54
54
  # [model guide](https://developers.openai.com/api/docs/models) to browse and
55
55
  # compare available models.
56
56
  #
@@ -116,8 +116,7 @@ module OpenAI
116
116
  #
117
117
  # @param metadata [Hash{Symbol=>String}, nil]
118
118
  # Set of 16 key-value pairs that can be attached to an object. This can be useful
119
- # for storing additional information about the object in a structured format, and
120
- # querying for objects via API or the dashboard.
119
+ # for storing additional information about the object in a structured format.
121
120
  #
122
121
  # Keys are strings with a maximum length of 64 characters. Values are strings with
123
122
  # a maximum length of 512 characters.
@@ -255,7 +254,7 @@ module OpenAI
255
254
  # parameter.
256
255
  #
257
256
  # @param stop [String, Array<String>, nil]
258
- # Not supported with latest reasoning models `o3` and `o4-mini`.
257
+ # Not supported with reasoning models `o3` and `o4-mini`.
259
258
  #
260
259
  # Up to 4 sequences where the API will stop generating further tokens. The
261
260
  # returned text will not contain the stop sequence.
@@ -386,9 +385,9 @@ module OpenAI
386
385
  # [audio](https://developers.openai.com/api/docs/guides/audio).
387
386
  #
388
387
  # @param model [String, Symbol, OpenAI::Models::ChatModel]
389
- # Model ID used to generate the response, like `gpt-6-astra` or `o3`. OpenAI
390
- # offers a wide range of models with different capabilities, performance
391
- # characteristics, and price points. Refer to the
388
+ # Model ID used to generate the response, like `gpt-6.2-astra`. OpenAI offers a
389
+ # wide range of models with different capabilities, performance characteristics,
390
+ # and price points. Refer to the
392
391
  # [model guide](https://developers.openai.com/api/docs/models) to browse and
393
392
  # compare available models.
394
393
  #
@@ -454,8 +453,7 @@ module OpenAI
454
453
  #
455
454
  # @param metadata [Hash{Symbol=>String}, nil]
456
455
  # Set of 16 key-value pairs that can be attached to an object. This can be useful
457
- # for storing additional information about the object in a structured format, and
458
- # querying for objects via API or the dashboard.
456
+ # for storing additional information about the object in a structured format.
459
457
  #
460
458
  # Keys are strings with a maximum length of 64 characters. Values are strings with
461
459
  # a maximum length of 512 characters.
@@ -593,7 +591,7 @@ module OpenAI
593
591
  # parameter.
594
592
  #
595
593
  # @param stop [String, Array<String>, nil]
596
- # Not supported with latest reasoning models `o3` and `o4-mini`.
594
+ # Not supported with reasoning models `o3` and `o4-mini`.
597
595
  #
598
596
  # Up to 4 sequences where the API will stop generating further tokens. The
599
597
  # returned text will not contain the stop sequence.
@@ -722,8 +720,7 @@ module OpenAI
722
720
  #
723
721
  # @param metadata [Hash{Symbol=>String}, nil]
724
722
  # Set of 16 key-value pairs that can be attached to an object. This can be useful
725
- # for storing additional information about the object in a structured format, and
726
- # querying for objects via API or the dashboard.
723
+ # for storing additional information about the object in a structured format.
727
724
  #
728
725
  # Keys are strings with a maximum length of 64 characters. Values are strings with
729
726
  # a maximum length of 512 characters.
@@ -106,7 +106,7 @@ module OpenAI
106
106
  # response parameter to monitor changes in the backend.
107
107
  #
108
108
  # @param stop [String, Array<String>, nil]
109
- # Not supported with latest reasoning models `o3` and `o4-mini`.
109
+ # Not supported with reasoning models `o3` and `o4-mini`.
110
110
  #
111
111
  # Up to 4 sequences where the API will stop generating further tokens. The
112
112
  # returned text will not contain the stop sequence.
@@ -261,7 +261,7 @@ module OpenAI
261
261
  # response parameter to monitor changes in the backend.
262
262
  #
263
263
  # @param stop [String, Array<String>, nil]
264
- # Not supported with latest reasoning models `o3` and `o4-mini`.
264
+ # Not supported with reasoning models `o3` and `o4-mini`.
265
265
  #
266
266
  # Up to 4 sequences where the API will stop generating further tokens. The
267
267
  # returned text will not contain the stop sequence.
@@ -10,7 +10,7 @@ module OpenAI
10
10
 
11
11
  # Create a conversation.
12
12
  #
13
- # @overload create(items: nil, metadata: nil, request_options: {})
13
+ # @overload create(items: nil, metadata: nil, safety_identifier: nil, request_options: {})
14
14
  #
15
15
  # @param items [Array<OpenAI::Models::Responses::EasyInputMessage, OpenAI::Models::Responses::ResponseInputItem::Message, OpenAI::Models::Responses::ResponseOutputMessage, OpenAI::Models::Responses::ResponseFileSearchToolCall, OpenAI::Models::Responses::ResponseComputerToolCall, OpenAI::Models::Responses::ResponseInputItem::ComputerCallOutput, OpenAI::Models::Responses::ResponseFunctionWebSearch, OpenAI::Models::Responses::ResponseFunctionToolCall, OpenAI::Models::Responses::ResponseInputItem::FunctionCallOutput, OpenAI::Models::Responses::ResponseInputItem::ToolSearchCall, OpenAI::Models::Responses::ResponseToolSearchOutputItemParam, OpenAI::Models::Responses::ResponseInputItem::AdditionalTools, OpenAI::Models::Responses::ResponseConfigurationUpdateItemParam, OpenAI::Models::Responses::ResponseReasoningItem, OpenAI::Models::Responses::ResponseCompactionItemParam, OpenAI::Models::Responses::ResponseInputItem::ImageGenerationCall, OpenAI::Models::Responses::ResponseCodeInterpreterToolCall, OpenAI::Models::Responses::ResponseInputItem::LocalShellCall, OpenAI::Models::Responses::ResponseInputItem::LocalShellCallOutput, OpenAI::Models::Responses::ResponseInputItem::ShellCall, OpenAI::Models::Responses::ResponseInputItem::ShellCallOutput, OpenAI::Models::Responses::ResponseInputItem::ApplyPatchCall, OpenAI::Models::Responses::ResponseInputItem::ApplyPatchCallOutput, OpenAI::Models::Responses::ResponseInputItem::McpListTools, OpenAI::Models::Responses::ResponseInputItem::McpApprovalRequest, OpenAI::Models::Responses::ResponseInputItem::McpApprovalResponse, OpenAI::Models::Responses::ResponseInputItem::McpCall, OpenAI::Models::Responses::ResponseCustomToolCallOutput, OpenAI::Models::Responses::ResponseCustomToolCall, OpenAI::Models::Responses::ResponseInputItem::CompactionTrigger, OpenAI::Models::Responses::ResponseInputItem::ItemReference, OpenAI::Models::Responses::ResponseInputItem::Program, OpenAI::Models::Responses::ResponseInputItem::ProgramOutput>, nil]
16
16
  # Initial items to include in the conversation context. You may add up to 20 items
@@ -18,12 +18,14 @@ module OpenAI
18
18
  #
19
19
  # @param metadata [Hash{Symbol=>String}, nil]
20
20
  # Set of 16 key-value pairs that can be attached to an object. This can be useful
21
- # for storing additional information about the object in a structured format, and
22
- # querying for objects via API or the dashboard.
21
+ # for storing additional information about the object in a structured format.
23
22
  #
24
23
  # Keys are strings with a maximum length of 64 characters. Values are strings with
25
24
  # a maximum length of 512 characters.
26
25
  #
26
+ # @param safety_identifier [String, nil]
27
+ # A stable identifier used for safety monitoring and abuse detection.
28
+ #
27
29
  # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil]
28
30
  #
29
31
  # @return [OpenAI::Models::Conversations::Conversation]
@@ -23,8 +23,7 @@ module OpenAI
23
23
  #
24
24
  # @param metadata [Hash{Symbol=>String}, nil]
25
25
  # Set of 16 key-value pairs that can be attached to an object. This can be useful
26
- # for storing additional information about the object in a structured format, and
27
- # querying for objects via API or the dashboard.
26
+ # for storing additional information about the object in a structured format.
28
27
  #
29
28
  # Keys are strings with a maximum length of 64 characters. Values are strings with
30
29
  # a maximum length of 512 characters.
@@ -29,8 +29,7 @@ module OpenAI
29
29
  #
30
30
  # @param metadata [Hash{Symbol=>String}, nil]
31
31
  # Set of 16 key-value pairs that can be attached to an object. This can be useful
32
- # for storing additional information about the object in a structured format, and
33
- # querying for objects via API or the dashboard.
32
+ # for storing additional information about the object in a structured format.
34
33
  #
35
34
  # Keys are strings with a maximum length of 64 characters. Values are strings with
36
35
  # a maximum length of 512 characters.
@@ -86,8 +85,7 @@ module OpenAI
86
85
  #
87
86
  # @param metadata [Hash{Symbol=>String}, nil]
88
87
  # Set of 16 key-value pairs that can be attached to an object. This can be useful
89
- # for storing additional information about the object in a structured format, and
90
- # querying for objects via API or the dashboard.
88
+ # for storing additional information about the object in a structured format.
91
89
  #
92
90
  # Keys are strings with a maximum length of 64 characters. Values are strings with
93
91
  # a maximum length of 512 characters.
@@ -53,8 +53,7 @@ module OpenAI
53
53
  #
54
54
  # @param metadata [Hash{Symbol=>String}, nil]
55
55
  # Set of 16 key-value pairs that can be attached to an object. This can be useful
56
- # for storing additional information about the object in a structured format, and
57
- # querying for objects via API or the dashboard.
56
+ # for storing additional information about the object in a structured format.
58
57
  #
59
58
  # Keys are strings with a maximum length of 64 characters. Values are strings with
60
59
  # a maximum length of 512 characters.
@@ -72,7 +71,7 @@ module OpenAI
72
71
  # name.
73
72
  #
74
73
  # For example, a `suffix` of "custom-model-name" would produce a model name like
75
- # `ft:gpt-4o-mini:openai:custom-model-name:7p4lURel`.
74
+ # `ft:gpt-4.1-mini-2025-04-14:openai:custom-model-name:7p4lURel`.
76
75
  #
77
76
  # @param validation_file [String, nil]
78
77
  # The ID of an uploaded file that contains validation data.
@@ -124,16 +124,15 @@ module OpenAI
124
124
  #
125
125
  # @param metadata [Hash{Symbol=>String}, nil]
126
126
  # Set of 16 key-value pairs that can be attached to an object. This can be useful
127
- # for storing additional information about the object in a structured format, and
128
- # querying for objects via API or the dashboard.
127
+ # for storing additional information about the object in a structured format.
129
128
  #
130
129
  # Keys are strings with a maximum length of 64 characters. Values are strings with
131
130
  # a maximum length of 512 characters.
132
131
  #
133
132
  # @param model [String, Symbol, OpenAI::Models::ChatModel, OpenAI::Models::ResponsesModel::ResponsesOnlyModel]
134
- # Model ID used to generate the response, like `gpt-6-astra`. OpenAI offers a wide
135
- # range of models with different capabilities, performance characteristics, and
136
- # price points. Refer to the
133
+ # Model ID used to generate the response, like `gpt-6.2-astra`. OpenAI offers a
134
+ # wide range of models with different capabilities, performance characteristics,
135
+ # and price points. Refer to the
137
136
  # [model guide](https://developers.openai.com/api/docs/models) to browse and
138
137
  # compare available models.
139
138
  #
@@ -427,16 +426,15 @@ module OpenAI
427
426
  #
428
427
  # @param metadata [Hash{Symbol=>String}, nil]
429
428
  # Set of 16 key-value pairs that can be attached to an object. This can be useful
430
- # for storing additional information about the object in a structured format, and
431
- # querying for objects via API or the dashboard.
429
+ # for storing additional information about the object in a structured format.
432
430
  #
433
431
  # Keys are strings with a maximum length of 64 characters. Values are strings with
434
432
  # a maximum length of 512 characters.
435
433
  #
436
434
  # @param model [String, Symbol, OpenAI::Models::ChatModel, OpenAI::Models::ResponsesModel::ResponsesOnlyModel]
437
- # Model ID used to generate the response, like `gpt-6-astra`. OpenAI offers a wide
438
- # range of models with different capabilities, performance characteristics, and
439
- # price points. Refer to the
435
+ # Model ID used to generate the response, like `gpt-6.2-astra`. OpenAI offers a
436
+ # wide range of models with different capabilities, performance characteristics,
437
+ # and price points. Refer to the
440
438
  # [model guide](https://developers.openai.com/api/docs/models) to browse and
441
439
  # compare available models.
442
440
  #
@@ -805,12 +803,12 @@ module OpenAI
805
803
  # For ZDR-compatible compaction details, see
806
804
  # [Compaction (advanced)](https://developers.openai.com/api/docs/guides/conversation-state#compaction-advanced).
807
805
  #
808
- # @overload compact(model:, image: nil, input: nil, instructions: nil, previous_response_id: nil, prompt_cache_key: nil, prompt_cache_options: nil, prompt_cache_retention: nil, service_tier: nil, request_options: {})
806
+ # @overload compact(model:, image: nil, input: nil, instructions: nil, previous_response_id: nil, prompt_cache_key: nil, prompt_cache_options: nil, prompt_cache_retention: nil, safety_identifier: nil, service_tier: nil, request_options: {})
809
807
  #
810
808
  # @param model [Symbol, String, OpenAI::Models::Responses::ResponseCompactParams::Model, nil]
811
- # Model ID used to generate the response, like `gpt-6-astra`. OpenAI offers a wide
812
- # range of models with different capabilities, performance characteristics, and
813
- # price points. Refer to the
809
+ # Model ID used to generate the response, like `gpt-6.2-astra`. OpenAI offers a
810
+ # wide range of models with different capabilities, performance characteristics,
811
+ # and price points. Refer to the
814
812
  # [model guide](https://developers.openai.com/api/docs/models) to browse and
815
813
  # compare available models.
816
814
  #
@@ -849,6 +847,9 @@ module OpenAI
849
847
  # @param prompt_cache_retention [Symbol, OpenAI::Models::Responses::ResponseCompactParams::PromptCacheRetention, nil]
850
848
  # How long to retain a prompt cache entry created by this request.
851
849
  #
850
+ # @param safety_identifier [String, nil]
851
+ # A stable identifier used for safety monitoring and abuse detection.
852
+ #
852
853
  # @param service_tier [Symbol, OpenAI::Models::Responses::ResponseCompactParams::ServiceTier, nil]
853
854
  # Specifies the processing type used for serving the request. - If set to 'auto',
854
855
  # then the request will be processed with the service tier configured in the
@@ -31,8 +31,7 @@ module OpenAI
31
31
  #
32
32
  # @param metadata [Hash{Symbol=>String}, nil]
33
33
  # Set of 16 key-value pairs that can be attached to an object. This can be useful
34
- # for storing additional information about the object in a structured format, and
35
- # querying for objects via API or the dashboard.
34
+ # for storing additional information about the object in a structured format.
36
35
  #
37
36
  # Keys are strings with a maximum length of 64 characters. Values are strings with
38
37
  # a maximum length of 512 characters.
@@ -93,8 +92,7 @@ module OpenAI
93
92
  #
94
93
  # @param metadata [Hash{Symbol=>String}, nil]
95
94
  # Set of 16 key-value pairs that can be attached to an object. This can be useful
96
- # for storing additional information about the object in a structured format, and
97
- # querying for objects via API or the dashboard.
95
+ # for storing additional information about the object in a structured format.
98
96
  #
99
97
  # Keys are strings with a maximum length of 64 characters. Values are strings with
100
98
  # a maximum length of 512 characters.
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module OpenAI
4
- VERSION = "1.1.0"
4
+ VERSION = "1.3.0"
5
5
  end
@@ -42,6 +42,18 @@ module OpenAI
42
42
  sig { returns(Integer) }
43
43
  attr_accessor :threshold_amount
44
44
 
45
+ # Email notifications sent when the hard spend limit is reached.
46
+ sig { returns(T.nilable(OpenAI::Admin::Organization::OrganizationSpendLimit::NotificationChannel)) }
47
+ attr_reader :notification_channel
48
+
49
+ sig {
50
+ params(
51
+ notification_channel: OpenAI::Admin::Organization::OrganizationSpendLimit::NotificationChannel::OrHash
52
+ )
53
+ .void
54
+ }
55
+ attr_writer :notification_channel
56
+
45
57
  # Represents a hard spend limit configured at the organization level.
46
58
  sig do
47
59
  params(
@@ -54,6 +66,8 @@ module OpenAI
54
66
 
55
67
  threshold_amount: Integer,
56
68
 
69
+ notification_channel: OpenAI::Admin::Organization::OrganizationSpendLimit::NotificationChannel::OrHash,
70
+
57
71
  object: Symbol
58
72
  )
59
73
  .returns(T.attached_class)
@@ -73,6 +87,9 @@ module OpenAI
73
87
  # The hard spend limit amount, in cents.
74
88
  threshold_amount:,
75
89
 
90
+ # Email notifications sent when the hard spend limit is reached.
91
+ notification_channel: nil,
92
+
76
93
  # The object type, which is always `organization.spend_limit`.
77
94
 
78
95
  object: :"organization.spend_limit"
@@ -86,7 +103,8 @@ module OpenAI
86
103
  enforcement: OpenAI::Admin::Organization::OrganizationSpendLimit::Enforcement,
87
104
  interval: OpenAI::Admin::Organization::OrganizationSpendLimit::Interval::Variants,
88
105
  object: Symbol,
89
- threshold_amount: Integer
106
+ threshold_amount: Integer,
107
+ notification_channel: OpenAI::Admin::Organization::OrganizationSpendLimit::NotificationChannel
90
108
  }
91
109
  )
92
110
  end
@@ -211,6 +229,55 @@ module OpenAI
211
229
 
212
230
  end
213
231
 
232
+ class NotificationChannel < OpenAI::Internal::Type::BaseModel
233
+ OrHash = T.type_alias do
234
+ T.any(
235
+ OpenAI::Admin::Organization::OrganizationSpendLimit::NotificationChannel,
236
+ OpenAI::Internal::AnyHash
237
+ )
238
+ end
239
+
240
+ sig { returns(T::Array[String]) }
241
+ attr_accessor :recipients
242
+
243
+ sig { returns(Symbol) }
244
+ attr_accessor :type
245
+
246
+ sig { returns(T.nilable(String)) }
247
+ attr_accessor :subject_prefix
248
+
249
+ # Email notifications sent when the hard spend limit is reached.
250
+ sig do
251
+ params(
252
+
253
+ recipients: T::Array[String],
254
+
255
+ subject_prefix: T.nilable(String),
256
+
257
+ type: Symbol
258
+ )
259
+ .returns(T.attached_class)
260
+ end
261
+ def self.new(
262
+
263
+ recipients:,
264
+
265
+ subject_prefix: nil,
266
+
267
+ type: :email
268
+ )
269
+ end
270
+
271
+ sig do
272
+ override.returns(
273
+ {recipients: T::Array[String], type: Symbol, subject_prefix: T.nilable(String)}
274
+ )
275
+ end
276
+ def to_hash
277
+ end
278
+
279
+ end
280
+
214
281
  end
215
282
 
216
283
  end
@@ -46,6 +46,18 @@ module OpenAI
46
46
  sig { returns(Integer) }
47
47
  attr_accessor :threshold_amount
48
48
 
49
+ # Email notifications sent when the hard spend limit is reached.
50
+ sig { returns(T.nilable(OpenAI::Admin::Organization::Projects::ProjectSpendLimit::NotificationChannel)) }
51
+ attr_reader :notification_channel
52
+
53
+ sig {
54
+ params(
55
+ notification_channel: OpenAI::Admin::Organization::Projects::ProjectSpendLimit::NotificationChannel::OrHash
56
+ )
57
+ .void
58
+ }
59
+ attr_writer :notification_channel
60
+
49
61
  # Represents a hard spend limit configured at the project level.
50
62
  sig do
51
63
  params(
@@ -58,6 +70,8 @@ module OpenAI
58
70
 
59
71
  threshold_amount: Integer,
60
72
 
73
+ notification_channel: OpenAI::Admin::Organization::Projects::ProjectSpendLimit::NotificationChannel::OrHash,
74
+
61
75
  object: Symbol
62
76
  )
63
77
  .returns(T.attached_class)
@@ -77,6 +91,9 @@ module OpenAI
77
91
  # The hard spend limit amount, in cents.
78
92
  threshold_amount:,
79
93
 
94
+ # Email notifications sent when the hard spend limit is reached.
95
+ notification_channel: nil,
96
+
80
97
  # The object type, which is always `project.spend_limit`.
81
98
 
82
99
  object: :"project.spend_limit"
@@ -90,7 +107,8 @@ module OpenAI
90
107
  enforcement: OpenAI::Admin::Organization::Projects::ProjectSpendLimit::Enforcement,
91
108
  interval: OpenAI::Admin::Organization::Projects::ProjectSpendLimit::Interval::Variants,
92
109
  object: Symbol,
93
- threshold_amount: Integer
110
+ threshold_amount: Integer,
111
+ notification_channel: OpenAI::Admin::Organization::Projects::ProjectSpendLimit::NotificationChannel
94
112
  }
95
113
  )
96
114
  end
@@ -222,6 +240,55 @@ module OpenAI
222
240
 
223
241
  end
224
242
 
243
+ class NotificationChannel < OpenAI::Internal::Type::BaseModel
244
+ OrHash = T.type_alias do
245
+ T.any(
246
+ OpenAI::Admin::Organization::Projects::ProjectSpendLimit::NotificationChannel,
247
+ OpenAI::Internal::AnyHash
248
+ )
249
+ end
250
+
251
+ sig { returns(T::Array[String]) }
252
+ attr_accessor :recipients
253
+
254
+ sig { returns(Symbol) }
255
+ attr_accessor :type
256
+
257
+ sig { returns(T.nilable(String)) }
258
+ attr_accessor :subject_prefix
259
+
260
+ # Email notifications sent when the hard spend limit is reached.
261
+ sig do
262
+ params(
263
+
264
+ recipients: T::Array[String],
265
+
266
+ subject_prefix: T.nilable(String),
267
+
268
+ type: Symbol
269
+ )
270
+ .returns(T.attached_class)
271
+ end
272
+ def self.new(
273
+
274
+ recipients:,
275
+
276
+ subject_prefix: nil,
277
+
278
+ type: :email
279
+ )
280
+ end
281
+
282
+ sig do
283
+ override.returns(
284
+ {recipients: T::Array[String], type: Symbol, subject_prefix: T.nilable(String)}
285
+ )
286
+ end
287
+ def to_hash
288
+ end
289
+
290
+ end
291
+
225
292
  end
226
293
 
227
294
  end
@@ -37,6 +37,23 @@ module OpenAI
37
37
  sig { returns(Integer) }
38
38
  attr_accessor :threshold_amount
39
39
 
40
+ # Configure email notifications when the spend limit is reached. Leave this out to
41
+ # keep the current settings, or send null to reset to owner-only notifications.
42
+ sig {
43
+ returns(T.nilable(OpenAI::Admin::Organization::Projects::SpendLimitUpdateParams::NotificationChannel))
44
+ }
45
+ attr_reader :notification_channel
46
+
47
+ sig {
48
+ params(
49
+ notification_channel: T.nilable(
50
+ OpenAI::Admin::Organization::Projects::SpendLimitUpdateParams::NotificationChannel::OrHash
51
+ )
52
+ )
53
+ .void
54
+ }
55
+ attr_writer :notification_channel
56
+
40
57
  sig do
41
58
  params(
42
59
 
@@ -48,6 +65,10 @@ module OpenAI
48
65
 
49
66
  threshold_amount: Integer,
50
67
 
68
+ notification_channel: T.nilable(
69
+ OpenAI::Admin::Organization::Projects::SpendLimitUpdateParams::NotificationChannel::OrHash
70
+ ),
71
+
51
72
  request_options: OpenAI::RequestOptions::OrHash
52
73
  )
53
74
  .returns(T.attached_class)
@@ -66,6 +87,10 @@ module OpenAI
66
87
  # The hard spend limit amount, in cents.
67
88
  threshold_amount:,
68
89
 
90
+ # Configure email notifications when the spend limit is reached. Leave this out to
91
+ # keep the current settings, or send null to reset to owner-only notifications.
92
+ notification_channel: nil,
93
+
69
94
  request_options: {}
70
95
  )
71
96
  end
@@ -77,6 +102,9 @@ module OpenAI
77
102
  currency: OpenAI::Admin::Organization::Projects::SpendLimitUpdateParams::Currency::OrSymbol,
78
103
  interval: OpenAI::Admin::Organization::Projects::SpendLimitUpdateParams::Interval::OrSymbol,
79
104
  threshold_amount: Integer,
105
+ notification_channel: T.nilable(
106
+ OpenAI::Admin::Organization::Projects::SpendLimitUpdateParams::NotificationChannel
107
+ ),
80
108
  request_options: OpenAI::RequestOptions
81
109
  }
82
110
  )
@@ -128,6 +156,65 @@ module OpenAI
128
156
  end
129
157
  end
130
158
 
159
+ class NotificationChannel < OpenAI::Internal::Type::BaseModel
160
+ OrHash = T.type_alias do
161
+ T.any(
162
+ OpenAI::Admin::Organization::Projects::SpendLimitUpdateParams::NotificationChannel,
163
+ OpenAI::Internal::AnyHash
164
+ )
165
+ end
166
+
167
+ sig { returns(Symbol) }
168
+ attr_accessor :type
169
+
170
+ # Additional email recipients. Omit to keep them unchanged; send [] to clear them.
171
+ sig { returns(T.nilable(T::Array[String])) }
172
+ attr_reader :recipients
173
+
174
+ sig { params(recipients: T::Array[String]).void }
175
+ attr_writer :recipients
176
+
177
+ # Email subject prefix. Omit to keep it unchanged; send null or an empty string to
178
+ # clear it.
179
+ sig { returns(T.nilable(String)) }
180
+ attr_accessor :subject_prefix
181
+
182
+ # Configure email notifications when the spend limit is reached. Leave this out to
183
+ # keep the current settings, or send null to reset to owner-only notifications.
184
+ sig do
185
+ params(
186
+
187
+ recipients: T::Array[String],
188
+
189
+ subject_prefix: T.nilable(String),
190
+
191
+ type: Symbol
192
+ )
193
+ .returns(T.attached_class)
194
+ end
195
+ def self.new(
196
+
197
+ # Additional email recipients. Omit to keep them unchanged; send [] to clear them.
198
+ recipients: nil,
199
+
200
+ # Email subject prefix. Omit to keep it unchanged; send null or an empty string to
201
+ # clear it.
202
+ subject_prefix: nil,
203
+
204
+ type: :email
205
+ )
206
+ end
207
+
208
+ sig do
209
+ override.returns(
210
+ {type: Symbol, recipients: T::Array[String], subject_prefix: T.nilable(String)}
211
+ )
212
+ end
213
+ def to_hash
214
+ end
215
+
216
+ end
217
+
131
218
  end
132
219
 
133
220
  end