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.
Files changed (154) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +23 -0
  3. data/README.md +1 -1
  4. data/lib/openai/client.rb +1 -1
  5. data/lib/openai/helpers/data_residency.rb +4 -1
  6. data/lib/openai/models/admin/organization/projects/project_optional_service_tier.rb +24 -0
  7. data/lib/openai/models/admin/organization/projects/project_service_tier_settings.rb +88 -0
  8. data/lib/openai/models/admin/organization/projects/service_tier_setting_retrieve_params.rb +29 -0
  9. data/lib/openai/models/admin/organization/projects/service_tier_setting_update_params.rb +92 -0
  10. data/lib/openai/models/all_models.rb +1 -0
  11. data/lib/openai/models/beta/beta_compacted_response.rb +34 -1
  12. data/lib/openai/models/beta/beta_response.rb +35 -1
  13. data/lib/openai/models/beta/beta_response_input_item.rb +45 -1
  14. data/lib/openai/models/beta/beta_response_item.rb +45 -1
  15. data/lib/openai/models/beta/beta_response_output_item.rb +45 -1
  16. data/lib/openai/models/beta/beta_response_tool_search_output_item_param.rb +186 -13
  17. data/lib/openai/models/beta/beta_response_usage.rb +33 -1
  18. data/lib/openai/models/beta/beta_responses_client_event.rb +58 -10
  19. data/lib/openai/models/beta/beta_tool.rb +164 -13
  20. data/lib/openai/models/beta/response_compact_params.rb +47 -4
  21. data/lib/openai/models/beta/response_create_params.rb +54 -10
  22. data/lib/openai/models/beta/session_turn_error.rb +3 -0
  23. data/lib/openai/models/chat/completion_create_params.rb +3 -3
  24. data/lib/openai/models/conversations/conversation_item.rb +45 -1
  25. data/lib/openai/models/image_edit_params.rb +72 -16
  26. data/lib/openai/models/image_generate_params.rb +160 -8
  27. data/lib/openai/models/image_model.rb +2 -0
  28. data/lib/openai/models/images_response.rb +55 -4
  29. data/lib/openai/models/realtime/realtime_audio_config_input.rb +14 -1
  30. data/lib/openai/models/realtime/realtime_session_create_response.rb +14 -1
  31. data/lib/openai/models/realtime/realtime_transcription_session_audio_input.rb +14 -1
  32. data/lib/openai/models/realtime/realtime_transcription_session_create_response.rb +14 -1
  33. data/lib/openai/models/realtime/realtime_translation_session.rb +14 -1
  34. data/lib/openai/models/realtime/realtime_translation_session_create_request.rb +14 -1
  35. data/lib/openai/models/realtime/realtime_translation_session_update_request.rb +14 -1
  36. data/lib/openai/models/responses/compacted_response.rb +37 -1
  37. data/lib/openai/models/responses/response.rb +35 -1
  38. data/lib/openai/models/responses/response_compact_params.rb +53 -4
  39. data/lib/openai/models/responses/response_create_params.rb +57 -10
  40. data/lib/openai/models/responses/response_input_item.rb +45 -1
  41. data/lib/openai/models/responses/response_item.rb +45 -1
  42. data/lib/openai/models/responses/response_output_item.rb +45 -1
  43. data/lib/openai/models/responses/response_tool_search_output_item_param.rb +186 -13
  44. data/lib/openai/models/responses/response_usage.rb +33 -1
  45. data/lib/openai/models/responses/responses_client_event.rb +58 -10
  46. data/lib/openai/models/responses/tool.rb +164 -13
  47. data/lib/openai/models/responses_model.rb +1 -0
  48. data/lib/openai/resources/admin/organization/projects/service_tier_settings.rb +77 -0
  49. data/lib/openai/resources/admin/organization/projects.rb +6 -0
  50. data/lib/openai/resources/admin/organization.rb +6 -6
  51. data/lib/openai/resources/beta/responses.rb +18 -9
  52. data/lib/openai/resources/chat/completions.rb +2 -2
  53. data/lib/openai/resources/images.rb +102 -18
  54. data/lib/openai/resources/responses.rb +15 -6
  55. data/lib/openai/version.rb +1 -1
  56. data/lib/openai.rb +5 -0
  57. data/rbi/openai/models/admin/organization/projects/project_optional_service_tier.rbi +45 -0
  58. data/rbi/openai/models/admin/organization/projects/project_service_tier_settings.rbi +143 -0
  59. data/rbi/openai/models/admin/organization/projects/service_tier_setting_retrieve_params.rbi +63 -0
  60. data/rbi/openai/models/admin/organization/projects/service_tier_setting_update_params.rbi +183 -0
  61. data/rbi/openai/models/all_models.rbi +1 -0
  62. data/rbi/openai/models/beta/beta_compacted_response.rbi +67 -1
  63. data/rbi/openai/models/beta/beta_response.rbi +63 -0
  64. data/rbi/openai/models/beta/beta_response_input_item.rbi +82 -1
  65. data/rbi/openai/models/beta/beta_response_item.rbi +82 -1
  66. data/rbi/openai/models/beta/beta_response_output_item.rbi +82 -1
  67. data/rbi/openai/models/beta/beta_response_tool_search_output_item_param.rbi +338 -13
  68. data/rbi/openai/models/beta/beta_response_usage.rbi +66 -3
  69. data/rbi/openai/models/beta/beta_responses_client_event.rbi +118 -9
  70. data/rbi/openai/models/beta/beta_tool.rbi +245 -13
  71. data/rbi/openai/models/beta/response_compact_params.rbi +84 -3
  72. data/rbi/openai/models/beta/response_create_params.rbi +91 -9
  73. data/rbi/openai/models/beta/session_turn_error.rbi +3 -0
  74. data/rbi/openai/models/chat/completion_create_params.rbi +3 -3
  75. data/rbi/openai/models/conversations/conversation_item.rbi +84 -1
  76. data/rbi/openai/models/image_edit_params.rbi +76 -14
  77. data/rbi/openai/models/image_generate_params.rbi +218 -6
  78. data/rbi/openai/models/image_model.rbi +2 -0
  79. data/rbi/openai/models/images_response.rbi +90 -3
  80. data/rbi/openai/models/realtime/realtime_audio_config_input.rbi +17 -1
  81. data/rbi/openai/models/realtime/realtime_session_create_response.rbi +17 -1
  82. data/rbi/openai/models/realtime/realtime_transcription_session_audio_input.rbi +17 -1
  83. data/rbi/openai/models/realtime/realtime_transcription_session_create_response.rbi +17 -1
  84. data/rbi/openai/models/realtime/realtime_translation_session.rbi +19 -3
  85. data/rbi/openai/models/realtime/realtime_translation_session_create_request.rbi +19 -3
  86. data/rbi/openai/models/realtime/realtime_translation_session_update_request.rbi +19 -3
  87. data/rbi/openai/models/responses/compacted_response.rbi +67 -1
  88. data/rbi/openai/models/responses/response.rbi +63 -0
  89. data/rbi/openai/models/responses/response_compact_params.rbi +91 -3
  90. data/rbi/openai/models/responses/response_create_params.rbi +97 -9
  91. data/rbi/openai/models/responses/response_input_item.rbi +82 -1
  92. data/rbi/openai/models/responses/response_item.rbi +82 -1
  93. data/rbi/openai/models/responses/response_output_item.rbi +82 -1
  94. data/rbi/openai/models/responses/response_tool_search_output_item_param.rbi +340 -13
  95. data/rbi/openai/models/responses/response_usage.rbi +66 -3
  96. data/rbi/openai/models/responses/responses_client_event.rbi +118 -9
  97. data/rbi/openai/models/responses/tool.rbi +248 -13
  98. data/rbi/openai/models/responses_model.rbi +1 -0
  99. data/rbi/openai/resources/admin/organization/projects/service_tier_settings.rbi +67 -0
  100. data/rbi/openai/resources/admin/organization/projects.rbi +3 -0
  101. data/rbi/openai/resources/admin/organization.rbi +3 -3
  102. data/rbi/openai/resources/beta/responses.rbi +15 -6
  103. data/rbi/openai/resources/chat/completions.rbi +2 -2
  104. data/rbi/openai/resources/images.rbi +98 -14
  105. data/rbi/openai/resources/responses.rbi +14 -3
  106. data/sig/openai/models/admin/organization/projects/project_optional_service_tier.rbs +23 -0
  107. data/sig/openai/models/admin/organization/projects/project_service_tier_settings.rbs +72 -0
  108. data/sig/openai/models/admin/organization/projects/service_tier_setting_retrieve_params.rbs +32 -0
  109. data/sig/openai/models/admin/organization/projects/service_tier_setting_update_params.rbs +91 -0
  110. data/sig/openai/models/all_models.rbs +2 -0
  111. data/sig/openai/models/beta/beta_compacted_response.rbs +42 -2
  112. data/sig/openai/models/beta/beta_response.rbs +42 -1
  113. data/sig/openai/models/beta/beta_response_input_item.rbs +51 -3
  114. data/sig/openai/models/beta/beta_response_item.rbs +51 -3
  115. data/sig/openai/models/beta/beta_response_output_item.rbs +51 -3
  116. data/sig/openai/models/beta/beta_response_tool_search_output_item_param.rbs +188 -15
  117. data/sig/openai/models/beta/beta_response_usage.rbs +40 -3
  118. data/sig/openai/models/beta/beta_responses_client_event.rbs +67 -10
  119. data/sig/openai/models/beta/beta_tool.rbs +188 -15
  120. data/sig/openai/models/beta/response_compact_params.rbs +58 -2
  121. data/sig/openai/models/beta/response_create_params.rbs +67 -10
  122. data/sig/openai/models/beta/session_turn_error.rbs +4 -0
  123. data/sig/openai/models/chat/completion_create_params.rbs +3 -3
  124. data/sig/openai/models/conversations/conversation_item.rbs +51 -3
  125. data/sig/openai/models/image_edit_params.rbs +63 -12
  126. data/sig/openai/models/image_generate_params.rbs +150 -5
  127. data/sig/openai/models/image_model.rbs +4 -0
  128. data/sig/openai/models/images_response.rbs +59 -4
  129. data/sig/openai/models/realtime/realtime_audio_config_input.rbs +20 -1
  130. data/sig/openai/models/realtime/realtime_session_create_response.rbs +20 -1
  131. data/sig/openai/models/realtime/realtime_transcription_session_audio_input.rbs +20 -1
  132. data/sig/openai/models/realtime/realtime_transcription_session_create_response.rbs +20 -1
  133. data/sig/openai/models/realtime/realtime_translation_session.rbs +22 -3
  134. data/sig/openai/models/realtime/realtime_translation_session_create_request.rbs +22 -3
  135. data/sig/openai/models/realtime/realtime_translation_session_update_request.rbs +22 -3
  136. data/sig/openai/models/responses/compacted_response.rbs +42 -2
  137. data/sig/openai/models/responses/response.rbs +42 -1
  138. data/sig/openai/models/responses/response_compact_params.rbs +60 -2
  139. data/sig/openai/models/responses/response_create_params.rbs +67 -10
  140. data/sig/openai/models/responses/response_input_item.rbs +51 -3
  141. data/sig/openai/models/responses/response_item.rbs +51 -3
  142. data/sig/openai/models/responses/response_output_item.rbs +51 -3
  143. data/sig/openai/models/responses/response_tool_search_output_item_param.rbs +188 -15
  144. data/sig/openai/models/responses/response_usage.rbs +40 -3
  145. data/sig/openai/models/responses/responses_client_event.rbs +67 -10
  146. data/sig/openai/models/responses/tool.rbs +188 -15
  147. data/sig/openai/models/responses_model.rbs +2 -0
  148. data/sig/openai/resources/admin/organization/projects/service_tier_settings.rbs +25 -0
  149. data/sig/openai/resources/admin/organization/projects.rbs +2 -0
  150. data/sig/openai/resources/admin/organization.rbs +2 -2
  151. data/sig/openai/resources/beta/responses.rbs +3 -0
  152. data/sig/openai/resources/images.rbs +14 -0
  153. data/sig/openai/resources/responses.rbs +4 -0
  154. metadata +16 -1
@@ -631,6 +631,29 @@ module OpenAI
631
631
  # @return [Symbol, OpenAI::Models::Beta::BetaTool::ImageGeneration::Background, nil]
632
632
  optional :background, enum: -> { OpenAI::Beta::BetaTool::ImageGeneration::Background }
633
633
 
634
+ # @!attribute complexity
635
+ # Computation spent planning the image, independently of rendering quality.
636
+ # Overrides the outer response's `reasoning.effort` for image generation. When
637
+ # omitted, inherits a supported outer reasoning effort or uses the image model's
638
+ # configured default. For SVG output, controls the reference image, not the SVG
639
+ # author's reasoning.
640
+ #
641
+ # @return [Symbol, OpenAI::Models::Beta::BetaTool::ImageGeneration::Complexity, nil]
642
+ optional :complexity, enum: -> { OpenAI::Beta::BetaTool::ImageGeneration::Complexity }
643
+
644
+ # @!attribute frame_count
645
+ # Number of GIF frames. Requires `output_format` to be `gif`. Default: 9.
646
+ #
647
+ # @return [Integer, nil]
648
+ optional :frame_count, Integer
649
+
650
+ # @!attribute frame_duration_ms
651
+ # Duration of each GIF frame in milliseconds, rounded to 10 ms. Requires
652
+ # `output_format` to be `gif`. Default: 200.
653
+ #
654
+ # @return [Integer, nil]
655
+ optional :frame_duration_ms, Integer
656
+
634
657
  # @!attribute input_fidelity
635
658
  # Control how much effort the model will exert to match the style and features,
636
659
  # especially facial features, of input images. Supports `high` and `low` on
@@ -657,8 +680,8 @@ module OpenAI
657
680
  # The image generation model to use. One of `gpt-image-1-mini`, `gpt-image-1.5`,
658
681
  # `gpt-image-2`, `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`,
659
682
  # `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`,
660
- # `gpt-image-2.5-flare-2026-09-08`, or `chatgpt-image-latest`. Default:
661
- # `gpt-image-2`.
683
+ # `gpt-image-2.5-flare-2026-09-08`, `gpt-image-2.6-sunburst`,
684
+ # `gpt-image-2.6-flare`, or `chatgpt-image-latest`. Default: `gpt-image-2`.
662
685
  #
663
686
  # `gpt-image-1` was shut down on October 23, 2026. Use `gpt-image-2.5-sunburst` or
664
687
  # `gpt-image-2.5-flare` instead.
@@ -679,8 +702,12 @@ module OpenAI
679
702
  optional :output_compression, Integer
680
703
 
681
704
  # @!attribute output_format
682
- # The output format of the generated image. One of `png`, `webp`, or `jpeg`.
683
- # Default: `png`.
705
+ # The output format of the generated image. One of `png`, `webp`, `jpeg`, `gif`,
706
+ # or `svg`. Default: `png`. GIF and SVG output require a model that supports the
707
+ # selected format. GIF output does not support partial image streaming
708
+ # (`partial_images` greater than `0`), `input_image_mask`, or custom
709
+ # `output_compression`. Responses lifecycle events can still be streamed for GIF
710
+ # output.
684
711
  #
685
712
  # @return [Symbol, OpenAI::Models::Beta::BetaTool::ImageGeneration::OutputFormat, nil]
686
713
  optional :output_format, enum: -> { OpenAI::Beta::BetaTool::ImageGeneration::OutputFormat }
@@ -716,7 +743,16 @@ module OpenAI
716
743
  # @return [String, Symbol, OpenAI::Models::Beta::BetaTool::ImageGeneration::Size, nil]
717
744
  optional :size, union: -> { OpenAI::Beta::BetaTool::ImageGeneration::Size }
718
745
 
719
- # @!method initialize(action: nil, background: 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, type: :image_generation)
746
+ # @!attribute svg
747
+ # SVG author model settings. Requires `output_format` to be `svg`. When SVG model
748
+ # selection is enabled, omitting this object uses the outer response model.
749
+ # Otherwise, the default SVG author is used and explicit model overrides are
750
+ # unavailable.
751
+ #
752
+ # @return [OpenAI::Models::Beta::BetaTool::ImageGeneration::Svg, nil]
753
+ optional :svg, -> { OpenAI::Beta::BetaTool::ImageGeneration::Svg }
754
+
755
+ # @!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)
720
756
  # A tool that generates images using the GPT image models.
721
757
  #
722
758
  # @param action [Symbol, OpenAI::Models::Beta::BetaTool::ImageGeneration::Action]
@@ -733,6 +769,20 @@ module OpenAI
733
769
  # `gpt-image-2-2026-04-21`, this support is in preview. When using `transparent`,
734
770
  # set the output format to `png` or `webp`.
735
771
  #
772
+ # @param complexity [Symbol, OpenAI::Models::Beta::BetaTool::ImageGeneration::Complexity]
773
+ # Computation spent planning the image, independently of rendering quality.
774
+ # Overrides the outer response's `reasoning.effort` for image generation. When
775
+ # omitted, inherits a supported outer reasoning effort or uses the image model's
776
+ # configured default. For SVG output, controls the reference image, not the SVG
777
+ # author's reasoning.
778
+ #
779
+ # @param frame_count [Integer]
780
+ # Number of GIF frames. Requires `output_format` to be `gif`. Default: 9.
781
+ #
782
+ # @param frame_duration_ms [Integer]
783
+ # Duration of each GIF frame in milliseconds, rounded to 10 ms. Requires
784
+ # `output_format` to be `gif`. Default: 200.
785
+ #
736
786
  # @param input_fidelity [Symbol, OpenAI::Models::Beta::BetaTool::ImageGeneration::InputFidelity, nil]
737
787
  # Control how much effort the model will exert to match the style and features,
738
788
  # especially facial features, of input images. Supports `high` and `low` on
@@ -747,8 +797,8 @@ module OpenAI
747
797
  # The image generation model to use. One of `gpt-image-1-mini`, `gpt-image-1.5`,
748
798
  # `gpt-image-2`, `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`,
749
799
  # `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`,
750
- # `gpt-image-2.5-flare-2026-09-08`, or `chatgpt-image-latest`. Default:
751
- # `gpt-image-2`.
800
+ # `gpt-image-2.5-flare-2026-09-08`, `gpt-image-2.6-sunburst`,
801
+ # `gpt-image-2.6-flare`, or `chatgpt-image-latest`. Default: `gpt-image-2`.
752
802
  #
753
803
  # `gpt-image-1` was shut down on October 23, 2026. Use `gpt-image-2.5-sunburst` or
754
804
  # `gpt-image-2.5-flare` instead.
@@ -760,8 +810,12 @@ module OpenAI
760
810
  # Compression level for the output image. Default: 100.
761
811
  #
762
812
  # @param output_format [Symbol, OpenAI::Models::Beta::BetaTool::ImageGeneration::OutputFormat]
763
- # The output format of the generated image. One of `png`, `webp`, or `jpeg`.
764
- # Default: `png`.
813
+ # The output format of the generated image. One of `png`, `webp`, `jpeg`, `gif`,
814
+ # or `svg`. Default: `png`. GIF and SVG output require a model that supports the
815
+ # selected format. GIF output does not support partial image streaming
816
+ # (`partial_images` greater than `0`), `input_image_mask`, or custom
817
+ # `output_compression`. Responses lifecycle events can still be streamed for GIF
818
+ # output.
765
819
  #
766
820
  # @param partial_images [Integer]
767
821
  # Number of partial images to generate in streaming mode, from 0 (default value)
@@ -785,6 +839,12 @@ module OpenAI
785
839
  # `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models;
786
840
  # `auto` is supported for models that allow automatic sizing.
787
841
  #
842
+ # @param svg [OpenAI::Models::Beta::BetaTool::ImageGeneration::Svg]
843
+ # SVG author model settings. Requires `output_format` to be `svg`. When SVG model
844
+ # selection is enabled, omitting this object uses the outer response model.
845
+ # Otherwise, the default SVG author is used and explicit model overrides are
846
+ # unavailable.
847
+ #
788
848
  # @param type [Symbol, :image_generation]
789
849
  # The type of the image generation tool. Always `image_generation`.
790
850
 
@@ -824,6 +884,24 @@ module OpenAI
824
884
  # @return [Array<Symbol>]
825
885
  end
826
886
 
887
+ # Computation spent planning the image, independently of rendering quality.
888
+ # Overrides the outer response's `reasoning.effort` for image generation. When
889
+ # omitted, inherits a supported outer reasoning effort or uses the image model's
890
+ # configured default. For SVG output, controls the reference image, not the SVG
891
+ # author's reasoning.
892
+ #
893
+ # @see OpenAI::Models::Beta::BetaTool::ImageGeneration#complexity
894
+ module Complexity
895
+ extend OpenAI::Internal::Type::Enum
896
+
897
+ LOW = :low
898
+ MEDIUM = :medium
899
+ HIGH = :high
900
+
901
+ # @!method self.values
902
+ # @return [Array<Symbol>]
903
+ end
904
+
827
905
  # Control how much effort the model will exert to match the style and features,
828
906
  # especially facial features, of input images. Supports `high` and `low` on
829
907
  # `gpt-image-1.5`; `gpt-image-1-mini` supports only `low`. For `gpt-image-2`, omit
@@ -868,8 +946,8 @@ module OpenAI
868
946
  # The image generation model to use. One of `gpt-image-1-mini`, `gpt-image-1.5`,
869
947
  # `gpt-image-2`, `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`,
870
948
  # `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`,
871
- # `gpt-image-2.5-flare-2026-09-08`, or `chatgpt-image-latest`. Default:
872
- # `gpt-image-2`.
949
+ # `gpt-image-2.5-flare-2026-09-08`, `gpt-image-2.6-sunburst`,
950
+ # `gpt-image-2.6-flare`, or `chatgpt-image-latest`. Default: `gpt-image-2`.
873
951
  #
874
952
  # `gpt-image-1` was shut down on October 23, 2026. Use `gpt-image-2.5-sunburst` or
875
953
  # `gpt-image-2.5-flare` instead.
@@ -900,6 +978,10 @@ module OpenAI
900
978
  const: -> { OpenAI::Models::Beta::BetaTool::ImageGeneration::Model::GPT_IMAGE_2_5_FLARE_2026_09_08 }
901
979
  )
902
980
 
981
+ variant const: -> { OpenAI::Models::Beta::BetaTool::ImageGeneration::Model::GPT_IMAGE_2_6_SUNBURST }
982
+
983
+ variant const: -> { OpenAI::Models::Beta::BetaTool::ImageGeneration::Model::GPT_IMAGE_2_6_FLARE }
984
+
903
985
  variant const: -> { OpenAI::Models::Beta::BetaTool::ImageGeneration::Model::GPT_IMAGE_1_5 }
904
986
 
905
987
  variant const: -> { OpenAI::Models::Beta::BetaTool::ImageGeneration::Model::CHATGPT_IMAGE_LATEST }
@@ -923,6 +1005,8 @@ module OpenAI
923
1005
  GPT_IMAGE_2_5_SUNBURST_2026_09_08 = :"gpt-image-2.5-sunburst-2026-09-08"
924
1006
  GPT_IMAGE_2_5_FLARE = :"gpt-image-2.5-flare"
925
1007
  GPT_IMAGE_2_5_FLARE_2026_09_08 = :"gpt-image-2.5-flare-2026-09-08"
1008
+ GPT_IMAGE_2_6_SUNBURST = :"gpt-image-2.6-sunburst"
1009
+ GPT_IMAGE_2_6_FLARE = :"gpt-image-2.6-flare"
926
1010
  GPT_IMAGE_1_5 = :"gpt-image-1.5"
927
1011
  CHATGPT_IMAGE_LATEST = :"chatgpt-image-latest"
928
1012
 
@@ -942,8 +1026,12 @@ module OpenAI
942
1026
  # @return [Array<Symbol>]
943
1027
  end
944
1028
 
945
- # The output format of the generated image. One of `png`, `webp`, or `jpeg`.
946
- # Default: `png`.
1029
+ # The output format of the generated image. One of `png`, `webp`, `jpeg`, `gif`,
1030
+ # or `svg`. Default: `png`. GIF and SVG output require a model that supports the
1031
+ # selected format. GIF output does not support partial image streaming
1032
+ # (`partial_images` greater than `0`), `input_image_mask`, or custom
1033
+ # `output_compression`. Responses lifecycle events can still be streamed for GIF
1034
+ # output.
947
1035
  #
948
1036
  # @see OpenAI::Models::Beta::BetaTool::ImageGeneration#output_format
949
1037
  module OutputFormat
@@ -952,6 +1040,8 @@ module OpenAI
952
1040
  PNG = :png
953
1041
  WEBP = :webp
954
1042
  JPEG = :jpeg
1043
+ GIF = :gif
1044
+ SVG = :svg
955
1045
 
956
1046
  # @!method self.values
957
1047
  # @return [Array<Symbol>]
@@ -1018,6 +1108,67 @@ module OpenAI
1018
1108
 
1019
1109
  # @!endgroup
1020
1110
  end
1111
+
1112
+ # @see OpenAI::Models::Beta::BetaTool::ImageGeneration#svg
1113
+ class Svg < OpenAI::Internal::Type::BaseModel
1114
+ # @!attribute model
1115
+ #
1116
+ # @return [String, nil]
1117
+ optional :model, String
1118
+
1119
+ # @!attribute reasoning
1120
+ # Reasoning effort for SVG authoring. When omitted, uses the author model's
1121
+ # default in both Images and Responses.
1122
+ #
1123
+ # @return [OpenAI::Models::Beta::BetaTool::ImageGeneration::Svg::Reasoning, nil]
1124
+ optional :reasoning, -> { OpenAI::Beta::BetaTool::ImageGeneration::Svg::Reasoning }, nil?: true
1125
+
1126
+ # @!method initialize(model: nil, reasoning: nil)
1127
+ # SVG author model settings. Requires `output_format` to be `svg`. When SVG model
1128
+ # selection is enabled, omitting this object uses the outer response model.
1129
+ # Otherwise, the default SVG author is used and explicit model overrides are
1130
+ # unavailable.
1131
+ #
1132
+ # @param model [String]
1133
+ #
1134
+ # @param reasoning [OpenAI::Models::Beta::BetaTool::ImageGeneration::Svg::Reasoning, nil]
1135
+ # Reasoning effort for SVG authoring. When omitted, uses the author model's
1136
+ # default in both Images and Responses.
1137
+
1138
+ # @see OpenAI::Models::Beta::BetaTool::ImageGeneration::Svg#reasoning
1139
+ class Reasoning < OpenAI::Internal::Type::BaseModel
1140
+ # @!attribute effort
1141
+ # Controls how much effort the model should spend on reasoning for this request.
1142
+ #
1143
+ # @return [Symbol, OpenAI::Models::Beta::BetaTool::ImageGeneration::Svg::Reasoning::Effort, nil]
1144
+ optional :effort, enum: -> { OpenAI::Beta::BetaTool::ImageGeneration::Svg::Reasoning::Effort }
1145
+
1146
+ # @!method initialize(effort: nil)
1147
+ # Reasoning effort for SVG authoring. When omitted, uses the author model's
1148
+ # default in both Images and Responses.
1149
+ #
1150
+ # @param effort [Symbol, OpenAI::Models::Beta::BetaTool::ImageGeneration::Svg::Reasoning::Effort]
1151
+ # Controls how much effort the model should spend on reasoning for this request.
1152
+
1153
+ # Controls how much effort the model should spend on reasoning for this request.
1154
+ #
1155
+ # @see OpenAI::Models::Beta::BetaTool::ImageGeneration::Svg::Reasoning#effort
1156
+ module Effort
1157
+ extend OpenAI::Internal::Type::Enum
1158
+
1159
+ NONE = :none
1160
+ MINIMAL = :minimal
1161
+ LOW = :low
1162
+ MEDIUM = :medium
1163
+ HIGH = :high
1164
+ XHIGH = :xhigh
1165
+ MAX = :max
1166
+
1167
+ # @!method self.values
1168
+ # @return [Array<Symbol>]
1169
+ end
1170
+ end
1171
+ end
1021
1172
  end
1022
1173
 
1023
1174
  class LocalShell < OpenAI::Internal::Type::BaseModel
@@ -18,6 +18,12 @@ module OpenAI
18
18
  # @return [Symbol, String, OpenAI::Models::Beta::ResponseCompactParams::Model, nil]
19
19
  required :model, union: -> { OpenAI::Beta::ResponseCompactParams::Model }, nil?: true
20
20
 
21
+ # @!attribute image
22
+ # Request level image options.
23
+ #
24
+ # @return [OpenAI::Models::Beta::ResponseCompactParams::Image, nil]
25
+ optional :image, -> { OpenAI::Beta::ResponseCompactParams::Image }
26
+
21
27
  # @!attribute input
22
28
  # Text, image, or file inputs to the model, used to generate a response
23
29
  #
@@ -55,7 +61,7 @@ module OpenAI
55
61
  # request can write up to four breakpoints. For cache matching, OpenAI considers
56
62
  # up to the latest 80 breakpoints in the conversation, without a content-block
57
63
  # lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The
58
- # `ttl` defaults to `30m`, which is currently the only supported value. See the
64
+ # `ttl` defaults to `30m`. Supported lifetimes depend on the API. See the
59
65
  # [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching)
60
66
  # for current details.
61
67
  #
@@ -106,7 +112,7 @@ module OpenAI
106
112
  # @return [Array<Symbol, OpenAI::Models::Beta::ResponseCompactParams::Beta>, nil]
107
113
  optional :betas, -> { OpenAI::Internal::Type::ArrayOf[enum: OpenAI::Beta::ResponseCompactParams::Beta] }
108
114
 
109
- # @!method initialize(model:, input: nil, instructions: nil, previous_response_id: nil, prompt_cache_key: nil, prompt_cache_options: nil, prompt_cache_retention: nil, service_tier: nil, betas: nil, request_options: {})
115
+ # @!method initialize(model:, image: nil, input: nil, instructions: nil, previous_response_id: nil, prompt_cache_key: nil, prompt_cache_options: nil, prompt_cache_retention: nil, service_tier: nil, betas: nil, request_options: {})
110
116
  # @param model [Symbol, String, OpenAI::Models::Beta::ResponseCompactParams::Model, nil]
111
117
  # Model ID used to generate the response, like `gpt-6-astra`. OpenAI offers a wide
112
118
  # range of models with different capabilities, performance characteristics, and
@@ -114,6 +120,9 @@ module OpenAI
114
120
  # [model guide](https://developers.openai.com/api/docs/models) to browse and
115
121
  # compare available models.
116
122
  #
123
+ # @param image [OpenAI::Models::Beta::ResponseCompactParams::Image]
124
+ # Request level image options.
125
+ #
117
126
  # @param input [String, Array<OpenAI::Models::Beta::BetaEasyInputMessage, OpenAI::Models::Beta::BetaResponseInputItem::Message, OpenAI::Models::Beta::BetaResponseOutputMessage, OpenAI::Models::Beta::BetaResponseFileSearchToolCall, OpenAI::Models::Beta::BetaResponseComputerToolCall, OpenAI::Models::Beta::BetaResponseInputItem::ComputerCallOutput, OpenAI::Models::Beta::BetaResponseFunctionWebSearch, OpenAI::Models::Beta::BetaResponseFunctionToolCall, OpenAI::Models::Beta::BetaResponseInputItem::FunctionCallOutput, OpenAI::Models::Beta::BetaResponseInputItem::AgentMessage, OpenAI::Models::Beta::BetaResponseInputItem::MultiAgentCall, OpenAI::Models::Beta::BetaResponseInputItem::MultiAgentCallOutput, OpenAI::Models::Beta::BetaResponseInputItem::ToolSearchCall, OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam, OpenAI::Models::Beta::BetaResponseInputItem::AdditionalTools, OpenAI::Models::Beta::BetaResponseConfigurationUpdateItemParam, OpenAI::Models::Beta::BetaResponseReasoningItem, OpenAI::Models::Beta::BetaResponseCompactionItemParam, OpenAI::Models::Beta::BetaResponseInputItem::ImageGenerationCall, OpenAI::Models::Beta::BetaResponseCodeInterpreterToolCall, OpenAI::Models::Beta::BetaResponseInputItem::LocalShellCall, OpenAI::Models::Beta::BetaResponseInputItem::LocalShellCallOutput, OpenAI::Models::Beta::BetaResponseInputItem::ShellCall, OpenAI::Models::Beta::BetaResponseInputItem::ShellCallOutput, OpenAI::Models::Beta::BetaResponseInputItem::ApplyPatchCall, OpenAI::Models::Beta::BetaResponseInputItem::ApplyPatchCallOutput, OpenAI::Models::Beta::BetaResponseInputItem::McpListTools, OpenAI::Models::Beta::BetaResponseInputItem::McpApprovalRequest, OpenAI::Models::Beta::BetaResponseInputItem::McpApprovalResponse, OpenAI::Models::Beta::BetaResponseInputItem::McpCall, OpenAI::Models::Beta::BetaResponseCustomToolCallOutput, OpenAI::Models::Beta::BetaResponseCustomToolCall, OpenAI::Models::Beta::BetaResponseInputItem::CompactionTrigger, OpenAI::Models::Beta::BetaResponseInputItem::ItemReference, OpenAI::Models::Beta::BetaResponseInputItem::Program, OpenAI::Models::Beta::BetaResponseInputItem::ProgramOutput>, nil]
118
127
  # Text, image, or file inputs to the model, used to generate a response
119
128
  #
@@ -139,7 +148,7 @@ module OpenAI
139
148
  # request can write up to four breakpoints. For cache matching, OpenAI considers
140
149
  # up to the latest 80 breakpoints in the conversation, without a content-block
141
150
  # lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The
142
- # `ttl` defaults to `30m`, which is currently the only supported value. See the
151
+ # `ttl` defaults to `30m`. Supported lifetimes depend on the API. See the
143
152
  # [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching)
144
153
  # for current details.
145
154
  #
@@ -784,6 +793,40 @@ module OpenAI
784
793
  # @!endgroup
785
794
  end
786
795
 
796
+ class Image < OpenAI::Internal::Type::BaseModel
797
+ # @!attribute context_compression
798
+ # Controls image context optimization. Defaults to `auto`, which uses the model,
799
+ # transport, and input to select a policy. Use `enabled` to require compression
800
+ # support or `disabled` to turn it off.
801
+ #
802
+ # @return [Symbol, OpenAI::Models::Beta::ResponseCompactParams::Image::ContextCompression, nil]
803
+ optional :context_compression, enum: -> { OpenAI::Beta::ResponseCompactParams::Image::ContextCompression }
804
+
805
+ # @!method initialize(context_compression: nil)
806
+ # Request level image options.
807
+ #
808
+ # @param context_compression [Symbol, OpenAI::Models::Beta::ResponseCompactParams::Image::ContextCompression]
809
+ # Controls image context optimization. Defaults to `auto`, which uses the model,
810
+ # transport, and input to select a policy. Use `enabled` to require compression
811
+ # support or `disabled` to turn it off.
812
+
813
+ # Controls image context optimization. Defaults to `auto`, which uses the model,
814
+ # transport, and input to select a policy. Use `enabled` to require compression
815
+ # support or `disabled` to turn it off.
816
+ #
817
+ # @see OpenAI::Models::Beta::ResponseCompactParams::Image#context_compression
818
+ module ContextCompression
819
+ extend OpenAI::Internal::Type::Enum
820
+
821
+ AUTO = :auto
822
+ ENABLED = :enabled
823
+ DISABLED = :disabled
824
+
825
+ # @!method self.values
826
+ # @return [Array<Symbol>]
827
+ end
828
+ end
829
+
787
830
  # Text, image, or file inputs to the model, used to generate a response
788
831
  module Input
789
832
  extend OpenAI::Internal::Type::Union
@@ -830,7 +873,7 @@ module OpenAI
830
873
  # request can write up to four breakpoints. For cache matching, OpenAI considers
831
874
  # up to the latest 80 breakpoints in the conversation, without a content-block
832
875
  # lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The
833
- # `ttl` defaults to `30m`, which is currently the only supported value. See the
876
+ # `ttl` defaults to `30m`. Supported lifetimes depend on the API. See the
834
877
  # [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching)
835
878
  # for current details.
836
879
  #
@@ -44,6 +44,12 @@ module OpenAI
44
44
  # @return [String, OpenAI::Models::Beta::BetaResponseConversationParam, nil]
45
45
  optional :conversation, union: -> { OpenAI::Beta::ResponseCreateParams::Conversation }, nil?: true
46
46
 
47
+ # @!attribute image
48
+ # Request level image options.
49
+ #
50
+ # @return [OpenAI::Models::Beta::ResponseCreateParams::Image, nil]
51
+ optional :image, -> { OpenAI::Beta::ResponseCreateParams::Image }
52
+
47
53
  # @!attribute include
48
54
  # Specify additional output data to include in the model response. Currently
49
55
  # supported values are:
@@ -182,7 +188,7 @@ module OpenAI
182
188
  # request can write up to four breakpoints. For cache matching, OpenAI considers
183
189
  # up to the latest 80 breakpoints in the conversation, without a content-block
184
190
  # lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The
185
- # `ttl` defaults to `30m`, which is currently the only supported value. See the
191
+ # `ttl` defaults to `30m`. Supported lifetimes depend on the API. See the
186
192
  # [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching)
187
193
  # for current details.
188
194
  #
@@ -382,7 +388,7 @@ module OpenAI
382
388
  # @return [Array<Symbol, OpenAI::Models::Beta::ResponseCreateParams::Beta>, nil]
383
389
  optional :betas, -> { OpenAI::Internal::Type::ArrayOf[enum: OpenAI::Beta::ResponseCreateParams::Beta] }
384
390
 
385
- # @!method initialize(access_programs: nil, background: nil, context_management: nil, conversation: 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_options: nil, temperature: nil, text: nil, tool_choice: nil, tools: nil, top_logprobs: nil, top_p: nil, truncation: nil, user: nil, betas: nil, request_options: {})
391
+ # @!method initialize(access_programs: nil, background: nil, context_management: nil, conversation: 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_options: nil, temperature: nil, text: nil, tool_choice: nil, tools: nil, top_logprobs: nil, top_p: nil, truncation: nil, user: nil, betas: nil, request_options: {})
386
392
  # @param access_programs [OpenAI::Models::Beta::ResponseCreateParams::AccessPrograms]
387
393
  # Domain-specific access programs to use for this request.
388
394
  #
@@ -399,6 +405,9 @@ module OpenAI
399
405
  # items from this response are automatically added to this conversation after this
400
406
  # response completes.
401
407
  #
408
+ # @param image [OpenAI::Models::Beta::ResponseCreateParams::Image]
409
+ # Request level image options.
410
+ #
402
411
  # @param include [Array<Symbol, OpenAI::Models::Beta::BetaResponseIncludable>, nil]
403
412
  # Specify additional output data to include in the model response. Currently
404
413
  # supported values are:
@@ -494,7 +503,7 @@ module OpenAI
494
503
  # request can write up to four breakpoints. For cache matching, OpenAI considers
495
504
  # up to the latest 80 breakpoints in the conversation, without a content-block
496
505
  # lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The
497
- # `ttl` defaults to `30m`, which is currently the only supported value. See the
506
+ # `ttl` defaults to `30m`. Supported lifetimes depend on the API. See the
498
507
  # [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching)
499
508
  # for current details.
500
509
  #
@@ -731,6 +740,40 @@ module OpenAI
731
740
  # @return [Array(String, OpenAI::Models::Beta::BetaResponseConversationParam)]
732
741
  end
733
742
 
743
+ class Image < OpenAI::Internal::Type::BaseModel
744
+ # @!attribute context_compression
745
+ # Controls image context optimization. Defaults to `auto`, which uses the model,
746
+ # transport, and input to select a policy. Use `enabled` to require compression
747
+ # support or `disabled` to turn it off.
748
+ #
749
+ # @return [Symbol, OpenAI::Models::Beta::ResponseCreateParams::Image::ContextCompression, nil]
750
+ optional :context_compression, enum: -> { OpenAI::Beta::ResponseCreateParams::Image::ContextCompression }
751
+
752
+ # @!method initialize(context_compression: nil)
753
+ # Request level image options.
754
+ #
755
+ # @param context_compression [Symbol, OpenAI::Models::Beta::ResponseCreateParams::Image::ContextCompression]
756
+ # Controls image context optimization. Defaults to `auto`, which uses the model,
757
+ # transport, and input to select a policy. Use `enabled` to require compression
758
+ # support or `disabled` to turn it off.
759
+
760
+ # Controls image context optimization. Defaults to `auto`, which uses the model,
761
+ # transport, and input to select a policy. Use `enabled` to require compression
762
+ # support or `disabled` to turn it off.
763
+ #
764
+ # @see OpenAI::Models::Beta::ResponseCreateParams::Image#context_compression
765
+ module ContextCompression
766
+ extend OpenAI::Internal::Type::Enum
767
+
768
+ AUTO = :auto
769
+ ENABLED = :enabled
770
+ DISABLED = :disabled
771
+
772
+ # @!method self.values
773
+ # @return [Array<Symbol>]
774
+ end
775
+ end
776
+
734
777
  # Text, image, or file inputs to the model, used to generate a response.
735
778
  #
736
779
  # Learn more:
@@ -1533,8 +1576,8 @@ module OpenAI
1533
1576
 
1534
1577
  # @!attribute ttl
1535
1578
  # The minimum lifetime applied to every implicit and explicit cache breakpoint
1536
- # written by the request. Defaults to `30m`, which is currently the only supported
1537
- # value. The backend may retain cache entries for longer.
1579
+ # written by the request. Supported values are `30m` (the default) and `12h`. The
1580
+ # backend may retain cache entries for longer.
1538
1581
  #
1539
1582
  # @return [Symbol, OpenAI::Models::Beta::ResponseCreateParams::PromptCacheOptions::Ttl, nil]
1540
1583
  optional :ttl, enum: -> { OpenAI::Beta::ResponseCreateParams::PromptCacheOptions::Ttl }
@@ -1546,7 +1589,7 @@ module OpenAI
1546
1589
  # request can write up to four breakpoints. For cache matching, OpenAI considers
1547
1590
  # up to the latest 80 breakpoints in the conversation, without a content-block
1548
1591
  # lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The
1549
- # `ttl` defaults to `30m`, which is currently the only supported value. See the
1592
+ # `ttl` defaults to `30m`. Supported lifetimes depend on the API. See the
1550
1593
  # [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching)
1551
1594
  # for current details.
1552
1595
  #
@@ -1568,8 +1611,8 @@ module OpenAI
1568
1611
  #
1569
1612
  # @param ttl [Symbol, OpenAI::Models::Beta::ResponseCreateParams::PromptCacheOptions::Ttl]
1570
1613
  # The minimum lifetime applied to every implicit and explicit cache breakpoint
1571
- # written by the request. Defaults to `30m`, which is currently the only supported
1572
- # value. The backend may retain cache entries for longer.
1614
+ # written by the request. Supported values are `30m` (the default) and `12h`. The
1615
+ # backend may retain cache entries for longer.
1573
1616
 
1574
1617
  # Controls whether OpenAI automatically creates an implicit cache breakpoint.
1575
1618
  # Defaults to `implicit`. With `implicit`, OpenAI creates one implicit breakpoint
@@ -1590,14 +1633,15 @@ module OpenAI
1590
1633
  end
1591
1634
 
1592
1635
  # The minimum lifetime applied to every implicit and explicit cache breakpoint
1593
- # written by the request. Defaults to `30m`, which is currently the only supported
1594
- # value. The backend may retain cache entries for longer.
1636
+ # written by the request. Supported values are `30m` (the default) and `12h`. The
1637
+ # backend may retain cache entries for longer.
1595
1638
  #
1596
1639
  # @see OpenAI::Models::Beta::ResponseCreateParams::PromptCacheOptions#ttl
1597
1640
  module Ttl
1598
1641
  extend OpenAI::Internal::Type::Enum
1599
1642
 
1600
1643
  TTL_30M = :"30m"
1644
+ TTL_12H = :"12h"
1601
1645
 
1602
1646
  # @!method self.values
1603
1647
  # @return [Array<Symbol>]
@@ -34,6 +34,9 @@ module OpenAI
34
34
  # The request exceeds the model's context window.
35
35
  CONTEXT_LENGTH_EXCEEDED = :context_length_exceeded
36
36
 
37
+ # The model reached its output token limit before finishing the response.
38
+ MAX_OUTPUT_TOKENS = :max_output_tokens
39
+
37
40
  # The session has reached its usage budget.
38
41
  SESSION_BUDGET_EXCEEDED = :session_budget_exceeded
39
42
 
@@ -212,7 +212,7 @@ module OpenAI
212
212
  # request can write up to four breakpoints. For cache matching, OpenAI considers
213
213
  # up to the latest 80 breakpoints in the conversation, without a content-block
214
214
  # lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The
215
- # `ttl` defaults to `30m`, which is currently the only supported value. See the
215
+ # `ttl` defaults to `30m`. Supported lifetimes depend on the API. See the
216
216
  # [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching)
217
217
  # for current details.
218
218
  #
@@ -569,7 +569,7 @@ module OpenAI
569
569
  # request can write up to four breakpoints. For cache matching, OpenAI considers
570
570
  # up to the latest 80 breakpoints in the conversation, without a content-block
571
571
  # lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The
572
- # `ttl` defaults to `30m`, which is currently the only supported value. See the
572
+ # `ttl` defaults to `30m`. Supported lifetimes depend on the API. See the
573
573
  # [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching)
574
574
  # for current details.
575
575
  #
@@ -979,7 +979,7 @@ module OpenAI
979
979
  # request can write up to four breakpoints. For cache matching, OpenAI considers
980
980
  # up to the latest 80 breakpoints in the conversation, without a content-block
981
981
  # lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The
982
- # `ttl` defaults to `30m`, which is currently the only supported value. See the
982
+ # `ttl` defaults to `30m`. Supported lifetimes depend on the API. See the
983
983
  # [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching)
984
984
  # for current details.
985
985
  #
@@ -189,7 +189,12 @@ module OpenAI
189
189
  nil?: true
190
190
  )
191
191
 
192
- # @!method initialize(id:, result:, status:, action: nil, background: nil, error: nil, output_format: nil, quality: nil, revised_prompt: nil, size: nil, type: :image_generation_call)
192
+ # @!attribute svg_usage
193
+ #
194
+ # @return [OpenAI::Models::Conversations::ConversationItem::ImageGenerationCall::SvgUsage, nil]
195
+ optional :svg_usage, -> { OpenAI::Conversations::ConversationItem::ImageGenerationCall::SvgUsage }
196
+
197
+ # @!method initialize(id:, result:, status:, action: nil, background: nil, error: nil, output_format: nil, quality: nil, revised_prompt: nil, size: nil, svg_usage: nil, type: :image_generation_call)
193
198
  # An image generation request made by the model.
194
199
  #
195
200
  # @param id [String]
@@ -223,6 +228,8 @@ module OpenAI
223
228
  # @param size [String, Symbol, OpenAI::Models::Conversations::ConversationItem::ImageGenerationCall::Size, nil]
224
229
  # The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`.
225
230
  #
231
+ # @param svg_usage [OpenAI::Models::Conversations::ConversationItem::ImageGenerationCall::SvgUsage]
232
+ #
226
233
  # @param type [Symbol, :image_generation_call]
227
234
  # The type of the image generation call. Always `image_generation_call`.
228
235
 
@@ -375,6 +382,8 @@ module OpenAI
375
382
  PNG = :png
376
383
  WEBP = :webp
377
384
  JPEG = :jpeg
385
+ GIF = :gif
386
+ SVG = :svg
378
387
 
379
388
  # @!method self.values
380
389
  # @return [Array<Symbol>]
@@ -435,6 +444,41 @@ module OpenAI
435
444
 
436
445
  # @!endgroup
437
446
  end
447
+
448
+ # @see OpenAI::Models::Conversations::ConversationItem::ImageGenerationCall#svg_usage
449
+ class SvgUsage < OpenAI::Internal::Type::BaseModel
450
+ # @!attribute input_tokens
451
+ #
452
+ # @return [Integer]
453
+ required :input_tokens, Integer
454
+
455
+ # @!attribute model
456
+ #
457
+ # @return [String]
458
+ required :model, String
459
+
460
+ # @!attribute output_tokens
461
+ #
462
+ # @return [Integer]
463
+ required :output_tokens, Integer
464
+
465
+ # @!attribute reasoning_tokens
466
+ #
467
+ # @return [Integer]
468
+ required :reasoning_tokens, Integer
469
+
470
+ # @!attribute total_tokens
471
+ #
472
+ # @return [Integer]
473
+ required :total_tokens, Integer
474
+
475
+ # @!method initialize(input_tokens:, model:, output_tokens:, reasoning_tokens:, total_tokens:)
476
+ # @param input_tokens [Integer]
477
+ # @param model [String]
478
+ # @param output_tokens [Integer]
479
+ # @param reasoning_tokens [Integer]
480
+ # @param total_tokens [Integer]
481
+ end
438
482
  end
439
483
 
440
484
  class AdditionalTools < OpenAI::Internal::Type::BaseModel