openai 0.117.0 → 0.119.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 +23 -0
- data/README.md +1 -1
- data/lib/openai/client.rb +1 -1
- data/lib/openai/helpers/data_residency.rb +4 -1
- data/lib/openai/models/admin/organization/projects/project_optional_service_tier.rb +24 -0
- data/lib/openai/models/admin/organization/projects/project_service_tier_settings.rb +88 -0
- data/lib/openai/models/admin/organization/projects/service_tier_setting_retrieve_params.rb +29 -0
- data/lib/openai/models/admin/organization/projects/service_tier_setting_update_params.rb +92 -0
- data/lib/openai/models/all_models.rb +1 -0
- data/lib/openai/models/beta/beta_compacted_response.rb +34 -1
- data/lib/openai/models/beta/beta_response.rb +35 -1
- data/lib/openai/models/beta/beta_response_input_item.rb +45 -1
- data/lib/openai/models/beta/beta_response_item.rb +45 -1
- data/lib/openai/models/beta/beta_response_output_item.rb +45 -1
- data/lib/openai/models/beta/beta_response_tool_search_output_item_param.rb +186 -13
- data/lib/openai/models/beta/beta_response_usage.rb +33 -1
- data/lib/openai/models/beta/beta_responses_client_event.rb +58 -10
- data/lib/openai/models/beta/beta_tool.rb +164 -13
- data/lib/openai/models/beta/response_compact_params.rb +47 -4
- data/lib/openai/models/beta/response_create_params.rb +54 -10
- data/lib/openai/models/beta/session_turn_error.rb +3 -0
- data/lib/openai/models/chat/completion_create_params.rb +3 -3
- data/lib/openai/models/conversations/conversation_item.rb +45 -1
- data/lib/openai/models/image_edit_params.rb +72 -16
- data/lib/openai/models/image_generate_params.rb +160 -8
- data/lib/openai/models/image_model.rb +2 -0
- data/lib/openai/models/images_response.rb +55 -4
- data/lib/openai/models/realtime/realtime_audio_config_input.rb +14 -1
- data/lib/openai/models/realtime/realtime_session_create_response.rb +14 -1
- data/lib/openai/models/realtime/realtime_transcription_session_audio_input.rb +14 -1
- data/lib/openai/models/realtime/realtime_transcription_session_create_response.rb +14 -1
- data/lib/openai/models/realtime/realtime_translation_session.rb +14 -1
- data/lib/openai/models/realtime/realtime_translation_session_create_request.rb +14 -1
- data/lib/openai/models/realtime/realtime_translation_session_update_request.rb +14 -1
- data/lib/openai/models/responses/compacted_response.rb +37 -1
- data/lib/openai/models/responses/response.rb +35 -1
- data/lib/openai/models/responses/response_compact_params.rb +53 -4
- data/lib/openai/models/responses/response_create_params.rb +57 -10
- data/lib/openai/models/responses/response_input_item.rb +45 -1
- data/lib/openai/models/responses/response_item.rb +45 -1
- data/lib/openai/models/responses/response_output_item.rb +45 -1
- data/lib/openai/models/responses/response_tool_search_output_item_param.rb +186 -13
- data/lib/openai/models/responses/response_usage.rb +33 -1
- data/lib/openai/models/responses/responses_client_event.rb +58 -10
- data/lib/openai/models/responses/tool.rb +164 -13
- data/lib/openai/models/responses_model.rb +1 -0
- data/lib/openai/resources/admin/organization/projects/service_tier_settings.rb +77 -0
- data/lib/openai/resources/admin/organization/projects.rb +6 -0
- data/lib/openai/resources/admin/organization.rb +6 -6
- data/lib/openai/resources/beta/responses.rb +18 -9
- data/lib/openai/resources/chat/completions.rb +2 -2
- data/lib/openai/resources/images.rb +102 -18
- data/lib/openai/resources/responses.rb +15 -6
- data/lib/openai/version.rb +1 -1
- data/lib/openai.rb +5 -0
- data/rbi/openai/models/admin/organization/projects/project_optional_service_tier.rbi +45 -0
- data/rbi/openai/models/admin/organization/projects/project_service_tier_settings.rbi +143 -0
- data/rbi/openai/models/admin/organization/projects/service_tier_setting_retrieve_params.rbi +63 -0
- data/rbi/openai/models/admin/organization/projects/service_tier_setting_update_params.rbi +183 -0
- data/rbi/openai/models/all_models.rbi +1 -0
- data/rbi/openai/models/beta/beta_compacted_response.rbi +67 -1
- data/rbi/openai/models/beta/beta_response.rbi +63 -0
- data/rbi/openai/models/beta/beta_response_input_item.rbi +82 -1
- data/rbi/openai/models/beta/beta_response_item.rbi +82 -1
- data/rbi/openai/models/beta/beta_response_output_item.rbi +82 -1
- data/rbi/openai/models/beta/beta_response_tool_search_output_item_param.rbi +338 -13
- data/rbi/openai/models/beta/beta_response_usage.rbi +66 -3
- data/rbi/openai/models/beta/beta_responses_client_event.rbi +118 -9
- data/rbi/openai/models/beta/beta_tool.rbi +245 -13
- data/rbi/openai/models/beta/response_compact_params.rbi +84 -3
- data/rbi/openai/models/beta/response_create_params.rbi +91 -9
- data/rbi/openai/models/beta/session_turn_error.rbi +3 -0
- data/rbi/openai/models/chat/completion_create_params.rbi +3 -3
- data/rbi/openai/models/conversations/conversation_item.rbi +84 -1
- data/rbi/openai/models/image_edit_params.rbi +76 -14
- data/rbi/openai/models/image_generate_params.rbi +218 -6
- data/rbi/openai/models/image_model.rbi +2 -0
- data/rbi/openai/models/images_response.rbi +90 -3
- data/rbi/openai/models/realtime/realtime_audio_config_input.rbi +17 -1
- data/rbi/openai/models/realtime/realtime_session_create_response.rbi +17 -1
- data/rbi/openai/models/realtime/realtime_transcription_session_audio_input.rbi +17 -1
- data/rbi/openai/models/realtime/realtime_transcription_session_create_response.rbi +17 -1
- data/rbi/openai/models/realtime/realtime_translation_session.rbi +19 -3
- data/rbi/openai/models/realtime/realtime_translation_session_create_request.rbi +19 -3
- data/rbi/openai/models/realtime/realtime_translation_session_update_request.rbi +19 -3
- data/rbi/openai/models/responses/compacted_response.rbi +67 -1
- data/rbi/openai/models/responses/response.rbi +63 -0
- data/rbi/openai/models/responses/response_compact_params.rbi +91 -3
- data/rbi/openai/models/responses/response_create_params.rbi +97 -9
- data/rbi/openai/models/responses/response_input_item.rbi +82 -1
- data/rbi/openai/models/responses/response_item.rbi +82 -1
- data/rbi/openai/models/responses/response_output_item.rbi +82 -1
- data/rbi/openai/models/responses/response_tool_search_output_item_param.rbi +340 -13
- data/rbi/openai/models/responses/response_usage.rbi +66 -3
- data/rbi/openai/models/responses/responses_client_event.rbi +118 -9
- data/rbi/openai/models/responses/tool.rbi +248 -13
- data/rbi/openai/models/responses_model.rbi +1 -0
- data/rbi/openai/resources/admin/organization/projects/service_tier_settings.rbi +67 -0
- data/rbi/openai/resources/admin/organization/projects.rbi +3 -0
- data/rbi/openai/resources/admin/organization.rbi +3 -3
- data/rbi/openai/resources/beta/responses.rbi +15 -6
- data/rbi/openai/resources/chat/completions.rbi +2 -2
- data/rbi/openai/resources/images.rbi +98 -14
- data/rbi/openai/resources/responses.rbi +14 -3
- data/sig/openai/models/admin/organization/projects/project_optional_service_tier.rbs +23 -0
- data/sig/openai/models/admin/organization/projects/project_service_tier_settings.rbs +72 -0
- data/sig/openai/models/admin/organization/projects/service_tier_setting_retrieve_params.rbs +32 -0
- data/sig/openai/models/admin/organization/projects/service_tier_setting_update_params.rbs +91 -0
- data/sig/openai/models/all_models.rbs +2 -0
- data/sig/openai/models/beta/beta_compacted_response.rbs +42 -2
- data/sig/openai/models/beta/beta_response.rbs +42 -1
- data/sig/openai/models/beta/beta_response_input_item.rbs +51 -3
- data/sig/openai/models/beta/beta_response_item.rbs +51 -3
- data/sig/openai/models/beta/beta_response_output_item.rbs +51 -3
- data/sig/openai/models/beta/beta_response_tool_search_output_item_param.rbs +188 -15
- data/sig/openai/models/beta/beta_response_usage.rbs +40 -3
- data/sig/openai/models/beta/beta_responses_client_event.rbs +67 -10
- data/sig/openai/models/beta/beta_tool.rbs +188 -15
- data/sig/openai/models/beta/response_compact_params.rbs +58 -2
- data/sig/openai/models/beta/response_create_params.rbs +67 -10
- data/sig/openai/models/beta/session_turn_error.rbs +4 -0
- data/sig/openai/models/chat/completion_create_params.rbs +3 -3
- data/sig/openai/models/conversations/conversation_item.rbs +51 -3
- data/sig/openai/models/image_edit_params.rbs +63 -12
- data/sig/openai/models/image_generate_params.rbs +150 -5
- data/sig/openai/models/image_model.rbs +4 -0
- data/sig/openai/models/images_response.rbs +59 -4
- data/sig/openai/models/realtime/realtime_audio_config_input.rbs +20 -1
- data/sig/openai/models/realtime/realtime_session_create_response.rbs +20 -1
- data/sig/openai/models/realtime/realtime_transcription_session_audio_input.rbs +20 -1
- data/sig/openai/models/realtime/realtime_transcription_session_create_response.rbs +20 -1
- data/sig/openai/models/realtime/realtime_translation_session.rbs +22 -3
- data/sig/openai/models/realtime/realtime_translation_session_create_request.rbs +22 -3
- data/sig/openai/models/realtime/realtime_translation_session_update_request.rbs +22 -3
- data/sig/openai/models/responses/compacted_response.rbs +42 -2
- data/sig/openai/models/responses/response.rbs +42 -1
- data/sig/openai/models/responses/response_compact_params.rbs +60 -2
- data/sig/openai/models/responses/response_create_params.rbs +67 -10
- data/sig/openai/models/responses/response_input_item.rbs +51 -3
- data/sig/openai/models/responses/response_item.rbs +51 -3
- data/sig/openai/models/responses/response_output_item.rbs +51 -3
- data/sig/openai/models/responses/response_tool_search_output_item_param.rbs +188 -15
- data/sig/openai/models/responses/response_usage.rbs +40 -3
- data/sig/openai/models/responses/responses_client_event.rbs +67 -10
- data/sig/openai/models/responses/tool.rbs +188 -15
- data/sig/openai/models/responses_model.rbs +2 -0
- data/sig/openai/resources/admin/organization/projects/service_tier_settings.rbs +25 -0
- data/sig/openai/resources/admin/organization/projects.rbs +2 -0
- data/sig/openai/resources/admin/organization.rbs +2 -2
- data/sig/openai/resources/beta/responses.rbs +3 -0
- data/sig/openai/resources/images.rbs +14 -0
- data/sig/openai/resources/responses.rbs +4 -0
- metadata +16 -1
|
@@ -755,6 +755,32 @@ module OpenAI
|
|
|
755
755
|
enum: -> { OpenAI::Beta::BetaResponseToolSearchOutputItemParam::Tool::ImageGeneration::Background }
|
|
756
756
|
)
|
|
757
757
|
|
|
758
|
+
# @!attribute complexity
|
|
759
|
+
# Computation spent planning the image, independently of rendering quality.
|
|
760
|
+
# Overrides the outer response's `reasoning.effort` for image generation. When
|
|
761
|
+
# omitted, inherits a supported outer reasoning effort or uses the image model's
|
|
762
|
+
# configured default. For SVG output, controls the reference image, not the SVG
|
|
763
|
+
# author's reasoning.
|
|
764
|
+
#
|
|
765
|
+
# @return [Symbol, OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Tool::ImageGeneration::Complexity, nil]
|
|
766
|
+
optional(
|
|
767
|
+
:complexity,
|
|
768
|
+
enum: -> { OpenAI::Beta::BetaResponseToolSearchOutputItemParam::Tool::ImageGeneration::Complexity }
|
|
769
|
+
)
|
|
770
|
+
|
|
771
|
+
# @!attribute frame_count
|
|
772
|
+
# Number of GIF frames. Requires `output_format` to be `gif`. Default: 9.
|
|
773
|
+
#
|
|
774
|
+
# @return [Integer, nil]
|
|
775
|
+
optional :frame_count, Integer
|
|
776
|
+
|
|
777
|
+
# @!attribute frame_duration_ms
|
|
778
|
+
# Duration of each GIF frame in milliseconds, rounded to 10 ms. Requires
|
|
779
|
+
# `output_format` to be `gif`. Default: 200.
|
|
780
|
+
#
|
|
781
|
+
# @return [Integer, nil]
|
|
782
|
+
optional :frame_duration_ms, Integer
|
|
783
|
+
|
|
758
784
|
# @!attribute input_fidelity
|
|
759
785
|
# Control how much effort the model will exert to match the style and features,
|
|
760
786
|
# especially facial features, of input images. Supports `high` and `low` on
|
|
@@ -784,8 +810,8 @@ module OpenAI
|
|
|
784
810
|
# The image generation model to use. One of `gpt-image-1-mini`, `gpt-image-1.5`,
|
|
785
811
|
# `gpt-image-2`, `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`,
|
|
786
812
|
# `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`,
|
|
787
|
-
# `gpt-image-2.5-flare-2026-09-08`,
|
|
788
|
-
# `gpt-image-2`.
|
|
813
|
+
# `gpt-image-2.5-flare-2026-09-08`, `gpt-image-2.6-sunburst`,
|
|
814
|
+
# `gpt-image-2.6-flare`, or `chatgpt-image-latest`. Default: `gpt-image-2`.
|
|
789
815
|
#
|
|
790
816
|
# `gpt-image-1` was shut down on October 23, 2026. Use `gpt-image-2.5-sunburst` or
|
|
791
817
|
# `gpt-image-2.5-flare` instead.
|
|
@@ -812,8 +838,12 @@ module OpenAI
|
|
|
812
838
|
optional :output_compression, Integer
|
|
813
839
|
|
|
814
840
|
# @!attribute output_format
|
|
815
|
-
# The output format of the generated image. One of `png`, `webp`,
|
|
816
|
-
# Default: `png`.
|
|
841
|
+
# The output format of the generated image. One of `png`, `webp`, `jpeg`, `gif`,
|
|
842
|
+
# or `svg`. Default: `png`. GIF and SVG output require a model that supports the
|
|
843
|
+
# selected format. GIF output does not support partial image streaming
|
|
844
|
+
# (`partial_images` greater than `0`), `input_image_mask`, or custom
|
|
845
|
+
# `output_compression`. Responses lifecycle events can still be streamed for GIF
|
|
846
|
+
# output.
|
|
817
847
|
#
|
|
818
848
|
# @return [Symbol, OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Tool::ImageGeneration::OutputFormat, nil]
|
|
819
849
|
optional(
|
|
@@ -858,7 +888,16 @@ module OpenAI
|
|
|
858
888
|
union: -> { OpenAI::Beta::BetaResponseToolSearchOutputItemParam::Tool::ImageGeneration::Size }
|
|
859
889
|
)
|
|
860
890
|
|
|
861
|
-
# @!
|
|
891
|
+
# @!attribute svg
|
|
892
|
+
# SVG author model settings. Requires `output_format` to be `svg`. When SVG model
|
|
893
|
+
# selection is enabled, omitting this object uses the outer response model.
|
|
894
|
+
# Otherwise, the default SVG author is used and explicit model overrides are
|
|
895
|
+
# unavailable.
|
|
896
|
+
#
|
|
897
|
+
# @return [OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Tool::ImageGeneration::Svg, nil]
|
|
898
|
+
optional :svg, -> { OpenAI::Beta::BetaResponseToolSearchOutputItemParam::Tool::ImageGeneration::Svg }
|
|
899
|
+
|
|
900
|
+
# @!method initialize(action: nil, background: nil, complexity: nil, frame_count: nil, frame_duration_ms: nil, input_fidelity: nil, input_image_mask: nil, model: nil, moderation: nil, output_compression: nil, output_format: nil, partial_images: nil, quality: nil, size: nil, svg: nil, type: :image_generation)
|
|
862
901
|
# A tool that generates images using the GPT image models.
|
|
863
902
|
#
|
|
864
903
|
# @param action [Symbol, OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Tool::ImageGeneration::Action]
|
|
@@ -875,6 +914,20 @@ module OpenAI
|
|
|
875
914
|
# `gpt-image-2-2026-04-21`, this support is in preview. When using `transparent`,
|
|
876
915
|
# set the output format to `png` or `webp`.
|
|
877
916
|
#
|
|
917
|
+
# @param complexity [Symbol, OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Tool::ImageGeneration::Complexity]
|
|
918
|
+
# Computation spent planning the image, independently of rendering quality.
|
|
919
|
+
# Overrides the outer response's `reasoning.effort` for image generation. When
|
|
920
|
+
# omitted, inherits a supported outer reasoning effort or uses the image model's
|
|
921
|
+
# configured default. For SVG output, controls the reference image, not the SVG
|
|
922
|
+
# author's reasoning.
|
|
923
|
+
#
|
|
924
|
+
# @param frame_count [Integer]
|
|
925
|
+
# Number of GIF frames. Requires `output_format` to be `gif`. Default: 9.
|
|
926
|
+
#
|
|
927
|
+
# @param frame_duration_ms [Integer]
|
|
928
|
+
# Duration of each GIF frame in milliseconds, rounded to 10 ms. Requires
|
|
929
|
+
# `output_format` to be `gif`. Default: 200.
|
|
930
|
+
#
|
|
878
931
|
# @param input_fidelity [Symbol, OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Tool::ImageGeneration::InputFidelity, nil]
|
|
879
932
|
# Control how much effort the model will exert to match the style and features,
|
|
880
933
|
# especially facial features, of input images. Supports `high` and `low` on
|
|
@@ -889,8 +942,8 @@ module OpenAI
|
|
|
889
942
|
# The image generation model to use. One of `gpt-image-1-mini`, `gpt-image-1.5`,
|
|
890
943
|
# `gpt-image-2`, `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`,
|
|
891
944
|
# `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`,
|
|
892
|
-
# `gpt-image-2.5-flare-2026-09-08`,
|
|
893
|
-
# `gpt-image-2`.
|
|
945
|
+
# `gpt-image-2.5-flare-2026-09-08`, `gpt-image-2.6-sunburst`,
|
|
946
|
+
# `gpt-image-2.6-flare`, or `chatgpt-image-latest`. Default: `gpt-image-2`.
|
|
894
947
|
#
|
|
895
948
|
# `gpt-image-1` was shut down on October 23, 2026. Use `gpt-image-2.5-sunburst` or
|
|
896
949
|
# `gpt-image-2.5-flare` instead.
|
|
@@ -902,8 +955,12 @@ module OpenAI
|
|
|
902
955
|
# Compression level for the output image. Default: 100.
|
|
903
956
|
#
|
|
904
957
|
# @param output_format [Symbol, OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Tool::ImageGeneration::OutputFormat]
|
|
905
|
-
# The output format of the generated image. One of `png`, `webp`,
|
|
906
|
-
# Default: `png`.
|
|
958
|
+
# The output format of the generated image. One of `png`, `webp`, `jpeg`, `gif`,
|
|
959
|
+
# or `svg`. Default: `png`. GIF and SVG output require a model that supports the
|
|
960
|
+
# selected format. GIF output does not support partial image streaming
|
|
961
|
+
# (`partial_images` greater than `0`), `input_image_mask`, or custom
|
|
962
|
+
# `output_compression`. Responses lifecycle events can still be streamed for GIF
|
|
963
|
+
# output.
|
|
907
964
|
#
|
|
908
965
|
# @param partial_images [Integer]
|
|
909
966
|
# Number of partial images to generate in streaming mode, from 0 (default value)
|
|
@@ -927,6 +984,12 @@ module OpenAI
|
|
|
927
984
|
# `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models;
|
|
928
985
|
# `auto` is supported for models that allow automatic sizing.
|
|
929
986
|
#
|
|
987
|
+
# @param svg [OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Tool::ImageGeneration::Svg]
|
|
988
|
+
# SVG author model settings. Requires `output_format` to be `svg`. When SVG model
|
|
989
|
+
# selection is enabled, omitting this object uses the outer response model.
|
|
990
|
+
# Otherwise, the default SVG author is used and explicit model overrides are
|
|
991
|
+
# unavailable.
|
|
992
|
+
#
|
|
930
993
|
# @param type [Symbol, :image_generation]
|
|
931
994
|
# The type of the image generation tool. Always `image_generation`.
|
|
932
995
|
|
|
@@ -966,6 +1029,24 @@ module OpenAI
|
|
|
966
1029
|
# @return [Array<Symbol>]
|
|
967
1030
|
end
|
|
968
1031
|
|
|
1032
|
+
# Computation spent planning the image, independently of rendering quality.
|
|
1033
|
+
# Overrides the outer response's `reasoning.effort` for image generation. When
|
|
1034
|
+
# omitted, inherits a supported outer reasoning effort or uses the image model's
|
|
1035
|
+
# configured default. For SVG output, controls the reference image, not the SVG
|
|
1036
|
+
# author's reasoning.
|
|
1037
|
+
#
|
|
1038
|
+
# @see OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Tool::ImageGeneration#complexity
|
|
1039
|
+
module Complexity
|
|
1040
|
+
extend OpenAI::Internal::Type::Enum
|
|
1041
|
+
|
|
1042
|
+
LOW = :low
|
|
1043
|
+
MEDIUM = :medium
|
|
1044
|
+
HIGH = :high
|
|
1045
|
+
|
|
1046
|
+
# @!method self.values
|
|
1047
|
+
# @return [Array<Symbol>]
|
|
1048
|
+
end
|
|
1049
|
+
|
|
969
1050
|
# Control how much effort the model will exert to match the style and features,
|
|
970
1051
|
# especially facial features, of input images. Supports `high` and `low` on
|
|
971
1052
|
# `gpt-image-1.5`; `gpt-image-1-mini` supports only `low`. For `gpt-image-2`, omit
|
|
@@ -1010,8 +1091,8 @@ module OpenAI
|
|
|
1010
1091
|
# The image generation model to use. One of `gpt-image-1-mini`, `gpt-image-1.5`,
|
|
1011
1092
|
# `gpt-image-2`, `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`,
|
|
1012
1093
|
# `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`,
|
|
1013
|
-
# `gpt-image-2.5-flare-2026-09-08`,
|
|
1014
|
-
# `gpt-image-2`.
|
|
1094
|
+
# `gpt-image-2.5-flare-2026-09-08`, `gpt-image-2.6-sunburst`,
|
|
1095
|
+
# `gpt-image-2.6-flare`, or `chatgpt-image-latest`. Default: `gpt-image-2`.
|
|
1015
1096
|
#
|
|
1016
1097
|
# `gpt-image-1` was shut down on October 23, 2026. Use `gpt-image-2.5-sunburst` or
|
|
1017
1098
|
# `gpt-image-2.5-flare` instead.
|
|
@@ -1070,6 +1151,18 @@ module OpenAI
|
|
|
1070
1151
|
}
|
|
1071
1152
|
)
|
|
1072
1153
|
|
|
1154
|
+
variant(
|
|
1155
|
+
const: -> {
|
|
1156
|
+
OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Tool::ImageGeneration::Model::GPT_IMAGE_2_6_SUNBURST
|
|
1157
|
+
}
|
|
1158
|
+
)
|
|
1159
|
+
|
|
1160
|
+
variant(
|
|
1161
|
+
const: -> {
|
|
1162
|
+
OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Tool::ImageGeneration::Model::GPT_IMAGE_2_6_FLARE
|
|
1163
|
+
}
|
|
1164
|
+
)
|
|
1165
|
+
|
|
1073
1166
|
variant(
|
|
1074
1167
|
const: -> {
|
|
1075
1168
|
OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Tool::ImageGeneration::Model::GPT_IMAGE_1_5
|
|
@@ -1106,6 +1199,8 @@ module OpenAI
|
|
|
1106
1199
|
GPT_IMAGE_2_5_SUNBURST_2026_09_08 = :"gpt-image-2.5-sunburst-2026-09-08"
|
|
1107
1200
|
GPT_IMAGE_2_5_FLARE = :"gpt-image-2.5-flare"
|
|
1108
1201
|
GPT_IMAGE_2_5_FLARE_2026_09_08 = :"gpt-image-2.5-flare-2026-09-08"
|
|
1202
|
+
GPT_IMAGE_2_6_SUNBURST = :"gpt-image-2.6-sunburst"
|
|
1203
|
+
GPT_IMAGE_2_6_FLARE = :"gpt-image-2.6-flare"
|
|
1109
1204
|
GPT_IMAGE_1_5 = :"gpt-image-1.5"
|
|
1110
1205
|
CHATGPT_IMAGE_LATEST = :"chatgpt-image-latest"
|
|
1111
1206
|
|
|
@@ -1125,8 +1220,12 @@ module OpenAI
|
|
|
1125
1220
|
# @return [Array<Symbol>]
|
|
1126
1221
|
end
|
|
1127
1222
|
|
|
1128
|
-
# The output format of the generated image. One of `png`, `webp`,
|
|
1129
|
-
# Default: `png`.
|
|
1223
|
+
# The output format of the generated image. One of `png`, `webp`, `jpeg`, `gif`,
|
|
1224
|
+
# or `svg`. Default: `png`. GIF and SVG output require a model that supports the
|
|
1225
|
+
# selected format. GIF output does not support partial image streaming
|
|
1226
|
+
# (`partial_images` greater than `0`), `input_image_mask`, or custom
|
|
1227
|
+
# `output_compression`. Responses lifecycle events can still be streamed for GIF
|
|
1228
|
+
# output.
|
|
1130
1229
|
#
|
|
1131
1230
|
# @see OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Tool::ImageGeneration#output_format
|
|
1132
1231
|
module OutputFormat
|
|
@@ -1135,6 +1234,8 @@ module OpenAI
|
|
|
1135
1234
|
PNG = :png
|
|
1136
1235
|
WEBP = :webp
|
|
1137
1236
|
JPEG = :jpeg
|
|
1237
|
+
GIF = :gif
|
|
1238
|
+
SVG = :svg
|
|
1138
1239
|
|
|
1139
1240
|
# @!method self.values
|
|
1140
1241
|
# @return [Array<Symbol>]
|
|
@@ -1222,6 +1323,78 @@ module OpenAI
|
|
|
1222
1323
|
|
|
1223
1324
|
# @!endgroup
|
|
1224
1325
|
end
|
|
1326
|
+
|
|
1327
|
+
# @see OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Tool::ImageGeneration#svg
|
|
1328
|
+
class Svg < OpenAI::Internal::Type::BaseModel
|
|
1329
|
+
# @!attribute model
|
|
1330
|
+
#
|
|
1331
|
+
# @return [String, nil]
|
|
1332
|
+
optional :model, String
|
|
1333
|
+
|
|
1334
|
+
# @!attribute reasoning
|
|
1335
|
+
# Reasoning effort for SVG authoring. When omitted, uses the author model's
|
|
1336
|
+
# default in both Images and Responses.
|
|
1337
|
+
#
|
|
1338
|
+
# @return [OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Tool::ImageGeneration::Svg::Reasoning, nil]
|
|
1339
|
+
optional(
|
|
1340
|
+
:reasoning,
|
|
1341
|
+
-> {
|
|
1342
|
+
OpenAI::Beta::BetaResponseToolSearchOutputItemParam::Tool::ImageGeneration::Svg::Reasoning
|
|
1343
|
+
},
|
|
1344
|
+
nil?: true
|
|
1345
|
+
)
|
|
1346
|
+
|
|
1347
|
+
# @!method initialize(model: nil, reasoning: nil)
|
|
1348
|
+
# SVG author model settings. Requires `output_format` to be `svg`. When SVG model
|
|
1349
|
+
# selection is enabled, omitting this object uses the outer response model.
|
|
1350
|
+
# Otherwise, the default SVG author is used and explicit model overrides are
|
|
1351
|
+
# unavailable.
|
|
1352
|
+
#
|
|
1353
|
+
# @param model [String]
|
|
1354
|
+
#
|
|
1355
|
+
# @param reasoning [OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Tool::ImageGeneration::Svg::Reasoning, nil]
|
|
1356
|
+
# Reasoning effort for SVG authoring. When omitted, uses the author model's
|
|
1357
|
+
# default in both Images and Responses.
|
|
1358
|
+
|
|
1359
|
+
# @see OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Tool::ImageGeneration::Svg#reasoning
|
|
1360
|
+
class Reasoning < OpenAI::Internal::Type::BaseModel
|
|
1361
|
+
# @!attribute effort
|
|
1362
|
+
# Controls how much effort the model should spend on reasoning for this request.
|
|
1363
|
+
#
|
|
1364
|
+
# @return [Symbol, OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Tool::ImageGeneration::Svg::Reasoning::Effort, nil]
|
|
1365
|
+
optional(
|
|
1366
|
+
:effort,
|
|
1367
|
+
enum: -> {
|
|
1368
|
+
OpenAI::Beta::BetaResponseToolSearchOutputItemParam::Tool::ImageGeneration::Svg::Reasoning::Effort
|
|
1369
|
+
}
|
|
1370
|
+
)
|
|
1371
|
+
|
|
1372
|
+
# @!method initialize(effort: nil)
|
|
1373
|
+
# Reasoning effort for SVG authoring. When omitted, uses the author model's
|
|
1374
|
+
# default in both Images and Responses.
|
|
1375
|
+
#
|
|
1376
|
+
# @param effort [Symbol, OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Tool::ImageGeneration::Svg::Reasoning::Effort]
|
|
1377
|
+
# Controls how much effort the model should spend on reasoning for this request.
|
|
1378
|
+
|
|
1379
|
+
# Controls how much effort the model should spend on reasoning for this request.
|
|
1380
|
+
#
|
|
1381
|
+
# @see OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam::Tool::ImageGeneration::Svg::Reasoning#effort
|
|
1382
|
+
module Effort
|
|
1383
|
+
extend OpenAI::Internal::Type::Enum
|
|
1384
|
+
|
|
1385
|
+
NONE = :none
|
|
1386
|
+
MINIMAL = :minimal
|
|
1387
|
+
LOW = :low
|
|
1388
|
+
MEDIUM = :medium
|
|
1389
|
+
HIGH = :high
|
|
1390
|
+
XHIGH = :xhigh
|
|
1391
|
+
MAX = :max
|
|
1392
|
+
|
|
1393
|
+
# @!method self.values
|
|
1394
|
+
# @return [Array<Symbol>]
|
|
1395
|
+
end
|
|
1396
|
+
end
|
|
1397
|
+
end
|
|
1225
1398
|
end
|
|
1226
1399
|
|
|
1227
1400
|
class LocalShell < OpenAI::Internal::Type::BaseModel
|
|
@@ -68,7 +68,15 @@ module OpenAI
|
|
|
68
68
|
# @return [Integer]
|
|
69
69
|
required :cached_tokens, Integer
|
|
70
70
|
|
|
71
|
-
# @!
|
|
71
|
+
# @!attribute cache_write_tokens_details
|
|
72
|
+
#
|
|
73
|
+
# @return [OpenAI::Models::Beta::BetaResponseUsage::InputTokensDetails::CacheWriteTokensDetails, nil]
|
|
74
|
+
optional(
|
|
75
|
+
:cache_write_tokens_details,
|
|
76
|
+
-> { OpenAI::Beta::BetaResponseUsage::InputTokensDetails::CacheWriteTokensDetails }
|
|
77
|
+
)
|
|
78
|
+
|
|
79
|
+
# @!method initialize(cache_write_tokens:, cached_tokens:, cache_write_tokens_details: nil)
|
|
72
80
|
# A detailed breakdown of the input tokens.
|
|
73
81
|
#
|
|
74
82
|
# @param cache_write_tokens [Integer]
|
|
@@ -77,6 +85,30 @@ module OpenAI
|
|
|
77
85
|
# @param cached_tokens [Integer]
|
|
78
86
|
# The number of tokens that were retrieved from the cache.
|
|
79
87
|
# [More on prompt caching](https://developers.openai.com/api/docs/guides/prompt-caching).
|
|
88
|
+
#
|
|
89
|
+
# @param cache_write_tokens_details [OpenAI::Models::Beta::BetaResponseUsage::InputTokensDetails::CacheWriteTokensDetails]
|
|
90
|
+
|
|
91
|
+
# @see OpenAI::Models::Beta::BetaResponseUsage::InputTokensDetails#cache_write_tokens_details
|
|
92
|
+
class CacheWriteTokensDetails < OpenAI::Internal::Type::BaseModel
|
|
93
|
+
# @!attribute ttl_12h_tokens
|
|
94
|
+
# The number of input tokens written with 12-hour retention.
|
|
95
|
+
#
|
|
96
|
+
# @return [Integer]
|
|
97
|
+
required :ttl_12h_tokens, Integer
|
|
98
|
+
|
|
99
|
+
# @!attribute ttl_30m_tokens
|
|
100
|
+
# The number of input tokens written with 30-minute retention.
|
|
101
|
+
#
|
|
102
|
+
# @return [Integer]
|
|
103
|
+
required :ttl_30m_tokens, Integer
|
|
104
|
+
|
|
105
|
+
# @!method initialize(ttl_12h_tokens:, ttl_30m_tokens:)
|
|
106
|
+
# @param ttl_12h_tokens [Integer]
|
|
107
|
+
# The number of input tokens written with 12-hour retention.
|
|
108
|
+
#
|
|
109
|
+
# @param ttl_30m_tokens [Integer]
|
|
110
|
+
# The number of input tokens written with 30-minute retention.
|
|
111
|
+
end
|
|
80
112
|
end
|
|
81
113
|
|
|
82
114
|
# @see OpenAI::Models::Beta::BetaResponseUsage#output_tokens_details
|
|
@@ -107,6 +107,12 @@ module OpenAI
|
|
|
107
107
|
# @return [Boolean, nil]
|
|
108
108
|
optional :generate, OpenAI::Internal::Type::Boolean
|
|
109
109
|
|
|
110
|
+
# @!attribute image
|
|
111
|
+
# Request level image options.
|
|
112
|
+
#
|
|
113
|
+
# @return [OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::Image, nil]
|
|
114
|
+
optional :image, -> { OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Image }
|
|
115
|
+
|
|
110
116
|
# @!attribute include
|
|
111
117
|
# Specify additional output data to include in the model response. Currently
|
|
112
118
|
# supported values are:
|
|
@@ -253,7 +259,7 @@ module OpenAI
|
|
|
253
259
|
# request can write up to four breakpoints. For cache matching, OpenAI considers
|
|
254
260
|
# up to the latest 80 breakpoints in the conversation, without a content-block
|
|
255
261
|
# lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The
|
|
256
|
-
# `ttl` defaults to `30m
|
|
262
|
+
# `ttl` defaults to `30m`. Supported lifetimes depend on the API. See the
|
|
257
263
|
# [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching)
|
|
258
264
|
# for current details.
|
|
259
265
|
#
|
|
@@ -490,7 +496,7 @@ module OpenAI
|
|
|
490
496
|
# @return [String, nil]
|
|
491
497
|
optional :user, String
|
|
492
498
|
|
|
493
|
-
# @!method initialize(access_programs: nil, background: nil, context_management: nil, conversation: nil, generate: nil, include: nil, input: nil, instructions: nil, max_output_tokens: nil, max_tool_calls: nil, metadata: nil, model: nil, moderation: nil, multi_agent: nil, parallel_tool_calls: nil, previous_response_id: nil, prompt: nil, prompt_cache_key: nil, prompt_cache_options: nil, prompt_cache_retention: nil, reasoning: nil, safety_identifier: nil, service_tier: nil, store: nil, stream: nil, stream_id: nil, stream_options: nil, temperature: nil, text: nil, tool_choice: nil, tools: nil, top_logprobs: nil, top_p: nil, truncation: nil, user: nil, type: :"response.create")
|
|
499
|
+
# @!method initialize(access_programs: nil, background: nil, context_management: nil, conversation: nil, generate: nil, image: nil, include: nil, input: nil, instructions: nil, max_output_tokens: nil, max_tool_calls: nil, metadata: nil, model: nil, moderation: nil, multi_agent: nil, parallel_tool_calls: nil, previous_response_id: nil, prompt: nil, prompt_cache_key: nil, prompt_cache_options: nil, prompt_cache_retention: nil, reasoning: nil, safety_identifier: nil, service_tier: nil, store: nil, stream: nil, stream_id: nil, stream_options: nil, temperature: nil, text: nil, tool_choice: nil, tools: nil, top_logprobs: nil, top_p: nil, truncation: nil, user: nil, type: :"response.create")
|
|
494
500
|
# Client event for creating a response over a persistent WebSocket connection.
|
|
495
501
|
# This payload uses the same top-level fields as `POST /v1/responses`, plus
|
|
496
502
|
# WebSocket-only envelope metadata.
|
|
@@ -522,6 +528,9 @@ module OpenAI
|
|
|
522
528
|
# to false to prepare request state without model output; the response ID can be
|
|
523
529
|
# used as previous_response_id on a later turn.
|
|
524
530
|
#
|
|
531
|
+
# @param image [OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::Image]
|
|
532
|
+
# Request level image options.
|
|
533
|
+
#
|
|
525
534
|
# @param include [Array<Symbol, OpenAI::Models::Beta::BetaResponseIncludable>, nil]
|
|
526
535
|
# Specify additional output data to include in the model response. Currently
|
|
527
536
|
# supported values are:
|
|
@@ -617,7 +626,7 @@ module OpenAI
|
|
|
617
626
|
# request can write up to four breakpoints. For cache matching, OpenAI considers
|
|
618
627
|
# up to the latest 80 breakpoints in the conversation, without a content-block
|
|
619
628
|
# lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The
|
|
620
|
-
# `ttl` defaults to `30m
|
|
629
|
+
# `ttl` defaults to `30m`. Supported lifetimes depend on the API. See the
|
|
621
630
|
# [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching)
|
|
622
631
|
# for current details.
|
|
623
632
|
#
|
|
@@ -874,6 +883,44 @@ module OpenAI
|
|
|
874
883
|
# @return [Array(String, OpenAI::Models::Beta::BetaResponseConversationParam)]
|
|
875
884
|
end
|
|
876
885
|
|
|
886
|
+
# @see OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate#image
|
|
887
|
+
class Image < OpenAI::Internal::Type::BaseModel
|
|
888
|
+
# @!attribute context_compression
|
|
889
|
+
# Controls image context optimization. Defaults to `auto`, which uses the model,
|
|
890
|
+
# transport, and input to select a policy. Use `enabled` to require compression
|
|
891
|
+
# support or `disabled` to turn it off.
|
|
892
|
+
#
|
|
893
|
+
# @return [Symbol, OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::Image::ContextCompression, nil]
|
|
894
|
+
optional(
|
|
895
|
+
:context_compression,
|
|
896
|
+
enum: -> { OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Image::ContextCompression }
|
|
897
|
+
)
|
|
898
|
+
|
|
899
|
+
# @!method initialize(context_compression: nil)
|
|
900
|
+
# Request level image options.
|
|
901
|
+
#
|
|
902
|
+
# @param context_compression [Symbol, OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::Image::ContextCompression]
|
|
903
|
+
# Controls image context optimization. Defaults to `auto`, which uses the model,
|
|
904
|
+
# transport, and input to select a policy. Use `enabled` to require compression
|
|
905
|
+
# support or `disabled` to turn it off.
|
|
906
|
+
|
|
907
|
+
# Controls image context optimization. Defaults to `auto`, which uses the model,
|
|
908
|
+
# transport, and input to select a policy. Use `enabled` to require compression
|
|
909
|
+
# support or `disabled` to turn it off.
|
|
910
|
+
#
|
|
911
|
+
# @see OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::Image#context_compression
|
|
912
|
+
module ContextCompression
|
|
913
|
+
extend OpenAI::Internal::Type::Enum
|
|
914
|
+
|
|
915
|
+
AUTO = :auto
|
|
916
|
+
ENABLED = :enabled
|
|
917
|
+
DISABLED = :disabled
|
|
918
|
+
|
|
919
|
+
# @!method self.values
|
|
920
|
+
# @return [Array<Symbol>]
|
|
921
|
+
end
|
|
922
|
+
end
|
|
923
|
+
|
|
877
924
|
# Text, image, or file inputs to the model, used to generate a response.
|
|
878
925
|
#
|
|
879
926
|
# Learn more:
|
|
@@ -1884,8 +1931,8 @@ module OpenAI
|
|
|
1884
1931
|
|
|
1885
1932
|
# @!attribute ttl
|
|
1886
1933
|
# The minimum lifetime applied to every implicit and explicit cache breakpoint
|
|
1887
|
-
# written by the request.
|
|
1888
|
-
#
|
|
1934
|
+
# written by the request. Supported values are `30m` (the default) and `12h`. The
|
|
1935
|
+
# backend may retain cache entries for longer.
|
|
1889
1936
|
#
|
|
1890
1937
|
# @return [Symbol, OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::PromptCacheOptions::Ttl, nil]
|
|
1891
1938
|
optional(
|
|
@@ -1900,7 +1947,7 @@ module OpenAI
|
|
|
1900
1947
|
# request can write up to four breakpoints. For cache matching, OpenAI considers
|
|
1901
1948
|
# up to the latest 80 breakpoints in the conversation, without a content-block
|
|
1902
1949
|
# lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The
|
|
1903
|
-
# `ttl` defaults to `30m
|
|
1950
|
+
# `ttl` defaults to `30m`. Supported lifetimes depend on the API. See the
|
|
1904
1951
|
# [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching)
|
|
1905
1952
|
# for current details.
|
|
1906
1953
|
#
|
|
@@ -1922,8 +1969,8 @@ module OpenAI
|
|
|
1922
1969
|
#
|
|
1923
1970
|
# @param ttl [Symbol, OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::PromptCacheOptions::Ttl]
|
|
1924
1971
|
# The minimum lifetime applied to every implicit and explicit cache breakpoint
|
|
1925
|
-
# written by the request.
|
|
1926
|
-
#
|
|
1972
|
+
# written by the request. Supported values are `30m` (the default) and `12h`. The
|
|
1973
|
+
# backend may retain cache entries for longer.
|
|
1927
1974
|
|
|
1928
1975
|
# Controls whether OpenAI automatically creates an implicit cache breakpoint.
|
|
1929
1976
|
# Defaults to `implicit`. With `implicit`, OpenAI creates one implicit breakpoint
|
|
@@ -1944,14 +1991,15 @@ module OpenAI
|
|
|
1944
1991
|
end
|
|
1945
1992
|
|
|
1946
1993
|
# The minimum lifetime applied to every implicit and explicit cache breakpoint
|
|
1947
|
-
# written by the request.
|
|
1948
|
-
#
|
|
1994
|
+
# written by the request. Supported values are `30m` (the default) and `12h`. The
|
|
1995
|
+
# backend may retain cache entries for longer.
|
|
1949
1996
|
#
|
|
1950
1997
|
# @see OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::PromptCacheOptions#ttl
|
|
1951
1998
|
module Ttl
|
|
1952
1999
|
extend OpenAI::Internal::Type::Enum
|
|
1953
2000
|
|
|
1954
2001
|
TTL_30M = :"30m"
|
|
2002
|
+
TTL_12H = :"12h"
|
|
1955
2003
|
|
|
1956
2004
|
# @!method self.values
|
|
1957
2005
|
# @return [Array<Symbol>]
|