openai 0.78.0 → 0.80.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 +99 -0
- data/README.md +241 -8
- data/SECURITY.md +6 -22
- data/azure.md +110 -0
- data/bedrock.md +197 -0
- data/examples/mtls_custom_http_client.rb +61 -0
- data/lib/openai/auth/workload_identity.rb +13 -2
- data/lib/openai/auth/workload_identity_auth.rb +2 -1
- data/lib/openai/client.rb +29 -6
- data/lib/openai/errors.rb +11 -1
- data/lib/openai/helpers/streaming/chat_completion_stream.rb +3 -3
- data/lib/openai/helpers/streaming/response_stream.rb +5 -6
- data/lib/openai/helpers/structured_output/base_model.rb +20 -19
- data/lib/openai/helpers/structured_output/json_schema_converter.rb +12 -5
- data/lib/openai/http_client.rb +99 -7
- data/lib/openai/internal/conversation_cursor_page.rb +5 -6
- data/lib/openai/internal/cursor_page.rb +3 -3
- data/lib/openai/internal/logging.rb +419 -0
- data/lib/openai/internal/next_cursor_page.rb +5 -6
- data/lib/openai/internal/page.rb +2 -2
- data/lib/openai/internal/provider.rb +7 -1
- data/lib/openai/internal/read_io_adapter.rb +42 -18
- data/lib/openai/internal/stream.rb +2 -2
- data/lib/openai/internal/transport/base_client.rb +137 -37
- data/lib/openai/internal/type/array_of.rb +6 -4
- data/lib/openai/internal/type/base_model.rb +39 -1
- data/lib/openai/internal/type/base_page.rb +19 -2
- data/lib/openai/internal/type/base_stream.rb +39 -7
- data/lib/openai/internal/type/hash_of.rb +3 -3
- data/lib/openai/internal/util.rb +52 -27
- data/lib/openai/models/admin/organization/audit_log_list_params.rb +3 -1
- data/lib/openai/models/admin/organization/audit_log_list_response.rb +33 -11
- data/lib/openai/models/admin/organization/groups/role_list_response.rb +5 -1
- data/lib/openai/models/admin/organization/groups/role_retrieve_response.rb +5 -1
- data/lib/openai/models/admin/organization/projects/groups/role_list_response.rb +6 -1
- data/lib/openai/models/admin/organization/projects/groups/role_retrieve_response.rb +6 -1
- data/lib/openai/models/admin/organization/projects/service_account_create_response.rb +3 -1
- data/lib/openai/models/admin/organization/projects/users/role_list_response.rb +6 -1
- data/lib/openai/models/admin/organization/projects/users/role_retrieve_response.rb +6 -1
- data/lib/openai/models/admin/organization/users/role_list_response.rb +5 -1
- data/lib/openai/models/admin/organization/users/role_retrieve_response.rb +5 -1
- data/lib/openai/models/all_models.rb +5 -0
- data/lib/openai/models/audio/transcription_create_params.rb +7 -1
- data/lib/openai/models/audio/translation_create_params.rb +7 -1
- data/lib/openai/models/beta/beta_mcp_tool_call_error.rb +84 -0
- data/lib/openai/models/beta/beta_response.rb +27 -0
- data/lib/openai/models/beta/beta_response_input_item.rb +3 -3
- data/lib/openai/models/beta/beta_response_item.rb +3 -3
- data/lib/openai/models/beta/beta_response_output_item.rb +3 -3
- data/lib/openai/models/beta/beta_response_output_item_added_event.rb +5 -2
- data/lib/openai/models/beta/beta_response_output_text_annotation_added_event.rb +201 -4
- data/lib/openai/models/beta/beta_response_reasoning_item.rb +5 -0
- data/lib/openai/models/beta/beta_response_stream_event.rb +1 -1
- data/lib/openai/models/beta/beta_responses_client_event.rb +46 -3
- data/lib/openai/models/beta/beta_responses_server_event.rb +1143 -63
- data/lib/openai/models/beta/beta_web_search_tool.rb +11 -1
- data/lib/openai/models/beta/response_compact_params.rb +18 -0
- data/lib/openai/models/beta/response_create_params.rb +27 -0
- data/lib/openai/models/chat_model.rb +1 -0
- data/lib/openai/models/completion_usage.rb +26 -2
- data/lib/openai/models/containers/file_create_params.rb +4 -0
- data/lib/openai/models/content_provenance_check_create_params.rb +4 -0
- data/lib/openai/models/conversations/conversation_item.rb +3 -3
- data/lib/openai/models/file_create_params.rb +4 -0
- data/lib/openai/models/image_create_variation_params.rb +4 -0
- data/lib/openai/models/image_edit_params.rb +8 -0
- data/lib/openai/models/model.rb +9 -1
- data/lib/openai/models/responses/mcp_tool_call_error.rb +82 -0
- data/lib/openai/models/responses/response.rb +9 -0
- data/lib/openai/models/responses/response_compact_params.rb +18 -0
- data/lib/openai/models/responses/response_create_params.rb +9 -0
- data/lib/openai/models/responses/response_input_item.rb +3 -3
- data/lib/openai/models/responses/response_item.rb +3 -3
- data/lib/openai/models/responses/response_output_item.rb +3 -3
- data/lib/openai/models/responses/response_output_item_added_event.rb +5 -2
- data/lib/openai/models/responses/response_output_text_annotation_added_event.rb +201 -4
- data/lib/openai/models/responses/response_reasoning_item.rb +5 -0
- data/lib/openai/models/responses/response_stream_event.rb +1 -1
- data/lib/openai/models/responses/responses_client_event.rb +22 -1
- data/lib/openai/models/responses/responses_server_event.rb +1107 -56
- data/lib/openai/models/responses/web_search_tool.rb +11 -1
- data/lib/openai/models/responses_model.rb +5 -0
- data/lib/openai/models/skill_create_params.rb +4 -0
- data/lib/openai/models/skills/version_create_params.rb +4 -0
- data/lib/openai/models/uploads/part_create_params.rb +4 -0
- data/lib/openai/models/vector_store_search_response.rb +3 -1
- data/lib/openai/models/video_create_character_params.rb +4 -0
- data/lib/openai/models/video_create_params.rb +4 -0
- data/lib/openai/models/video_edit_params.rb +4 -0
- data/lib/openai/models/video_extend_params.rb +4 -0
- data/lib/openai/models.rb +9 -1
- data/lib/openai/net_http_client.rb +20 -6
- data/lib/openai/providers/azure.rb +216 -0
- data/lib/openai/providers/bedrock.rb +130 -17
- data/lib/openai/resources/admin/organization/projects/groups/roles.rb +1 -1
- data/lib/openai/resources/admin/organization/projects/groups.rb +1 -1
- data/lib/openai/resources/admin/organization/projects/users/roles.rb +1 -1
- data/lib/openai/resources/admin/organization/projects.rb +4 -2
- data/lib/openai/resources/audio/transcriptions.rb +8 -0
- data/lib/openai/resources/audio/translations.rb +4 -0
- data/lib/openai/resources/beta/responses.rb +1 -1
- data/lib/openai/resources/beta/threads/runs/steps.rb +2 -2
- data/lib/openai/resources/containers/files.rb +4 -0
- data/lib/openai/resources/content_provenance_checks.rb +4 -0
- data/lib/openai/resources/conversations/items.rb +1 -1
- data/lib/openai/resources/evals/runs/output_items.rb +1 -1
- data/lib/openai/resources/files.rb +5 -1
- data/lib/openai/resources/images.rb +12 -0
- data/lib/openai/resources/responses.rb +3 -2
- data/lib/openai/resources/skills/versions.rb +4 -0
- data/lib/openai/resources/skills.rb +4 -0
- data/lib/openai/resources/uploads/parts.rb +4 -0
- data/lib/openai/resources/vector_stores/file_batches.rb +1 -1
- data/lib/openai/resources/videos.rb +38 -0
- data/lib/openai/resources/webhooks.rb +18 -6
- data/lib/openai/version.rb +1 -1
- data/lib/openai.rb +111 -105
- data/rbi/openai/auth.rbi +4 -4
- data/rbi/openai/client.rbi +13 -3
- data/rbi/openai/errors.rbi +7 -0
- data/rbi/openai/helpers/streaming/events.rbi +12 -0
- data/rbi/openai/http_client.rbi +62 -2
- data/rbi/openai/internal/logging.rbi +192 -0
- data/rbi/openai/internal/provider.rbi +3 -0
- data/rbi/openai/internal/read_io_adapter.rbi +6 -1
- data/rbi/openai/internal/transport/base_client.rbi +61 -7
- data/rbi/openai/internal/type/base_model.rbi +24 -1
- data/rbi/openai/internal/type/base_page.rbi +13 -2
- data/rbi/openai/internal/type/base_stream.rbi +15 -4
- data/rbi/openai/internal/util.rbi +26 -2
- data/rbi/openai/models/admin/organization/audit_log_list_params.rbi +5 -0
- data/rbi/openai/models/admin/organization/audit_log_list_response.rbi +5 -0
- data/rbi/openai/models/all_models.rbi +25 -0
- data/rbi/openai/models/audio/transcription_create_params.rbi +14 -2
- data/rbi/openai/models/audio/translation_create_params.rbi +14 -2
- data/rbi/openai/models/beta/beta_mcp_tool_call_error.rbi +122 -0
- data/rbi/openai/models/beta/beta_response.rbi +47 -0
- data/rbi/openai/models/beta/beta_response_input_item.rbi +27 -3
- data/rbi/openai/models/beta/beta_response_item.rbi +27 -3
- data/rbi/openai/models/beta/beta_response_output_item.rbi +27 -3
- data/rbi/openai/models/beta/beta_response_output_item_added_event.rbi +8 -2
- data/rbi/openai/models/beta/beta_response_output_text_annotation_added_event.rbi +297 -5
- data/rbi/openai/models/beta/beta_response_reasoning_item.rbi +10 -0
- data/rbi/openai/models/beta/beta_response_stream_event.rbi +1 -1
- data/rbi/openai/models/beta/beta_responses_client_event.rbi +69 -1
- data/rbi/openai/models/beta/beta_responses_server_event.rbi +3945 -54
- data/rbi/openai/models/beta/beta_web_search_tool.rbi +15 -0
- data/rbi/openai/models/beta/response_compact_params.rbi +30 -0
- data/rbi/openai/models/beta/response_create_params.rbi +47 -0
- data/rbi/openai/models/chat_model.rbi +2 -0
- data/rbi/openai/models/completion_usage.rbi +39 -6
- data/rbi/openai/models/containers/file_create_params.rbi +8 -0
- data/rbi/openai/models/content_provenance_check_create_params.rbi +8 -0
- data/rbi/openai/models/conversations/conversation_item.rbi +12 -3
- data/rbi/openai/models/file_create_params.rbi +8 -0
- data/rbi/openai/models/image_create_variation_params.rbi +8 -0
- data/rbi/openai/models/image_edit_params.rbi +16 -0
- data/rbi/openai/models/model.rbi +14 -1
- data/rbi/openai/models/responses/mcp_tool_call_error.rbi +120 -0
- data/rbi/openai/models/responses/response.rbi +17 -0
- data/rbi/openai/models/responses/response_compact_params.rbi +30 -0
- data/rbi/openai/models/responses/response_create_params.rbi +17 -0
- data/rbi/openai/models/responses/response_input_item.rbi +27 -3
- data/rbi/openai/models/responses/response_item.rbi +27 -3
- data/rbi/openai/models/responses/response_output_item.rbi +27 -3
- data/rbi/openai/models/responses/response_output_item_added_event.rbi +8 -2
- data/rbi/openai/models/responses/response_output_text_annotation_added_event.rbi +297 -5
- data/rbi/openai/models/responses/response_reasoning_item.rbi +10 -0
- data/rbi/openai/models/responses/response_stream_event.rbi +1 -1
- data/rbi/openai/models/responses/responses_client_event.rbi +36 -0
- data/rbi/openai/models/responses/responses_server_event.rbi +3385 -53
- data/rbi/openai/models/responses/web_search_tool.rbi +15 -0
- data/rbi/openai/models/responses_model.rbi +25 -0
- data/rbi/openai/models/skill_create_params.rbi +8 -0
- data/rbi/openai/models/skills/version_create_params.rbi +8 -0
- data/rbi/openai/models/uploads/part_create_params.rbi +8 -0
- data/rbi/openai/models/video_create_character_params.rbi +8 -0
- data/rbi/openai/models/video_create_params.rbi +8 -0
- data/rbi/openai/models/video_edit_params.rbi +8 -0
- data/rbi/openai/models/video_extend_params.rbi +8 -0
- data/rbi/openai/net_http_client.rbi +2 -2
- data/rbi/openai/providers.rbi +11 -0
- data/rbi/openai/resources/audio/transcriptions.rbi +14 -2
- data/rbi/openai/resources/audio/translations.rbi +7 -1
- data/rbi/openai/resources/beta/responses.rbi +8 -0
- data/rbi/openai/resources/containers/files.rbi +4 -0
- data/rbi/openai/resources/content_provenance_checks.rbi +4 -0
- data/rbi/openai/resources/files.rbi +5 -1
- data/rbi/openai/resources/images.rbi +20 -0
- data/rbi/openai/resources/responses.rbi +8 -0
- data/rbi/openai/resources/skills/versions.rbi +4 -0
- data/rbi/openai/resources/skills.rbi +4 -0
- data/rbi/openai/resources/uploads/parts.rbi +4 -0
- data/rbi/openai/resources/videos.rbi +16 -0
- data/sig/openai/client.rbs +6 -2
- data/sig/openai/errors.rbs +5 -0
- data/sig/openai/http_client.rbs +37 -2
- data/sig/openai/internal/logging.rbs +88 -0
- data/sig/openai/internal/provider.rbs +3 -1
- data/sig/openai/internal/read_io_adapter.rbs +3 -1
- data/sig/openai/internal/transport/base_client.rbs +33 -5
- data/sig/openai/internal/type/base_model.rbs +13 -0
- data/sig/openai/internal/type/base_page.rbs +8 -1
- data/sig/openai/internal/type/base_stream.rbs +8 -2
- data/sig/openai/internal/util.rbs +12 -0
- data/sig/openai/models/admin/organization/audit_log_list_params.rbs +2 -0
- data/sig/openai/models/admin/organization/audit_log_list_response.rbs +2 -0
- data/sig/openai/models/all_models.rbs +10 -0
- data/sig/openai/models/beta/beta_mcp_tool_call_error.rbs +75 -0
- data/sig/openai/models/beta/beta_response.rbs +14 -1
- data/sig/openai/models/beta/beta_response_input_item.rbs +4 -4
- data/sig/openai/models/beta/beta_response_item.rbs +4 -4
- data/sig/openai/models/beta/beta_response_output_item.rbs +4 -4
- data/sig/openai/models/beta/beta_response_output_text_annotation_added_event.rbs +149 -4
- data/sig/openai/models/beta/beta_responses_client_event.rbs +21 -1
- data/sig/openai/models/beta/beta_responses_server_event.rbs +2005 -53
- data/sig/openai/models/beta/beta_web_search_tool.rbs +7 -0
- data/sig/openai/models/beta/response_compact_params.rbs +12 -0
- data/sig/openai/models/beta/response_create_params.rbs +14 -1
- data/sig/openai/models/chat_model.rbs +2 -0
- data/sig/openai/models/completion_usage.rbs +27 -6
- data/sig/openai/models/conversations/conversation_item.rbs +4 -4
- data/sig/openai/models/model.rbs +12 -2
- data/sig/openai/models/responses/mcp_tool_call_error.rbs +73 -0
- data/sig/openai/models/responses/response.rbs +2 -1
- data/sig/openai/models/responses/response_compact_params.rbs +12 -0
- data/sig/openai/models/responses/response_create_params.rbs +2 -1
- data/sig/openai/models/responses/response_input_item.rbs +4 -4
- data/sig/openai/models/responses/response_item.rbs +4 -4
- data/sig/openai/models/responses/response_output_item.rbs +4 -4
- data/sig/openai/models/responses/response_output_text_annotation_added_event.rbs +149 -4
- data/sig/openai/models/responses/responses_client_event.rbs +9 -1
- data/sig/openai/models/responses/responses_server_event.rbs +1834 -53
- data/sig/openai/models/responses/web_search_tool.rbs +7 -0
- data/sig/openai/models/responses_model.rbs +10 -0
- data/sig/openai/net_http_client.rbs +2 -2
- data/sig/openai/providers.rbs +7 -0
- metadata +30 -1
|
@@ -15,6 +15,15 @@ module OpenAI
|
|
|
15
15
|
sig { returns(OpenAI::Beta::BetaWebSearchTool::Type::OrSymbol) }
|
|
16
16
|
attr_accessor :type
|
|
17
17
|
|
|
18
|
+
# Allow live internet access for web search. Defaults to true when omitted. When
|
|
19
|
+
# false, the web search tool runs in offline/cache-only mode and will not fetch
|
|
20
|
+
# new external content.
|
|
21
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
22
|
+
attr_reader :external_web_access
|
|
23
|
+
|
|
24
|
+
sig { params(external_web_access: T::Boolean).void }
|
|
25
|
+
attr_writer :external_web_access
|
|
26
|
+
|
|
18
27
|
# Filters for the search.
|
|
19
28
|
sig { returns(T.nilable(OpenAI::Beta::BetaWebSearchTool::Filters)) }
|
|
20
29
|
attr_reader :filters
|
|
@@ -64,6 +73,7 @@ module OpenAI
|
|
|
64
73
|
sig do
|
|
65
74
|
params(
|
|
66
75
|
type: OpenAI::Beta::BetaWebSearchTool::Type::OrSymbol,
|
|
76
|
+
external_web_access: T::Boolean,
|
|
67
77
|
filters:
|
|
68
78
|
T.nilable(OpenAI::Beta::BetaWebSearchTool::Filters::OrHash),
|
|
69
79
|
search_context_size:
|
|
@@ -75,6 +85,10 @@ module OpenAI
|
|
|
75
85
|
def self.new(
|
|
76
86
|
# The type of the web search tool. One of `web_search` or `web_search_2025_08_26`.
|
|
77
87
|
type:,
|
|
88
|
+
# Allow live internet access for web search. Defaults to true when omitted. When
|
|
89
|
+
# false, the web search tool runs in offline/cache-only mode and will not fetch
|
|
90
|
+
# new external content.
|
|
91
|
+
external_web_access: nil,
|
|
78
92
|
# Filters for the search.
|
|
79
93
|
filters: nil,
|
|
80
94
|
# High level guidance for the amount of context window space to use for the
|
|
@@ -89,6 +103,7 @@ module OpenAI
|
|
|
89
103
|
override.returns(
|
|
90
104
|
{
|
|
91
105
|
type: OpenAI::Beta::BetaWebSearchTool::Type::OrSymbol,
|
|
106
|
+
external_web_access: T::Boolean,
|
|
92
107
|
filters: T.nilable(OpenAI::Beta::BetaWebSearchTool::Filters),
|
|
93
108
|
search_context_size:
|
|
94
109
|
OpenAI::Beta::BetaWebSearchTool::SearchContextSize::OrSymbol,
|
|
@@ -305,6 +305,11 @@ module OpenAI
|
|
|
305
305
|
:"gpt-5.5",
|
|
306
306
|
OpenAI::Beta::ResponseCompactParams::Model::TaggedSymbol
|
|
307
307
|
)
|
|
308
|
+
GPT_5_5_2026_04_23 =
|
|
309
|
+
T.let(
|
|
310
|
+
:"gpt-5.5-2026-04-23",
|
|
311
|
+
OpenAI::Beta::ResponseCompactParams::Model::TaggedSymbol
|
|
312
|
+
)
|
|
308
313
|
GPT_5_4 =
|
|
309
314
|
T.let(
|
|
310
315
|
:"gpt-5.4",
|
|
@@ -739,6 +744,16 @@ module OpenAI
|
|
|
739
744
|
:"computer-use-preview-2025-03-11",
|
|
740
745
|
OpenAI::Beta::ResponseCompactParams::Model::TaggedSymbol
|
|
741
746
|
)
|
|
747
|
+
GPT_5_5_PRO =
|
|
748
|
+
T.let(
|
|
749
|
+
:"gpt-5.5-pro",
|
|
750
|
+
OpenAI::Beta::ResponseCompactParams::Model::TaggedSymbol
|
|
751
|
+
)
|
|
752
|
+
GPT_5_5_PRO_2026_04_23 =
|
|
753
|
+
T.let(
|
|
754
|
+
:"gpt-5.5-pro-2026-04-23",
|
|
755
|
+
OpenAI::Beta::ResponseCompactParams::Model::TaggedSymbol
|
|
756
|
+
)
|
|
742
757
|
GPT_5_CODEX =
|
|
743
758
|
T.let(
|
|
744
759
|
:"gpt-5-codex",
|
|
@@ -759,6 +774,21 @@ module OpenAI
|
|
|
759
774
|
:"gpt-5.1-codex-max",
|
|
760
775
|
OpenAI::Beta::ResponseCompactParams::Model::TaggedSymbol
|
|
761
776
|
)
|
|
777
|
+
GPT_DAYBREAK_BLUE_LATEST =
|
|
778
|
+
T.let(
|
|
779
|
+
:"gpt-daybreak-blue-latest",
|
|
780
|
+
OpenAI::Beta::ResponseCompactParams::Model::TaggedSymbol
|
|
781
|
+
)
|
|
782
|
+
GPT_DAYBREAK_RED_LATEST =
|
|
783
|
+
T.let(
|
|
784
|
+
:"gpt-daybreak-red-latest",
|
|
785
|
+
OpenAI::Beta::ResponseCompactParams::Model::TaggedSymbol
|
|
786
|
+
)
|
|
787
|
+
GPT_5_6_CYBER =
|
|
788
|
+
T.let(
|
|
789
|
+
:"gpt-5.6-cyber",
|
|
790
|
+
OpenAI::Beta::ResponseCompactParams::Model::TaggedSymbol
|
|
791
|
+
)
|
|
762
792
|
end
|
|
763
793
|
|
|
764
794
|
# Text, image, or file inputs to the model, used to generate a response
|
|
@@ -287,6 +287,10 @@ module OpenAI
|
|
|
287
287
|
# Responses or Chat Completions. The response will show `service_tier=priority`
|
|
288
288
|
# regardless of if you specify `service_tier=fast` or `priority` in your
|
|
289
289
|
# request.
|
|
290
|
+
# - If set to 'ultrafast', then the request will be processed with the
|
|
291
|
+
# access-controlled Ultrafast Processing service tier. This tier is currently
|
|
292
|
+
# available for `gpt-5.6-sol`; a response served through it will show
|
|
293
|
+
# `service_tier=ultrafast`.
|
|
290
294
|
# - When not set, the default behavior is 'auto'.
|
|
291
295
|
#
|
|
292
296
|
# When the `service_tier` parameter is set, the response body will include the
|
|
@@ -749,6 +753,10 @@ module OpenAI
|
|
|
749
753
|
# Responses or Chat Completions. The response will show `service_tier=priority`
|
|
750
754
|
# regardless of if you specify `service_tier=fast` or `priority` in your
|
|
751
755
|
# request.
|
|
756
|
+
# - If set to 'ultrafast', then the request will be processed with the
|
|
757
|
+
# access-controlled Ultrafast Processing service tier. This tier is currently
|
|
758
|
+
# available for `gpt-5.6-sol`; a response served through it will show
|
|
759
|
+
# `service_tier=ultrafast`.
|
|
752
760
|
# - When not set, the default behavior is 'auto'.
|
|
753
761
|
#
|
|
754
762
|
# When the `service_tier` parameter is set, the response body will include the
|
|
@@ -1068,6 +1076,11 @@ module OpenAI
|
|
|
1068
1076
|
:"gpt-5.5",
|
|
1069
1077
|
OpenAI::Beta::ResponseCreateParams::Model::TaggedSymbol
|
|
1070
1078
|
)
|
|
1079
|
+
GPT_5_5_2026_04_23 =
|
|
1080
|
+
T.let(
|
|
1081
|
+
:"gpt-5.5-2026-04-23",
|
|
1082
|
+
OpenAI::Beta::ResponseCreateParams::Model::TaggedSymbol
|
|
1083
|
+
)
|
|
1071
1084
|
GPT_5_4 =
|
|
1072
1085
|
T.let(
|
|
1073
1086
|
:"gpt-5.4",
|
|
@@ -1502,6 +1515,16 @@ module OpenAI
|
|
|
1502
1515
|
:"computer-use-preview-2025-03-11",
|
|
1503
1516
|
OpenAI::Beta::ResponseCreateParams::Model::TaggedSymbol
|
|
1504
1517
|
)
|
|
1518
|
+
GPT_5_5_PRO =
|
|
1519
|
+
T.let(
|
|
1520
|
+
:"gpt-5.5-pro",
|
|
1521
|
+
OpenAI::Beta::ResponseCreateParams::Model::TaggedSymbol
|
|
1522
|
+
)
|
|
1523
|
+
GPT_5_5_PRO_2026_04_23 =
|
|
1524
|
+
T.let(
|
|
1525
|
+
:"gpt-5.5-pro-2026-04-23",
|
|
1526
|
+
OpenAI::Beta::ResponseCreateParams::Model::TaggedSymbol
|
|
1527
|
+
)
|
|
1505
1528
|
GPT_5_CODEX =
|
|
1506
1529
|
T.let(
|
|
1507
1530
|
:"gpt-5-codex",
|
|
@@ -1522,6 +1545,21 @@ module OpenAI
|
|
|
1522
1545
|
:"gpt-5.1-codex-max",
|
|
1523
1546
|
OpenAI::Beta::ResponseCreateParams::Model::TaggedSymbol
|
|
1524
1547
|
)
|
|
1548
|
+
GPT_DAYBREAK_BLUE_LATEST =
|
|
1549
|
+
T.let(
|
|
1550
|
+
:"gpt-daybreak-blue-latest",
|
|
1551
|
+
OpenAI::Beta::ResponseCreateParams::Model::TaggedSymbol
|
|
1552
|
+
)
|
|
1553
|
+
GPT_DAYBREAK_RED_LATEST =
|
|
1554
|
+
T.let(
|
|
1555
|
+
:"gpt-daybreak-red-latest",
|
|
1556
|
+
OpenAI::Beta::ResponseCreateParams::Model::TaggedSymbol
|
|
1557
|
+
)
|
|
1558
|
+
GPT_5_6_CYBER =
|
|
1559
|
+
T.let(
|
|
1560
|
+
:"gpt-5.6-cyber",
|
|
1561
|
+
OpenAI::Beta::ResponseCreateParams::Model::TaggedSymbol
|
|
1562
|
+
)
|
|
1525
1563
|
end
|
|
1526
1564
|
|
|
1527
1565
|
class Moderation < OpenAI::Internal::Type::BaseModel
|
|
@@ -2544,6 +2582,10 @@ module OpenAI
|
|
|
2544
2582
|
# Responses or Chat Completions. The response will show `service_tier=priority`
|
|
2545
2583
|
# regardless of if you specify `service_tier=fast` or `priority` in your
|
|
2546
2584
|
# request.
|
|
2585
|
+
# - If set to 'ultrafast', then the request will be processed with the
|
|
2586
|
+
# access-controlled Ultrafast Processing service tier. This tier is currently
|
|
2587
|
+
# available for `gpt-5.6-sol`; a response served through it will show
|
|
2588
|
+
# `service_tier=ultrafast`.
|
|
2547
2589
|
# - When not set, the default behavior is 'auto'.
|
|
2548
2590
|
#
|
|
2549
2591
|
# When the `service_tier` parameter is set, the response body will include the
|
|
@@ -2589,6 +2631,11 @@ module OpenAI
|
|
|
2589
2631
|
:fast,
|
|
2590
2632
|
OpenAI::Beta::ResponseCreateParams::ServiceTier::TaggedSymbol
|
|
2591
2633
|
)
|
|
2634
|
+
ULTRAFAST =
|
|
2635
|
+
T.let(
|
|
2636
|
+
:ultrafast,
|
|
2637
|
+
OpenAI::Beta::ResponseCreateParams::ServiceTier::TaggedSymbol
|
|
2638
|
+
)
|
|
2592
2639
|
|
|
2593
2640
|
sig do
|
|
2594
2641
|
override.returns(
|
|
@@ -12,6 +12,8 @@ module OpenAI
|
|
|
12
12
|
GPT_5_6_TERRA = T.let(:"gpt-5.6-terra", OpenAI::ChatModel::TaggedSymbol)
|
|
13
13
|
GPT_5_6_LUNA = T.let(:"gpt-5.6-luna", OpenAI::ChatModel::TaggedSymbol)
|
|
14
14
|
GPT_5_5 = T.let(:"gpt-5.5", OpenAI::ChatModel::TaggedSymbol)
|
|
15
|
+
GPT_5_5_2026_04_23 =
|
|
16
|
+
T.let(:"gpt-5.5-2026-04-23", OpenAI::ChatModel::TaggedSymbol)
|
|
15
17
|
GPT_5_4 = T.let(:"gpt-5.4", OpenAI::ChatModel::TaggedSymbol)
|
|
16
18
|
GPT_5_4_MINI = T.let(:"gpt-5.4-mini", OpenAI::ChatModel::TaggedSymbol)
|
|
17
19
|
GPT_5_4_NANO = T.let(:"gpt-5.4-nano", OpenAI::ChatModel::TaggedSymbol)
|
|
@@ -128,13 +128,21 @@ module OpenAI
|
|
|
128
128
|
sig { params(rejected_prediction_tokens: Integer).void }
|
|
129
129
|
attr_writer :rejected_prediction_tokens
|
|
130
130
|
|
|
131
|
+
# Text output tokens generated by the model.
|
|
132
|
+
sig { returns(T.nilable(Integer)) }
|
|
133
|
+
attr_reader :text_tokens
|
|
134
|
+
|
|
135
|
+
sig { params(text_tokens: Integer).void }
|
|
136
|
+
attr_writer :text_tokens
|
|
137
|
+
|
|
131
138
|
# Breakdown of tokens used in a completion.
|
|
132
139
|
sig do
|
|
133
140
|
params(
|
|
134
141
|
accepted_prediction_tokens: Integer,
|
|
135
142
|
audio_tokens: Integer,
|
|
136
143
|
reasoning_tokens: Integer,
|
|
137
|
-
rejected_prediction_tokens: Integer
|
|
144
|
+
rejected_prediction_tokens: Integer,
|
|
145
|
+
text_tokens: Integer
|
|
138
146
|
).returns(T.attached_class)
|
|
139
147
|
end
|
|
140
148
|
def self.new(
|
|
@@ -149,7 +157,9 @@ module OpenAI
|
|
|
149
157
|
# not appear in the completion. However, like reasoning tokens, these tokens are
|
|
150
158
|
# still counted in the total completion tokens for purposes of billing, output,
|
|
151
159
|
# and context window limits.
|
|
152
|
-
rejected_prediction_tokens: nil
|
|
160
|
+
rejected_prediction_tokens: nil,
|
|
161
|
+
# Text output tokens generated by the model.
|
|
162
|
+
text_tokens: nil
|
|
153
163
|
)
|
|
154
164
|
end
|
|
155
165
|
|
|
@@ -159,7 +169,8 @@ module OpenAI
|
|
|
159
169
|
accepted_prediction_tokens: Integer,
|
|
160
170
|
audio_tokens: Integer,
|
|
161
171
|
reasoning_tokens: Integer,
|
|
162
|
-
rejected_prediction_tokens: Integer
|
|
172
|
+
rejected_prediction_tokens: Integer,
|
|
173
|
+
text_tokens: Integer
|
|
163
174
|
}
|
|
164
175
|
)
|
|
165
176
|
end
|
|
@@ -197,12 +208,28 @@ module OpenAI
|
|
|
197
208
|
sig { params(cached_tokens: Integer).void }
|
|
198
209
|
attr_writer :cached_tokens
|
|
199
210
|
|
|
211
|
+
# Image input tokens present in the prompt.
|
|
212
|
+
sig { returns(T.nilable(Integer)) }
|
|
213
|
+
attr_reader :image_tokens
|
|
214
|
+
|
|
215
|
+
sig { params(image_tokens: Integer).void }
|
|
216
|
+
attr_writer :image_tokens
|
|
217
|
+
|
|
218
|
+
# Text input tokens present in the prompt.
|
|
219
|
+
sig { returns(T.nilable(Integer)) }
|
|
220
|
+
attr_reader :text_tokens
|
|
221
|
+
|
|
222
|
+
sig { params(text_tokens: Integer).void }
|
|
223
|
+
attr_writer :text_tokens
|
|
224
|
+
|
|
200
225
|
# Breakdown of tokens used in the prompt.
|
|
201
226
|
sig do
|
|
202
227
|
params(
|
|
203
228
|
audio_tokens: Integer,
|
|
204
229
|
cache_write_tokens: Integer,
|
|
205
|
-
cached_tokens: Integer
|
|
230
|
+
cached_tokens: Integer,
|
|
231
|
+
image_tokens: Integer,
|
|
232
|
+
text_tokens: Integer
|
|
206
233
|
).returns(T.attached_class)
|
|
207
234
|
end
|
|
208
235
|
def self.new(
|
|
@@ -211,7 +238,11 @@ module OpenAI
|
|
|
211
238
|
# The unadjusted number of prompt tokens written to cache.
|
|
212
239
|
cache_write_tokens: nil,
|
|
213
240
|
# Cached tokens present in the prompt.
|
|
214
|
-
cached_tokens: nil
|
|
241
|
+
cached_tokens: nil,
|
|
242
|
+
# Image input tokens present in the prompt.
|
|
243
|
+
image_tokens: nil,
|
|
244
|
+
# Text input tokens present in the prompt.
|
|
245
|
+
text_tokens: nil
|
|
215
246
|
)
|
|
216
247
|
end
|
|
217
248
|
|
|
@@ -220,7 +251,9 @@ module OpenAI
|
|
|
220
251
|
{
|
|
221
252
|
audio_tokens: Integer,
|
|
222
253
|
cache_write_tokens: Integer,
|
|
223
|
-
cached_tokens: Integer
|
|
254
|
+
cached_tokens: Integer,
|
|
255
|
+
image_tokens: Integer,
|
|
256
|
+
text_tokens: Integer
|
|
224
257
|
}
|
|
225
258
|
)
|
|
226
259
|
end
|
|
@@ -19,6 +19,10 @@ module OpenAI
|
|
|
19
19
|
attr_accessor :container_id
|
|
20
20
|
|
|
21
21
|
# The File object (not file name) to be uploaded.
|
|
22
|
+
#
|
|
23
|
+
# `String`, `StringIO`, and pathless `IO` inputs are sent with generic upload
|
|
24
|
+
# metadata. Use `OpenAI::FilePart` when you need to override the filename or
|
|
25
|
+
# content type.
|
|
22
26
|
sig { returns(T.nilable(OpenAI::Internal::FileInput)) }
|
|
23
27
|
attr_reader :file
|
|
24
28
|
|
|
@@ -43,6 +47,10 @@ module OpenAI
|
|
|
43
47
|
def self.new(
|
|
44
48
|
container_id:,
|
|
45
49
|
# The File object (not file name) to be uploaded.
|
|
50
|
+
#
|
|
51
|
+
# `String`, `StringIO`, and pathless `IO` inputs are sent with generic upload
|
|
52
|
+
# metadata. Use `OpenAI::FilePart` when you need to override the filename or
|
|
53
|
+
# content type.
|
|
46
54
|
file: nil,
|
|
47
55
|
# Name of the file to create.
|
|
48
56
|
file_id: nil,
|
|
@@ -15,6 +15,10 @@ module OpenAI
|
|
|
15
15
|
end
|
|
16
16
|
|
|
17
17
|
# The image or audio file to check for supported OpenAI provenance signals.
|
|
18
|
+
#
|
|
19
|
+
# `String`, `StringIO`, and pathless `IO` inputs are sent with generic upload
|
|
20
|
+
# metadata. Use `OpenAI::FilePart` when you need to override the filename or
|
|
21
|
+
# content type.
|
|
18
22
|
sig { returns(OpenAI::Internal::FileInput) }
|
|
19
23
|
attr_accessor :file
|
|
20
24
|
|
|
@@ -26,6 +30,10 @@ module OpenAI
|
|
|
26
30
|
end
|
|
27
31
|
def self.new(
|
|
28
32
|
# The image or audio file to check for supported OpenAI provenance signals.
|
|
33
|
+
#
|
|
34
|
+
# `String`, `StringIO`, and pathless `IO` inputs are sent with generic upload
|
|
35
|
+
# metadata. Use `OpenAI::FilePart` when you need to override the filename or
|
|
36
|
+
# content type.
|
|
29
37
|
file:,
|
|
30
38
|
request_options: {}
|
|
31
39
|
)
|
|
@@ -1109,7 +1109,9 @@ module OpenAI
|
|
|
1109
1109
|
attr_accessor :approval_request_id
|
|
1110
1110
|
|
|
1111
1111
|
# The error from the tool call, if any.
|
|
1112
|
-
sig
|
|
1112
|
+
sig do
|
|
1113
|
+
returns(T.nilable(OpenAI::Responses::McpToolCallError::Variants))
|
|
1114
|
+
end
|
|
1113
1115
|
attr_accessor :error
|
|
1114
1116
|
|
|
1115
1117
|
# The output from the tool call.
|
|
@@ -1143,7 +1145,14 @@ module OpenAI
|
|
|
1143
1145
|
name: String,
|
|
1144
1146
|
server_label: String,
|
|
1145
1147
|
approval_request_id: T.nilable(String),
|
|
1146
|
-
error:
|
|
1148
|
+
error:
|
|
1149
|
+
T.nilable(
|
|
1150
|
+
T.any(
|
|
1151
|
+
OpenAI::Responses::McpToolCallError::McpProtocolError::OrHash,
|
|
1152
|
+
OpenAI::Responses::McpToolCallError::McpToolExecutionError::OrHash,
|
|
1153
|
+
OpenAI::Responses::McpToolCallError::HTTPError::OrHash
|
|
1154
|
+
)
|
|
1155
|
+
),
|
|
1147
1156
|
output: T.nilable(String),
|
|
1148
1157
|
status:
|
|
1149
1158
|
OpenAI::Conversations::ConversationItem::McpCall::Status::OrSymbol,
|
|
@@ -1184,7 +1193,7 @@ module OpenAI
|
|
|
1184
1193
|
server_label: String,
|
|
1185
1194
|
type: Symbol,
|
|
1186
1195
|
approval_request_id: T.nilable(String),
|
|
1187
|
-
error: T.nilable(
|
|
1196
|
+
error: T.nilable(OpenAI::Responses::McpToolCallError::Variants),
|
|
1188
1197
|
output: T.nilable(String),
|
|
1189
1198
|
status:
|
|
1190
1199
|
OpenAI::Conversations::ConversationItem::McpCall::Status::TaggedSymbol
|
|
@@ -12,6 +12,10 @@ module OpenAI
|
|
|
12
12
|
end
|
|
13
13
|
|
|
14
14
|
# The File object (not file name) to be uploaded.
|
|
15
|
+
#
|
|
16
|
+
# `String`, `StringIO`, and pathless `IO` inputs are sent with generic upload
|
|
17
|
+
# metadata. Use `OpenAI::FilePart` when you need to override the filename or
|
|
18
|
+
# content type.
|
|
15
19
|
sig { returns(OpenAI::Internal::FileInput) }
|
|
16
20
|
attr_accessor :file
|
|
17
21
|
|
|
@@ -48,6 +52,10 @@ module OpenAI
|
|
|
48
52
|
end
|
|
49
53
|
def self.new(
|
|
50
54
|
# The File object (not file name) to be uploaded.
|
|
55
|
+
#
|
|
56
|
+
# `String`, `StringIO`, and pathless `IO` inputs are sent with generic upload
|
|
57
|
+
# metadata. Use `OpenAI::FilePart` when you need to override the filename or
|
|
58
|
+
# content type.
|
|
51
59
|
file:,
|
|
52
60
|
# The intended purpose of the uploaded file. One of:
|
|
53
61
|
#
|
|
@@ -13,6 +13,10 @@ module OpenAI
|
|
|
13
13
|
|
|
14
14
|
# The image to use as the basis for the variation(s). Must be a valid PNG file,
|
|
15
15
|
# less than 4MB, and square.
|
|
16
|
+
#
|
|
17
|
+
# `String`, `StringIO`, and pathless `IO` inputs are sent with generic upload
|
|
18
|
+
# metadata. Use `OpenAI::FilePart` when you need to override the filename or
|
|
19
|
+
# content type.
|
|
16
20
|
sig { returns(OpenAI::Internal::FileInput) }
|
|
17
21
|
attr_accessor :image
|
|
18
22
|
|
|
@@ -70,6 +74,10 @@ module OpenAI
|
|
|
70
74
|
def self.new(
|
|
71
75
|
# The image to use as the basis for the variation(s). Must be a valid PNG file,
|
|
72
76
|
# less than 4MB, and square.
|
|
77
|
+
#
|
|
78
|
+
# `String`, `StringIO`, and pathless `IO` inputs are sent with generic upload
|
|
79
|
+
# metadata. Use `OpenAI::FilePart` when you need to override the filename or
|
|
80
|
+
# content type.
|
|
73
81
|
image:,
|
|
74
82
|
# The model to use for image generation. Only `dall-e-2` is supported at this
|
|
75
83
|
# time.
|
|
@@ -20,6 +20,10 @@ module OpenAI
|
|
|
20
20
|
#
|
|
21
21
|
# For `dall-e-2`, you can only provide one image, and it should be a square `png`
|
|
22
22
|
# file less than 4MB.
|
|
23
|
+
#
|
|
24
|
+
# `String`, `StringIO`, and pathless `IO` inputs are sent with generic upload
|
|
25
|
+
# metadata. Use `OpenAI::FilePart` when you need to override the filename or
|
|
26
|
+
# content type.
|
|
23
27
|
sig { returns(OpenAI::ImageEditParams::Image::Variants) }
|
|
24
28
|
attr_accessor :image
|
|
25
29
|
|
|
@@ -56,6 +60,10 @@ module OpenAI
|
|
|
56
60
|
# indicate where `image` should be edited. If there are multiple images provided,
|
|
57
61
|
# the mask will be applied on the first image. Must be a valid PNG file, less than
|
|
58
62
|
# 4MB, and have the same dimensions as `image`.
|
|
63
|
+
#
|
|
64
|
+
# `String`, `StringIO`, and pathless `IO` inputs are sent with generic upload
|
|
65
|
+
# metadata. Use `OpenAI::FilePart` when you need to override the filename or
|
|
66
|
+
# content type.
|
|
59
67
|
sig { returns(T.nilable(OpenAI::Internal::FileInput)) }
|
|
60
68
|
attr_reader :mask
|
|
61
69
|
|
|
@@ -170,6 +178,10 @@ module OpenAI
|
|
|
170
178
|
#
|
|
171
179
|
# For `dall-e-2`, you can only provide one image, and it should be a square `png`
|
|
172
180
|
# file less than 4MB.
|
|
181
|
+
#
|
|
182
|
+
# `String`, `StringIO`, and pathless `IO` inputs are sent with generic upload
|
|
183
|
+
# metadata. Use `OpenAI::FilePart` when you need to override the filename or
|
|
184
|
+
# content type.
|
|
173
185
|
image:,
|
|
174
186
|
# A text description of the desired image(s). The maximum length is 1000
|
|
175
187
|
# characters for `dall-e-2`, and 32000 characters for the GPT image models.
|
|
@@ -196,6 +208,10 @@ module OpenAI
|
|
|
196
208
|
# indicate where `image` should be edited. If there are multiple images provided,
|
|
197
209
|
# the mask will be applied on the first image. Must be a valid PNG file, less than
|
|
198
210
|
# 4MB, and have the same dimensions as `image`.
|
|
211
|
+
#
|
|
212
|
+
# `String`, `StringIO`, and pathless `IO` inputs are sent with generic upload
|
|
213
|
+
# metadata. Use `OpenAI::FilePart` when you need to override the filename or
|
|
214
|
+
# content type.
|
|
199
215
|
mask: nil,
|
|
200
216
|
# The model to use for image generation. One of `dall-e-2` or a GPT image model
|
|
201
217
|
# (`gpt-image-1`, `gpt-image-1-mini`, `gpt-image-1.5`, `gpt-image-2`,
|
data/rbi/openai/models/model.rbi
CHANGED
|
@@ -21,12 +21,17 @@ module OpenAI
|
|
|
21
21
|
sig { returns(String) }
|
|
22
22
|
attr_accessor :owned_by
|
|
23
23
|
|
|
24
|
+
# The date when the model will shut down, or null if not announced.
|
|
25
|
+
sig { returns(T.nilable(Date)) }
|
|
26
|
+
attr_accessor :shutdown_date
|
|
27
|
+
|
|
24
28
|
# Describes an OpenAI model offering that can be used with the API.
|
|
25
29
|
sig do
|
|
26
30
|
params(
|
|
27
31
|
id: String,
|
|
28
32
|
created: Integer,
|
|
29
33
|
owned_by: String,
|
|
34
|
+
shutdown_date: T.nilable(Date),
|
|
30
35
|
object: Symbol
|
|
31
36
|
).returns(T.attached_class)
|
|
32
37
|
end
|
|
@@ -37,6 +42,8 @@ module OpenAI
|
|
|
37
42
|
created:,
|
|
38
43
|
# The organization that owns the model.
|
|
39
44
|
owned_by:,
|
|
45
|
+
# The date when the model will shut down, or null if not announced.
|
|
46
|
+
shutdown_date: nil,
|
|
40
47
|
# The object type, which is always "model".
|
|
41
48
|
object: :model
|
|
42
49
|
)
|
|
@@ -44,7 +51,13 @@ module OpenAI
|
|
|
44
51
|
|
|
45
52
|
sig do
|
|
46
53
|
override.returns(
|
|
47
|
-
{
|
|
54
|
+
{
|
|
55
|
+
id: String,
|
|
56
|
+
created: Integer,
|
|
57
|
+
object: Symbol,
|
|
58
|
+
owned_by: String,
|
|
59
|
+
shutdown_date: T.nilable(Date)
|
|
60
|
+
}
|
|
48
61
|
)
|
|
49
62
|
end
|
|
50
63
|
def to_hash
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module OpenAI
|
|
4
|
+
module Models
|
|
5
|
+
module Responses
|
|
6
|
+
module McpToolCallError
|
|
7
|
+
extend OpenAI::Internal::Type::Union
|
|
8
|
+
|
|
9
|
+
Variants =
|
|
10
|
+
T.type_alias do
|
|
11
|
+
T.any(
|
|
12
|
+
OpenAI::Responses::McpToolCallError::McpProtocolError,
|
|
13
|
+
OpenAI::Responses::McpToolCallError::McpToolExecutionError,
|
|
14
|
+
OpenAI::Responses::McpToolCallError::HTTPError
|
|
15
|
+
)
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
class McpProtocolError < OpenAI::Internal::Type::BaseModel
|
|
19
|
+
OrHash =
|
|
20
|
+
T.type_alias do
|
|
21
|
+
T.any(
|
|
22
|
+
OpenAI::Responses::McpToolCallError::McpProtocolError,
|
|
23
|
+
OpenAI::Internal::AnyHash
|
|
24
|
+
)
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
sig { returns(Integer) }
|
|
28
|
+
attr_accessor :code
|
|
29
|
+
|
|
30
|
+
sig { returns(String) }
|
|
31
|
+
attr_accessor :message
|
|
32
|
+
|
|
33
|
+
sig { returns(Symbol) }
|
|
34
|
+
attr_accessor :type
|
|
35
|
+
|
|
36
|
+
sig do
|
|
37
|
+
params(code: Integer, message: String, type: Symbol).returns(
|
|
38
|
+
T.attached_class
|
|
39
|
+
)
|
|
40
|
+
end
|
|
41
|
+
def self.new(code:, message:, type: :mcp_protocol_error)
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
sig do
|
|
45
|
+
override.returns({ code: Integer, message: String, type: Symbol })
|
|
46
|
+
end
|
|
47
|
+
def to_hash
|
|
48
|
+
end
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
class McpToolExecutionError < OpenAI::Internal::Type::BaseModel
|
|
52
|
+
OrHash =
|
|
53
|
+
T.type_alias do
|
|
54
|
+
T.any(
|
|
55
|
+
OpenAI::Responses::McpToolCallError::McpToolExecutionError,
|
|
56
|
+
OpenAI::Internal::AnyHash
|
|
57
|
+
)
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
sig { returns(T.anything) }
|
|
61
|
+
attr_accessor :content
|
|
62
|
+
|
|
63
|
+
sig { returns(Symbol) }
|
|
64
|
+
attr_accessor :type
|
|
65
|
+
|
|
66
|
+
sig do
|
|
67
|
+
params(content: T.anything, type: Symbol).returns(T.attached_class)
|
|
68
|
+
end
|
|
69
|
+
def self.new(content:, type: :mcp_tool_execution_error)
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
sig { override.returns({ content: T.anything, type: Symbol }) }
|
|
73
|
+
def to_hash
|
|
74
|
+
end
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
class HTTPError < OpenAI::Internal::Type::BaseModel
|
|
78
|
+
OrHash =
|
|
79
|
+
T.type_alias do
|
|
80
|
+
T.any(
|
|
81
|
+
OpenAI::Responses::McpToolCallError::HTTPError,
|
|
82
|
+
OpenAI::Internal::AnyHash
|
|
83
|
+
)
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
sig { returns(Integer) }
|
|
87
|
+
attr_accessor :code
|
|
88
|
+
|
|
89
|
+
sig { returns(String) }
|
|
90
|
+
attr_accessor :message
|
|
91
|
+
|
|
92
|
+
sig { returns(Symbol) }
|
|
93
|
+
attr_accessor :type
|
|
94
|
+
|
|
95
|
+
sig do
|
|
96
|
+
params(code: Integer, message: String, type: Symbol).returns(
|
|
97
|
+
T.attached_class
|
|
98
|
+
)
|
|
99
|
+
end
|
|
100
|
+
def self.new(code:, message:, type: :http_error)
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
sig do
|
|
104
|
+
override.returns({ code: Integer, message: String, type: Symbol })
|
|
105
|
+
end
|
|
106
|
+
def to_hash
|
|
107
|
+
end
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
sig do
|
|
111
|
+
override.returns(
|
|
112
|
+
T::Array[OpenAI::Responses::McpToolCallError::Variants]
|
|
113
|
+
)
|
|
114
|
+
end
|
|
115
|
+
def self.variants
|
|
116
|
+
end
|
|
117
|
+
end
|
|
118
|
+
end
|
|
119
|
+
end
|
|
120
|
+
end
|
|
@@ -282,6 +282,10 @@ module OpenAI
|
|
|
282
282
|
# Responses or Chat Completions. The response will show `service_tier=priority`
|
|
283
283
|
# regardless of if you specify `service_tier=fast` or `priority` in your
|
|
284
284
|
# request.
|
|
285
|
+
# - If set to 'ultrafast', then the request will be processed with the
|
|
286
|
+
# access-controlled Ultrafast Processing service tier. This tier is currently
|
|
287
|
+
# available for `gpt-5.6-sol`; a response served through it will show
|
|
288
|
+
# `service_tier=ultrafast`.
|
|
285
289
|
# - When not set, the default behavior is 'auto'.
|
|
286
290
|
#
|
|
287
291
|
# When the `service_tier` parameter is set, the response body will include the
|
|
@@ -624,6 +628,10 @@ module OpenAI
|
|
|
624
628
|
# Responses or Chat Completions. The response will show `service_tier=priority`
|
|
625
629
|
# regardless of if you specify `service_tier=fast` or `priority` in your
|
|
626
630
|
# request.
|
|
631
|
+
# - If set to 'ultrafast', then the request will be processed with the
|
|
632
|
+
# access-controlled Ultrafast Processing service tier. This tier is currently
|
|
633
|
+
# available for `gpt-5.6-sol`; a response served through it will show
|
|
634
|
+
# `service_tier=ultrafast`.
|
|
627
635
|
# - When not set, the default behavior is 'auto'.
|
|
628
636
|
#
|
|
629
637
|
# When the `service_tier` parameter is set, the response body will include the
|
|
@@ -1574,6 +1582,10 @@ module OpenAI
|
|
|
1574
1582
|
# Responses or Chat Completions. The response will show `service_tier=priority`
|
|
1575
1583
|
# regardless of if you specify `service_tier=fast` or `priority` in your
|
|
1576
1584
|
# request.
|
|
1585
|
+
# - If set to 'ultrafast', then the request will be processed with the
|
|
1586
|
+
# access-controlled Ultrafast Processing service tier. This tier is currently
|
|
1587
|
+
# available for `gpt-5.6-sol`; a response served through it will show
|
|
1588
|
+
# `service_tier=ultrafast`.
|
|
1577
1589
|
# - When not set, the default behavior is 'auto'.
|
|
1578
1590
|
#
|
|
1579
1591
|
# When the `service_tier` parameter is set, the response body will include the
|
|
@@ -1610,6 +1622,11 @@ module OpenAI
|
|
|
1610
1622
|
)
|
|
1611
1623
|
FAST =
|
|
1612
1624
|
T.let(:fast, OpenAI::Responses::Response::ServiceTier::TaggedSymbol)
|
|
1625
|
+
ULTRAFAST =
|
|
1626
|
+
T.let(
|
|
1627
|
+
:ultrafast,
|
|
1628
|
+
OpenAI::Responses::Response::ServiceTier::TaggedSymbol
|
|
1629
|
+
)
|
|
1613
1630
|
|
|
1614
1631
|
sig do
|
|
1615
1632
|
override.returns(
|