openai 0.37.0 → 0.39.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 +21 -0
- data/README.md +9 -9
- data/lib/openai/internal/type/enum.rb +6 -6
- data/lib/openai/models/beta/assistant_create_params.rb +1 -1
- data/lib/openai/models/beta/assistant_update_params.rb +1 -1
- data/lib/openai/models/beta/threads/run_create_params.rb +1 -1
- data/lib/openai/models/chat/completion_create_params.rb +1 -1
- data/lib/openai/models/chat_model.rb +5 -0
- data/lib/openai/models/evals/create_eval_completions_run_data_source.rb +1 -1
- data/lib/openai/models/evals/run_cancel_response.rb +2 -2
- data/lib/openai/models/evals/run_create_params.rb +2 -2
- data/lib/openai/models/evals/run_create_response.rb +2 -2
- data/lib/openai/models/evals/run_list_response.rb +2 -2
- data/lib/openai/models/evals/run_retrieve_response.rb +2 -2
- data/lib/openai/models/graders/score_model_grader.rb +7 -3
- data/lib/openai/models/reasoning.rb +5 -3
- data/lib/openai/models/reasoning_effort.rb +1 -1
- data/lib/openai/models/responses/response_compact_params.rb +45 -30
- data/lib/openai/resources/responses.rb +9 -9
- data/lib/openai/version.rb +1 -1
- data/rbi/openai/models/beta/assistant_create_params.rbi +2 -2
- data/rbi/openai/models/beta/assistant_update_params.rbi +2 -2
- data/rbi/openai/models/beta/threads/run_create_params.rbi +2 -2
- data/rbi/openai/models/chat/completion_create_params.rbi +2 -2
- data/rbi/openai/models/chat_model.rbi +8 -0
- data/rbi/openai/models/evals/create_eval_completions_run_data_source.rbi +2 -2
- data/rbi/openai/models/evals/run_cancel_response.rbi +4 -4
- data/rbi/openai/models/evals/run_create_params.rbi +4 -4
- data/rbi/openai/models/evals/run_create_response.rbi +4 -4
- data/rbi/openai/models/evals/run_list_response.rbi +4 -4
- data/rbi/openai/models/evals/run_retrieve_response.rbi +4 -4
- data/rbi/openai/models/graders/score_model_grader.rbi +6 -4
- data/rbi/openai/models/reasoning.rbi +8 -5
- data/rbi/openai/models/reasoning_effort.rbi +1 -1
- data/rbi/openai/models/responses/response_compact_params.rbi +87 -62
- data/rbi/openai/resources/beta/assistants.rbi +2 -2
- data/rbi/openai/resources/beta/threads/runs.rbi +2 -2
- data/rbi/openai/resources/chat/completions.rbi +2 -2
- data/rbi/openai/resources/responses.rbi +11 -11
- data/sig/openai/models/chat_model.rbs +11 -1
- data/sig/openai/models/responses/response_compact_params.rbs +27 -17
- data/sig/openai/resources/responses.rbs +1 -1
- metadata +2 -2
|
@@ -250,7 +250,7 @@ module OpenAI
|
|
|
250
250
|
# - All models before `gpt-5.1` default to `medium` reasoning effort, and do not
|
|
251
251
|
# support `none`.
|
|
252
252
|
# - The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort.
|
|
253
|
-
# - `xhigh` is
|
|
253
|
+
# - `xhigh` is supported for all models after `gpt-5.1-codex-max`.
|
|
254
254
|
sig { returns(T.nilable(OpenAI::ReasoningEffort::OrSymbol)) }
|
|
255
255
|
attr_accessor :reasoning_effort
|
|
256
256
|
|
|
@@ -704,7 +704,7 @@ module OpenAI
|
|
|
704
704
|
# - All models before `gpt-5.1` default to `medium` reasoning effort, and do not
|
|
705
705
|
# support `none`.
|
|
706
706
|
# - The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort.
|
|
707
|
-
# - `xhigh` is
|
|
707
|
+
# - `xhigh` is supported for all models after `gpt-5.1-codex-max`.
|
|
708
708
|
reasoning_effort: nil,
|
|
709
709
|
# An object specifying the format that the model must output.
|
|
710
710
|
#
|
|
@@ -8,6 +8,14 @@ module OpenAI
|
|
|
8
8
|
TaggedSymbol = T.type_alias { T.all(Symbol, OpenAI::ChatModel) }
|
|
9
9
|
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
10
10
|
|
|
11
|
+
GPT_5_2 = T.let(:"gpt-5.2", OpenAI::ChatModel::TaggedSymbol)
|
|
12
|
+
GPT_5_2_2025_12_11 =
|
|
13
|
+
T.let(:"gpt-5.2-2025-12-11", OpenAI::ChatModel::TaggedSymbol)
|
|
14
|
+
GPT_5_2_CHAT_LATEST =
|
|
15
|
+
T.let(:"gpt-5.2-chat-latest", OpenAI::ChatModel::TaggedSymbol)
|
|
16
|
+
GPT_5_2_PRO = T.let(:"gpt-5.2-pro", OpenAI::ChatModel::TaggedSymbol)
|
|
17
|
+
GPT_5_2_PRO_2025_12_11 =
|
|
18
|
+
T.let(:"gpt-5.2-pro-2025-12-11", OpenAI::ChatModel::TaggedSymbol)
|
|
11
19
|
GPT_5_1 = T.let(:"gpt-5.1", OpenAI::ChatModel::TaggedSymbol)
|
|
12
20
|
GPT_5_1_2025_11_13 =
|
|
13
21
|
T.let(:"gpt-5.1-2025-11-13", OpenAI::ChatModel::TaggedSymbol)
|
|
@@ -899,7 +899,7 @@ module OpenAI
|
|
|
899
899
|
# - All models before `gpt-5.1` default to `medium` reasoning effort, and do not
|
|
900
900
|
# support `none`.
|
|
901
901
|
# - The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort.
|
|
902
|
-
# - `xhigh` is
|
|
902
|
+
# - `xhigh` is supported for all models after `gpt-5.1-codex-max`.
|
|
903
903
|
sig { returns(T.nilable(OpenAI::ReasoningEffort::OrSymbol)) }
|
|
904
904
|
attr_accessor :reasoning_effort
|
|
905
905
|
|
|
@@ -1007,7 +1007,7 @@ module OpenAI
|
|
|
1007
1007
|
# - All models before `gpt-5.1` default to `medium` reasoning effort, and do not
|
|
1008
1008
|
# support `none`.
|
|
1009
1009
|
# - The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort.
|
|
1010
|
-
# - `xhigh` is
|
|
1010
|
+
# - `xhigh` is supported for all models after `gpt-5.1-codex-max`.
|
|
1011
1011
|
reasoning_effort: nil,
|
|
1012
1012
|
# An object specifying the format that the model must output.
|
|
1013
1013
|
#
|
|
@@ -522,7 +522,7 @@ module OpenAI
|
|
|
522
522
|
# - All models before `gpt-5.1` default to `medium` reasoning effort, and do not
|
|
523
523
|
# support `none`.
|
|
524
524
|
# - The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort.
|
|
525
|
-
# - `xhigh` is
|
|
525
|
+
# - `xhigh` is supported for all models after `gpt-5.1-codex-max`.
|
|
526
526
|
sig do
|
|
527
527
|
returns(T.nilable(OpenAI::ReasoningEffort::TaggedSymbol))
|
|
528
528
|
end
|
|
@@ -589,7 +589,7 @@ module OpenAI
|
|
|
589
589
|
# - All models before `gpt-5.1` default to `medium` reasoning effort, and do not
|
|
590
590
|
# support `none`.
|
|
591
591
|
# - The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort.
|
|
592
|
-
# - `xhigh` is
|
|
592
|
+
# - `xhigh` is supported for all models after `gpt-5.1-codex-max`.
|
|
593
593
|
reasoning_effort: nil,
|
|
594
594
|
# Sampling temperature. This is a query parameter used to select responses.
|
|
595
595
|
temperature: nil,
|
|
@@ -1143,7 +1143,7 @@ module OpenAI
|
|
|
1143
1143
|
# - All models before `gpt-5.1` default to `medium` reasoning effort, and do not
|
|
1144
1144
|
# support `none`.
|
|
1145
1145
|
# - The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort.
|
|
1146
|
-
# - `xhigh` is
|
|
1146
|
+
# - `xhigh` is supported for all models after `gpt-5.1-codex-max`.
|
|
1147
1147
|
sig { returns(T.nilable(OpenAI::ReasoningEffort::TaggedSymbol)) }
|
|
1148
1148
|
attr_accessor :reasoning_effort
|
|
1149
1149
|
|
|
@@ -1276,7 +1276,7 @@ module OpenAI
|
|
|
1276
1276
|
# - All models before `gpt-5.1` default to `medium` reasoning effort, and do not
|
|
1277
1277
|
# support `none`.
|
|
1278
1278
|
# - The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort.
|
|
1279
|
-
# - `xhigh` is
|
|
1279
|
+
# - `xhigh` is supported for all models after `gpt-5.1-codex-max`.
|
|
1280
1280
|
reasoning_effort: nil,
|
|
1281
1281
|
# A seed value to initialize the randomness, during sampling.
|
|
1282
1282
|
seed: nil,
|
|
@@ -432,7 +432,7 @@ module OpenAI
|
|
|
432
432
|
# - All models before `gpt-5.1` default to `medium` reasoning effort, and do not
|
|
433
433
|
# support `none`.
|
|
434
434
|
# - The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort.
|
|
435
|
-
# - `xhigh` is
|
|
435
|
+
# - `xhigh` is supported for all models after `gpt-5.1-codex-max`.
|
|
436
436
|
sig { returns(T.nilable(OpenAI::ReasoningEffort::OrSymbol)) }
|
|
437
437
|
attr_accessor :reasoning_effort
|
|
438
438
|
|
|
@@ -497,7 +497,7 @@ module OpenAI
|
|
|
497
497
|
# - All models before `gpt-5.1` default to `medium` reasoning effort, and do not
|
|
498
498
|
# support `none`.
|
|
499
499
|
# - The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort.
|
|
500
|
-
# - `xhigh` is
|
|
500
|
+
# - `xhigh` is supported for all models after `gpt-5.1-codex-max`.
|
|
501
501
|
reasoning_effort: nil,
|
|
502
502
|
# Sampling temperature. This is a query parameter used to select responses.
|
|
503
503
|
temperature: nil,
|
|
@@ -1101,7 +1101,7 @@ module OpenAI
|
|
|
1101
1101
|
# - All models before `gpt-5.1` default to `medium` reasoning effort, and do not
|
|
1102
1102
|
# support `none`.
|
|
1103
1103
|
# - The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort.
|
|
1104
|
-
# - `xhigh` is
|
|
1104
|
+
# - `xhigh` is supported for all models after `gpt-5.1-codex-max`.
|
|
1105
1105
|
sig { returns(T.nilable(OpenAI::ReasoningEffort::OrSymbol)) }
|
|
1106
1106
|
attr_accessor :reasoning_effort
|
|
1107
1107
|
|
|
@@ -1253,7 +1253,7 @@ module OpenAI
|
|
|
1253
1253
|
# - All models before `gpt-5.1` default to `medium` reasoning effort, and do not
|
|
1254
1254
|
# support `none`.
|
|
1255
1255
|
# - The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort.
|
|
1256
|
-
# - `xhigh` is
|
|
1256
|
+
# - `xhigh` is supported for all models after `gpt-5.1-codex-max`.
|
|
1257
1257
|
reasoning_effort: nil,
|
|
1258
1258
|
# A seed value to initialize the randomness, during sampling.
|
|
1259
1259
|
seed: nil,
|
|
@@ -522,7 +522,7 @@ module OpenAI
|
|
|
522
522
|
# - All models before `gpt-5.1` default to `medium` reasoning effort, and do not
|
|
523
523
|
# support `none`.
|
|
524
524
|
# - The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort.
|
|
525
|
-
# - `xhigh` is
|
|
525
|
+
# - `xhigh` is supported for all models after `gpt-5.1-codex-max`.
|
|
526
526
|
sig do
|
|
527
527
|
returns(T.nilable(OpenAI::ReasoningEffort::TaggedSymbol))
|
|
528
528
|
end
|
|
@@ -589,7 +589,7 @@ module OpenAI
|
|
|
589
589
|
# - All models before `gpt-5.1` default to `medium` reasoning effort, and do not
|
|
590
590
|
# support `none`.
|
|
591
591
|
# - The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort.
|
|
592
|
-
# - `xhigh` is
|
|
592
|
+
# - `xhigh` is supported for all models after `gpt-5.1-codex-max`.
|
|
593
593
|
reasoning_effort: nil,
|
|
594
594
|
# Sampling temperature. This is a query parameter used to select responses.
|
|
595
595
|
temperature: nil,
|
|
@@ -1143,7 +1143,7 @@ module OpenAI
|
|
|
1143
1143
|
# - All models before `gpt-5.1` default to `medium` reasoning effort, and do not
|
|
1144
1144
|
# support `none`.
|
|
1145
1145
|
# - The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort.
|
|
1146
|
-
# - `xhigh` is
|
|
1146
|
+
# - `xhigh` is supported for all models after `gpt-5.1-codex-max`.
|
|
1147
1147
|
sig { returns(T.nilable(OpenAI::ReasoningEffort::TaggedSymbol)) }
|
|
1148
1148
|
attr_accessor :reasoning_effort
|
|
1149
1149
|
|
|
@@ -1276,7 +1276,7 @@ module OpenAI
|
|
|
1276
1276
|
# - All models before `gpt-5.1` default to `medium` reasoning effort, and do not
|
|
1277
1277
|
# support `none`.
|
|
1278
1278
|
# - The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort.
|
|
1279
|
-
# - `xhigh` is
|
|
1279
|
+
# - `xhigh` is supported for all models after `gpt-5.1-codex-max`.
|
|
1280
1280
|
reasoning_effort: nil,
|
|
1281
1281
|
# A seed value to initialize the randomness, during sampling.
|
|
1282
1282
|
seed: nil,
|
|
@@ -518,7 +518,7 @@ module OpenAI
|
|
|
518
518
|
# - All models before `gpt-5.1` default to `medium` reasoning effort, and do not
|
|
519
519
|
# support `none`.
|
|
520
520
|
# - The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort.
|
|
521
|
-
# - `xhigh` is
|
|
521
|
+
# - `xhigh` is supported for all models after `gpt-5.1-codex-max`.
|
|
522
522
|
sig do
|
|
523
523
|
returns(T.nilable(OpenAI::ReasoningEffort::TaggedSymbol))
|
|
524
524
|
end
|
|
@@ -585,7 +585,7 @@ module OpenAI
|
|
|
585
585
|
# - All models before `gpt-5.1` default to `medium` reasoning effort, and do not
|
|
586
586
|
# support `none`.
|
|
587
587
|
# - The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort.
|
|
588
|
-
# - `xhigh` is
|
|
588
|
+
# - `xhigh` is supported for all models after `gpt-5.1-codex-max`.
|
|
589
589
|
reasoning_effort: nil,
|
|
590
590
|
# Sampling temperature. This is a query parameter used to select responses.
|
|
591
591
|
temperature: nil,
|
|
@@ -1139,7 +1139,7 @@ module OpenAI
|
|
|
1139
1139
|
# - All models before `gpt-5.1` default to `medium` reasoning effort, and do not
|
|
1140
1140
|
# support `none`.
|
|
1141
1141
|
# - The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort.
|
|
1142
|
-
# - `xhigh` is
|
|
1142
|
+
# - `xhigh` is supported for all models after `gpt-5.1-codex-max`.
|
|
1143
1143
|
sig { returns(T.nilable(OpenAI::ReasoningEffort::TaggedSymbol)) }
|
|
1144
1144
|
attr_accessor :reasoning_effort
|
|
1145
1145
|
|
|
@@ -1272,7 +1272,7 @@ module OpenAI
|
|
|
1272
1272
|
# - All models before `gpt-5.1` default to `medium` reasoning effort, and do not
|
|
1273
1273
|
# support `none`.
|
|
1274
1274
|
# - The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort.
|
|
1275
|
-
# - `xhigh` is
|
|
1275
|
+
# - `xhigh` is supported for all models after `gpt-5.1-codex-max`.
|
|
1276
1276
|
reasoning_effort: nil,
|
|
1277
1277
|
# A seed value to initialize the randomness, during sampling.
|
|
1278
1278
|
seed: nil,
|
|
@@ -524,7 +524,7 @@ module OpenAI
|
|
|
524
524
|
# - All models before `gpt-5.1` default to `medium` reasoning effort, and do not
|
|
525
525
|
# support `none`.
|
|
526
526
|
# - The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort.
|
|
527
|
-
# - `xhigh` is
|
|
527
|
+
# - `xhigh` is supported for all models after `gpt-5.1-codex-max`.
|
|
528
528
|
sig do
|
|
529
529
|
returns(T.nilable(OpenAI::ReasoningEffort::TaggedSymbol))
|
|
530
530
|
end
|
|
@@ -591,7 +591,7 @@ module OpenAI
|
|
|
591
591
|
# - All models before `gpt-5.1` default to `medium` reasoning effort, and do not
|
|
592
592
|
# support `none`.
|
|
593
593
|
# - The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort.
|
|
594
|
-
# - `xhigh` is
|
|
594
|
+
# - `xhigh` is supported for all models after `gpt-5.1-codex-max`.
|
|
595
595
|
reasoning_effort: nil,
|
|
596
596
|
# Sampling temperature. This is a query parameter used to select responses.
|
|
597
597
|
temperature: nil,
|
|
@@ -1145,7 +1145,7 @@ module OpenAI
|
|
|
1145
1145
|
# - All models before `gpt-5.1` default to `medium` reasoning effort, and do not
|
|
1146
1146
|
# support `none`.
|
|
1147
1147
|
# - The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort.
|
|
1148
|
-
# - `xhigh` is
|
|
1148
|
+
# - `xhigh` is supported for all models after `gpt-5.1-codex-max`.
|
|
1149
1149
|
sig { returns(T.nilable(OpenAI::ReasoningEffort::TaggedSymbol)) }
|
|
1150
1150
|
attr_accessor :reasoning_effort
|
|
1151
1151
|
|
|
@@ -1278,7 +1278,7 @@ module OpenAI
|
|
|
1278
1278
|
# - All models before `gpt-5.1` default to `medium` reasoning effort, and do not
|
|
1279
1279
|
# support `none`.
|
|
1280
1280
|
# - The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort.
|
|
1281
|
-
# - `xhigh` is
|
|
1281
|
+
# - `xhigh` is supported for all models after `gpt-5.1-codex-max`.
|
|
1282
1282
|
reasoning_effort: nil,
|
|
1283
1283
|
# A seed value to initialize the randomness, during sampling.
|
|
1284
1284
|
seed: nil,
|
|
@@ -11,7 +11,8 @@ module OpenAI
|
|
|
11
11
|
T.any(OpenAI::Graders::ScoreModelGrader, OpenAI::Internal::AnyHash)
|
|
12
12
|
end
|
|
13
13
|
|
|
14
|
-
# The input
|
|
14
|
+
# The input messages evaluated by the grader. Supports text, output text, input
|
|
15
|
+
# image, and input audio content blocks, and may include template strings.
|
|
15
16
|
sig { returns(T::Array[OpenAI::Graders::ScoreModelGrader::Input]) }
|
|
16
17
|
attr_accessor :input
|
|
17
18
|
|
|
@@ -61,7 +62,8 @@ module OpenAI
|
|
|
61
62
|
).returns(T.attached_class)
|
|
62
63
|
end
|
|
63
64
|
def self.new(
|
|
64
|
-
# The input
|
|
65
|
+
# The input messages evaluated by the grader. Supports text, output text, input
|
|
66
|
+
# image, and input audio content blocks, and may include template strings.
|
|
65
67
|
input:,
|
|
66
68
|
# The model to use for the evaluation.
|
|
67
69
|
model:,
|
|
@@ -406,7 +408,7 @@ module OpenAI
|
|
|
406
408
|
# - All models before `gpt-5.1` default to `medium` reasoning effort, and do not
|
|
407
409
|
# support `none`.
|
|
408
410
|
# - The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort.
|
|
409
|
-
# - `xhigh` is
|
|
411
|
+
# - `xhigh` is supported for all models after `gpt-5.1-codex-max`.
|
|
410
412
|
sig { returns(T.nilable(OpenAI::ReasoningEffort::OrSymbol)) }
|
|
411
413
|
attr_accessor :reasoning_effort
|
|
412
414
|
|
|
@@ -447,7 +449,7 @@ module OpenAI
|
|
|
447
449
|
# - All models before `gpt-5.1` default to `medium` reasoning effort, and do not
|
|
448
450
|
# support `none`.
|
|
449
451
|
# - The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort.
|
|
450
|
-
# - `xhigh` is
|
|
452
|
+
# - `xhigh` is supported for all models after `gpt-5.1-codex-max`.
|
|
451
453
|
reasoning_effort: nil,
|
|
452
454
|
# A seed value to initialize the randomness, during sampling.
|
|
453
455
|
seed: nil,
|
|
@@ -18,7 +18,7 @@ module OpenAI
|
|
|
18
18
|
# - All models before `gpt-5.1` default to `medium` reasoning effort, and do not
|
|
19
19
|
# support `none`.
|
|
20
20
|
# - The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort.
|
|
21
|
-
# - `xhigh` is
|
|
21
|
+
# - `xhigh` is supported for all models after `gpt-5.1-codex-max`.
|
|
22
22
|
sig { returns(T.nilable(OpenAI::ReasoningEffort::OrSymbol)) }
|
|
23
23
|
attr_accessor :effort
|
|
24
24
|
|
|
@@ -34,7 +34,8 @@ module OpenAI
|
|
|
34
34
|
# debugging and understanding the model's reasoning process. One of `auto`,
|
|
35
35
|
# `concise`, or `detailed`.
|
|
36
36
|
#
|
|
37
|
-
# `concise` is
|
|
37
|
+
# `concise` is supported for `computer-use-preview` models and all reasoning
|
|
38
|
+
# models after `gpt-5`.
|
|
38
39
|
sig { returns(T.nilable(OpenAI::Reasoning::Summary::OrSymbol)) }
|
|
39
40
|
attr_accessor :summary
|
|
40
41
|
|
|
@@ -63,7 +64,7 @@ module OpenAI
|
|
|
63
64
|
# - All models before `gpt-5.1` default to `medium` reasoning effort, and do not
|
|
64
65
|
# support `none`.
|
|
65
66
|
# - The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort.
|
|
66
|
-
# - `xhigh` is
|
|
67
|
+
# - `xhigh` is supported for all models after `gpt-5.1-codex-max`.
|
|
67
68
|
effort: nil,
|
|
68
69
|
# **Deprecated:** use `summary` instead.
|
|
69
70
|
#
|
|
@@ -75,7 +76,8 @@ module OpenAI
|
|
|
75
76
|
# debugging and understanding the model's reasoning process. One of `auto`,
|
|
76
77
|
# `concise`, or `detailed`.
|
|
77
78
|
#
|
|
78
|
-
# `concise` is
|
|
79
|
+
# `concise` is supported for `computer-use-preview` models and all reasoning
|
|
80
|
+
# models after `gpt-5`.
|
|
79
81
|
summary: nil
|
|
80
82
|
)
|
|
81
83
|
end
|
|
@@ -124,7 +126,8 @@ module OpenAI
|
|
|
124
126
|
# debugging and understanding the model's reasoning process. One of `auto`,
|
|
125
127
|
# `concise`, or `detailed`.
|
|
126
128
|
#
|
|
127
|
-
# `concise` is
|
|
129
|
+
# `concise` is supported for `computer-use-preview` models and all reasoning
|
|
130
|
+
# models after `gpt-5`.
|
|
128
131
|
module Summary
|
|
129
132
|
extend OpenAI::Internal::Type::Enum
|
|
130
133
|
|
|
@@ -14,7 +14,7 @@ module OpenAI
|
|
|
14
14
|
# - All models before `gpt-5.1` default to `medium` reasoning effort, and do not
|
|
15
15
|
# support `none`.
|
|
16
16
|
# - The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort.
|
|
17
|
-
# - `xhigh` is
|
|
17
|
+
# - `xhigh` is supported for all models after `gpt-5.1-codex-max`.
|
|
18
18
|
module ReasoningEffort
|
|
19
19
|
extend OpenAI::Internal::Type::Enum
|
|
20
20
|
|
|
@@ -15,21 +15,6 @@ module OpenAI
|
|
|
15
15
|
)
|
|
16
16
|
end
|
|
17
17
|
|
|
18
|
-
# Text, image, or file inputs to the model, used to generate a response
|
|
19
|
-
sig do
|
|
20
|
-
returns(
|
|
21
|
-
T.nilable(OpenAI::Responses::ResponseCompactParams::Input::Variants)
|
|
22
|
-
)
|
|
23
|
-
end
|
|
24
|
-
attr_accessor :input
|
|
25
|
-
|
|
26
|
-
# A system (or developer) message inserted into the model's context. When used
|
|
27
|
-
# along with `previous_response_id`, the instructions from a previous response
|
|
28
|
-
# will not be carried over to the next response. This makes it simple to swap out
|
|
29
|
-
# system (or developer) messages in new responses.
|
|
30
|
-
sig { returns(T.nilable(String)) }
|
|
31
|
-
attr_accessor :instructions
|
|
32
|
-
|
|
33
18
|
# Model ID used to generate the response, like `gpt-5` or `o3`. OpenAI offers a
|
|
34
19
|
# wide range of models with different capabilities, performance characteristics,
|
|
35
20
|
# and price points. Refer to the
|
|
@@ -47,6 +32,21 @@ module OpenAI
|
|
|
47
32
|
end
|
|
48
33
|
attr_accessor :model
|
|
49
34
|
|
|
35
|
+
# Text, image, or file inputs to the model, used to generate a response
|
|
36
|
+
sig do
|
|
37
|
+
returns(
|
|
38
|
+
T.nilable(OpenAI::Responses::ResponseCompactParams::Input::Variants)
|
|
39
|
+
)
|
|
40
|
+
end
|
|
41
|
+
attr_accessor :input
|
|
42
|
+
|
|
43
|
+
# A system (or developer) message inserted into the model's context. When used
|
|
44
|
+
# along with `previous_response_id`, the instructions from a previous response
|
|
45
|
+
# will not be carried over to the next response. This makes it simple to swap out
|
|
46
|
+
# system (or developer) messages in new responses.
|
|
47
|
+
sig { returns(T.nilable(String)) }
|
|
48
|
+
attr_accessor :instructions
|
|
49
|
+
|
|
50
50
|
# The unique ID of the previous response to the model. Use this to create
|
|
51
51
|
# multi-turn conversations. Learn more about
|
|
52
52
|
# [conversation state](https://platform.openai.com/docs/guides/conversation-state).
|
|
@@ -56,11 +56,6 @@ module OpenAI
|
|
|
56
56
|
|
|
57
57
|
sig do
|
|
58
58
|
params(
|
|
59
|
-
input:
|
|
60
|
-
T.nilable(
|
|
61
|
-
OpenAI::Responses::ResponseCompactParams::Input::Variants
|
|
62
|
-
),
|
|
63
|
-
instructions: T.nilable(String),
|
|
64
59
|
model:
|
|
65
60
|
T.nilable(
|
|
66
61
|
T.any(
|
|
@@ -68,11 +63,22 @@ module OpenAI
|
|
|
68
63
|
String
|
|
69
64
|
)
|
|
70
65
|
),
|
|
66
|
+
input:
|
|
67
|
+
T.nilable(
|
|
68
|
+
OpenAI::Responses::ResponseCompactParams::Input::Variants
|
|
69
|
+
),
|
|
70
|
+
instructions: T.nilable(String),
|
|
71
71
|
previous_response_id: T.nilable(String),
|
|
72
72
|
request_options: OpenAI::RequestOptions::OrHash
|
|
73
73
|
).returns(T.attached_class)
|
|
74
74
|
end
|
|
75
75
|
def self.new(
|
|
76
|
+
# Model ID used to generate the response, like `gpt-5` or `o3`. OpenAI offers a
|
|
77
|
+
# wide range of models with different capabilities, performance characteristics,
|
|
78
|
+
# and price points. Refer to the
|
|
79
|
+
# [model guide](https://platform.openai.com/docs/models) to browse and compare
|
|
80
|
+
# available models.
|
|
81
|
+
model:,
|
|
76
82
|
# Text, image, or file inputs to the model, used to generate a response
|
|
77
83
|
input: nil,
|
|
78
84
|
# A system (or developer) message inserted into the model's context. When used
|
|
@@ -80,12 +86,6 @@ module OpenAI
|
|
|
80
86
|
# will not be carried over to the next response. This makes it simple to swap out
|
|
81
87
|
# system (or developer) messages in new responses.
|
|
82
88
|
instructions: nil,
|
|
83
|
-
# Model ID used to generate the response, like `gpt-5` or `o3`. OpenAI offers a
|
|
84
|
-
# wide range of models with different capabilities, performance characteristics,
|
|
85
|
-
# and price points. Refer to the
|
|
86
|
-
# [model guide](https://platform.openai.com/docs/models) to browse and compare
|
|
87
|
-
# available models.
|
|
88
|
-
model: nil,
|
|
89
89
|
# The unique ID of the previous response to the model. Use this to create
|
|
90
90
|
# multi-turn conversations. Learn more about
|
|
91
91
|
# [conversation state](https://platform.openai.com/docs/guides/conversation-state).
|
|
@@ -98,11 +98,6 @@ module OpenAI
|
|
|
98
98
|
sig do
|
|
99
99
|
override.returns(
|
|
100
100
|
{
|
|
101
|
-
input:
|
|
102
|
-
T.nilable(
|
|
103
|
-
OpenAI::Responses::ResponseCompactParams::Input::Variants
|
|
104
|
-
),
|
|
105
|
-
instructions: T.nilable(String),
|
|
106
101
|
model:
|
|
107
102
|
T.nilable(
|
|
108
103
|
T.any(
|
|
@@ -110,6 +105,11 @@ module OpenAI
|
|
|
110
105
|
String
|
|
111
106
|
)
|
|
112
107
|
),
|
|
108
|
+
input:
|
|
109
|
+
T.nilable(
|
|
110
|
+
OpenAI::Responses::ResponseCompactParams::Input::Variants
|
|
111
|
+
),
|
|
112
|
+
instructions: T.nilable(String),
|
|
113
113
|
previous_response_id: T.nilable(String),
|
|
114
114
|
request_options: OpenAI::RequestOptions
|
|
115
115
|
}
|
|
@@ -118,37 +118,6 @@ module OpenAI
|
|
|
118
118
|
def to_hash
|
|
119
119
|
end
|
|
120
120
|
|
|
121
|
-
# Text, image, or file inputs to the model, used to generate a response
|
|
122
|
-
module Input
|
|
123
|
-
extend OpenAI::Internal::Type::Union
|
|
124
|
-
|
|
125
|
-
Variants =
|
|
126
|
-
T.type_alias do
|
|
127
|
-
T.any(
|
|
128
|
-
String,
|
|
129
|
-
T::Array[OpenAI::Responses::ResponseInputItem::Variants]
|
|
130
|
-
)
|
|
131
|
-
end
|
|
132
|
-
|
|
133
|
-
sig do
|
|
134
|
-
override.returns(
|
|
135
|
-
T::Array[
|
|
136
|
-
OpenAI::Responses::ResponseCompactParams::Input::Variants
|
|
137
|
-
]
|
|
138
|
-
)
|
|
139
|
-
end
|
|
140
|
-
def self.variants
|
|
141
|
-
end
|
|
142
|
-
|
|
143
|
-
ResponseInputItemArray =
|
|
144
|
-
T.let(
|
|
145
|
-
OpenAI::Internal::Type::ArrayOf[
|
|
146
|
-
union: OpenAI::Responses::ResponseInputItem
|
|
147
|
-
],
|
|
148
|
-
OpenAI::Internal::Type::Converter
|
|
149
|
-
)
|
|
150
|
-
end
|
|
151
|
-
|
|
152
121
|
# Model ID used to generate the response, like `gpt-5` or `o3`. OpenAI offers a
|
|
153
122
|
# wide range of models with different capabilities, performance characteristics,
|
|
154
123
|
# and price points. Refer to the
|
|
@@ -181,6 +150,31 @@ module OpenAI
|
|
|
181
150
|
end
|
|
182
151
|
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
183
152
|
|
|
153
|
+
GPT_5_2 =
|
|
154
|
+
T.let(
|
|
155
|
+
:"gpt-5.2",
|
|
156
|
+
OpenAI::Responses::ResponseCompactParams::Model::TaggedSymbol
|
|
157
|
+
)
|
|
158
|
+
GPT_5_2_2025_12_11 =
|
|
159
|
+
T.let(
|
|
160
|
+
:"gpt-5.2-2025-12-11",
|
|
161
|
+
OpenAI::Responses::ResponseCompactParams::Model::TaggedSymbol
|
|
162
|
+
)
|
|
163
|
+
GPT_5_2_CHAT_LATEST =
|
|
164
|
+
T.let(
|
|
165
|
+
:"gpt-5.2-chat-latest",
|
|
166
|
+
OpenAI::Responses::ResponseCompactParams::Model::TaggedSymbol
|
|
167
|
+
)
|
|
168
|
+
GPT_5_2_PRO =
|
|
169
|
+
T.let(
|
|
170
|
+
:"gpt-5.2-pro",
|
|
171
|
+
OpenAI::Responses::ResponseCompactParams::Model::TaggedSymbol
|
|
172
|
+
)
|
|
173
|
+
GPT_5_2_PRO_2025_12_11 =
|
|
174
|
+
T.let(
|
|
175
|
+
:"gpt-5.2-pro-2025-12-11",
|
|
176
|
+
OpenAI::Responses::ResponseCompactParams::Model::TaggedSymbol
|
|
177
|
+
)
|
|
184
178
|
GPT_5_1 =
|
|
185
179
|
T.let(
|
|
186
180
|
:"gpt-5.1",
|
|
@@ -587,6 +581,37 @@ module OpenAI
|
|
|
587
581
|
OpenAI::Responses::ResponseCompactParams::Model::TaggedSymbol
|
|
588
582
|
)
|
|
589
583
|
end
|
|
584
|
+
|
|
585
|
+
# Text, image, or file inputs to the model, used to generate a response
|
|
586
|
+
module Input
|
|
587
|
+
extend OpenAI::Internal::Type::Union
|
|
588
|
+
|
|
589
|
+
Variants =
|
|
590
|
+
T.type_alias do
|
|
591
|
+
T.any(
|
|
592
|
+
String,
|
|
593
|
+
T::Array[OpenAI::Responses::ResponseInputItem::Variants]
|
|
594
|
+
)
|
|
595
|
+
end
|
|
596
|
+
|
|
597
|
+
sig do
|
|
598
|
+
override.returns(
|
|
599
|
+
T::Array[
|
|
600
|
+
OpenAI::Responses::ResponseCompactParams::Input::Variants
|
|
601
|
+
]
|
|
602
|
+
)
|
|
603
|
+
end
|
|
604
|
+
def self.variants
|
|
605
|
+
end
|
|
606
|
+
|
|
607
|
+
ResponseInputItemArray =
|
|
608
|
+
T.let(
|
|
609
|
+
OpenAI::Internal::Type::ArrayOf[
|
|
610
|
+
union: OpenAI::Responses::ResponseInputItem
|
|
611
|
+
],
|
|
612
|
+
OpenAI::Internal::Type::Converter
|
|
613
|
+
)
|
|
614
|
+
end
|
|
590
615
|
end
|
|
591
616
|
end
|
|
592
617
|
end
|
|
@@ -72,7 +72,7 @@ module OpenAI
|
|
|
72
72
|
# - All models before `gpt-5.1` default to `medium` reasoning effort, and do not
|
|
73
73
|
# support `none`.
|
|
74
74
|
# - The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort.
|
|
75
|
-
# - `xhigh` is
|
|
75
|
+
# - `xhigh` is supported for all models after `gpt-5.1-codex-max`.
|
|
76
76
|
reasoning_effort: nil,
|
|
77
77
|
# Specifies the format that the model must output. Compatible with
|
|
78
78
|
# [GPT-4o](https://platform.openai.com/docs/models#gpt-4o),
|
|
@@ -207,7 +207,7 @@ module OpenAI
|
|
|
207
207
|
# - All models before `gpt-5.1` default to `medium` reasoning effort, and do not
|
|
208
208
|
# support `none`.
|
|
209
209
|
# - The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort.
|
|
210
|
-
# - `xhigh` is
|
|
210
|
+
# - `xhigh` is supported for all models after `gpt-5.1-codex-max`.
|
|
211
211
|
reasoning_effort: nil,
|
|
212
212
|
# Specifies the format that the model must output. Compatible with
|
|
213
213
|
# [GPT-4o](https://platform.openai.com/docs/models#gpt-4o),
|
|
@@ -135,7 +135,7 @@ module OpenAI
|
|
|
135
135
|
# - All models before `gpt-5.1` default to `medium` reasoning effort, and do not
|
|
136
136
|
# support `none`.
|
|
137
137
|
# - The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort.
|
|
138
|
-
# - `xhigh` is
|
|
138
|
+
# - `xhigh` is supported for all models after `gpt-5.1-codex-max`.
|
|
139
139
|
reasoning_effort: nil,
|
|
140
140
|
# Body param: Specifies the format that the model must output. Compatible with
|
|
141
141
|
# [GPT-4o](https://platform.openai.com/docs/models#gpt-4o),
|
|
@@ -322,7 +322,7 @@ module OpenAI
|
|
|
322
322
|
# - All models before `gpt-5.1` default to `medium` reasoning effort, and do not
|
|
323
323
|
# support `none`.
|
|
324
324
|
# - The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort.
|
|
325
|
-
# - `xhigh` is
|
|
325
|
+
# - `xhigh` is supported for all models after `gpt-5.1-codex-max`.
|
|
326
326
|
reasoning_effort: nil,
|
|
327
327
|
# Body param: Specifies the format that the model must output. Compatible with
|
|
328
328
|
# [GPT-4o](https://platform.openai.com/docs/models#gpt-4o),
|
|
@@ -238,7 +238,7 @@ module OpenAI
|
|
|
238
238
|
# - All models before `gpt-5.1` default to `medium` reasoning effort, and do not
|
|
239
239
|
# support `none`.
|
|
240
240
|
# - The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort.
|
|
241
|
-
# - `xhigh` is
|
|
241
|
+
# - `xhigh` is supported for all models after `gpt-5.1-codex-max`.
|
|
242
242
|
reasoning_effort: nil,
|
|
243
243
|
# An object specifying the format that the model must output.
|
|
244
244
|
#
|
|
@@ -572,7 +572,7 @@ module OpenAI
|
|
|
572
572
|
# - All models before `gpt-5.1` default to `medium` reasoning effort, and do not
|
|
573
573
|
# support `none`.
|
|
574
574
|
# - The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort.
|
|
575
|
-
# - `xhigh` is
|
|
575
|
+
# - `xhigh` is supported for all models after `gpt-5.1-codex-max`.
|
|
576
576
|
reasoning_effort: nil,
|
|
577
577
|
# An object specifying the format that the model must output.
|
|
578
578
|
#
|
|
@@ -945,11 +945,6 @@ module OpenAI
|
|
|
945
945
|
# Compact conversation
|
|
946
946
|
sig do
|
|
947
947
|
params(
|
|
948
|
-
input:
|
|
949
|
-
T.nilable(
|
|
950
|
-
OpenAI::Responses::ResponseCompactParams::Input::Variants
|
|
951
|
-
),
|
|
952
|
-
instructions: T.nilable(String),
|
|
953
948
|
model:
|
|
954
949
|
T.nilable(
|
|
955
950
|
T.any(
|
|
@@ -957,11 +952,22 @@ module OpenAI
|
|
|
957
952
|
String
|
|
958
953
|
)
|
|
959
954
|
),
|
|
955
|
+
input:
|
|
956
|
+
T.nilable(
|
|
957
|
+
OpenAI::Responses::ResponseCompactParams::Input::Variants
|
|
958
|
+
),
|
|
959
|
+
instructions: T.nilable(String),
|
|
960
960
|
previous_response_id: T.nilable(String),
|
|
961
961
|
request_options: OpenAI::RequestOptions::OrHash
|
|
962
962
|
).returns(OpenAI::Responses::CompactedResponse)
|
|
963
963
|
end
|
|
964
964
|
def compact(
|
|
965
|
+
# Model ID used to generate the response, like `gpt-5` or `o3`. OpenAI offers a
|
|
966
|
+
# wide range of models with different capabilities, performance characteristics,
|
|
967
|
+
# and price points. Refer to the
|
|
968
|
+
# [model guide](https://platform.openai.com/docs/models) to browse and compare
|
|
969
|
+
# available models.
|
|
970
|
+
model:,
|
|
965
971
|
# Text, image, or file inputs to the model, used to generate a response
|
|
966
972
|
input: nil,
|
|
967
973
|
# A system (or developer) message inserted into the model's context. When used
|
|
@@ -969,12 +975,6 @@ module OpenAI
|
|
|
969
975
|
# will not be carried over to the next response. This makes it simple to swap out
|
|
970
976
|
# system (or developer) messages in new responses.
|
|
971
977
|
instructions: nil,
|
|
972
|
-
# Model ID used to generate the response, like `gpt-5` or `o3`. OpenAI offers a
|
|
973
|
-
# wide range of models with different capabilities, performance characteristics,
|
|
974
|
-
# and price points. Refer to the
|
|
975
|
-
# [model guide](https://platform.openai.com/docs/models) to browse and compare
|
|
976
|
-
# available models.
|
|
977
|
-
model: nil,
|
|
978
978
|
# The unique ID of the previous response to the model. Use this to create
|
|
979
979
|
# multi-turn conversations. Learn more about
|
|
980
980
|
# [conversation state](https://platform.openai.com/docs/guides/conversation-state).
|