openai 1.0.0 → 1.2.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 (51) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +30 -0
  3. data/README.md +4 -4
  4. data/lib/openai/helpers/agents/session_stream.rb +5 -0
  5. data/lib/openai/helpers/beta/agents/result.rb +8 -0
  6. data/lib/openai/models/all_models.rb +4 -0
  7. data/lib/openai/models/beta/agent_session.rb +40 -1
  8. data/lib/openai/models/beta/agent_session_budget_reached_event.rb +48 -0
  9. data/lib/openai/models/beta/agent_session_event.rb +4 -1
  10. data/lib/openai/models/beta/agents/session_create_params.rb +33 -1
  11. data/lib/openai/models/beta/agents/session_update_params.rb +33 -1
  12. data/lib/openai/models/beta/beta_response.rb +12 -0
  13. data/lib/openai/models/beta/beta_responses_client_event.rb +28 -0
  14. data/lib/openai/models/beta/response_compact_params.rb +12 -0
  15. data/lib/openai/models/beta/response_create_params.rb +12 -0
  16. data/lib/openai/models/beta/session_turn_error.rb +3 -0
  17. data/lib/openai/models/responses/response_compact_params.rb +12 -0
  18. data/lib/openai/models/responses_model.rb +4 -0
  19. data/lib/openai/resources/beta/agents/sessions/events.rb +1 -1
  20. data/lib/openai/resources/beta/agents/sessions.rb +15 -3
  21. data/lib/openai/version.rb +1 -1
  22. data/lib/openai.rb +1 -0
  23. data/rbi/openai/models/all_models.rbi +7 -0
  24. data/rbi/openai/models/beta/agent_session.rbi +66 -0
  25. data/rbi/openai/models/beta/agent_session_budget_reached_event.rbi +83 -0
  26. data/rbi/openai/models/beta/agent_session_event.rbi +1 -0
  27. data/rbi/openai/models/beta/agents/session_create_params.rbi +56 -0
  28. data/rbi/openai/models/beta/agents/session_update_params.rbi +56 -0
  29. data/rbi/openai/models/beta/beta_response.rbi +4 -0
  30. data/rbi/openai/models/beta/beta_responses_client_event.rbi +16 -0
  31. data/rbi/openai/models/beta/response_compact_params.rbi +16 -0
  32. data/rbi/openai/models/beta/response_create_params.rbi +16 -0
  33. data/rbi/openai/models/beta/session_turn_error.rbi +3 -0
  34. data/rbi/openai/models/responses/response_compact_params.rbi +16 -0
  35. data/rbi/openai/models/responses_model.rbi +16 -0
  36. data/rbi/openai/resources/beta/agents/sessions.rbi +12 -0
  37. data/sig/openai/models/all_models.rbs +8 -0
  38. data/sig/openai/models/beta/agent_session.rbs +33 -1
  39. data/sig/openai/models/beta/agent_session_budget_reached_event.rbs +52 -0
  40. data/sig/openai/models/beta/agent_session_event.rbs +1 -0
  41. data/sig/openai/models/beta/agents/session_create_params.rbs +23 -0
  42. data/sig/openai/models/beta/agents/session_update_params.rbs +23 -0
  43. data/sig/openai/models/beta/beta_response.rbs +8 -0
  44. data/sig/openai/models/beta/beta_responses_client_event.rbs +8 -0
  45. data/sig/openai/models/beta/response_compact_params.rbs +8 -0
  46. data/sig/openai/models/beta/response_create_params.rbs +8 -0
  47. data/sig/openai/models/beta/session_turn_error.rbs +4 -0
  48. data/sig/openai/models/responses/response_compact_params.rbs +8 -0
  49. data/sig/openai/models/responses_model.rbs +8 -0
  50. data/sig/openai/resources/beta/agents/sessions.rbs +3 -0
  51. metadata +4 -1
data/lib/openai.rb CHANGED
@@ -624,6 +624,7 @@ require_relative "openai/models/beta/agents/vault_update_params"
624
624
  require_relative "openai/models/beta/agent_send_subagent_input_call_item"
625
625
  require_relative "openai/models/beta/agent_session"
626
626
  require_relative "openai/models/beta/agent_session_assistant_message"
627
+ require_relative "openai/models/beta/agent_session_budget_reached_event"
627
628
  require_relative "openai/models/beta/agent_session_created_event"
628
629
  require_relative "openai/models/beta/agent_session_deleted"
629
630
  require_relative "openai/models/beta/agent_session_environment_connected_event"
@@ -55,6 +55,13 @@ module OpenAI
55
55
  GPT_ROSALIND_RESEARCH = T.let(:"gpt-rosalind-research", OpenAI::AllModels::ResponsesOnlyModel::TaggedSymbol)
56
56
  GPT_6_ROSALIND = T.let(:"gpt-6-rosalind", OpenAI::AllModels::ResponsesOnlyModel::TaggedSymbol)
57
57
  GPT_6_2_ASTRA_LAW = T.let(:"gpt-6.2-astra-law", OpenAI::AllModels::ResponsesOnlyModel::TaggedSymbol)
58
+ GPT_6_ASTRA_HEALTHCARE = T.let(:"gpt-6-astra-healthcare", OpenAI::AllModels::ResponsesOnlyModel::TaggedSymbol)
59
+ GPT_6_1_SOL_HEALTHCARE = T.let(:"gpt-6.1-sol-healthcare", OpenAI::AllModels::ResponsesOnlyModel::TaggedSymbol)
60
+ GPT_6_2_ASTRA_HEALTHCARE = T.let(
61
+ :"gpt-6.2-astra-healthcare",
62
+ OpenAI::AllModels::ResponsesOnlyModel::TaggedSymbol
63
+ )
64
+ GPT_6_2_SOL_HEALTHCARE = T.let(:"gpt-6.2-sol-healthcare", OpenAI::AllModels::ResponsesOnlyModel::TaggedSymbol)
58
65
 
59
66
  sig { override.returns(T::Array[OpenAI::AllModels::ResponsesOnlyModel::TaggedSymbol]) }
60
67
  def self.values
@@ -53,6 +53,14 @@ module OpenAI
53
53
  sig { returns(T::Array[OpenAI::Beta::AgentSession::RequiredAction::Variants]) }
54
54
  attr_accessor :required_actions
55
55
 
56
+ # Spending limit and best-effort consumption, in USD cents. The limit is null for
57
+ # an unlimited session. Consumption is null when unavailable.
58
+ sig { returns(OpenAI::Beta::AgentSession::SpendControl) }
59
+ attr_reader :spend_control
60
+
61
+ sig { params(spend_control: OpenAI::Beta::AgentSession::SpendControl::OrHash).void }
62
+ attr_writer :spend_control
63
+
56
64
  # The current status of the session.
57
65
  sig { returns(OpenAI::Beta::AgentSession::Status::TaggedSymbol) }
58
66
  attr_accessor :status
@@ -115,6 +123,8 @@ module OpenAI
115
123
  )
116
124
  ],
117
125
 
126
+ spend_control: OpenAI::Beta::AgentSession::SpendControl::OrHash,
127
+
118
128
  status: OpenAI::Beta::AgentSession::Status::OrSymbol,
119
129
 
120
130
  usage: T.nilable(OpenAI::Beta::TokenUsage::OrHash),
@@ -155,6 +165,10 @@ module OpenAI
155
165
  # Actions that must be completed before the session can continue.
156
166
  required_actions:,
157
167
 
168
+ # Spending limit and best-effort consumption, in USD cents. The limit is null for
169
+ # an unlimited session. Consumption is null when unavailable.
170
+ spend_control:,
171
+
158
172
  # The current status of the session.
159
173
  status:,
160
174
 
@@ -190,6 +204,7 @@ module OpenAI
190
204
  metadata: T::Hash[Symbol, String],
191
205
  object: Symbol,
192
206
  required_actions: T::Array[OpenAI::Beta::AgentSession::RequiredAction::Variants],
207
+ spend_control: OpenAI::Beta::AgentSession::SpendControl,
193
208
  status: OpenAI::Beta::AgentSession::Status::TaggedSymbol,
194
209
  usage: T.nilable(OpenAI::Beta::TokenUsage),
195
210
  vault_ids: T::Array[String],
@@ -1114,6 +1129,54 @@ module OpenAI
1114
1129
 
1115
1130
  end
1116
1131
 
1132
+ class SpendControl < OpenAI::Internal::Type::BaseModel
1133
+ OrHash = T.type_alias do
1134
+ T.any(
1135
+ OpenAI::Beta::AgentSession::SpendControl,
1136
+ OpenAI::Internal::AnyHash
1137
+ )
1138
+ end
1139
+
1140
+ # Best-effort recorded spend floored to whole USD cents, or null when unavailable.
1141
+ sig { returns(T.nilable(Integer)) }
1142
+ attr_accessor :consumed
1143
+
1144
+ # The configured positive limit in USD cents, or null when unlimited.
1145
+ sig { returns(T.nilable(Integer)) }
1146
+ attr_accessor :limit
1147
+
1148
+ # Spending limit and best-effort consumption, in USD cents. The limit is null for
1149
+ # an unlimited session. Consumption is null when unavailable.
1150
+ sig do
1151
+ params(
1152
+
1153
+ consumed: T.nilable(Integer),
1154
+
1155
+ limit: T.nilable(Integer)
1156
+ )
1157
+ .returns(T.attached_class)
1158
+ end
1159
+ def self.new(
1160
+
1161
+ # Best-effort recorded spend floored to whole USD cents, or null when unavailable.
1162
+ consumed:,
1163
+
1164
+ # The configured positive limit in USD cents, or null when unlimited.
1165
+
1166
+ limit:
1167
+ )
1168
+ end
1169
+
1170
+ sig do
1171
+ override.returns(
1172
+ {consumed: T.nilable(Integer), limit: T.nilable(Integer)}
1173
+ )
1174
+ end
1175
+ def to_hash
1176
+ end
1177
+
1178
+ end
1179
+
1117
1180
  # The current status of the session.
1118
1181
  module Status
1119
1182
  extend OpenAI::Internal::Type::Enum
@@ -1133,6 +1196,9 @@ module OpenAI
1133
1196
  # The session failed.
1134
1197
  FAILED = T.let(:failed, OpenAI::Beta::AgentSession::Status::TaggedSymbol)
1135
1198
 
1199
+ # The session is paused because its spending limit was reached.
1200
+ BUDGET_REACHED = T.let(:budget_reached, OpenAI::Beta::AgentSession::Status::TaggedSymbol)
1201
+
1136
1202
  sig { override.returns(T::Array[OpenAI::Beta::AgentSession::Status::TaggedSymbol]) }
1137
1203
  def self.values
1138
1204
  end
@@ -0,0 +1,83 @@
1
+ # typed: strong
2
+
3
+ module OpenAI
4
+ module Models
5
+
6
+ module Beta
7
+
8
+ class AgentSessionBudgetReachedEvent < OpenAI::Internal::Type::BaseModel
9
+
10
+ OrHash = T.type_alias do
11
+ T.any(
12
+ OpenAI::Beta::AgentSessionBudgetReachedEvent,
13
+ OpenAI::Internal::AnyHash
14
+ )
15
+ end
16
+
17
+ # The unique ID of the event.
18
+ sig { returns(String) }
19
+ attr_accessor :event_id
20
+
21
+ # The paused session.
22
+ sig { returns(OpenAI::Beta::AgentSession) }
23
+ attr_reader :session
24
+
25
+ sig { params(session: OpenAI::Beta::AgentSession::OrHash).void }
26
+ attr_writer :session
27
+
28
+ # The type of the object. Always `agent.session.budget_reached`.
29
+ sig { returns(Symbol) }
30
+ attr_accessor :type
31
+
32
+ # Random alphanumeric padding. Present when stream obfuscation is enabled.
33
+ sig { returns(T.nilable(String)) }
34
+ attr_reader :obfuscation
35
+
36
+ sig { params(obfuscation: String).void }
37
+ attr_writer :obfuscation
38
+
39
+ # Emitted when a session pauses because its spending limit was reached.
40
+ sig do
41
+ params(
42
+
43
+ event_id: String,
44
+
45
+ session: OpenAI::Beta::AgentSession::OrHash,
46
+
47
+ obfuscation: String,
48
+
49
+ type: Symbol
50
+ )
51
+ .returns(T.attached_class)
52
+ end
53
+ def self.new(
54
+
55
+ # The unique ID of the event.
56
+ event_id:,
57
+
58
+ # The paused session.
59
+ session:,
60
+
61
+ # Random alphanumeric padding. Present when stream obfuscation is enabled.
62
+ obfuscation: nil,
63
+
64
+ # The type of the object. Always `agent.session.budget_reached`.
65
+
66
+ type: :"agent.session.budget_reached"
67
+ )
68
+ end
69
+
70
+ sig do
71
+ override.returns(
72
+ {event_id: String, session: OpenAI::Beta::AgentSession, type: Symbol, obfuscation: String}
73
+ )
74
+ end
75
+ def to_hash
76
+ end
77
+
78
+ end
79
+
80
+ end
81
+
82
+ end
83
+ end
@@ -25,6 +25,7 @@ module OpenAI
25
25
  OpenAI::Beta::AgentSessionTurnCancelledEvent,
26
26
  OpenAI::Beta::AgentSessionTurnItemAddedEvent,
27
27
  OpenAI::Beta::AgentSessionIdleEvent,
28
+ OpenAI::Beta::AgentSessionBudgetReachedEvent,
28
29
  OpenAI::Beta::AgentSessionInProgressEvent,
29
30
  OpenAI::Beta::AgentSessionRequiresActionEvent,
30
31
  OpenAI::Beta::AgentSessionFailedEvent,
@@ -79,6 +79,16 @@ module OpenAI
79
79
  sig { params(review: OpenAI::Beta::Agents::SessionCreateParams::Review::OrSymbol).void }
80
80
  attr_writer :review
81
81
 
82
+ # Optional spending limit in USD cents. Omission or null creates an unlimited
83
+ # session.
84
+ sig { returns(T.nilable(OpenAI::Beta::Agents::SessionCreateParams::SpendControl)) }
85
+ attr_reader :spend_control
86
+
87
+ sig {
88
+ params(spend_control: T.nilable(OpenAI::Beta::Agents::SessionCreateParams::SpendControl::OrHash)).void
89
+ }
90
+ attr_writer :spend_control
91
+
82
92
  # Options for the event stream. Only allowed when `stream` is `true`.
83
93
  sig { returns(T.nilable(OpenAI::Beta::Agents::SessionCreateParams::StreamOptions)) }
84
94
  attr_reader :stream_options
@@ -111,6 +121,8 @@ module OpenAI
111
121
 
112
122
  review: OpenAI::Beta::Agents::SessionCreateParams::Review::OrSymbol,
113
123
 
124
+ spend_control: T.nilable(OpenAI::Beta::Agents::SessionCreateParams::SpendControl::OrHash),
125
+
114
126
  stream_options: OpenAI::Beta::Agents::SessionCreateParams::StreamOptions::OrHash,
115
127
 
116
128
  vault_ids: T.nilable(T::Array[String]),
@@ -149,6 +161,10 @@ module OpenAI
149
161
  # Action review mode. Omit to use none.
150
162
  review: nil,
151
163
 
164
+ # Optional spending limit in USD cents. Omission or null creates an unlimited
165
+ # session.
166
+ spend_control: nil,
167
+
152
168
  # Options for the event stream. Only allowed when `stream` is `true`.
153
169
  stream_options: nil,
154
170
 
@@ -173,6 +189,7 @@ module OpenAI
173
189
  metadata: T.nilable(T::Hash[Symbol, String]),
174
190
  prompt_cache_options: T.nilable(OpenAI::Beta::Agents::SessionCreateParams::PromptCacheOptions),
175
191
  review: OpenAI::Beta::Agents::SessionCreateParams::Review::OrSymbol,
192
+ spend_control: T.nilable(OpenAI::Beta::Agents::SessionCreateParams::SpendControl),
176
193
  stream_options: OpenAI::Beta::Agents::SessionCreateParams::StreamOptions,
177
194
  vault_ids: T.nilable(T::Array[String]),
178
195
  request_options: OpenAI::RequestOptions
@@ -595,6 +612,45 @@ module OpenAI
595
612
  end
596
613
  end
597
614
 
615
+ class SpendControl < OpenAI::Internal::Type::BaseModel
616
+ OrHash = T.type_alias do
617
+ T.any(
618
+ OpenAI::Beta::Agents::SessionCreateParams::SpendControl,
619
+ OpenAI::Internal::AnyHash
620
+ )
621
+ end
622
+
623
+ # Positive USD cents, or null to remove the limit.
624
+ sig { returns(T.nilable(Integer)) }
625
+ attr_accessor :limit
626
+
627
+ # Optional spending limit in USD cents. Omission or null creates an unlimited
628
+ # session.
629
+ sig do
630
+ params(
631
+
632
+ limit: T.nilable(Integer)
633
+ )
634
+ .returns(T.attached_class)
635
+ end
636
+ def self.new(
637
+
638
+ # Positive USD cents, or null to remove the limit.
639
+
640
+ limit:
641
+ )
642
+ end
643
+
644
+ sig do
645
+ override.returns(
646
+ {limit: T.nilable(Integer)}
647
+ )
648
+ end
649
+ def to_hash
650
+ end
651
+
652
+ end
653
+
598
654
  class StreamOptions < OpenAI::Internal::Type::BaseModel
599
655
  OrHash = T.type_alias do
600
656
  T.any(
@@ -56,6 +56,16 @@ module OpenAI
56
56
  sig { params(review: OpenAI::Beta::Agents::SessionUpdateParams::Review::OrSymbol).void }
57
57
  attr_writer :review
58
58
 
59
+ # Omit to retain the limit; null or a null limit removes it without resetting
60
+ # spend.
61
+ sig { returns(T.nilable(OpenAI::Beta::Agents::SessionUpdateParams::SpendControl)) }
62
+ attr_reader :spend_control
63
+
64
+ sig {
65
+ params(spend_control: T.nilable(OpenAI::Beta::Agents::SessionUpdateParams::SpendControl::OrHash)).void
66
+ }
67
+ attr_writer :spend_control
68
+
59
69
  sig do
60
70
  params(
61
71
 
@@ -69,6 +79,8 @@ module OpenAI
69
79
 
70
80
  review: OpenAI::Beta::Agents::SessionUpdateParams::Review::OrSymbol,
71
81
 
82
+ spend_control: T.nilable(OpenAI::Beta::Agents::SessionUpdateParams::SpendControl::OrHash),
83
+
72
84
  request_options: OpenAI::RequestOptions::OrHash
73
85
  )
74
86
  .returns(T.attached_class)
@@ -93,6 +105,10 @@ module OpenAI
93
105
  # keep their review mode.
94
106
  review: nil,
95
107
 
108
+ # Omit to retain the limit; null or a null limit removes it without resetting
109
+ # spend.
110
+ spend_control: nil,
111
+
96
112
  request_options: {}
97
113
  )
98
114
  end
@@ -105,6 +121,7 @@ module OpenAI
105
121
  metadata: T.nilable(T::Hash[Symbol, String]),
106
122
  prompt_cache_options: T.nilable(OpenAI::Beta::Agents::SessionUpdateParams::PromptCacheOptions),
107
123
  review: OpenAI::Beta::Agents::SessionUpdateParams::Review::OrSymbol,
124
+ spend_control: T.nilable(OpenAI::Beta::Agents::SessionUpdateParams::SpendControl),
108
125
  request_options: OpenAI::RequestOptions
109
126
  }
110
127
  )
@@ -415,6 +432,45 @@ module OpenAI
415
432
  end
416
433
  end
417
434
 
435
+ class SpendControl < OpenAI::Internal::Type::BaseModel
436
+ OrHash = T.type_alias do
437
+ T.any(
438
+ OpenAI::Beta::Agents::SessionUpdateParams::SpendControl,
439
+ OpenAI::Internal::AnyHash
440
+ )
441
+ end
442
+
443
+ # Positive USD cents, or null to remove the limit.
444
+ sig { returns(T.nilable(Integer)) }
445
+ attr_accessor :limit
446
+
447
+ # Omit to retain the limit; null or a null limit removes it without resetting
448
+ # spend.
449
+ sig do
450
+ params(
451
+
452
+ limit: T.nilable(Integer)
453
+ )
454
+ .returns(T.attached_class)
455
+ end
456
+ def self.new(
457
+
458
+ # Positive USD cents, or null to remove the limit.
459
+
460
+ limit:
461
+ )
462
+ end
463
+
464
+ sig do
465
+ override.returns(
466
+ {limit: T.nilable(Integer)}
467
+ )
468
+ end
469
+ def to_hash
470
+ end
471
+
472
+ end
473
+
418
474
  end
419
475
 
420
476
  end
@@ -1135,6 +1135,10 @@ module OpenAI
1135
1135
  GPT_6_CYBER = T.let(:"gpt-6-cyber", OpenAI::Beta::BetaResponse::Model::TaggedSymbol)
1136
1136
  GPT_ROSALIND_RESEARCH = T.let(:"gpt-rosalind-research", OpenAI::Beta::BetaResponse::Model::TaggedSymbol)
1137
1137
  GPT_6_2_ASTRA_LAW = T.let(:"gpt-6.2-astra-law", OpenAI::Beta::BetaResponse::Model::TaggedSymbol)
1138
+ GPT_6_ASTRA_HEALTHCARE = T.let(:"gpt-6-astra-healthcare", OpenAI::Beta::BetaResponse::Model::TaggedSymbol)
1139
+ GPT_6_1_SOL_HEALTHCARE = T.let(:"gpt-6.1-sol-healthcare", OpenAI::Beta::BetaResponse::Model::TaggedSymbol)
1140
+ GPT_6_2_ASTRA_HEALTHCARE = T.let(:"gpt-6.2-astra-healthcare", OpenAI::Beta::BetaResponse::Model::TaggedSymbol)
1141
+ GPT_6_2_SOL_HEALTHCARE = T.let(:"gpt-6.2-sol-healthcare", OpenAI::Beta::BetaResponse::Model::TaggedSymbol)
1138
1142
 
1139
1143
  end
1140
1144
 
@@ -1822,6 +1822,22 @@ module OpenAI
1822
1822
  :"gpt-6.2-astra-law",
1823
1823
  OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Model::TaggedSymbol
1824
1824
  )
1825
+ GPT_6_ASTRA_HEALTHCARE = T.let(
1826
+ :"gpt-6-astra-healthcare",
1827
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Model::TaggedSymbol
1828
+ )
1829
+ GPT_6_1_SOL_HEALTHCARE = T.let(
1830
+ :"gpt-6.1-sol-healthcare",
1831
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Model::TaggedSymbol
1832
+ )
1833
+ GPT_6_2_ASTRA_HEALTHCARE = T.let(
1834
+ :"gpt-6.2-astra-healthcare",
1835
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Model::TaggedSymbol
1836
+ )
1837
+ GPT_6_2_SOL_HEALTHCARE = T.let(
1838
+ :"gpt-6.2-sol-healthcare",
1839
+ OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Model::TaggedSymbol
1840
+ )
1825
1841
 
1826
1842
  end
1827
1843
 
@@ -440,6 +440,22 @@ module OpenAI
440
440
  )
441
441
  GPT_6_ROSALIND = T.let(:"gpt-6-rosalind", OpenAI::Beta::ResponseCompactParams::Model::TaggedSymbol)
442
442
  GPT_6_2_ASTRA_LAW = T.let(:"gpt-6.2-astra-law", OpenAI::Beta::ResponseCompactParams::Model::TaggedSymbol)
443
+ GPT_6_ASTRA_HEALTHCARE = T.let(
444
+ :"gpt-6-astra-healthcare",
445
+ OpenAI::Beta::ResponseCompactParams::Model::TaggedSymbol
446
+ )
447
+ GPT_6_1_SOL_HEALTHCARE = T.let(
448
+ :"gpt-6.1-sol-healthcare",
449
+ OpenAI::Beta::ResponseCompactParams::Model::TaggedSymbol
450
+ )
451
+ GPT_6_2_ASTRA_HEALTHCARE = T.let(
452
+ :"gpt-6.2-astra-healthcare",
453
+ OpenAI::Beta::ResponseCompactParams::Model::TaggedSymbol
454
+ )
455
+ GPT_6_2_SOL_HEALTHCARE = T.let(
456
+ :"gpt-6.2-sol-healthcare",
457
+ OpenAI::Beta::ResponseCompactParams::Model::TaggedSymbol
458
+ )
443
459
 
444
460
  end
445
461
 
@@ -1439,6 +1439,22 @@ module OpenAI
1439
1439
  )
1440
1440
  GPT_6_ROSALIND = T.let(:"gpt-6-rosalind", OpenAI::Beta::ResponseCreateParams::Model::TaggedSymbol)
1441
1441
  GPT_6_2_ASTRA_LAW = T.let(:"gpt-6.2-astra-law", OpenAI::Beta::ResponseCreateParams::Model::TaggedSymbol)
1442
+ GPT_6_ASTRA_HEALTHCARE = T.let(
1443
+ :"gpt-6-astra-healthcare",
1444
+ OpenAI::Beta::ResponseCreateParams::Model::TaggedSymbol
1445
+ )
1446
+ GPT_6_1_SOL_HEALTHCARE = T.let(
1447
+ :"gpt-6.1-sol-healthcare",
1448
+ OpenAI::Beta::ResponseCreateParams::Model::TaggedSymbol
1449
+ )
1450
+ GPT_6_2_ASTRA_HEALTHCARE = T.let(
1451
+ :"gpt-6.2-astra-healthcare",
1452
+ OpenAI::Beta::ResponseCreateParams::Model::TaggedSymbol
1453
+ )
1454
+ GPT_6_2_SOL_HEALTHCARE = T.let(
1455
+ :"gpt-6.2-sol-healthcare",
1456
+ OpenAI::Beta::ResponseCreateParams::Model::TaggedSymbol
1457
+ )
1442
1458
 
1443
1459
  end
1444
1460
 
@@ -64,6 +64,9 @@ module OpenAI
64
64
  # The model reached its output token limit before finishing the response.
65
65
  MAX_OUTPUT_TOKENS = T.let(:max_output_tokens, OpenAI::Beta::SessionTurnError::Code::TaggedSymbol)
66
66
 
67
+ # The session has reached its usage budget.
68
+ SESSION_BUDGET_EXCEEDED = T.let(:session_budget_exceeded, OpenAI::Beta::SessionTurnError::Code::TaggedSymbol)
69
+
67
70
  # The organization has reached a usage, plan, or billing limit.
68
71
  USAGE_LIMIT_EXCEEDED = T.let(:usage_limit_exceeded, OpenAI::Beta::SessionTurnError::Code::TaggedSymbol)
69
72
 
@@ -480,6 +480,22 @@ module OpenAI
480
480
  )
481
481
  GPT_6_ROSALIND = T.let(:"gpt-6-rosalind", OpenAI::Responses::ResponseCompactParams::Model::TaggedSymbol)
482
482
  GPT_6_2_ASTRA_LAW = T.let(:"gpt-6.2-astra-law", OpenAI::Responses::ResponseCompactParams::Model::TaggedSymbol)
483
+ GPT_6_ASTRA_HEALTHCARE = T.let(
484
+ :"gpt-6-astra-healthcare",
485
+ OpenAI::Responses::ResponseCompactParams::Model::TaggedSymbol
486
+ )
487
+ GPT_6_1_SOL_HEALTHCARE = T.let(
488
+ :"gpt-6.1-sol-healthcare",
489
+ OpenAI::Responses::ResponseCompactParams::Model::TaggedSymbol
490
+ )
491
+ GPT_6_2_ASTRA_HEALTHCARE = T.let(
492
+ :"gpt-6.2-astra-healthcare",
493
+ OpenAI::Responses::ResponseCompactParams::Model::TaggedSymbol
494
+ )
495
+ GPT_6_2_SOL_HEALTHCARE = T.let(
496
+ :"gpt-6.2-sol-healthcare",
497
+ OpenAI::Responses::ResponseCompactParams::Model::TaggedSymbol
498
+ )
483
499
 
484
500
  end
485
501
 
@@ -67,6 +67,22 @@ module OpenAI
67
67
  )
68
68
  GPT_6_ROSALIND = T.let(:"gpt-6-rosalind", OpenAI::ResponsesModel::ResponsesOnlyModel::TaggedSymbol)
69
69
  GPT_6_2_ASTRA_LAW = T.let(:"gpt-6.2-astra-law", OpenAI::ResponsesModel::ResponsesOnlyModel::TaggedSymbol)
70
+ GPT_6_ASTRA_HEALTHCARE = T.let(
71
+ :"gpt-6-astra-healthcare",
72
+ OpenAI::ResponsesModel::ResponsesOnlyModel::TaggedSymbol
73
+ )
74
+ GPT_6_1_SOL_HEALTHCARE = T.let(
75
+ :"gpt-6.1-sol-healthcare",
76
+ OpenAI::ResponsesModel::ResponsesOnlyModel::TaggedSymbol
77
+ )
78
+ GPT_6_2_ASTRA_HEALTHCARE = T.let(
79
+ :"gpt-6.2-astra-healthcare",
80
+ OpenAI::ResponsesModel::ResponsesOnlyModel::TaggedSymbol
81
+ )
82
+ GPT_6_2_SOL_HEALTHCARE = T.let(
83
+ :"gpt-6.2-sol-healthcare",
84
+ OpenAI::ResponsesModel::ResponsesOnlyModel::TaggedSymbol
85
+ )
70
86
 
71
87
  sig { override.returns(T::Array[OpenAI::ResponsesModel::ResponsesOnlyModel::TaggedSymbol]) }
72
88
  def self.values
@@ -46,6 +46,7 @@ module OpenAI
46
46
  metadata: T.nilable(T::Hash[Symbol, String]),
47
47
  prompt_cache_options: T.nilable(OpenAI::Beta::Agents::SessionCreateParams::PromptCacheOptions::OrHash),
48
48
  review: OpenAI::Beta::Agents::SessionCreateParams::Review::OrSymbol,
49
+ spend_control: T.nilable(OpenAI::Beta::Agents::SessionCreateParams::SpendControl::OrHash),
49
50
  stream_options: OpenAI::Beta::Agents::SessionCreateParams::StreamOptions::OrHash,
50
51
  vault_ids: T.nilable(T::Array[String]),
51
52
  stream: T.noreturn,
@@ -75,6 +76,9 @@ module OpenAI
75
76
  prompt_cache_options: nil,
76
77
  # Action review mode. Omit to use none.
77
78
  review: nil,
79
+ # Optional spending limit in USD cents. Omission or null creates an unlimited
80
+ # session.
81
+ spend_control: nil,
78
82
  # Options for the event stream. Only allowed when `stream` is `true`.
79
83
  stream_options: nil,
80
84
  # The IDs of vaults made available to the session.
@@ -107,6 +111,7 @@ module OpenAI
107
111
  metadata: T.nilable(T::Hash[Symbol, String]),
108
112
  prompt_cache_options: T.nilable(OpenAI::Beta::Agents::SessionCreateParams::PromptCacheOptions::OrHash),
109
113
  review: OpenAI::Beta::Agents::SessionCreateParams::Review::OrSymbol,
114
+ spend_control: T.nilable(OpenAI::Beta::Agents::SessionCreateParams::SpendControl::OrHash),
110
115
  stream_options: OpenAI::Beta::Agents::SessionCreateParams::StreamOptions::OrHash,
111
116
  vault_ids: T.nilable(T::Array[String]),
112
117
  stream: T.noreturn,
@@ -138,6 +143,9 @@ module OpenAI
138
143
  prompt_cache_options: nil,
139
144
  # Action review mode. Omit to use none.
140
145
  review: nil,
146
+ # Optional spending limit in USD cents. Omission or null creates an unlimited
147
+ # session.
148
+ spend_control: nil,
141
149
  # Options for the event stream. Only allowed when `stream` is `true`.
142
150
  stream_options: nil,
143
151
  # The IDs of vaults made available to the session.
@@ -174,6 +182,7 @@ module OpenAI
174
182
  metadata: T.nilable(T::Hash[Symbol, String]),
175
183
  prompt_cache_options: T.nilable(OpenAI::Beta::Agents::SessionUpdateParams::PromptCacheOptions::OrHash),
176
184
  review: OpenAI::Beta::Agents::SessionUpdateParams::Review::OrSymbol,
185
+ spend_control: T.nilable(OpenAI::Beta::Agents::SessionUpdateParams::SpendControl::OrHash),
177
186
  request_options: OpenAI::RequestOptions::OrHash
178
187
  )
179
188
  .returns(OpenAI::Beta::AgentSession)
@@ -193,6 +202,9 @@ module OpenAI
193
202
  # Default action review for new root turns. Existing turns and their subagents
194
203
  # keep their review mode.
195
204
  review: nil,
205
+ # Omit to retain the limit; null or a null limit removes it without resetting
206
+ # spend.
207
+ spend_control: nil,
196
208
  request_options: {}
197
209
  )
198
210
  end
@@ -32,6 +32,10 @@ module OpenAI
32
32
  | :"gpt-rosalind-research"
33
33
  | :"gpt-6-rosalind"
34
34
  | :"gpt-6.2-astra-law"
35
+ | :"gpt-6-astra-healthcare"
36
+ | :"gpt-6.1-sol-healthcare"
37
+ | :"gpt-6.2-astra-healthcare"
38
+ | :"gpt-6.2-sol-healthcare"
35
39
 
36
40
  module ResponsesOnlyModel
37
41
  extend OpenAI::Internal::Type::Enum
@@ -59,6 +63,10 @@ module OpenAI
59
63
  GPT_ROSALIND_RESEARCH: :"gpt-rosalind-research"
60
64
  GPT_6_ROSALIND: :"gpt-6-rosalind"
61
65
  GPT_6_2_ASTRA_LAW: :"gpt-6.2-astra-law"
66
+ GPT_6_ASTRA_HEALTHCARE: :"gpt-6-astra-healthcare"
67
+ GPT_6_1_SOL_HEALTHCARE: :"gpt-6.1-sol-healthcare"
68
+ GPT_6_2_ASTRA_HEALTHCARE: :"gpt-6.2-astra-healthcare"
69
+ GPT_6_2_SOL_HEALTHCARE: :"gpt-6.2-sol-healthcare"
62
70
 
63
71
  def self?.values: -> ::Array[OpenAI::Models::AllModels::responses_only_model]
64
72
  end