openai 0.125.0 → 0.127.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +17 -0
- data/README.md +1 -1
- data/lib/openai/helpers/agents/session_stream.rb +3 -0
- data/lib/openai/helpers/beta/agents/result.rb +5 -0
- data/lib/openai/models/all_models.rb +1 -0
- data/lib/openai/models/beta/agent_session.rb +17 -11
- data/lib/openai/models/beta/agent_session_budget_reached_event.rb +48 -0
- data/lib/openai/models/beta/agent_session_event.rb +4 -1
- data/lib/openai/models/beta/beta_response.rb +9 -0
- data/lib/openai/models/beta/beta_responses_client_event.rb +76 -1
- data/lib/openai/models/beta/response_compact_params.rb +9 -0
- data/lib/openai/models/beta/response_create_params.rb +70 -1
- data/lib/openai/models/chat_model.rb +2 -0
- data/lib/openai/models/responses/response_compact_params.rb +9 -0
- data/lib/openai/models/responses/response_create_params.rb +61 -1
- data/lib/openai/models/responses/responses_client_event.rb +65 -1
- data/lib/openai/models/responses_model.rb +1 -0
- data/lib/openai/resources/beta/agents/sessions/events.rb +1 -1
- data/lib/openai/resources/beta/responses.rb +12 -2
- data/lib/openai/resources/responses.rb +12 -2
- data/lib/openai/version.rb +1 -1
- data/lib/openai.rb +1 -0
- data/rbi/openai/models/all_models.rbi +1 -0
- data/rbi/openai/models/beta/agent_session.rbi +17 -11
- data/rbi/openai/models/beta/agent_session_budget_reached_event.rbi +83 -0
- data/rbi/openai/models/beta/agent_session_event.rbi +1 -0
- data/rbi/openai/models/beta/beta_response.rbi +3 -0
- data/rbi/openai/models/beta/beta_responses_client_event.rbi +145 -0
- data/rbi/openai/models/beta/response_compact_params.rbi +3 -0
- data/rbi/openai/models/beta/response_create_params.rbi +116 -0
- data/rbi/openai/models/chat_model.rbi +2 -0
- data/rbi/openai/models/responses/response_compact_params.rbi +3 -0
- data/rbi/openai/models/responses/response_create_params.rbi +117 -0
- data/rbi/openai/models/responses/responses_client_event.rbi +135 -0
- data/rbi/openai/models/responses_model.rbi +1 -0
- data/rbi/openai/resources/beta/responses.rbi +10 -0
- data/rbi/openai/resources/responses.rbi +12 -0
- data/sig/openai/models/all_models.rbs +2 -0
- data/sig/openai/models/beta/agent_session.rbs +20 -13
- data/sig/openai/models/beta/agent_session_budget_reached_event.rbs +52 -0
- data/sig/openai/models/beta/agent_session_event.rbs +1 -0
- data/sig/openai/models/beta/beta_response.rbs +6 -0
- data/sig/openai/models/beta/beta_responses_client_event.rbs +79 -0
- data/sig/openai/models/beta/response_compact_params.rbs +6 -0
- data/sig/openai/models/beta/response_create_params.rbs +79 -0
- data/sig/openai/models/chat_model.rbs +4 -0
- data/sig/openai/models/responses/response_compact_params.rbs +6 -0
- data/sig/openai/models/responses/response_create_params.rbs +73 -0
- data/sig/openai/models/responses/responses_client_event.rbs +73 -0
- data/sig/openai/models/responses_model.rbs +2 -0
- data/sig/openai/resources/beta/responses.rbs +2 -0
- data/sig/openai/resources/responses.rbs +3 -0
- metadata +4 -1
|
@@ -43,6 +43,20 @@ module OpenAI
|
|
|
43
43
|
sig { returns(T.nilable(T::Boolean)) }
|
|
44
44
|
attr_accessor :background
|
|
45
45
|
|
|
46
|
+
# Options for background execution on HTTP requests. The `2h` and `8h` completion
|
|
47
|
+
# windows require `background: true`, Standard processing, and `stream: false` or
|
|
48
|
+
# omitted.
|
|
49
|
+
sig { returns(T.nilable(OpenAI::Responses::ResponsesClientEvent::ResponseCreate::BackgroundOptions)) }
|
|
50
|
+
attr_reader :background_options
|
|
51
|
+
|
|
52
|
+
sig {
|
|
53
|
+
params(
|
|
54
|
+
background_options: OpenAI::Responses::ResponsesClientEvent::ResponseCreate::BackgroundOptions::OrHash
|
|
55
|
+
)
|
|
56
|
+
.void
|
|
57
|
+
}
|
|
58
|
+
attr_writer :background_options
|
|
59
|
+
|
|
46
60
|
# Context management configuration for this request.
|
|
47
61
|
sig {
|
|
48
62
|
returns(T.nilable(T::Array[OpenAI::Responses::ResponsesClientEvent::ResponseCreate::ContextManagement]))
|
|
@@ -508,6 +522,8 @@ module OpenAI
|
|
|
508
522
|
|
|
509
523
|
background: T.nilable(T::Boolean),
|
|
510
524
|
|
|
525
|
+
background_options: OpenAI::Responses::ResponsesClientEvent::ResponseCreate::BackgroundOptions::OrHash,
|
|
526
|
+
|
|
511
527
|
context_management: T.nilable(
|
|
512
528
|
T::Array[OpenAI::Responses::ResponsesClientEvent::ResponseCreate::ContextManagement::OrHash]
|
|
513
529
|
),
|
|
@@ -620,6 +636,11 @@ module OpenAI
|
|
|
620
636
|
# [Learn more](https://developers.openai.com/api/docs/guides/background).
|
|
621
637
|
background: nil,
|
|
622
638
|
|
|
639
|
+
# Options for background execution on HTTP requests. The `2h` and `8h` completion
|
|
640
|
+
# windows require `background: true`, Standard processing, and `stream: false` or
|
|
641
|
+
# omitted.
|
|
642
|
+
background_options: nil,
|
|
643
|
+
|
|
623
644
|
# Context management configuration for this request.
|
|
624
645
|
context_management: nil,
|
|
625
646
|
|
|
@@ -898,6 +919,9 @@ module OpenAI
|
|
|
898
919
|
type: Symbol,
|
|
899
920
|
access_programs: T.nilable(OpenAI::Responses::ResponsesClientEvent::ResponseCreate::AccessPrograms),
|
|
900
921
|
background: T.nilable(T::Boolean),
|
|
922
|
+
background_options: T.nilable(
|
|
923
|
+
OpenAI::Responses::ResponsesClientEvent::ResponseCreate::BackgroundOptions
|
|
924
|
+
),
|
|
901
925
|
context_management: T.nilable(
|
|
902
926
|
T::Array[OpenAI::Responses::ResponsesClientEvent::ResponseCreate::ContextManagement]
|
|
903
927
|
),
|
|
@@ -1087,6 +1111,117 @@ module OpenAI
|
|
|
1087
1111
|
end
|
|
1088
1112
|
end
|
|
1089
1113
|
|
|
1114
|
+
class BackgroundOptions < OpenAI::Internal::Type::BaseModel
|
|
1115
|
+
OrHash = T.type_alias do
|
|
1116
|
+
T.any(
|
|
1117
|
+
OpenAI::Responses::ResponsesClientEvent::ResponseCreate::BackgroundOptions,
|
|
1118
|
+
OpenAI::Internal::AnyHash
|
|
1119
|
+
)
|
|
1120
|
+
end
|
|
1121
|
+
|
|
1122
|
+
# The completion window for background execution. Defaults to `soonest`; `2h` and
|
|
1123
|
+
# `8h` select discounted background execution.
|
|
1124
|
+
sig {
|
|
1125
|
+
returns(
|
|
1126
|
+
T.nilable(
|
|
1127
|
+
OpenAI::Responses::ResponsesClientEvent::ResponseCreate::BackgroundOptions::CompletionWindow::OrSymbol
|
|
1128
|
+
)
|
|
1129
|
+
)
|
|
1130
|
+
}
|
|
1131
|
+
attr_reader :completion_window
|
|
1132
|
+
|
|
1133
|
+
sig {
|
|
1134
|
+
params(
|
|
1135
|
+
completion_window: OpenAI::Responses::ResponsesClientEvent::ResponseCreate::BackgroundOptions::CompletionWindow::OrSymbol
|
|
1136
|
+
)
|
|
1137
|
+
.void
|
|
1138
|
+
}
|
|
1139
|
+
attr_writer :completion_window
|
|
1140
|
+
|
|
1141
|
+
# A customer-provided opaque identifier used to prioritize related background
|
|
1142
|
+
# requests. It does not add prior history to the input.
|
|
1143
|
+
sig { returns(T.nilable(String)) }
|
|
1144
|
+
attr_reader :continuation_id
|
|
1145
|
+
|
|
1146
|
+
sig { params(continuation_id: String).void }
|
|
1147
|
+
attr_writer :continuation_id
|
|
1148
|
+
|
|
1149
|
+
# Options for background execution on HTTP requests. The `2h` and `8h` completion
|
|
1150
|
+
# windows require `background: true`, Standard processing, and `stream: false` or
|
|
1151
|
+
# omitted.
|
|
1152
|
+
sig do
|
|
1153
|
+
params(
|
|
1154
|
+
|
|
1155
|
+
completion_window: OpenAI::Responses::ResponsesClientEvent::ResponseCreate::BackgroundOptions::CompletionWindow::OrSymbol,
|
|
1156
|
+
|
|
1157
|
+
continuation_id: String
|
|
1158
|
+
)
|
|
1159
|
+
.returns(T.attached_class)
|
|
1160
|
+
end
|
|
1161
|
+
def self.new(
|
|
1162
|
+
|
|
1163
|
+
# The completion window for background execution. Defaults to `soonest`; `2h` and
|
|
1164
|
+
# `8h` select discounted background execution.
|
|
1165
|
+
completion_window: nil,
|
|
1166
|
+
|
|
1167
|
+
# A customer-provided opaque identifier used to prioritize related background
|
|
1168
|
+
# requests. It does not add prior history to the input.
|
|
1169
|
+
|
|
1170
|
+
continuation_id: nil
|
|
1171
|
+
)
|
|
1172
|
+
end
|
|
1173
|
+
|
|
1174
|
+
sig do
|
|
1175
|
+
override.returns(
|
|
1176
|
+
{
|
|
1177
|
+
completion_window: T.nilable(
|
|
1178
|
+
OpenAI::Responses::ResponsesClientEvent::ResponseCreate::BackgroundOptions::CompletionWindow::OrSymbol
|
|
1179
|
+
),
|
|
1180
|
+
continuation_id: T.nilable(String)
|
|
1181
|
+
}
|
|
1182
|
+
)
|
|
1183
|
+
end
|
|
1184
|
+
def to_hash
|
|
1185
|
+
end
|
|
1186
|
+
|
|
1187
|
+
# The completion window for background execution. Defaults to `soonest`; `2h` and
|
|
1188
|
+
# `8h` select discounted background execution.
|
|
1189
|
+
module CompletionWindow
|
|
1190
|
+
extend OpenAI::Internal::Type::Enum
|
|
1191
|
+
|
|
1192
|
+
TaggedSymbol = T.type_alias {
|
|
1193
|
+
T.all(
|
|
1194
|
+
Symbol,
|
|
1195
|
+
OpenAI::Responses::ResponsesClientEvent::ResponseCreate::BackgroundOptions::CompletionWindow
|
|
1196
|
+
)
|
|
1197
|
+
}
|
|
1198
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
1199
|
+
|
|
1200
|
+
SOONEST = T.let(
|
|
1201
|
+
:soonest,
|
|
1202
|
+
OpenAI::Responses::ResponsesClientEvent::ResponseCreate::BackgroundOptions::CompletionWindow::TaggedSymbol
|
|
1203
|
+
)
|
|
1204
|
+
COMPLETION_WINDOW_2H = T.let(
|
|
1205
|
+
:"2h",
|
|
1206
|
+
OpenAI::Responses::ResponsesClientEvent::ResponseCreate::BackgroundOptions::CompletionWindow::TaggedSymbol
|
|
1207
|
+
)
|
|
1208
|
+
COMPLETION_WINDOW_8H = T.let(
|
|
1209
|
+
:"8h",
|
|
1210
|
+
OpenAI::Responses::ResponsesClientEvent::ResponseCreate::BackgroundOptions::CompletionWindow::TaggedSymbol
|
|
1211
|
+
)
|
|
1212
|
+
|
|
1213
|
+
sig {
|
|
1214
|
+
override.returns(
|
|
1215
|
+
T::Array[
|
|
1216
|
+
OpenAI::Responses::ResponsesClientEvent::ResponseCreate::BackgroundOptions::CompletionWindow::TaggedSymbol
|
|
1217
|
+
]
|
|
1218
|
+
)
|
|
1219
|
+
}
|
|
1220
|
+
def self.values
|
|
1221
|
+
end
|
|
1222
|
+
end
|
|
1223
|
+
end
|
|
1224
|
+
|
|
1090
1225
|
class ContextManagement < OpenAI::Internal::Type::BaseModel
|
|
1091
1226
|
OrHash = T.type_alias do
|
|
1092
1227
|
T.any(
|
|
@@ -66,6 +66,7 @@ module OpenAI
|
|
|
66
66
|
OpenAI::ResponsesModel::ResponsesOnlyModel::TaggedSymbol
|
|
67
67
|
)
|
|
68
68
|
GPT_6_ROSALIND = T.let(:"gpt-6-rosalind", OpenAI::ResponsesModel::ResponsesOnlyModel::TaggedSymbol)
|
|
69
|
+
GPT_6_2_ASTRA_LAW = T.let(:"gpt-6.2-astra-law", OpenAI::ResponsesModel::ResponsesOnlyModel::TaggedSymbol)
|
|
69
70
|
|
|
70
71
|
sig { override.returns(T::Array[OpenAI::ResponsesModel::ResponsesOnlyModel::TaggedSymbol]) }
|
|
71
72
|
def self.values
|
|
@@ -57,6 +57,7 @@ module OpenAI
|
|
|
57
57
|
params(
|
|
58
58
|
access_programs: OpenAI::Beta::ResponseCreateParams::AccessPrograms::OrHash,
|
|
59
59
|
background: T.nilable(T::Boolean),
|
|
60
|
+
background_options: OpenAI::Beta::ResponseCreateParams::BackgroundOptions::OrHash,
|
|
60
61
|
context_management: T.nilable(T::Array[OpenAI::Beta::ResponseCreateParams::ContextManagement::OrHash]),
|
|
61
62
|
conversation: T.nilable(T.any(String, OpenAI::Beta::BetaResponseConversationParam::OrHash)),
|
|
62
63
|
image: OpenAI::Beta::ResponseCreateParams::Image::OrHash,
|
|
@@ -129,6 +130,10 @@ module OpenAI
|
|
|
129
130
|
# Body param: Whether to run the model response in the background.
|
|
130
131
|
# [Learn more](https://developers.openai.com/api/docs/guides/background).
|
|
131
132
|
background: nil,
|
|
133
|
+
# Body param: Options for background execution on HTTP requests. The `2h` and `8h`
|
|
134
|
+
# completion windows require `background: true`, Standard processing, and
|
|
135
|
+
# `stream: false` or omitted.
|
|
136
|
+
background_options: nil,
|
|
132
137
|
# Body param: Context management configuration for this request.
|
|
133
138
|
context_management: nil,
|
|
134
139
|
# Body param: The conversation that this response belongs to. Items from this
|
|
@@ -380,6 +385,7 @@ module OpenAI
|
|
|
380
385
|
params(
|
|
381
386
|
access_programs: OpenAI::Beta::ResponseCreateParams::AccessPrograms::OrHash,
|
|
382
387
|
background: T.nilable(T::Boolean),
|
|
388
|
+
background_options: OpenAI::Beta::ResponseCreateParams::BackgroundOptions::OrHash,
|
|
383
389
|
context_management: T.nilable(T::Array[OpenAI::Beta::ResponseCreateParams::ContextManagement::OrHash]),
|
|
384
390
|
conversation: T.nilable(T.any(String, OpenAI::Beta::BetaResponseConversationParam::OrHash)),
|
|
385
391
|
image: OpenAI::Beta::ResponseCreateParams::Image::OrHash,
|
|
@@ -456,6 +462,10 @@ module OpenAI
|
|
|
456
462
|
# Body param: Whether to run the model response in the background.
|
|
457
463
|
# [Learn more](https://developers.openai.com/api/docs/guides/background).
|
|
458
464
|
background: nil,
|
|
465
|
+
# Body param: Options for background execution on HTTP requests. The `2h` and `8h`
|
|
466
|
+
# completion windows require `background: true`, Standard processing, and
|
|
467
|
+
# `stream: false` or omitted.
|
|
468
|
+
background_options: nil,
|
|
459
469
|
# Body param: Context management configuration for this request.
|
|
460
470
|
context_management: nil,
|
|
461
471
|
# Body param: The conversation that this response belongs to. Items from this
|
|
@@ -55,6 +55,7 @@ module OpenAI
|
|
|
55
55
|
params(
|
|
56
56
|
access_programs: OpenAI::Responses::ResponseCreateParams::AccessPrograms::OrHash,
|
|
57
57
|
background: T.nilable(T::Boolean),
|
|
58
|
+
background_options: OpenAI::Responses::ResponseCreateParams::BackgroundOptions::OrHash,
|
|
58
59
|
context_management: T.nilable(T::Array[OpenAI::Responses::ResponseCreateParams::ContextManagement::OrHash]),
|
|
59
60
|
conversation: T.nilable(T.any(String, OpenAI::Responses::ResponseConversationParam::OrHash)),
|
|
60
61
|
image: OpenAI::Responses::ResponseCreateParams::Image::OrHash,
|
|
@@ -125,6 +126,10 @@ module OpenAI
|
|
|
125
126
|
# Whether to run the model response in the background.
|
|
126
127
|
# [Learn more](https://developers.openai.com/api/docs/guides/background).
|
|
127
128
|
background: nil,
|
|
129
|
+
# Options for background execution on HTTP requests. The `2h` and `8h` completion
|
|
130
|
+
# windows require `background: true`, Standard processing, and `stream: false` or
|
|
131
|
+
# omitted.
|
|
132
|
+
background_options: nil,
|
|
128
133
|
# Context management configuration for this request.
|
|
129
134
|
context_management: nil,
|
|
130
135
|
# The conversation that this response belongs to. Items from this conversation are
|
|
@@ -365,6 +370,7 @@ module OpenAI
|
|
|
365
370
|
params(
|
|
366
371
|
access_programs: OpenAI::Responses::ResponseCreateParams::AccessPrograms::OrHash,
|
|
367
372
|
background: T.nilable(T::Boolean),
|
|
373
|
+
background_options: OpenAI::Responses::ResponseCreateParams::BackgroundOptions::OrHash,
|
|
368
374
|
context_management: T.nilable(T::Array[OpenAI::Responses::ResponseCreateParams::ContextManagement::OrHash]),
|
|
369
375
|
conversation: T.nilable(T.any(String, OpenAI::Responses::ResponseConversationParam::OrHash)),
|
|
370
376
|
image: OpenAI::Responses::ResponseCreateParams::Image::OrHash,
|
|
@@ -441,6 +447,10 @@ module OpenAI
|
|
|
441
447
|
# Whether to run the model response in the background.
|
|
442
448
|
# [Learn more](https://developers.openai.com/api/docs/guides/background).
|
|
443
449
|
background: nil,
|
|
450
|
+
# Options for background execution on HTTP requests. The `2h` and `8h` completion
|
|
451
|
+
# windows require `background: true`, Standard processing, and `stream: false` or
|
|
452
|
+
# omitted.
|
|
453
|
+
background_options: nil,
|
|
444
454
|
# Context management configuration for this request.
|
|
445
455
|
context_management: nil,
|
|
446
456
|
# The conversation that this response belongs to. Items from this conversation are
|
|
@@ -873,6 +883,7 @@ module OpenAI
|
|
|
873
883
|
params(
|
|
874
884
|
access_programs: OpenAI::Responses::ResponsesClientEvent::ResponseCreate::AccessPrograms::OrHash,
|
|
875
885
|
background: T.nilable(T::Boolean),
|
|
886
|
+
background_options: OpenAI::Responses::ResponsesClientEvent::ResponseCreate::BackgroundOptions::OrHash,
|
|
876
887
|
context_management: T.nilable(
|
|
877
888
|
T::Array[OpenAI::Responses::ResponsesClientEvent::ResponseCreate::ContextManagement::OrHash]
|
|
878
889
|
),
|
|
@@ -946,6 +957,7 @@ module OpenAI
|
|
|
946
957
|
def create(
|
|
947
958
|
access_programs: nil,
|
|
948
959
|
background: nil,
|
|
960
|
+
background_options: nil,
|
|
949
961
|
context_management: nil,
|
|
950
962
|
conversation: nil,
|
|
951
963
|
generate: nil,
|
|
@@ -31,6 +31,7 @@ module OpenAI
|
|
|
31
31
|
| :"gpt-6-cyber"
|
|
32
32
|
| :"gpt-rosalind-research"
|
|
33
33
|
| :"gpt-6-rosalind"
|
|
34
|
+
| :"gpt-6.2-astra-law"
|
|
34
35
|
|
|
35
36
|
module ResponsesOnlyModel
|
|
36
37
|
extend OpenAI::Internal::Type::Enum
|
|
@@ -57,6 +58,7 @@ module OpenAI
|
|
|
57
58
|
GPT_6_CYBER: :"gpt-6-cyber"
|
|
58
59
|
GPT_ROSALIND_RESEARCH: :"gpt-rosalind-research"
|
|
59
60
|
GPT_6_ROSALIND: :"gpt-6-rosalind"
|
|
61
|
+
GPT_6_2_ASTRA_LAW: :"gpt-6.2-astra-law"
|
|
60
62
|
|
|
61
63
|
def self?.values: -> ::Array[OpenAI::Models::AllModels::responses_only_model]
|
|
62
64
|
end
|
|
@@ -71,12 +71,14 @@ module OpenAI
|
|
|
71
71
|
OpenAI::Models::Beta::AgentSession::review
|
|
72
72
|
) -> OpenAI::Models::Beta::AgentSession::review
|
|
73
73
|
|
|
74
|
-
#
|
|
75
|
-
#
|
|
74
|
+
# Spending limit and best-effort consumption, in USD cents. Present when
|
|
75
|
+
# spending-control visibility is enabled; limit is null without a cap. Older
|
|
76
|
+
# server responses may omit this object.
|
|
76
77
|
attr_reader spend_control: OpenAI::Beta::AgentSession::SpendControl?
|
|
77
78
|
|
|
78
|
-
#
|
|
79
|
-
#
|
|
79
|
+
# Spending limit and best-effort consumption, in USD cents. Present when
|
|
80
|
+
# spending-control visibility is enabled; limit is null without a cap. Older
|
|
81
|
+
# server responses may omit this object.
|
|
80
82
|
def spend_control=: (
|
|
81
83
|
OpenAI::Beta::AgentSession::SpendControl
|
|
82
84
|
) -> OpenAI::Beta::AgentSession::SpendControl
|
|
@@ -110,8 +112,9 @@ module OpenAI
|
|
|
110
112
|
# Review applied to eligible actions in this session. Omitted when review is none
|
|
111
113
|
# and automatic review is not enabled. Omission means none.
|
|
112
114
|
# @param spend_control
|
|
113
|
-
#
|
|
114
|
-
#
|
|
115
|
+
# Spending limit and best-effort consumption, in USD cents. Present when
|
|
116
|
+
# spending-control visibility is enabled; limit is null without a cap. Older
|
|
117
|
+
# server responses may omit this object.
|
|
115
118
|
# @param object
|
|
116
119
|
# The object type. Always `agent.session`.
|
|
117
120
|
def initialize: (
|
|
@@ -696,7 +699,8 @@ module OpenAI
|
|
|
696
699
|
def self?.variants: -> ::Array[OpenAI::Models::Beta::AgentSession::required_action]
|
|
697
700
|
end
|
|
698
701
|
|
|
699
|
-
type status =
|
|
702
|
+
type status =
|
|
703
|
+
:idle | :in_progress | :requires_action | :failed | :budget_reached
|
|
700
704
|
|
|
701
705
|
module Status
|
|
702
706
|
extend OpenAI::Internal::Type::Enum
|
|
@@ -713,6 +717,9 @@ module OpenAI
|
|
|
713
717
|
# The session failed.
|
|
714
718
|
FAILED: :failed
|
|
715
719
|
|
|
720
|
+
# The session is paused because its spending limit was reached.
|
|
721
|
+
BUDGET_REACHED: :budget_reached
|
|
722
|
+
|
|
716
723
|
def self?.values: -> ::Array[OpenAI::Models::Beta::AgentSession::status]
|
|
717
724
|
end
|
|
718
725
|
|
|
@@ -753,22 +760,22 @@ module OpenAI
|
|
|
753
760
|
def self?.values: -> ::Array[OpenAI::Models::Beta::AgentSession::review]
|
|
754
761
|
end
|
|
755
762
|
|
|
756
|
-
type spend_control = { consumed: Integer?, limit: Integer }
|
|
763
|
+
type spend_control = { consumed: Integer?, limit: Integer? }
|
|
757
764
|
|
|
758
765
|
class SpendControl < OpenAI::Internal::Type::BaseModel
|
|
759
766
|
# Best-effort recorded spend floored to whole USD cents, or null when unavailable.
|
|
760
767
|
attr_accessor consumed: Integer?
|
|
761
768
|
|
|
762
|
-
# The configured positive limit in USD cents.
|
|
763
|
-
attr_accessor limit: Integer
|
|
769
|
+
# The configured positive limit in USD cents, or null when unlimited.
|
|
770
|
+
attr_accessor limit: Integer?
|
|
764
771
|
|
|
765
772
|
# @param consumed
|
|
766
773
|
# Best-effort recorded spend floored to whole USD cents, or null when unavailable.
|
|
767
774
|
# @param limit
|
|
768
|
-
# The configured positive limit in USD cents.
|
|
769
|
-
def initialize: (consumed: Integer?, limit: Integer) -> void
|
|
775
|
+
# The configured positive limit in USD cents, or null when unlimited.
|
|
776
|
+
def initialize: (consumed: Integer?, limit: Integer?) -> void
|
|
770
777
|
|
|
771
|
-
def to_hash: -> { consumed: Integer?, limit: Integer }
|
|
778
|
+
def to_hash: -> { consumed: Integer?, limit: Integer? }
|
|
772
779
|
end
|
|
773
780
|
end
|
|
774
781
|
end
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
module OpenAI
|
|
2
|
+
module Models
|
|
3
|
+
module Beta
|
|
4
|
+
type agent_session_budget_reached_event =
|
|
5
|
+
{
|
|
6
|
+
event_id: String,
|
|
7
|
+
session: OpenAI::Beta::AgentSession,
|
|
8
|
+
?type: :"agent.session.budget_reached",
|
|
9
|
+
?obfuscation: String
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
class AgentSessionBudgetReachedEvent < OpenAI::Internal::Type::BaseModel
|
|
13
|
+
# The unique ID of the event.
|
|
14
|
+
attr_accessor event_id: String
|
|
15
|
+
|
|
16
|
+
# The paused session.
|
|
17
|
+
attr_accessor session: OpenAI::Beta::AgentSession
|
|
18
|
+
|
|
19
|
+
# The type of the object. Always `agent.session.budget_reached`.
|
|
20
|
+
attr_accessor type: :"agent.session.budget_reached"
|
|
21
|
+
|
|
22
|
+
# Random alphanumeric padding. Present when stream obfuscation is enabled.
|
|
23
|
+
attr_reader obfuscation: String?
|
|
24
|
+
|
|
25
|
+
# Random alphanumeric padding. Present when stream obfuscation is enabled.
|
|
26
|
+
def obfuscation=: (String) -> String
|
|
27
|
+
|
|
28
|
+
# @param event_id
|
|
29
|
+
# The unique ID of the event.
|
|
30
|
+
# @param session
|
|
31
|
+
# The paused session.
|
|
32
|
+
# @param obfuscation
|
|
33
|
+
# Random alphanumeric padding. Present when stream obfuscation is enabled.
|
|
34
|
+
# @param type
|
|
35
|
+
# The type of the object. Always `agent.session.budget_reached`.
|
|
36
|
+
def initialize: (
|
|
37
|
+
event_id: String,
|
|
38
|
+
session: OpenAI::Beta::AgentSession,
|
|
39
|
+
?obfuscation: String,
|
|
40
|
+
?type: :"agent.session.budget_reached"
|
|
41
|
+
) -> void
|
|
42
|
+
|
|
43
|
+
def to_hash: -> {
|
|
44
|
+
event_id: String,
|
|
45
|
+
session: OpenAI::Beta::AgentSession,
|
|
46
|
+
?type: :"agent.session.budget_reached",
|
|
47
|
+
?obfuscation: String
|
|
48
|
+
}
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
end
|
|
@@ -16,6 +16,7 @@ module OpenAI
|
|
|
16
16
|
| OpenAI::Beta::AgentSessionTurnCancelledEvent
|
|
17
17
|
| OpenAI::Beta::AgentSessionTurnItemAddedEvent
|
|
18
18
|
| OpenAI::Beta::AgentSessionIdleEvent
|
|
19
|
+
| OpenAI::Beta::AgentSessionBudgetReachedEvent
|
|
19
20
|
| OpenAI::Beta::AgentSessionInProgressEvent
|
|
20
21
|
| OpenAI::Beta::AgentSessionRequiresActionEvent
|
|
21
22
|
| OpenAI::Beta::AgentSessionFailedEvent
|
|
@@ -754,7 +754,9 @@ module OpenAI
|
|
|
754
754
|
|
|
755
755
|
type model =
|
|
756
756
|
:"gpt-6-astra"
|
|
757
|
+
| :"gpt-6.2-astra"
|
|
757
758
|
| :"gpt-6.1-sol"
|
|
759
|
+
| :"gpt-6.2-sol"
|
|
758
760
|
| :"gpt-6.1-terra"
|
|
759
761
|
| :"gpt-6-sol"
|
|
760
762
|
| :"gpt-6-luna"
|
|
@@ -864,6 +866,7 @@ module OpenAI
|
|
|
864
866
|
| :"gpt-5.6-cyber"
|
|
865
867
|
| :"gpt-6-cyber"
|
|
866
868
|
| :"gpt-rosalind-research"
|
|
869
|
+
| :"gpt-6.2-astra-law"
|
|
867
870
|
| String
|
|
868
871
|
|
|
869
872
|
module Model
|
|
@@ -872,7 +875,9 @@ module OpenAI
|
|
|
872
875
|
def self?.variants: -> ::Array[OpenAI::Models::Beta::BetaResponse::model]
|
|
873
876
|
|
|
874
877
|
GPT_6_ASTRA: :"gpt-6-astra"
|
|
878
|
+
GPT_6_2_ASTRA: :"gpt-6.2-astra"
|
|
875
879
|
GPT_6_1_SOL: :"gpt-6.1-sol"
|
|
880
|
+
GPT_6_2_SOL: :"gpt-6.2-sol"
|
|
876
881
|
GPT_6_1_TERRA: :"gpt-6.1-terra"
|
|
877
882
|
GPT_6_SOL: :"gpt-6-sol"
|
|
878
883
|
GPT_6_LUNA: :"gpt-6-luna"
|
|
@@ -982,6 +987,7 @@ module OpenAI
|
|
|
982
987
|
GPT_5_6_CYBER: :"gpt-5.6-cyber"
|
|
983
988
|
GPT_6_CYBER: :"gpt-6-cyber"
|
|
984
989
|
GPT_ROSALIND_RESEARCH: :"gpt-rosalind-research"
|
|
990
|
+
GPT_6_2_ASTRA_LAW: :"gpt-6.2-astra-law"
|
|
985
991
|
end
|
|
986
992
|
|
|
987
993
|
type tool_choice =
|
|
@@ -16,6 +16,7 @@ module OpenAI
|
|
|
16
16
|
?type: :"response.create",
|
|
17
17
|
?access_programs: OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::AccessPrograms,
|
|
18
18
|
?background: bool?,
|
|
19
|
+
?background_options: OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::BackgroundOptions,
|
|
19
20
|
?context_management: ::Array[OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::ContextManagement]?,
|
|
20
21
|
?conversation: OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::conversation?,
|
|
21
22
|
?generate: bool,
|
|
@@ -68,6 +69,18 @@ module OpenAI
|
|
|
68
69
|
# [Learn more](https://developers.openai.com/api/docs/guides/background).
|
|
69
70
|
attr_accessor background: bool?
|
|
70
71
|
|
|
72
|
+
# Options for background execution on HTTP requests. The `2h` and `8h` completion
|
|
73
|
+
# windows require `background: true`, Standard processing, and `stream: false` or
|
|
74
|
+
# omitted.
|
|
75
|
+
attr_reader background_options: OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::BackgroundOptions?
|
|
76
|
+
|
|
77
|
+
# Options for background execution on HTTP requests. The `2h` and `8h` completion
|
|
78
|
+
# windows require `background: true`, Standard processing, and `stream: false` or
|
|
79
|
+
# omitted.
|
|
80
|
+
def background_options=: (
|
|
81
|
+
OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::BackgroundOptions
|
|
82
|
+
) -> OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::BackgroundOptions
|
|
83
|
+
|
|
71
84
|
# Context management configuration for this request.
|
|
72
85
|
attr_accessor context_management: ::Array[OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::ContextManagement]?
|
|
73
86
|
|
|
@@ -441,6 +454,10 @@ module OpenAI
|
|
|
441
454
|
# @param background
|
|
442
455
|
# Whether to run the model response in the background.
|
|
443
456
|
# [Learn more](https://developers.openai.com/api/docs/guides/background).
|
|
457
|
+
# @param background_options
|
|
458
|
+
# Options for background execution on HTTP requests. The `2h` and `8h` completion
|
|
459
|
+
# windows require `background: true`, Standard processing, and `stream: false` or
|
|
460
|
+
# omitted.
|
|
444
461
|
# @param context_management
|
|
445
462
|
# Context management configuration for this request.
|
|
446
463
|
# @param conversation
|
|
@@ -681,6 +698,7 @@ module OpenAI
|
|
|
681
698
|
def initialize: (
|
|
682
699
|
?access_programs: OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::AccessPrograms,
|
|
683
700
|
?background: bool?,
|
|
701
|
+
?background_options: OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::BackgroundOptions,
|
|
684
702
|
?context_management: ::Array[OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::ContextManagement]?,
|
|
685
703
|
?conversation: OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::conversation?,
|
|
686
704
|
?generate: bool,
|
|
@@ -722,6 +740,7 @@ module OpenAI
|
|
|
722
740
|
?type: :"response.create",
|
|
723
741
|
?access_programs: OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::AccessPrograms,
|
|
724
742
|
?background: bool?,
|
|
743
|
+
?background_options: OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::BackgroundOptions,
|
|
725
744
|
?context_management: ::Array[OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::ContextManagement]?,
|
|
726
745
|
?conversation: OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::conversation?,
|
|
727
746
|
?generate: bool,
|
|
@@ -822,6 +841,60 @@ module OpenAI
|
|
|
822
841
|
end
|
|
823
842
|
end
|
|
824
843
|
|
|
844
|
+
type background_options =
|
|
845
|
+
{
|
|
846
|
+
?completion_window: OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::BackgroundOptions::completion_window,
|
|
847
|
+
?continuation_id: String
|
|
848
|
+
}
|
|
849
|
+
|
|
850
|
+
class BackgroundOptions < OpenAI::Internal::Type::BaseModel
|
|
851
|
+
# The completion window for background execution. Defaults to `soonest`; `2h` and
|
|
852
|
+
# `8h` select discounted background execution.
|
|
853
|
+
attr_reader completion_window: OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::BackgroundOptions::completion_window?
|
|
854
|
+
|
|
855
|
+
# The completion window for background execution. Defaults to `soonest`; `2h` and
|
|
856
|
+
# `8h` select discounted background execution.
|
|
857
|
+
def completion_window=: (
|
|
858
|
+
OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::BackgroundOptions::completion_window
|
|
859
|
+
) -> OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::BackgroundOptions::completion_window
|
|
860
|
+
|
|
861
|
+
# A customer-provided opaque identifier used to prioritize related background
|
|
862
|
+
# requests. It does not add prior history to the input.
|
|
863
|
+
attr_reader continuation_id: String?
|
|
864
|
+
|
|
865
|
+
# A customer-provided opaque identifier used to prioritize related background
|
|
866
|
+
# requests. It does not add prior history to the input.
|
|
867
|
+
def continuation_id=: (String) -> String
|
|
868
|
+
|
|
869
|
+
# @param completion_window
|
|
870
|
+
# The completion window for background execution. Defaults to `soonest`; `2h` and
|
|
871
|
+
# `8h` select discounted background execution.
|
|
872
|
+
# @param continuation_id
|
|
873
|
+
# A customer-provided opaque identifier used to prioritize related background
|
|
874
|
+
# requests. It does not add prior history to the input.
|
|
875
|
+
def initialize: (
|
|
876
|
+
?completion_window: OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::BackgroundOptions::completion_window,
|
|
877
|
+
?continuation_id: String
|
|
878
|
+
) -> void
|
|
879
|
+
|
|
880
|
+
def to_hash: -> {
|
|
881
|
+
?completion_window: OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::BackgroundOptions::completion_window,
|
|
882
|
+
?continuation_id: String
|
|
883
|
+
}
|
|
884
|
+
|
|
885
|
+
type completion_window = :soonest | :"2h" | :"8h"
|
|
886
|
+
|
|
887
|
+
module CompletionWindow
|
|
888
|
+
extend OpenAI::Internal::Type::Enum
|
|
889
|
+
|
|
890
|
+
SOONEST: :soonest
|
|
891
|
+
COMPLETION_WINDOW_2H: :"2h"
|
|
892
|
+
COMPLETION_WINDOW_8H: :"8h"
|
|
893
|
+
|
|
894
|
+
def self?.values: -> ::Array[OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::BackgroundOptions::completion_window]
|
|
895
|
+
end
|
|
896
|
+
end
|
|
897
|
+
|
|
825
898
|
type context_management =
|
|
826
899
|
{ type: String, ?compact_threshold: Integer? }
|
|
827
900
|
|
|
@@ -903,7 +976,9 @@ module OpenAI
|
|
|
903
976
|
|
|
904
977
|
type model =
|
|
905
978
|
:"gpt-6-astra"
|
|
979
|
+
| :"gpt-6.2-astra"
|
|
906
980
|
| :"gpt-6.1-sol"
|
|
981
|
+
| :"gpt-6.2-sol"
|
|
907
982
|
| :"gpt-6.1-terra"
|
|
908
983
|
| :"gpt-6-sol"
|
|
909
984
|
| :"gpt-6-luna"
|
|
@@ -1014,6 +1089,7 @@ module OpenAI
|
|
|
1014
1089
|
| :"gpt-6-cyber"
|
|
1015
1090
|
| :"gpt-rosalind-research"
|
|
1016
1091
|
| :"gpt-6-rosalind"
|
|
1092
|
+
| :"gpt-6.2-astra-law"
|
|
1017
1093
|
| String
|
|
1018
1094
|
|
|
1019
1095
|
module Model
|
|
@@ -1022,7 +1098,9 @@ module OpenAI
|
|
|
1022
1098
|
def self?.variants: -> ::Array[OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::model]
|
|
1023
1099
|
|
|
1024
1100
|
GPT_6_ASTRA: :"gpt-6-astra"
|
|
1101
|
+
GPT_6_2_ASTRA: :"gpt-6.2-astra"
|
|
1025
1102
|
GPT_6_1_SOL: :"gpt-6.1-sol"
|
|
1103
|
+
GPT_6_2_SOL: :"gpt-6.2-sol"
|
|
1026
1104
|
GPT_6_1_TERRA: :"gpt-6.1-terra"
|
|
1027
1105
|
GPT_6_SOL: :"gpt-6-sol"
|
|
1028
1106
|
GPT_6_LUNA: :"gpt-6-luna"
|
|
@@ -1133,6 +1211,7 @@ module OpenAI
|
|
|
1133
1211
|
GPT_6_CYBER: :"gpt-6-cyber"
|
|
1134
1212
|
GPT_ROSALIND_RESEARCH: :"gpt-rosalind-research"
|
|
1135
1213
|
GPT_6_ROSALIND: :"gpt-6-rosalind"
|
|
1214
|
+
GPT_6_2_ASTRA_LAW: :"gpt-6.2-astra-law"
|
|
1136
1215
|
end
|
|
1137
1216
|
|
|
1138
1217
|
type moderation =
|
|
@@ -172,7 +172,9 @@ module OpenAI
|
|
|
172
172
|
|
|
173
173
|
type model =
|
|
174
174
|
:"gpt-6-astra"
|
|
175
|
+
| :"gpt-6.2-astra"
|
|
175
176
|
| :"gpt-6.1-sol"
|
|
177
|
+
| :"gpt-6.2-sol"
|
|
176
178
|
| :"gpt-6.1-terra"
|
|
177
179
|
| :"gpt-6-sol"
|
|
178
180
|
| :"gpt-6-luna"
|
|
@@ -283,6 +285,7 @@ module OpenAI
|
|
|
283
285
|
| :"gpt-6-cyber"
|
|
284
286
|
| :"gpt-rosalind-research"
|
|
285
287
|
| :"gpt-6-rosalind"
|
|
288
|
+
| :"gpt-6.2-astra-law"
|
|
286
289
|
| String
|
|
287
290
|
|
|
288
291
|
module Model
|
|
@@ -291,7 +294,9 @@ module OpenAI
|
|
|
291
294
|
def self?.variants: -> ::Array[OpenAI::Models::Beta::ResponseCompactParams::model]
|
|
292
295
|
|
|
293
296
|
GPT_6_ASTRA: :"gpt-6-astra"
|
|
297
|
+
GPT_6_2_ASTRA: :"gpt-6.2-astra"
|
|
294
298
|
GPT_6_1_SOL: :"gpt-6.1-sol"
|
|
299
|
+
GPT_6_2_SOL: :"gpt-6.2-sol"
|
|
295
300
|
GPT_6_1_TERRA: :"gpt-6.1-terra"
|
|
296
301
|
GPT_6_SOL: :"gpt-6-sol"
|
|
297
302
|
GPT_6_LUNA: :"gpt-6-luna"
|
|
@@ -402,6 +407,7 @@ module OpenAI
|
|
|
402
407
|
GPT_6_CYBER: :"gpt-6-cyber"
|
|
403
408
|
GPT_ROSALIND_RESEARCH: :"gpt-rosalind-research"
|
|
404
409
|
GPT_6_ROSALIND: :"gpt-6-rosalind"
|
|
410
|
+
GPT_6_2_ASTRA_LAW: :"gpt-6.2-astra-law"
|
|
405
411
|
end
|
|
406
412
|
|
|
407
413
|
type image =
|