openai 0.125.0 → 0.126.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 (41) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +10 -0
  3. data/README.md +1 -1
  4. data/lib/openai/models/all_models.rb +1 -0
  5. data/lib/openai/models/beta/beta_response.rb +9 -0
  6. data/lib/openai/models/beta/beta_responses_client_event.rb +76 -1
  7. data/lib/openai/models/beta/response_compact_params.rb +9 -0
  8. data/lib/openai/models/beta/response_create_params.rb +70 -1
  9. data/lib/openai/models/chat_model.rb +2 -0
  10. data/lib/openai/models/responses/response_compact_params.rb +9 -0
  11. data/lib/openai/models/responses/response_create_params.rb +61 -1
  12. data/lib/openai/models/responses/responses_client_event.rb +65 -1
  13. data/lib/openai/models/responses_model.rb +1 -0
  14. data/lib/openai/resources/beta/responses.rb +12 -2
  15. data/lib/openai/resources/responses.rb +12 -2
  16. data/lib/openai/version.rb +1 -1
  17. data/rbi/openai/models/all_models.rbi +1 -0
  18. data/rbi/openai/models/beta/beta_response.rbi +3 -0
  19. data/rbi/openai/models/beta/beta_responses_client_event.rbi +145 -0
  20. data/rbi/openai/models/beta/response_compact_params.rbi +3 -0
  21. data/rbi/openai/models/beta/response_create_params.rbi +116 -0
  22. data/rbi/openai/models/chat_model.rbi +2 -0
  23. data/rbi/openai/models/responses/response_compact_params.rbi +3 -0
  24. data/rbi/openai/models/responses/response_create_params.rbi +117 -0
  25. data/rbi/openai/models/responses/responses_client_event.rbi +135 -0
  26. data/rbi/openai/models/responses_model.rbi +1 -0
  27. data/rbi/openai/resources/beta/responses.rbi +10 -0
  28. data/rbi/openai/resources/responses.rbi +12 -0
  29. data/sig/openai/models/all_models.rbs +2 -0
  30. data/sig/openai/models/beta/beta_response.rbs +6 -0
  31. data/sig/openai/models/beta/beta_responses_client_event.rbs +79 -0
  32. data/sig/openai/models/beta/response_compact_params.rbs +6 -0
  33. data/sig/openai/models/beta/response_create_params.rbs +79 -0
  34. data/sig/openai/models/chat_model.rbs +4 -0
  35. data/sig/openai/models/responses/response_compact_params.rbs +6 -0
  36. data/sig/openai/models/responses/response_create_params.rbs +73 -0
  37. data/sig/openai/models/responses/responses_client_event.rbs +73 -0
  38. data/sig/openai/models/responses_model.rbs +2 -0
  39. data/sig/openai/resources/beta/responses.rbs +2 -0
  40. data/sig/openai/resources/responses.rbs +3 -0
  41. metadata +1 -1
@@ -29,6 +29,15 @@ module OpenAI
29
29
  sig { returns(T.nilable(T::Boolean)) }
30
30
  attr_accessor :background
31
31
 
32
+ # Options for background execution on HTTP requests. The `2h` and `8h` completion
33
+ # windows require `background: true`, Standard processing, and `stream: false` or
34
+ # omitted.
35
+ sig { returns(T.nilable(OpenAI::Responses::ResponseCreateParams::BackgroundOptions)) }
36
+ attr_reader :background_options
37
+
38
+ sig { params(background_options: OpenAI::Responses::ResponseCreateParams::BackgroundOptions::OrHash).void }
39
+ attr_writer :background_options
40
+
32
41
  # Context management configuration for this request.
33
42
  sig { returns(T.nilable(T::Array[OpenAI::Responses::ResponseCreateParams::ContextManagement])) }
34
43
  attr_accessor :context_management
@@ -442,6 +451,8 @@ module OpenAI
442
451
 
443
452
  background: T.nilable(T::Boolean),
444
453
 
454
+ background_options: OpenAI::Responses::ResponseCreateParams::BackgroundOptions::OrHash,
455
+
445
456
  context_management: T.nilable(T::Array[OpenAI::Responses::ResponseCreateParams::ContextManagement::OrHash]),
446
457
 
447
458
  conversation: T.nilable(T.any(String, OpenAI::Responses::ResponseConversationParam::OrHash)),
@@ -544,6 +555,11 @@ module OpenAI
544
555
  # [Learn more](https://developers.openai.com/api/docs/guides/background).
545
556
  background: nil,
546
557
 
558
+ # Options for background execution on HTTP requests. The `2h` and `8h` completion
559
+ # windows require `background: true`, Standard processing, and `stream: false` or
560
+ # omitted.
561
+ background_options: nil,
562
+
547
563
  # Context management configuration for this request.
548
564
  context_management: nil,
549
565
 
@@ -799,6 +815,7 @@ module OpenAI
799
815
  {
800
816
  access_programs: OpenAI::Responses::ResponseCreateParams::AccessPrograms,
801
817
  background: T.nilable(T::Boolean),
818
+ background_options: OpenAI::Responses::ResponseCreateParams::BackgroundOptions,
802
819
  context_management: T.nilable(T::Array[OpenAI::Responses::ResponseCreateParams::ContextManagement]),
803
820
  conversation: T.nilable(T.any(String, OpenAI::Responses::ResponseConversationParam)),
804
821
  image: OpenAI::Responses::ResponseCreateParams::Image,
@@ -958,6 +975,106 @@ module OpenAI
958
975
  end
959
976
  end
960
977
 
978
+ class BackgroundOptions < OpenAI::Internal::Type::BaseModel
979
+ OrHash = T.type_alias do
980
+ T.any(
981
+ OpenAI::Responses::ResponseCreateParams::BackgroundOptions,
982
+ OpenAI::Internal::AnyHash
983
+ )
984
+ end
985
+
986
+ # The completion window for background execution. Defaults to `soonest`; `2h` and
987
+ # `8h` select discounted background execution.
988
+ sig {
989
+ returns(T.nilable(OpenAI::Responses::ResponseCreateParams::BackgroundOptions::CompletionWindow::OrSymbol))
990
+ }
991
+ attr_reader :completion_window
992
+
993
+ sig {
994
+ params(
995
+ completion_window: OpenAI::Responses::ResponseCreateParams::BackgroundOptions::CompletionWindow::OrSymbol
996
+ )
997
+ .void
998
+ }
999
+ attr_writer :completion_window
1000
+
1001
+ # A customer-provided opaque identifier used to prioritize related background
1002
+ # requests. It does not add prior history to the input.
1003
+ sig { returns(T.nilable(String)) }
1004
+ attr_reader :continuation_id
1005
+
1006
+ sig { params(continuation_id: String).void }
1007
+ attr_writer :continuation_id
1008
+
1009
+ # Options for background execution on HTTP requests. The `2h` and `8h` completion
1010
+ # windows require `background: true`, Standard processing, and `stream: false` or
1011
+ # omitted.
1012
+ sig do
1013
+ params(
1014
+
1015
+ completion_window: OpenAI::Responses::ResponseCreateParams::BackgroundOptions::CompletionWindow::OrSymbol,
1016
+
1017
+ continuation_id: String
1018
+ )
1019
+ .returns(T.attached_class)
1020
+ end
1021
+ def self.new(
1022
+
1023
+ # The completion window for background execution. Defaults to `soonest`; `2h` and
1024
+ # `8h` select discounted background execution.
1025
+ completion_window: nil,
1026
+
1027
+ # A customer-provided opaque identifier used to prioritize related background
1028
+ # requests. It does not add prior history to the input.
1029
+
1030
+ continuation_id: nil
1031
+ )
1032
+ end
1033
+
1034
+ sig do
1035
+ override.returns(
1036
+ {
1037
+ completion_window: OpenAI::Responses::ResponseCreateParams::BackgroundOptions::CompletionWindow::OrSymbol,
1038
+ continuation_id: String
1039
+ }
1040
+ )
1041
+ end
1042
+ def to_hash
1043
+ end
1044
+
1045
+ # The completion window for background execution. Defaults to `soonest`; `2h` and
1046
+ # `8h` select discounted background execution.
1047
+ module CompletionWindow
1048
+ extend OpenAI::Internal::Type::Enum
1049
+
1050
+ TaggedSymbol = T.type_alias {
1051
+ T.all(Symbol, OpenAI::Responses::ResponseCreateParams::BackgroundOptions::CompletionWindow)
1052
+ }
1053
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
1054
+
1055
+ SOONEST = T.let(
1056
+ :soonest,
1057
+ OpenAI::Responses::ResponseCreateParams::BackgroundOptions::CompletionWindow::TaggedSymbol
1058
+ )
1059
+ COMPLETION_WINDOW_2H = T.let(
1060
+ :"2h",
1061
+ OpenAI::Responses::ResponseCreateParams::BackgroundOptions::CompletionWindow::TaggedSymbol
1062
+ )
1063
+ COMPLETION_WINDOW_8H = T.let(
1064
+ :"8h",
1065
+ OpenAI::Responses::ResponseCreateParams::BackgroundOptions::CompletionWindow::TaggedSymbol
1066
+ )
1067
+
1068
+ sig {
1069
+ override.returns(
1070
+ T::Array[OpenAI::Responses::ResponseCreateParams::BackgroundOptions::CompletionWindow::TaggedSymbol]
1071
+ )
1072
+ }
1073
+ def self.values
1074
+ end
1075
+ end
1076
+ end
1077
+
961
1078
  class ContextManagement < OpenAI::Internal::Type::BaseModel
962
1079
  OrHash = T.type_alias do
963
1080
  T.any(
@@ -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
@@ -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 =