openai 0.82.0 → 0.84.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 +47 -0
- data/README.md +1 -1
- data/lib/openai/auth/workload_identity_auth.rb +17 -2
- data/lib/openai/client.rb +20 -6
- data/lib/openai/errors.rb +1 -1
- data/lib/openai/helpers/realtime/client_extension.rb +107 -0
- data/lib/openai/helpers/streaming/chat_completion_stream.rb +1 -2
- data/lib/openai/helpers/streaming/response_events.rb +2 -2
- data/lib/openai/helpers/streaming/response_stream.rb +73 -42
- data/lib/openai/helpers/structured_output/chat_completion_parser.rb +6 -0
- data/lib/openai/helpers/structured_output/response_parser.rb +1 -1
- data/lib/openai/http_client.rb +40 -1
- data/lib/openai/internal/logging.rb +7 -1
- data/lib/openai/internal/transport/base_client.rb +35 -4
- data/lib/openai/internal/type/base_model.rb +2 -2
- data/lib/openai/internal/type/converter.rb +1 -1
- data/lib/openai/internal/util.rb +8 -4
- data/lib/openai/models/admin/organization/audit_log_list_params.rb +2 -0
- data/lib/openai/models/admin/organization/audit_log_list_response.rb +2 -0
- data/lib/openai/models/admin/organization/usage_costs_params.rb +10 -1
- data/lib/openai/models/batch.rb +4 -4
- data/lib/openai/models/beta/beta_response.rb +9 -12
- data/lib/openai/models/beta/beta_responses_client_event.rb +8 -12
- data/lib/openai/models/beta/response_compact_params.rb +7 -7
- data/lib/openai/models/beta/response_create_params.rb +8 -12
- data/lib/openai/models/chat/completion_create_params.rb +8 -8
- data/lib/openai/models/eval_create_response.rb +1 -1
- data/lib/openai/models/eval_list_response.rb +1 -1
- data/lib/openai/models/eval_retrieve_response.rb +1 -1
- data/lib/openai/models/eval_update_response.rb +1 -1
- data/lib/openai/models/evals/create_eval_completions_run_data_source.rb +2 -2
- data/lib/openai/models/reasoning.rb +0 -2
- data/lib/openai/models/responses/response.rb +6 -7
- data/lib/openai/models/responses/response_compact_params.rb +7 -7
- data/lib/openai/models/responses/response_create_params.rb +5 -7
- data/lib/openai/models/responses/responses_client_event.rb +5 -7
- data/lib/openai/request_options.rb +8 -0
- data/lib/openai/resources/admin/organization/usage.rb +3 -1
- data/lib/openai/resources/beta/responses.rb +5 -5
- data/lib/openai/resources/chat/completions.rb +2 -2
- data/lib/openai/resources/responses.rb +7 -6
- data/lib/openai/version.rb +1 -1
- data/lib/openai.rb +1 -0
- data/rbi/openai/errors.rbi +1 -1
- data/rbi/openai/helpers/streaming/events.rbi +2 -2
- data/rbi/openai/helpers/streaming/response_stream.rbi +3 -3
- data/rbi/openai/http_client.rbi +25 -2
- data/rbi/openai/internal/logging.rbi +12 -2
- data/rbi/openai/internal/transport/base_client.rbi +12 -2
- data/rbi/openai/internal/util.rbi +3 -2
- data/rbi/openai/models/admin/organization/audit_log_list_params.rbi +8 -0
- data/rbi/openai/models/admin/organization/audit_log_list_response.rbi +8 -0
- data/rbi/openai/models/admin/organization/usage_costs_params.rbi +15 -0
- data/rbi/openai/models/batch.rbi +6 -6
- data/rbi/openai/models/beta/beta_response.rbi +10 -15
- data/rbi/openai/models/beta/beta_responses_client_event.rbi +9 -15
- data/rbi/openai/models/beta/response_compact_params.rbi +9 -9
- data/rbi/openai/models/beta/response_create_params.rbi +9 -15
- data/rbi/openai/models/chat/completion_create_params.rbi +9 -9
- data/rbi/openai/models/eval_create_response.rbi +1 -1
- data/rbi/openai/models/eval_list_response.rbi +1 -1
- data/rbi/openai/models/eval_retrieve_response.rbi +1 -1
- data/rbi/openai/models/eval_update_response.rbi +1 -1
- data/rbi/openai/models/evals/create_eval_completions_run_data_source.rbi +2 -2
- data/rbi/openai/models/reasoning.rbi +0 -2
- data/rbi/openai/models/responses/response.rbi +7 -10
- data/rbi/openai/models/responses/response_compact_params.rbi +9 -9
- data/rbi/openai/models/responses/response_create_params.rbi +6 -10
- data/rbi/openai/models/responses/responses_client_event.rbi +6 -10
- data/rbi/openai/request_options.rbi +4 -0
- data/rbi/openai/resources/admin/organization/usage.rbi +4 -0
- data/rbi/openai/resources/beta/responses.rbi +7 -11
- data/rbi/openai/resources/chat/completions.rbi +6 -6
- data/rbi/openai/resources/responses.rbi +9 -13
- data/sig/openai/errors.rbs +1 -1
- data/sig/openai/http_client.rbs +14 -1
- data/sig/openai/internal/logging.rbs +6 -1
- data/sig/openai/internal/transport/base_client.rbs +11 -20
- data/sig/openai/internal/util.rbs +3 -1
- data/sig/openai/models/admin/organization/audit_log_list_params.rbs +4 -0
- data/sig/openai/models/admin/organization/audit_log_list_response.rbs +4 -0
- data/sig/openai/models/admin/organization/usage_costs_params.rbs +7 -0
- data/sig/openai/models/beta/beta_response.rbs +2 -1
- data/sig/openai/models/responses/response.rbs +2 -1
- data/sig/openai/request_options.rbs +4 -1
- data/sig/openai/resources/admin/organization/usage.rbs +1 -0
- metadata +1 -1
|
@@ -114,9 +114,9 @@ module OpenAI
|
|
|
114
114
|
sig { returns(T.nilable(T::Hash[Symbol, String])) }
|
|
115
115
|
attr_accessor :metadata
|
|
116
116
|
|
|
117
|
-
# Model ID used to generate the response, like `gpt-
|
|
118
|
-
#
|
|
119
|
-
#
|
|
117
|
+
# Model ID used to generate the response, like `gpt-5.6-sol`. OpenAI offers a wide
|
|
118
|
+
# range of models with different capabilities, performance characteristics, and
|
|
119
|
+
# price points. Refer to the
|
|
120
120
|
# [model guide](https://platform.openai.com/docs/models) to browse and compare
|
|
121
121
|
# available models.
|
|
122
122
|
sig {
|
|
@@ -216,8 +216,6 @@ module OpenAI
|
|
|
216
216
|
}
|
|
217
217
|
attr_accessor :prompt_cache_retention
|
|
218
218
|
|
|
219
|
-
# **gpt-5 and o-series models only**
|
|
220
|
-
#
|
|
221
219
|
# Configuration options for
|
|
222
220
|
# [reasoning models](https://platform.openai.com/docs/guides/reasoning).
|
|
223
221
|
sig { returns(T.nilable(OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Reasoning)) }
|
|
@@ -654,9 +652,9 @@ module OpenAI
|
|
|
654
652
|
# a maximum length of 512 characters.
|
|
655
653
|
metadata: nil,
|
|
656
654
|
|
|
657
|
-
# Model ID used to generate the response, like `gpt-
|
|
658
|
-
#
|
|
659
|
-
#
|
|
655
|
+
# Model ID used to generate the response, like `gpt-5.6-sol`. OpenAI offers a wide
|
|
656
|
+
# range of models with different capabilities, performance characteristics, and
|
|
657
|
+
# price points. Refer to the
|
|
660
658
|
# [model guide](https://platform.openai.com/docs/models) to browse and compare
|
|
661
659
|
# available models.
|
|
662
660
|
model: nil,
|
|
@@ -715,8 +713,6 @@ module OpenAI
|
|
|
715
713
|
# `prompt_cache_retention` is not specified.
|
|
716
714
|
prompt_cache_retention: nil,
|
|
717
715
|
|
|
718
|
-
# **gpt-5 and o-series models only**
|
|
719
|
-
#
|
|
720
716
|
# Configuration options for
|
|
721
717
|
# [reasoning models](https://platform.openai.com/docs/guides/reasoning).
|
|
722
718
|
reasoning: nil,
|
|
@@ -1008,9 +1004,9 @@ module OpenAI
|
|
|
1008
1004
|
|
|
1009
1005
|
end
|
|
1010
1006
|
|
|
1011
|
-
# Model ID used to generate the response, like `gpt-
|
|
1012
|
-
#
|
|
1013
|
-
#
|
|
1007
|
+
# Model ID used to generate the response, like `gpt-5.6-sol`. OpenAI offers a wide
|
|
1008
|
+
# range of models with different capabilities, performance characteristics, and
|
|
1009
|
+
# price points. Refer to the
|
|
1014
1010
|
# [model guide](https://platform.openai.com/docs/models) to browse and compare
|
|
1015
1011
|
# available models.
|
|
1016
1012
|
module Model
|
|
@@ -1998,8 +1994,6 @@ module OpenAI
|
|
|
1998
1994
|
}
|
|
1999
1995
|
attr_accessor :summary
|
|
2000
1996
|
|
|
2001
|
-
# **gpt-5 and o-series models only**
|
|
2002
|
-
#
|
|
2003
1997
|
# Configuration options for
|
|
2004
1998
|
# [reasoning models](https://platform.openai.com/docs/guides/reasoning).
|
|
2005
1999
|
sig do
|
|
@@ -17,9 +17,9 @@ module OpenAI
|
|
|
17
17
|
)
|
|
18
18
|
end
|
|
19
19
|
|
|
20
|
-
# Model ID used to generate the response, like `gpt-5
|
|
21
|
-
#
|
|
22
|
-
#
|
|
20
|
+
# Model ID used to generate the response, like `gpt-5.6-sol`. OpenAI offers a wide
|
|
21
|
+
# range of models with different capabilities, performance characteristics, and
|
|
22
|
+
# price points. Refer to the
|
|
23
23
|
# [model guide](https://platform.openai.com/docs/models) to browse and compare
|
|
24
24
|
# available models.
|
|
25
25
|
sig { returns(T.nilable(T.any(OpenAI::Beta::ResponseCompactParams::Model::OrSymbol, String))) }
|
|
@@ -119,9 +119,9 @@ module OpenAI
|
|
|
119
119
|
end
|
|
120
120
|
def self.new(
|
|
121
121
|
|
|
122
|
-
# Model ID used to generate the response, like `gpt-5
|
|
123
|
-
#
|
|
124
|
-
#
|
|
122
|
+
# Model ID used to generate the response, like `gpt-5.6-sol`. OpenAI offers a wide
|
|
123
|
+
# range of models with different capabilities, performance characteristics, and
|
|
124
|
+
# price points. Refer to the
|
|
125
125
|
# [model guide](https://platform.openai.com/docs/models) to browse and compare
|
|
126
126
|
# available models.
|
|
127
127
|
model:,
|
|
@@ -200,9 +200,9 @@ module OpenAI
|
|
|
200
200
|
def to_hash
|
|
201
201
|
end
|
|
202
202
|
|
|
203
|
-
# Model ID used to generate the response, like `gpt-5
|
|
204
|
-
#
|
|
205
|
-
#
|
|
203
|
+
# Model ID used to generate the response, like `gpt-5.6-sol`. OpenAI offers a wide
|
|
204
|
+
# range of models with different capabilities, performance characteristics, and
|
|
205
|
+
# price points. Refer to the
|
|
206
206
|
# [model guide](https://platform.openai.com/docs/models) to browse and compare
|
|
207
207
|
# available models.
|
|
208
208
|
module Model
|
|
@@ -99,9 +99,9 @@ module OpenAI
|
|
|
99
99
|
sig { returns(T.nilable(T::Hash[Symbol, String])) }
|
|
100
100
|
attr_accessor :metadata
|
|
101
101
|
|
|
102
|
-
# Model ID used to generate the response, like `gpt-
|
|
103
|
-
#
|
|
104
|
-
#
|
|
102
|
+
# Model ID used to generate the response, like `gpt-5.6-sol`. OpenAI offers a wide
|
|
103
|
+
# range of models with different capabilities, performance characteristics, and
|
|
104
|
+
# price points. Refer to the
|
|
105
105
|
# [model guide](https://platform.openai.com/docs/models) to browse and compare
|
|
106
106
|
# available models.
|
|
107
107
|
sig { returns(T.nilable(T.any(OpenAI::Beta::ResponseCreateParams::Model::OrSymbol, String))) }
|
|
@@ -184,8 +184,6 @@ module OpenAI
|
|
|
184
184
|
sig { returns(T.nilable(OpenAI::Beta::ResponseCreateParams::PromptCacheRetention::OrSymbol)) }
|
|
185
185
|
attr_accessor :prompt_cache_retention
|
|
186
186
|
|
|
187
|
-
# **gpt-5 and o-series models only**
|
|
188
|
-
#
|
|
189
187
|
# Configuration options for
|
|
190
188
|
# [reasoning models](https://platform.openai.com/docs/guides/reasoning).
|
|
191
189
|
sig { returns(T.nilable(OpenAI::Beta::ResponseCreateParams::Reasoning)) }
|
|
@@ -586,9 +584,9 @@ module OpenAI
|
|
|
586
584
|
# a maximum length of 512 characters.
|
|
587
585
|
metadata: nil,
|
|
588
586
|
|
|
589
|
-
# Model ID used to generate the response, like `gpt-
|
|
590
|
-
#
|
|
591
|
-
#
|
|
587
|
+
# Model ID used to generate the response, like `gpt-5.6-sol`. OpenAI offers a wide
|
|
588
|
+
# range of models with different capabilities, performance characteristics, and
|
|
589
|
+
# price points. Refer to the
|
|
592
590
|
# [model guide](https://platform.openai.com/docs/models) to browse and compare
|
|
593
591
|
# available models.
|
|
594
592
|
model: nil,
|
|
@@ -647,8 +645,6 @@ module OpenAI
|
|
|
647
645
|
# `prompt_cache_retention` is not specified.
|
|
648
646
|
prompt_cache_retention: nil,
|
|
649
647
|
|
|
650
|
-
# **gpt-5 and o-series models only**
|
|
651
|
-
#
|
|
652
648
|
# Configuration options for
|
|
653
649
|
# [reasoning models](https://platform.openai.com/docs/guides/reasoning).
|
|
654
650
|
reasoning: nil,
|
|
@@ -918,9 +914,9 @@ module OpenAI
|
|
|
918
914
|
|
|
919
915
|
end
|
|
920
916
|
|
|
921
|
-
# Model ID used to generate the response, like `gpt-
|
|
922
|
-
#
|
|
923
|
-
#
|
|
917
|
+
# Model ID used to generate the response, like `gpt-5.6-sol`. OpenAI offers a wide
|
|
918
|
+
# range of models with different capabilities, performance characteristics, and
|
|
919
|
+
# price points. Refer to the
|
|
924
920
|
# [model guide](https://platform.openai.com/docs/models) to browse and compare
|
|
925
921
|
# available models.
|
|
926
922
|
module Model
|
|
@@ -1611,8 +1607,6 @@ module OpenAI
|
|
|
1611
1607
|
sig { returns(T.nilable(OpenAI::Beta::ResponseCreateParams::Reasoning::Summary::OrSymbol)) }
|
|
1612
1608
|
attr_accessor :summary
|
|
1613
1609
|
|
|
1614
|
-
# **gpt-5 and o-series models only**
|
|
1615
|
-
#
|
|
1616
1610
|
# Configuration options for
|
|
1617
1611
|
# [reasoning models](https://platform.openai.com/docs/guides/reasoning).
|
|
1618
1612
|
sig do
|
|
@@ -40,9 +40,9 @@ module OpenAI
|
|
|
40
40
|
|
|
41
41
|
attr_accessor :messages
|
|
42
42
|
|
|
43
|
-
# Model ID used to generate the response, like `gpt-
|
|
44
|
-
# wide range of models with different capabilities, performance
|
|
45
|
-
# and price points. Refer to the
|
|
43
|
+
# Model ID used to generate the response, like `gpt-5.6-sol` or `o3`. OpenAI
|
|
44
|
+
# offers a wide range of models with different capabilities, performance
|
|
45
|
+
# characteristics, and price points. Refer to the
|
|
46
46
|
# [model guide](https://platform.openai.com/docs/models) to browse and compare
|
|
47
47
|
# available models.
|
|
48
48
|
sig { returns(T.any(String, OpenAI::ChatModel::OrSymbol)) }
|
|
@@ -583,9 +583,9 @@ module OpenAI
|
|
|
583
583
|
# [audio](https://platform.openai.com/docs/guides/audio).
|
|
584
584
|
messages:,
|
|
585
585
|
|
|
586
|
-
# Model ID used to generate the response, like `gpt-
|
|
587
|
-
# wide range of models with different capabilities, performance
|
|
588
|
-
# and price points. Refer to the
|
|
586
|
+
# Model ID used to generate the response, like `gpt-5.6-sol` or `o3`. OpenAI
|
|
587
|
+
# offers a wide range of models with different capabilities, performance
|
|
588
|
+
# characteristics, and price points. Refer to the
|
|
589
589
|
# [model guide](https://platform.openai.com/docs/models) to browse and compare
|
|
590
590
|
# available models.
|
|
591
591
|
model:,
|
|
@@ -930,9 +930,9 @@ module OpenAI
|
|
|
930
930
|
def to_hash
|
|
931
931
|
end
|
|
932
932
|
|
|
933
|
-
# Model ID used to generate the response, like `gpt-
|
|
934
|
-
# wide range of models with different capabilities, performance
|
|
935
|
-
# and price points. Refer to the
|
|
933
|
+
# Model ID used to generate the response, like `gpt-5.6-sol` or `o3`. OpenAI
|
|
934
|
+
# offers a wide range of models with different capabilities, performance
|
|
935
|
+
# characteristics, and price points. Refer to the
|
|
936
936
|
# [model guide](https://platform.openai.com/docs/models) to browse and compare
|
|
937
937
|
# available models.
|
|
938
938
|
module Model
|
|
@@ -50,7 +50,7 @@ module OpenAI
|
|
|
50
50
|
#
|
|
51
51
|
# - Improve the quality of my chatbot
|
|
52
52
|
# - See how well my chatbot handles customer support
|
|
53
|
-
# - Check if o4-mini is better at my usecase than gpt-
|
|
53
|
+
# - Check if o4-mini is better at my usecase than gpt-5.6-sol
|
|
54
54
|
sig do
|
|
55
55
|
params(
|
|
56
56
|
|
|
@@ -50,7 +50,7 @@ module OpenAI
|
|
|
50
50
|
#
|
|
51
51
|
# - Improve the quality of my chatbot
|
|
52
52
|
# - See how well my chatbot handles customer support
|
|
53
|
-
# - Check if o4-mini is better at my usecase than gpt-
|
|
53
|
+
# - Check if o4-mini is better at my usecase than gpt-5.6-sol
|
|
54
54
|
sig do
|
|
55
55
|
params(
|
|
56
56
|
|
|
@@ -50,7 +50,7 @@ module OpenAI
|
|
|
50
50
|
#
|
|
51
51
|
# - Improve the quality of my chatbot
|
|
52
52
|
# - See how well my chatbot handles customer support
|
|
53
|
-
# - Check if o4-mini is better at my usecase than gpt-
|
|
53
|
+
# - Check if o4-mini is better at my usecase than gpt-5.6-sol
|
|
54
54
|
sig do
|
|
55
55
|
params(
|
|
56
56
|
|
|
@@ -50,7 +50,7 @@ module OpenAI
|
|
|
50
50
|
#
|
|
51
51
|
# - Improve the quality of my chatbot
|
|
52
52
|
# - See how well my chatbot handles customer support
|
|
53
|
-
# - Check if o4-mini is better at my usecase than gpt-
|
|
53
|
+
# - Check if o4-mini is better at my usecase than gpt-5.6-sol
|
|
54
54
|
sig do
|
|
55
55
|
params(
|
|
56
56
|
|
|
@@ -320,7 +320,7 @@ module OpenAI
|
|
|
320
320
|
sig { returns(T.nilable(T::Hash[Symbol, String])) }
|
|
321
321
|
attr_accessor :metadata
|
|
322
322
|
|
|
323
|
-
# An optional model to filter by (e.g., 'gpt-
|
|
323
|
+
# An optional model to filter by (e.g., 'gpt-5.6-sol').
|
|
324
324
|
sig { returns(T.nilable(String)) }
|
|
325
325
|
attr_accessor :model
|
|
326
326
|
|
|
@@ -361,7 +361,7 @@ module OpenAI
|
|
|
361
361
|
# a maximum length of 512 characters.
|
|
362
362
|
metadata: nil,
|
|
363
363
|
|
|
364
|
-
# An optional model to filter by (e.g., 'gpt-
|
|
364
|
+
# An optional model to filter by (e.g., 'gpt-5.6-sol').
|
|
365
365
|
model: nil,
|
|
366
366
|
|
|
367
367
|
# The type of source. Always `stored_completions`.
|
|
@@ -56,8 +56,6 @@ module OpenAI
|
|
|
56
56
|
sig { returns(T.nilable(OpenAI::Reasoning::Summary::OrSymbol)) }
|
|
57
57
|
attr_accessor :summary
|
|
58
58
|
|
|
59
|
-
# **gpt-5 and o-series models only**
|
|
60
|
-
#
|
|
61
59
|
# Configuration options for
|
|
62
60
|
# [reasoning models](https://platform.openai.com/docs/guides/reasoning).
|
|
63
61
|
sig do
|
|
@@ -53,9 +53,9 @@ module OpenAI
|
|
|
53
53
|
sig { returns(T.nilable(T::Hash[Symbol, String])) }
|
|
54
54
|
attr_accessor :metadata
|
|
55
55
|
|
|
56
|
-
# Model ID used to generate the response, like `gpt-
|
|
57
|
-
#
|
|
58
|
-
#
|
|
56
|
+
# Model ID used to generate the response, like `gpt-5.6-sol`. OpenAI offers a wide
|
|
57
|
+
# range of models with different capabilities, performance characteristics, and
|
|
58
|
+
# price points. Refer to the
|
|
59
59
|
# [model guide](https://platform.openai.com/docs/models) to browse and compare
|
|
60
60
|
# available models.
|
|
61
61
|
sig { returns(OpenAI::ResponsesModel::Variants) }
|
|
@@ -215,8 +215,6 @@ module OpenAI
|
|
|
215
215
|
sig { returns(T.nilable(OpenAI::Responses::Response::PromptCacheRetention::TaggedSymbol)) }
|
|
216
216
|
attr_accessor :prompt_cache_retention
|
|
217
217
|
|
|
218
|
-
# **gpt-5 and o-series models only**
|
|
219
|
-
#
|
|
220
218
|
# Configuration options for
|
|
221
219
|
# [reasoning models](https://platform.openai.com/docs/guides/reasoning).
|
|
222
220
|
sig { returns(T.nilable(OpenAI::Reasoning)) }
|
|
@@ -477,9 +475,9 @@ module OpenAI
|
|
|
477
475
|
# a maximum length of 512 characters.
|
|
478
476
|
metadata:,
|
|
479
477
|
|
|
480
|
-
# Model ID used to generate the response, like `gpt-
|
|
481
|
-
#
|
|
482
|
-
#
|
|
478
|
+
# Model ID used to generate the response, like `gpt-5.6-sol`. OpenAI offers a wide
|
|
479
|
+
# range of models with different capabilities, performance characteristics, and
|
|
480
|
+
# price points. Refer to the
|
|
483
481
|
# [model guide](https://platform.openai.com/docs/models) to browse and compare
|
|
484
482
|
# available models.
|
|
485
483
|
model:,
|
|
@@ -600,8 +598,6 @@ module OpenAI
|
|
|
600
598
|
# `prompt_cache_retention` is not specified.
|
|
601
599
|
prompt_cache_retention: nil,
|
|
602
600
|
|
|
603
|
-
# **gpt-5 and o-series models only**
|
|
604
|
-
#
|
|
605
601
|
# Configuration options for
|
|
606
602
|
# [reasoning models](https://platform.openai.com/docs/guides/reasoning).
|
|
607
603
|
reasoning: nil,
|
|
@@ -775,6 +771,7 @@ module OpenAI
|
|
|
775
771
|
:max_output_tokens,
|
|
776
772
|
OpenAI::Responses::Response::IncompleteDetails::Reason::TaggedSymbol
|
|
777
773
|
)
|
|
774
|
+
MAX_MESSAGES = T.let(:max_messages, OpenAI::Responses::Response::IncompleteDetails::Reason::TaggedSymbol)
|
|
778
775
|
CONTENT_FILTER = T.let(
|
|
779
776
|
:content_filter,
|
|
780
777
|
OpenAI::Responses::Response::IncompleteDetails::Reason::TaggedSymbol
|
|
@@ -17,9 +17,9 @@ module OpenAI
|
|
|
17
17
|
)
|
|
18
18
|
end
|
|
19
19
|
|
|
20
|
-
# Model ID used to generate the response, like `gpt-5
|
|
21
|
-
#
|
|
22
|
-
#
|
|
20
|
+
# Model ID used to generate the response, like `gpt-5.6-sol`. OpenAI offers a wide
|
|
21
|
+
# range of models with different capabilities, performance characteristics, and
|
|
22
|
+
# price points. Refer to the
|
|
23
23
|
# [model guide](https://platform.openai.com/docs/models) to browse and compare
|
|
24
24
|
# available models.
|
|
25
25
|
sig { returns(T.nilable(T.any(OpenAI::Responses::ResponseCompactParams::Model::OrSymbol, String))) }
|
|
@@ -112,9 +112,9 @@ module OpenAI
|
|
|
112
112
|
end
|
|
113
113
|
def self.new(
|
|
114
114
|
|
|
115
|
-
# Model ID used to generate the response, like `gpt-5
|
|
116
|
-
#
|
|
117
|
-
#
|
|
115
|
+
# Model ID used to generate the response, like `gpt-5.6-sol`. OpenAI offers a wide
|
|
116
|
+
# range of models with different capabilities, performance characteristics, and
|
|
117
|
+
# price points. Refer to the
|
|
118
118
|
# [model guide](https://platform.openai.com/docs/models) to browse and compare
|
|
119
119
|
# available models.
|
|
120
120
|
model:,
|
|
@@ -192,9 +192,9 @@ module OpenAI
|
|
|
192
192
|
def to_hash
|
|
193
193
|
end
|
|
194
194
|
|
|
195
|
-
# Model ID used to generate the response, like `gpt-5
|
|
196
|
-
#
|
|
197
|
-
#
|
|
195
|
+
# Model ID used to generate the response, like `gpt-5.6-sol`. OpenAI offers a wide
|
|
196
|
+
# range of models with different capabilities, performance characteristics, and
|
|
197
|
+
# price points. Refer to the
|
|
198
198
|
# [model guide](https://platform.openai.com/docs/models) to browse and compare
|
|
199
199
|
# available models.
|
|
200
200
|
module Model
|
|
@@ -99,9 +99,9 @@ module OpenAI
|
|
|
99
99
|
sig { returns(T.nilable(T::Hash[Symbol, String])) }
|
|
100
100
|
attr_accessor :metadata
|
|
101
101
|
|
|
102
|
-
# Model ID used to generate the response, like `gpt-
|
|
103
|
-
#
|
|
104
|
-
#
|
|
102
|
+
# Model ID used to generate the response, like `gpt-5.6-sol`. OpenAI offers a wide
|
|
103
|
+
# range of models with different capabilities, performance characteristics, and
|
|
104
|
+
# price points. Refer to the
|
|
105
105
|
# [model guide](https://platform.openai.com/docs/models) to browse and compare
|
|
106
106
|
# available models.
|
|
107
107
|
sig {
|
|
@@ -186,8 +186,6 @@ module OpenAI
|
|
|
186
186
|
sig { returns(T.nilable(OpenAI::Responses::ResponseCreateParams::PromptCacheRetention::OrSymbol)) }
|
|
187
187
|
attr_accessor :prompt_cache_retention
|
|
188
188
|
|
|
189
|
-
# **gpt-5 and o-series models only**
|
|
190
|
-
#
|
|
191
189
|
# Configuration options for
|
|
192
190
|
# [reasoning models](https://platform.openai.com/docs/guides/reasoning).
|
|
193
191
|
sig { returns(T.nilable(OpenAI::Reasoning)) }
|
|
@@ -587,9 +585,9 @@ module OpenAI
|
|
|
587
585
|
# a maximum length of 512 characters.
|
|
588
586
|
metadata: nil,
|
|
589
587
|
|
|
590
|
-
# Model ID used to generate the response, like `gpt-
|
|
591
|
-
#
|
|
592
|
-
#
|
|
588
|
+
# Model ID used to generate the response, like `gpt-5.6-sol`. OpenAI offers a wide
|
|
589
|
+
# range of models with different capabilities, performance characteristics, and
|
|
590
|
+
# price points. Refer to the
|
|
593
591
|
# [model guide](https://platform.openai.com/docs/models) to browse and compare
|
|
594
592
|
# available models.
|
|
595
593
|
model: nil,
|
|
@@ -645,8 +643,6 @@ module OpenAI
|
|
|
645
643
|
# `prompt_cache_retention` is not specified.
|
|
646
644
|
prompt_cache_retention: nil,
|
|
647
645
|
|
|
648
|
-
# **gpt-5 and o-series models only**
|
|
649
|
-
#
|
|
650
646
|
# Configuration options for
|
|
651
647
|
# [reasoning models](https://platform.openai.com/docs/guides/reasoning).
|
|
652
648
|
reasoning: nil,
|
|
@@ -100,9 +100,9 @@ module OpenAI
|
|
|
100
100
|
sig { returns(T.nilable(T::Hash[Symbol, String])) }
|
|
101
101
|
attr_accessor :metadata
|
|
102
102
|
|
|
103
|
-
# Model ID used to generate the response, like `gpt-
|
|
104
|
-
#
|
|
105
|
-
#
|
|
103
|
+
# Model ID used to generate the response, like `gpt-5.6-sol`. OpenAI offers a wide
|
|
104
|
+
# range of models with different capabilities, performance characteristics, and
|
|
105
|
+
# price points. Refer to the
|
|
106
106
|
# [model guide](https://platform.openai.com/docs/models) to browse and compare
|
|
107
107
|
# available models.
|
|
108
108
|
sig {
|
|
@@ -187,8 +187,6 @@ module OpenAI
|
|
|
187
187
|
sig { returns(T.nilable(OpenAI::Responses::ResponsesClientEvent::PromptCacheRetention::OrSymbol)) }
|
|
188
188
|
attr_accessor :prompt_cache_retention
|
|
189
189
|
|
|
190
|
-
# **gpt-5 and o-series models only**
|
|
191
|
-
#
|
|
192
190
|
# Configuration options for
|
|
193
191
|
# [reasoning models](https://platform.openai.com/docs/guides/reasoning).
|
|
194
192
|
sig { returns(T.nilable(OpenAI::Reasoning)) }
|
|
@@ -603,9 +601,9 @@ module OpenAI
|
|
|
603
601
|
# a maximum length of 512 characters.
|
|
604
602
|
metadata: nil,
|
|
605
603
|
|
|
606
|
-
# Model ID used to generate the response, like `gpt-
|
|
607
|
-
#
|
|
608
|
-
#
|
|
604
|
+
# Model ID used to generate the response, like `gpt-5.6-sol`. OpenAI offers a wide
|
|
605
|
+
# range of models with different capabilities, performance characteristics, and
|
|
606
|
+
# price points. Refer to the
|
|
609
607
|
# [model guide](https://platform.openai.com/docs/models) to browse and compare
|
|
610
608
|
# available models.
|
|
611
609
|
model: nil,
|
|
@@ -661,8 +659,6 @@ module OpenAI
|
|
|
661
659
|
# `prompt_cache_retention` is not specified.
|
|
662
660
|
prompt_cache_retention: nil,
|
|
663
661
|
|
|
664
|
-
# **gpt-5 and o-series models only**
|
|
665
|
-
#
|
|
666
662
|
# Configuration options for
|
|
667
663
|
# [reasoning models](https://platform.openai.com/docs/guides/reasoning).
|
|
668
664
|
reasoning: nil,
|
|
@@ -47,6 +47,10 @@ module OpenAI
|
|
|
47
47
|
sig { returns(T.nilable(Float)) }
|
|
48
48
|
attr_accessor :timeout
|
|
49
49
|
|
|
50
|
+
# Retain the exact successful response body on `last_response.body`.
|
|
51
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
52
|
+
attr_accessor :include_raw_body
|
|
53
|
+
|
|
50
54
|
# Returns a new instance of RequestOptions.
|
|
51
55
|
sig { params(values: OpenAI::Internal::AnyHash).returns(T.attached_class) }
|
|
52
56
|
def self.new(values = {})
|
|
@@ -210,6 +210,7 @@ module OpenAI
|
|
|
210
210
|
end_time: Integer,
|
|
211
211
|
group_by: T::Array[OpenAI::Admin::Organization::UsageCostsParams::GroupBy::OrSymbol],
|
|
212
212
|
limit: Integer,
|
|
213
|
+
line_items: T::Array[String],
|
|
213
214
|
page: String,
|
|
214
215
|
project_ids: T::Array[String],
|
|
215
216
|
request_options: OpenAI::RequestOptions::OrHash
|
|
@@ -232,6 +233,9 @@ module OpenAI
|
|
|
232
233
|
# A limit on the number of buckets to be returned. Limit can range between 1 and
|
|
233
234
|
# 180, and the default is 7.
|
|
234
235
|
limit: nil,
|
|
236
|
+
# Return only costs for these exact line item names. Each value must match the
|
|
237
|
+
# complete `line_item` value, for example `gpt-5.6-sol, input_tokens`.
|
|
238
|
+
line_items: nil,
|
|
235
239
|
# A cursor for use in pagination. Corresponding to the `next_page` field from the
|
|
236
240
|
# previous response.
|
|
237
241
|
page: nil,
|
|
@@ -157,8 +157,8 @@ module OpenAI
|
|
|
157
157
|
# Keys are strings with a maximum length of 64 characters. Values are strings with
|
|
158
158
|
# a maximum length of 512 characters.
|
|
159
159
|
metadata: nil,
|
|
160
|
-
# Body param: Model ID used to generate the response, like `gpt-
|
|
161
|
-
#
|
|
160
|
+
# Body param: Model ID used to generate the response, like `gpt-5.6-sol`. OpenAI
|
|
161
|
+
# offers a wide range of models with different capabilities, performance
|
|
162
162
|
# characteristics, and price points. Refer to the
|
|
163
163
|
# [model guide](https://platform.openai.com/docs/models) to browse and compare
|
|
164
164
|
# available models.
|
|
@@ -211,9 +211,7 @@ module OpenAI
|
|
|
211
211
|
# - Organizations with ZDR enabled default to `in_memory` when
|
|
212
212
|
# `prompt_cache_retention` is not specified.
|
|
213
213
|
prompt_cache_retention: nil,
|
|
214
|
-
# Body param:
|
|
215
|
-
#
|
|
216
|
-
# Configuration options for
|
|
214
|
+
# Body param: Configuration options for
|
|
217
215
|
# [reasoning models](https://platform.openai.com/docs/guides/reasoning).
|
|
218
216
|
reasoning: nil,
|
|
219
217
|
# Body param: A stable identifier used to help detect users of your application
|
|
@@ -473,8 +471,8 @@ module OpenAI
|
|
|
473
471
|
# Keys are strings with a maximum length of 64 characters. Values are strings with
|
|
474
472
|
# a maximum length of 512 characters.
|
|
475
473
|
metadata: nil,
|
|
476
|
-
# Body param: Model ID used to generate the response, like `gpt-
|
|
477
|
-
#
|
|
474
|
+
# Body param: Model ID used to generate the response, like `gpt-5.6-sol`. OpenAI
|
|
475
|
+
# offers a wide range of models with different capabilities, performance
|
|
478
476
|
# characteristics, and price points. Refer to the
|
|
479
477
|
# [model guide](https://platform.openai.com/docs/models) to browse and compare
|
|
480
478
|
# available models.
|
|
@@ -527,9 +525,7 @@ module OpenAI
|
|
|
527
525
|
# - Organizations with ZDR enabled default to `in_memory` when
|
|
528
526
|
# `prompt_cache_retention` is not specified.
|
|
529
527
|
prompt_cache_retention: nil,
|
|
530
|
-
# Body param:
|
|
531
|
-
#
|
|
532
|
-
# Configuration options for
|
|
528
|
+
# Body param: Configuration options for
|
|
533
529
|
# [reasoning models](https://platform.openai.com/docs/guides/reasoning).
|
|
534
530
|
reasoning: nil,
|
|
535
531
|
# Body param: A stable identifier used to help detect users of your application
|
|
@@ -786,7 +782,7 @@ module OpenAI
|
|
|
786
782
|
.returns(OpenAI::Beta::BetaCompactedResponse)
|
|
787
783
|
}
|
|
788
784
|
def compact(
|
|
789
|
-
# Body param: Model ID used to generate the response, like `gpt-5
|
|
785
|
+
# Body param: Model ID used to generate the response, like `gpt-5.6-sol`. OpenAI
|
|
790
786
|
# offers a wide range of models with different capabilities, performance
|
|
791
787
|
# characteristics, and price points. Refer to the
|
|
792
788
|
# [model guide](https://platform.openai.com/docs/models) to browse and compare
|
|
@@ -115,9 +115,9 @@ module OpenAI
|
|
|
115
115
|
# [images](https://platform.openai.com/docs/guides/vision), and
|
|
116
116
|
# [audio](https://platform.openai.com/docs/guides/audio).
|
|
117
117
|
messages:,
|
|
118
|
-
# Model ID used to generate the response, like `gpt-
|
|
119
|
-
# wide range of models with different capabilities, performance
|
|
120
|
-
# and price points. Refer to the
|
|
118
|
+
# Model ID used to generate the response, like `gpt-5.6-sol` or `o3`. OpenAI
|
|
119
|
+
# offers a wide range of models with different capabilities, performance
|
|
120
|
+
# characteristics, and price points. Refer to the
|
|
121
121
|
# [model guide](https://platform.openai.com/docs/models) to browse and compare
|
|
122
122
|
# available models.
|
|
123
123
|
model:,
|
|
@@ -453,9 +453,9 @@ module OpenAI
|
|
|
453
453
|
# [images](https://platform.openai.com/docs/guides/vision), and
|
|
454
454
|
# [audio](https://platform.openai.com/docs/guides/audio).
|
|
455
455
|
messages:,
|
|
456
|
-
# Model ID used to generate the response, like `gpt-
|
|
457
|
-
# wide range of models with different capabilities, performance
|
|
458
|
-
# and price points. Refer to the
|
|
456
|
+
# Model ID used to generate the response, like `gpt-5.6-sol` or `o3`. OpenAI
|
|
457
|
+
# offers a wide range of models with different capabilities, performance
|
|
458
|
+
# characteristics, and price points. Refer to the
|
|
459
459
|
# [model guide](https://platform.openai.com/docs/models) to browse and compare
|
|
460
460
|
# available models.
|
|
461
461
|
model:,
|
|
@@ -155,9 +155,9 @@ module OpenAI
|
|
|
155
155
|
# Keys are strings with a maximum length of 64 characters. Values are strings with
|
|
156
156
|
# a maximum length of 512 characters.
|
|
157
157
|
metadata: nil,
|
|
158
|
-
# Model ID used to generate the response, like `gpt-
|
|
159
|
-
#
|
|
160
|
-
#
|
|
158
|
+
# Model ID used to generate the response, like `gpt-5.6-sol`. OpenAI offers a wide
|
|
159
|
+
# range of models with different capabilities, performance characteristics, and
|
|
160
|
+
# price points. Refer to the
|
|
161
161
|
# [model guide](https://platform.openai.com/docs/models) to browse and compare
|
|
162
162
|
# available models.
|
|
163
163
|
model: nil,
|
|
@@ -205,8 +205,6 @@ module OpenAI
|
|
|
205
205
|
# - Organizations with ZDR enabled default to `in_memory` when
|
|
206
206
|
# `prompt_cache_retention` is not specified.
|
|
207
207
|
prompt_cache_retention: nil,
|
|
208
|
-
# **gpt-5 and o-series models only**
|
|
209
|
-
#
|
|
210
208
|
# Configuration options for
|
|
211
209
|
# [reasoning models](https://platform.openai.com/docs/guides/reasoning).
|
|
212
210
|
reasoning: nil,
|
|
@@ -462,9 +460,9 @@ module OpenAI
|
|
|
462
460
|
# Keys are strings with a maximum length of 64 characters. Values are strings with
|
|
463
461
|
# a maximum length of 512 characters.
|
|
464
462
|
metadata: nil,
|
|
465
|
-
# Model ID used to generate the response, like `gpt-
|
|
466
|
-
#
|
|
467
|
-
#
|
|
463
|
+
# Model ID used to generate the response, like `gpt-5.6-sol`. OpenAI offers a wide
|
|
464
|
+
# range of models with different capabilities, performance characteristics, and
|
|
465
|
+
# price points. Refer to the
|
|
468
466
|
# [model guide](https://platform.openai.com/docs/models) to browse and compare
|
|
469
467
|
# available models.
|
|
470
468
|
model: nil,
|
|
@@ -512,8 +510,6 @@ module OpenAI
|
|
|
512
510
|
# - Organizations with ZDR enabled default to `in_memory` when
|
|
513
511
|
# `prompt_cache_retention` is not specified.
|
|
514
512
|
prompt_cache_retention: nil,
|
|
515
|
-
# **gpt-5 and o-series models only**
|
|
516
|
-
#
|
|
517
513
|
# Configuration options for
|
|
518
514
|
# [reasoning models](https://platform.openai.com/docs/guides/reasoning).
|
|
519
515
|
reasoning: nil,
|
|
@@ -990,9 +986,9 @@ module OpenAI
|
|
|
990
986
|
.returns(OpenAI::Responses::CompactedResponse)
|
|
991
987
|
end
|
|
992
988
|
def compact(
|
|
993
|
-
# Model ID used to generate the response, like `gpt-5
|
|
994
|
-
#
|
|
995
|
-
#
|
|
989
|
+
# Model ID used to generate the response, like `gpt-5.6-sol`. OpenAI offers a wide
|
|
990
|
+
# range of models with different capabilities, performance characteristics, and
|
|
991
|
+
# price points. Refer to the
|
|
996
992
|
# [model guide](https://platform.openai.com/docs/models) to browse and compare
|
|
997
993
|
# available models.
|
|
998
994
|
model:,
|