openai 1.2.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 (202) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +18 -0
  3. data/README.md +1 -1
  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/batch.rb +4 -6
  10. data/lib/openai/models/batch_create_params.rb +2 -4
  11. data/lib/openai/models/beta/agents/automation_target_param.rb +2 -2
  12. data/lib/openai/models/beta/agents/session_create_params.rb +2 -2
  13. data/lib/openai/models/beta/agents/session_update_params.rb +12 -1
  14. data/lib/openai/models/beta/beta_compacted_response.rb +19 -1
  15. data/lib/openai/models/beta/beta_container_auto.rb +8 -2
  16. data/lib/openai/models/beta/beta_response.rb +11 -13
  17. data/lib/openai/models/beta/beta_responses_client_event.rb +11 -13
  18. data/lib/openai/models/beta/response_compact_params.rb +19 -10
  19. data/lib/openai/models/beta/response_create_params.rb +11 -13
  20. data/lib/openai/models/chat/chat_completion.rb +2 -4
  21. data/lib/openai/models/chat/completion_create_params.rb +15 -17
  22. data/lib/openai/models/chat/completion_update_params.rb +2 -4
  23. data/lib/openai/models/completion_create_params.rb +3 -3
  24. data/lib/openai/models/conversations/conversation_create_params.rb +12 -5
  25. data/lib/openai/models/eval_create_params.rb +2 -4
  26. data/lib/openai/models/eval_create_response.rb +5 -9
  27. data/lib/openai/models/eval_list_response.rb +5 -9
  28. data/lib/openai/models/eval_retrieve_response.rb +5 -9
  29. data/lib/openai/models/eval_stored_completions_data_source_config.rb +2 -4
  30. data/lib/openai/models/eval_update_params.rb +2 -4
  31. data/lib/openai/models/eval_update_response.rb +5 -9
  32. data/lib/openai/models/evals/create_eval_completions_run_data_source.rb +6 -8
  33. data/lib/openai/models/evals/run_cancel_response.rb +4 -6
  34. data/lib/openai/models/evals/run_create_params.rb +4 -6
  35. data/lib/openai/models/evals/run_create_response.rb +4 -6
  36. data/lib/openai/models/evals/run_list_response.rb +4 -6
  37. data/lib/openai/models/evals/run_retrieve_response.rb +4 -6
  38. data/lib/openai/models/fine_tuning/fine_tuning_job.rb +2 -4
  39. data/lib/openai/models/fine_tuning/job_create_params.rb +7 -6
  40. data/lib/openai/models/live/fork_server_event.rb +4 -4
  41. data/lib/openai/models/live/media_session_config.rb +15 -16
  42. data/lib/openai/models/live/responses_delegation_config.rb +8 -2
  43. data/lib/openai/models/live/responses_delegation_update_config.rb +8 -2
  44. data/lib/openai/models/live/server_event.rb +4 -4
  45. data/lib/openai/models/live/sideband_server_event.rb +4 -4
  46. data/lib/openai/models/realtime/realtime_audio_config_input.rb +12 -9
  47. data/lib/openai/models/realtime/realtime_response.rb +2 -4
  48. data/lib/openai/models/realtime/realtime_response_create_params.rb +2 -4
  49. data/lib/openai/models/responses/compacted_response.rb +19 -1
  50. data/lib/openai/models/responses/container_auto.rb +8 -2
  51. data/lib/openai/models/responses/response.rb +8 -10
  52. data/lib/openai/models/responses/response_compact_params.rb +19 -10
  53. data/lib/openai/models/responses/response_create_params.rb +8 -10
  54. data/lib/openai/models/responses/responses_client_event.rb +8 -10
  55. data/lib/openai/models/vector_store.rb +2 -4
  56. data/lib/openai/models/vector_store_create_params.rb +2 -4
  57. data/lib/openai/models/vector_store_update_params.rb +2 -4
  58. data/lib/openai/resources/admin/organization/projects/spend_limit.rb +5 -1
  59. data/lib/openai/resources/admin/organization/spend_limit.rb +5 -1
  60. data/lib/openai/resources/admin/organization/usage.rb +1 -1
  61. data/lib/openai/resources/batches.rb +1 -2
  62. data/lib/openai/resources/beta/agents/sessions/events.rb +7 -2
  63. data/lib/openai/resources/beta/agents/sessions/traces.rb +4 -2
  64. data/lib/openai/resources/beta/agents/sessions.rb +8 -4
  65. data/lib/openai/resources/beta/responses.rb +9 -6
  66. data/lib/openai/resources/chat/completions.rb +11 -14
  67. data/lib/openai/resources/completions.rb +2 -2
  68. data/lib/openai/resources/conversations.rb +5 -3
  69. data/lib/openai/resources/evals/runs.rb +1 -2
  70. data/lib/openai/resources/evals.rb +2 -4
  71. data/lib/openai/resources/fine_tuning/jobs.rb +2 -3
  72. data/lib/openai/resources/responses.rb +15 -14
  73. data/lib/openai/resources/vector_stores.rb +2 -4
  74. data/lib/openai/version.rb +1 -1
  75. data/rbi/openai/models/admin/organization/organization_spend_limit.rbi +68 -1
  76. data/rbi/openai/models/admin/organization/projects/project_spend_limit.rbi +68 -1
  77. data/rbi/openai/models/admin/organization/projects/spend_limit_update_params.rbi +87 -0
  78. data/rbi/openai/models/admin/organization/spend_limit_update_params.rbi +85 -0
  79. data/rbi/openai/models/admin/organization/usage_costs_params.rbi +2 -2
  80. data/rbi/openai/models/batch.rbi +4 -6
  81. data/rbi/openai/models/batch_create_params.rbi +2 -4
  82. data/rbi/openai/models/beta/agents/automation_target_param.rbi +2 -2
  83. data/rbi/openai/models/beta/agents/session_create_params.rbi +2 -2
  84. data/rbi/openai/models/beta/agents/session_update_params.rbi +12 -0
  85. data/rbi/openai/models/beta/beta_compacted_response.rbi +24 -1
  86. data/rbi/openai/models/beta/beta_container_auto.rbi +8 -2
  87. data/rbi/openai/models/beta/beta_response.rbi +11 -13
  88. data/rbi/openai/models/beta/beta_responses_client_event.rbi +11 -13
  89. data/rbi/openai/models/beta/response_compact_params.rbi +19 -9
  90. data/rbi/openai/models/beta/response_create_params.rbi +11 -13
  91. data/rbi/openai/models/chat/chat_completion.rbi +2 -4
  92. data/rbi/openai/models/chat/completion_create_params.rbi +14 -16
  93. data/rbi/openai/models/chat/completion_update_params.rbi +2 -4
  94. data/rbi/openai/models/completion_create_params.rbi +3 -3
  95. data/rbi/openai/models/conversations/conversation_create_params.rbi +12 -4
  96. data/rbi/openai/models/eval_create_params.rbi +2 -4
  97. data/rbi/openai/models/eval_create_response.rbi +5 -9
  98. data/rbi/openai/models/eval_list_response.rbi +5 -9
  99. data/rbi/openai/models/eval_retrieve_response.rbi +5 -9
  100. data/rbi/openai/models/eval_stored_completions_data_source_config.rbi +2 -4
  101. data/rbi/openai/models/eval_update_params.rbi +2 -4
  102. data/rbi/openai/models/eval_update_response.rbi +5 -9
  103. data/rbi/openai/models/evals/create_eval_completions_run_data_source.rbi +6 -8
  104. data/rbi/openai/models/evals/run_cancel_response.rbi +4 -6
  105. data/rbi/openai/models/evals/run_create_params.rbi +4 -6
  106. data/rbi/openai/models/evals/run_create_response.rbi +4 -6
  107. data/rbi/openai/models/evals/run_list_response.rbi +4 -6
  108. data/rbi/openai/models/evals/run_retrieve_response.rbi +4 -6
  109. data/rbi/openai/models/fine_tuning/fine_tuning_job.rbi +2 -4
  110. data/rbi/openai/models/fine_tuning/job_create_params.rbi +8 -6
  111. data/rbi/openai/models/live/fork_server_event.rbi +3 -3
  112. data/rbi/openai/models/live/media_session_config.rbi +15 -16
  113. data/rbi/openai/models/live/responses_delegation_config.rbi +8 -2
  114. data/rbi/openai/models/live/responses_delegation_update_config.rbi +8 -2
  115. data/rbi/openai/models/live/server_event.rbi +3 -3
  116. data/rbi/openai/models/live/sideband_server_event.rbi +3 -3
  117. data/rbi/openai/models/realtime/realtime_audio_config_input.rbi +12 -9
  118. data/rbi/openai/models/realtime/realtime_response.rbi +2 -4
  119. data/rbi/openai/models/realtime/realtime_response_create_params.rbi +2 -4
  120. data/rbi/openai/models/responses/compacted_response.rbi +24 -1
  121. data/rbi/openai/models/responses/container_auto.rbi +8 -2
  122. data/rbi/openai/models/responses/response.rbi +8 -10
  123. data/rbi/openai/models/responses/response_compact_params.rbi +19 -9
  124. data/rbi/openai/models/responses/response_create_params.rbi +8 -10
  125. data/rbi/openai/models/responses/responses_client_event.rbi +8 -10
  126. data/rbi/openai/models/vector_store.rbi +2 -4
  127. data/rbi/openai/models/vector_store_create_params.rbi +2 -4
  128. data/rbi/openai/models/vector_store_update_params.rbi +2 -4
  129. data/rbi/openai/resources/admin/organization/projects/spend_limit.rbi +6 -0
  130. data/rbi/openai/resources/admin/organization/spend_limit.rbi +6 -0
  131. data/rbi/openai/resources/admin/organization/usage.rbi +1 -1
  132. data/rbi/openai/resources/batches.rbi +1 -2
  133. data/rbi/openai/resources/beta/agents/sessions/events.rbi +7 -2
  134. data/rbi/openai/resources/beta/agents/sessions/traces.rbi +4 -2
  135. data/rbi/openai/resources/beta/agents/sessions.rbi +7 -3
  136. data/rbi/openai/resources/beta/responses.rbi +8 -5
  137. data/rbi/openai/resources/chat/completions.rbi +11 -14
  138. data/rbi/openai/resources/completions.rbi +2 -2
  139. data/rbi/openai/resources/conversations.rbi +4 -2
  140. data/rbi/openai/resources/evals/runs.rbi +1 -2
  141. data/rbi/openai/resources/evals.rbi +2 -4
  142. data/rbi/openai/resources/fine_tuning/jobs.rbi +2 -3
  143. data/rbi/openai/resources/responses.rbi +14 -13
  144. data/rbi/openai/resources/vector_stores.rbi +2 -4
  145. data/sig/openai/models/admin/organization/organization_spend_limit.rbs +42 -2
  146. data/sig/openai/models/admin/organization/projects/project_spend_limit.rbs +42 -2
  147. data/sig/openai/models/admin/organization/projects/spend_limit_update_params.rbs +48 -0
  148. data/sig/openai/models/admin/organization/spend_limit_update_params.rbs +48 -0
  149. data/sig/openai/models/admin/organization/usage_costs_params.rbs +3 -3
  150. data/sig/openai/models/batch.rbs +5 -7
  151. data/sig/openai/models/batch_create_params.rbs +2 -4
  152. data/sig/openai/models/beta/agents/automation_target_param.rbs +2 -2
  153. data/sig/openai/models/beta/agents/session_create_params.rbs +2 -2
  154. data/sig/openai/models/beta/agents/session_update_params.rbs +10 -0
  155. data/sig/openai/models/beta/beta_compacted_response.rbs +21 -2
  156. data/sig/openai/models/beta/beta_container_auto.rbs +12 -3
  157. data/sig/openai/models/beta/beta_response.rbs +8 -10
  158. data/sig/openai/models/beta/beta_responses_client_event.rbs +11 -13
  159. data/sig/openai/models/beta/response_compact_params.rbs +14 -6
  160. data/sig/openai/models/beta/response_create_params.rbs +11 -13
  161. data/sig/openai/models/chat/chat_completion.rbs +2 -4
  162. data/sig/openai/models/chat/completion_create_params.rbs +10 -12
  163. data/sig/openai/models/chat/completion_update_params.rbs +2 -4
  164. data/sig/openai/models/completion_create_params.rbs +2 -2
  165. data/sig/openai/models/conversations/conversation_create_params.rbs +10 -4
  166. data/sig/openai/models/eval_create_params.rbs +2 -4
  167. data/sig/openai/models/eval_create_response.rbs +4 -8
  168. data/sig/openai/models/eval_list_response.rbs +4 -8
  169. data/sig/openai/models/eval_retrieve_response.rbs +4 -8
  170. data/sig/openai/models/eval_stored_completions_data_source_config.rbs +2 -4
  171. data/sig/openai/models/eval_update_params.rbs +2 -4
  172. data/sig/openai/models/eval_update_response.rbs +4 -8
  173. data/sig/openai/models/evals/create_eval_completions_run_data_source.rbs +7 -9
  174. data/sig/openai/models/evals/run_cancel_response.rbs +5 -7
  175. data/sig/openai/models/evals/run_create_params.rbs +5 -7
  176. data/sig/openai/models/evals/run_create_response.rbs +5 -7
  177. data/sig/openai/models/evals/run_list_response.rbs +5 -7
  178. data/sig/openai/models/evals/run_retrieve_response.rbs +5 -7
  179. data/sig/openai/models/fine_tuning/fine_tuning_job.rbs +2 -4
  180. data/sig/openai/models/fine_tuning/job_create_params.rbs +6 -6
  181. data/sig/openai/models/live/media_session_config.rbs +21 -21
  182. data/sig/openai/models/live/responses_delegation_config.rbs +8 -2
  183. data/sig/openai/models/live/responses_delegation_update_config.rbs +8 -2
  184. data/sig/openai/models/realtime/realtime_audio_config_input.rbs +12 -9
  185. data/sig/openai/models/realtime/realtime_response.rbs +2 -4
  186. data/sig/openai/models/realtime/realtime_response_create_params.rbs +2 -4
  187. data/sig/openai/models/responses/compacted_response.rbs +21 -2
  188. data/sig/openai/models/responses/container_auto.rbs +12 -3
  189. data/sig/openai/models/responses/response.rbs +8 -10
  190. data/sig/openai/models/responses/response_compact_params.rbs +14 -6
  191. data/sig/openai/models/responses/response_create_params.rbs +11 -13
  192. data/sig/openai/models/responses/responses_client_event.rbs +11 -13
  193. data/sig/openai/models/vector_store.rbs +2 -4
  194. data/sig/openai/models/vector_store_create_params.rbs +2 -4
  195. data/sig/openai/models/vector_store_update_params.rbs +2 -4
  196. data/sig/openai/resources/admin/organization/projects/spend_limit.rbs +1 -0
  197. data/sig/openai/resources/admin/organization/spend_limit.rbs +1 -0
  198. data/sig/openai/resources/beta/agents/sessions.rbs +1 -0
  199. data/sig/openai/resources/beta/responses.rbs +1 -0
  200. data/sig/openai/resources/conversations.rbs +1 -0
  201. data/sig/openai/resources/responses.rbs +1 -0
  202. metadata +1 -1
@@ -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.2.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
@@ -32,6 +32,21 @@ module OpenAI
32
32
  sig { returns(Integer) }
33
33
  attr_accessor :threshold_amount
34
34
 
35
+ # Configure email notifications when the spend limit is reached. Leave this out to
36
+ # keep the current settings, or send null to reset to owner-only notifications.
37
+ sig { returns(T.nilable(OpenAI::Admin::Organization::SpendLimitUpdateParams::NotificationChannel)) }
38
+ attr_reader :notification_channel
39
+
40
+ sig {
41
+ params(
42
+ notification_channel: T.nilable(
43
+ OpenAI::Admin::Organization::SpendLimitUpdateParams::NotificationChannel::OrHash
44
+ )
45
+ )
46
+ .void
47
+ }
48
+ attr_writer :notification_channel
49
+
35
50
  sig do
36
51
  params(
37
52
 
@@ -41,6 +56,10 @@ module OpenAI
41
56
 
42
57
  threshold_amount: Integer,
43
58
 
59
+ notification_channel: T.nilable(
60
+ OpenAI::Admin::Organization::SpendLimitUpdateParams::NotificationChannel::OrHash
61
+ ),
62
+
44
63
  request_options: OpenAI::RequestOptions::OrHash
45
64
  )
46
65
  .returns(T.attached_class)
@@ -57,6 +76,10 @@ module OpenAI
57
76
  # The hard spend limit amount, in cents.
58
77
  threshold_amount:,
59
78
 
79
+ # Configure email notifications when the spend limit is reached. Leave this out to
80
+ # keep the current settings, or send null to reset to owner-only notifications.
81
+ notification_channel: nil,
82
+
60
83
  request_options: {}
61
84
  )
62
85
  end
@@ -67,6 +90,9 @@ module OpenAI
67
90
  currency: OpenAI::Admin::Organization::SpendLimitUpdateParams::Currency::OrSymbol,
68
91
  interval: OpenAI::Admin::Organization::SpendLimitUpdateParams::Interval::OrSymbol,
69
92
  threshold_amount: Integer,
93
+ notification_channel: T.nilable(
94
+ OpenAI::Admin::Organization::SpendLimitUpdateParams::NotificationChannel
95
+ ),
70
96
  request_options: OpenAI::RequestOptions
71
97
  }
72
98
  )
@@ -111,6 +137,65 @@ module OpenAI
111
137
  end
112
138
  end
113
139
 
140
+ class NotificationChannel < OpenAI::Internal::Type::BaseModel
141
+ OrHash = T.type_alias do
142
+ T.any(
143
+ OpenAI::Admin::Organization::SpendLimitUpdateParams::NotificationChannel,
144
+ OpenAI::Internal::AnyHash
145
+ )
146
+ end
147
+
148
+ sig { returns(Symbol) }
149
+ attr_accessor :type
150
+
151
+ # Additional email recipients. Omit to keep them unchanged; send [] to clear them.
152
+ sig { returns(T.nilable(T::Array[String])) }
153
+ attr_reader :recipients
154
+
155
+ sig { params(recipients: T::Array[String]).void }
156
+ attr_writer :recipients
157
+
158
+ # Email subject prefix. Omit to keep it unchanged; send null or an empty string to
159
+ # clear it.
160
+ sig { returns(T.nilable(String)) }
161
+ attr_accessor :subject_prefix
162
+
163
+ # Configure email notifications when the spend limit is reached. Leave this out to
164
+ # keep the current settings, or send null to reset to owner-only notifications.
165
+ sig do
166
+ params(
167
+
168
+ recipients: T::Array[String],
169
+
170
+ subject_prefix: T.nilable(String),
171
+
172
+ type: Symbol
173
+ )
174
+ .returns(T.attached_class)
175
+ end
176
+ def self.new(
177
+
178
+ # Additional email recipients. Omit to keep them unchanged; send [] to clear them.
179
+ recipients: nil,
180
+
181
+ # Email subject prefix. Omit to keep it unchanged; send null or an empty string to
182
+ # clear it.
183
+ subject_prefix: nil,
184
+
185
+ type: :email
186
+ )
187
+ end
188
+
189
+ sig do
190
+ override.returns(
191
+ {type: Symbol, recipients: T::Array[String], subject_prefix: T.nilable(String)}
192
+ )
193
+ end
194
+ def to_hash
195
+ end
196
+
197
+ end
198
+
114
199
  end
115
200
 
116
201
  end
@@ -67,7 +67,7 @@ module OpenAI
67
67
  attr_writer :limit
68
68
 
69
69
  # Return only costs for these exact line item names. Each value must match the
70
- # complete `line_item` value, for example `gpt-6-astra, input_tokens`.
70
+ # complete `line_item` value, for example `gpt-6.2-astra, input_tokens`.
71
71
  sig { returns(T.nilable(T::Array[String])) }
72
72
  attr_reader :line_items
73
73
 
@@ -143,7 +143,7 @@ module OpenAI
143
143
  limit: nil,
144
144
 
145
145
  # Return only costs for these exact line item names. Each value must match the
146
- # complete `line_item` value, for example `gpt-6-astra, input_tokens`.
146
+ # complete `line_item` value, for example `gpt-6.2-astra, input_tokens`.
147
147
  line_items: nil,
148
148
 
149
149
  # A cursor for use in pagination. Corresponding to the `next_page` field from the
@@ -109,15 +109,14 @@ module OpenAI
109
109
  attr_writer :in_progress_at
110
110
 
111
111
  # Set of 16 key-value pairs that can be attached to an object. This can be useful
112
- # for storing additional information about the object in a structured format, and
113
- # querying for objects via API or the dashboard.
112
+ # for storing additional information about the object in a structured format.
114
113
  #
115
114
  # Keys are strings with a maximum length of 64 characters. Values are strings with
116
115
  # a maximum length of 512 characters.
117
116
  sig { returns(T.nilable(T::Hash[Symbol, String])) }
118
117
  attr_accessor :metadata
119
118
 
120
- # Model ID used to process the batch, like `gpt-6-astra`. OpenAI offers a wide
119
+ # Model ID used to process the batch, like `gpt-6.2-astra`. OpenAI offers a wide
121
120
  # range of models with different capabilities, performance characteristics, and
122
121
  # price points. Refer to the
123
122
  # [model guide](https://developers.openai.com/api/docs/models) to browse and
@@ -249,14 +248,13 @@ module OpenAI
249
248
  in_progress_at: nil,
250
249
 
251
250
  # Set of 16 key-value pairs that can be attached to an object. This can be useful
252
- # for storing additional information about the object in a structured format, and
253
- # querying for objects via API or the dashboard.
251
+ # for storing additional information about the object in a structured format.
254
252
  #
255
253
  # Keys are strings with a maximum length of 64 characters. Values are strings with
256
254
  # a maximum length of 512 characters.
257
255
  metadata: nil,
258
256
 
259
- # Model ID used to process the batch, like `gpt-6-astra`. OpenAI offers a wide
257
+ # Model ID used to process the batch, like `gpt-6.2-astra`. OpenAI offers a wide
260
258
  # range of models with different capabilities, performance characteristics, and
261
259
  # price points. Refer to the
262
260
  # [model guide](https://developers.openai.com/api/docs/models) to browse and
@@ -39,8 +39,7 @@ module OpenAI
39
39
  attr_accessor :input_file_id
40
40
 
41
41
  # Set of 16 key-value pairs that can be attached to an object. This can be useful
42
- # for storing additional information about the object in a structured format, and
43
- # querying for objects via API or the dashboard.
42
+ # for storing additional information about the object in a structured format.
44
43
  #
45
44
  # Keys are strings with a maximum length of 64 characters. Values are strings with
46
45
  # a maximum length of 512 characters.
@@ -95,8 +94,7 @@ module OpenAI
95
94
  input_file_id:,
96
95
 
97
96
  # Set of 16 key-value pairs that can be attached to an object. This can be useful
98
- # for storing additional information about the object in a structured format, and
99
- # querying for objects via API or the dashboard.
97
+ # for storing additional information about the object in a structured format.
100
98
  #
101
99
  # Keys are strings with a maximum length of 64 characters. Values are strings with
102
100
  # a maximum length of 512 characters.
@@ -217,7 +217,7 @@ module OpenAI
217
217
  attr_writer :text
218
218
 
219
219
  # Tools available to the agent. Omit to inherit, or pass null to clear them. The
220
- # resolved tool list must fit within 3 MiB (3,145,728 bytes) of compact UTF-8
220
+ # resolved tool list must fit within 8 MiB (8,388,608 bytes) of compact UTF-8
221
221
  # JSON.
222
222
  sig {
223
223
  returns(
@@ -309,7 +309,7 @@ module OpenAI
309
309
  text: nil,
310
310
 
311
311
  # Tools available to the agent. Omit to inherit, or pass null to clear them. The
312
- # resolved tool list must fit within 3 MiB (3,145,728 bytes) of compact UTF-8
312
+ # resolved tool list must fit within 8 MiB (8,388,608 bytes) of compact UTF-8
313
313
  # JSON.
314
314
 
315
315
  tools: nil
@@ -264,7 +264,7 @@ module OpenAI
264
264
  attr_writer :text
265
265
 
266
266
  # Tools available to the agent. Omit to inherit, or pass null to clear them. The
267
- # resolved tool list must fit within 3 MiB (3,145,728 bytes) of compact UTF-8
267
+ # resolved tool list must fit within 8 MiB (8,388,608 bytes) of compact UTF-8
268
268
  # JSON.
269
269
  sig {
270
270
  returns(
@@ -353,7 +353,7 @@ module OpenAI
353
353
  text: nil,
354
354
 
355
355
  # Tools available to the agent. Omit to inherit, or pass null to clear them. The
356
- # resolved tool list must fit within 3 MiB (3,145,728 bytes) of compact UTF-8
356
+ # resolved tool list must fit within 8 MiB (8,388,608 bytes) of compact UTF-8
357
357
  # JSON.
358
358
 
359
359
  tools: nil