openai 0.115.0 → 0.116.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.
@@ -63,7 +63,18 @@ module OpenAI
63
63
  T.any(
64
64
  OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::LiveToolChoiceEnum::OrSymbol,
65
65
  OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::LiveFunctionToolChoiceParam,
66
- OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::LiveMCPToolChoiceParam
66
+ OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::LiveMCPToolChoiceParam,
67
+ OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::FileSearch,
68
+ OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::WebSearch,
69
+ OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::WebSearchPreview,
70
+ OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::ImageGeneration,
71
+ OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::Computer,
72
+ OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::CodeInterpreter,
73
+ OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::ProgrammaticToolCalling,
74
+ OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::Shell,
75
+ OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::Custom,
76
+ OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::ApplyPatch,
77
+ OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::LiveAllowedToolsChoiceParam
67
78
  )
68
79
  )
69
80
  )
@@ -75,7 +86,18 @@ module OpenAI
75
86
  tool_choice: T.any(
76
87
  OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::LiveToolChoiceEnum::OrSymbol,
77
88
  OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::LiveFunctionToolChoiceParam::OrHash,
78
- OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::LiveMCPToolChoiceParam::OrHash
89
+ OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::LiveMCPToolChoiceParam::OrHash,
90
+ OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::FileSearch::OrHash,
91
+ OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::WebSearch::OrHash,
92
+ OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::WebSearchPreview::OrHash,
93
+ OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::ImageGeneration::OrHash,
94
+ OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::Computer::OrHash,
95
+ OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::CodeInterpreter::OrHash,
96
+ OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::ProgrammaticToolCalling::OrHash,
97
+ OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::Shell::OrHash,
98
+ OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::Custom::OrHash,
99
+ OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::ApplyPatch::OrHash,
100
+ OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::LiveAllowedToolsChoiceParam::OrHash
79
101
  )
80
102
  )
81
103
  .void
@@ -88,7 +110,21 @@ module OpenAI
88
110
  returns(
89
111
  T.nilable(
90
112
  T::Array[
91
- T.any(OpenAI::Live::FunctionTool, OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::WebSearch)
113
+ T.any(
114
+ OpenAI::Live::FunctionTool,
115
+ OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::WebSearch,
116
+ OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::FileSearch,
117
+ OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::CodeInterpreter,
118
+ OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::Shell,
119
+ OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::ImageGeneration,
120
+ OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::Mcp,
121
+ OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::Custom,
122
+ OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::Namespace,
123
+ OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::ToolSearch,
124
+ OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::ProgrammaticToolCalling,
125
+ OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::Computer,
126
+ OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::ApplyPatch
127
+ )
92
128
  ]
93
129
  )
94
130
  )
@@ -100,7 +136,18 @@ module OpenAI
100
136
  tools: T::Array[
101
137
  T.any(
102
138
  OpenAI::Live::FunctionTool::OrHash,
103
- OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::WebSearch::OrHash
139
+ OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::WebSearch::OrHash,
140
+ OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::FileSearch::OrHash,
141
+ OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::CodeInterpreter::OrHash,
142
+ OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::Shell::OrHash,
143
+ OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::ImageGeneration::OrHash,
144
+ OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::Mcp::OrHash,
145
+ OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::Custom::OrHash,
146
+ OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::Namespace::OrHash,
147
+ OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::ToolSearch::OrHash,
148
+ OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::ProgrammaticToolCalling::OrHash,
149
+ OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::Computer::OrHash,
150
+ OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::ApplyPatch::OrHash
104
151
  )
105
152
  ]
106
153
  )
@@ -130,13 +177,35 @@ module OpenAI
130
177
  tool_choice: T.any(
131
178
  OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::LiveToolChoiceEnum::OrSymbol,
132
179
  OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::LiveFunctionToolChoiceParam::OrHash,
133
- OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::LiveMCPToolChoiceParam::OrHash
180
+ OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::LiveMCPToolChoiceParam::OrHash,
181
+ OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::FileSearch::OrHash,
182
+ OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::WebSearch::OrHash,
183
+ OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::WebSearchPreview::OrHash,
184
+ OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::ImageGeneration::OrHash,
185
+ OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::Computer::OrHash,
186
+ OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::CodeInterpreter::OrHash,
187
+ OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::ProgrammaticToolCalling::OrHash,
188
+ OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::Shell::OrHash,
189
+ OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::Custom::OrHash,
190
+ OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::ApplyPatch::OrHash,
191
+ OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::LiveAllowedToolsChoiceParam::OrHash
134
192
  ),
135
193
 
136
194
  tools: T::Array[
137
195
  T.any(
138
196
  OpenAI::Live::FunctionTool::OrHash,
139
- OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::WebSearch::OrHash
197
+ OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::WebSearch::OrHash,
198
+ OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::FileSearch::OrHash,
199
+ OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::CodeInterpreter::OrHash,
200
+ OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::Shell::OrHash,
201
+ OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::ImageGeneration::OrHash,
202
+ OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::Mcp::OrHash,
203
+ OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::Custom::OrHash,
204
+ OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::Namespace::OrHash,
205
+ OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::ToolSearch::OrHash,
206
+ OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::ProgrammaticToolCalling::OrHash,
207
+ OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::Computer::OrHash,
208
+ OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::ApplyPatch::OrHash
140
209
  )
141
210
  ]
142
211
  )
@@ -193,10 +262,35 @@ module OpenAI
193
262
  tool_choice: T.any(
194
263
  OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::LiveToolChoiceEnum::OrSymbol,
195
264
  OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::LiveFunctionToolChoiceParam,
196
- OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::LiveMCPToolChoiceParam
265
+ OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::LiveMCPToolChoiceParam,
266
+ OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::FileSearch,
267
+ OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::WebSearch,
268
+ OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::WebSearchPreview,
269
+ OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::ImageGeneration,
270
+ OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::Computer,
271
+ OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::CodeInterpreter,
272
+ OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::ProgrammaticToolCalling,
273
+ OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::Shell,
274
+ OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::Custom,
275
+ OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::ApplyPatch,
276
+ OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::LiveAllowedToolsChoiceParam
197
277
  ),
198
278
  tools: T::Array[
199
- T.any(OpenAI::Live::FunctionTool, OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::WebSearch)
279
+ T.any(
280
+ OpenAI::Live::FunctionTool,
281
+ OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::WebSearch,
282
+ OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::FileSearch,
283
+ OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::CodeInterpreter,
284
+ OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::Shell,
285
+ OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::ImageGeneration,
286
+ OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::Mcp,
287
+ OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::Custom,
288
+ OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::Namespace,
289
+ OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::ToolSearch,
290
+ OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::ProgrammaticToolCalling,
291
+ OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::Computer,
292
+ OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::ApplyPatch
293
+ )
200
294
  ]
201
295
  }
202
296
  )
@@ -395,7 +489,18 @@ module OpenAI
395
489
  T.any(
396
490
  OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::LiveToolChoiceEnum::TaggedSymbol,
397
491
  OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::LiveFunctionToolChoiceParam,
398
- OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::LiveMCPToolChoiceParam
492
+ OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::LiveMCPToolChoiceParam,
493
+ OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::FileSearch,
494
+ OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::WebSearch,
495
+ OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::WebSearchPreview,
496
+ OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::ImageGeneration,
497
+ OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::Computer,
498
+ OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::CodeInterpreter,
499
+ OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::ProgrammaticToolCalling,
500
+ OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::Shell,
501
+ OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::Custom,
502
+ OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::ApplyPatch,
503
+ OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::LiveAllowedToolsChoiceParam
399
504
  )
400
505
  }
401
506
 
@@ -518,34 +623,55 @@ module OpenAI
518
623
 
519
624
  end
520
625
 
521
- sig { override.returns(T::Array[OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::Variants]) }
522
- def self.variants
523
- end
626
+ class FileSearch < OpenAI::Internal::Type::BaseModel
627
+ OrHash = T.type_alias do
628
+ T.any(
629
+ OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::FileSearch,
630
+ OpenAI::Internal::AnyHash
631
+ )
632
+ end
524
633
 
525
- end
634
+ # The tool to call. Always `file_search`.
635
+ sig { returns(Symbol) }
636
+ attr_accessor :type
526
637
 
527
- # A function tool available to the Responses backend when the Live model delegates
528
- # a task.
529
- module Tool
530
- extend OpenAI::Internal::Type::Union
638
+ sig do
639
+ params(
531
640
 
532
- Variants = T.type_alias {
533
- T.any(OpenAI::Live::FunctionTool, OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::WebSearch)
534
- }
641
+ type: Symbol
642
+ )
643
+ .returns(T.attached_class)
644
+ end
645
+ def self.new(
646
+
647
+ # The tool to call. Always `file_search`.
648
+
649
+ type: :file_search
650
+ )
651
+ end
652
+
653
+ sig do
654
+ override.returns(
655
+ {type: Symbol}
656
+ )
657
+ end
658
+ def to_hash
659
+ end
660
+
661
+ end
535
662
 
536
663
  class WebSearch < OpenAI::Internal::Type::BaseModel
537
664
  OrHash = T.type_alias do
538
665
  T.any(
539
- OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::WebSearch,
666
+ OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::WebSearch,
540
667
  OpenAI::Internal::AnyHash
541
668
  )
542
669
  end
543
670
 
544
- # The tool type. Always `web_search`.
671
+ # The tool to call. Always `web_search`.
545
672
  sig { returns(Symbol) }
546
673
  attr_accessor :type
547
674
 
548
- # A web search tool available to the Live session’s Responses backend.
549
675
  sig do
550
676
  params(
551
677
 
@@ -555,7 +681,7 @@ module OpenAI
555
681
  end
556
682
  def self.new(
557
683
 
558
- # The tool type. Always `web_search`.
684
+ # The tool to call. Always `web_search`.
559
685
 
560
686
  type: :web_search
561
687
  )
@@ -571,6 +697,2183 @@ module OpenAI
571
697
 
572
698
  end
573
699
 
700
+ class WebSearchPreview < OpenAI::Internal::Type::BaseModel
701
+ OrHash = T.type_alias do
702
+ T.any(
703
+ OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::WebSearchPreview,
704
+ OpenAI::Internal::AnyHash
705
+ )
706
+ end
707
+
708
+ # The tool to call. Always `web_search_preview`.
709
+ sig { returns(Symbol) }
710
+ attr_accessor :type
711
+
712
+ sig do
713
+ params(
714
+
715
+ type: Symbol
716
+ )
717
+ .returns(T.attached_class)
718
+ end
719
+ def self.new(
720
+
721
+ # The tool to call. Always `web_search_preview`.
722
+
723
+ type: :web_search_preview
724
+ )
725
+ end
726
+
727
+ sig do
728
+ override.returns(
729
+ {type: Symbol}
730
+ )
731
+ end
732
+ def to_hash
733
+ end
734
+
735
+ end
736
+
737
+ class ImageGeneration < OpenAI::Internal::Type::BaseModel
738
+ OrHash = T.type_alias do
739
+ T.any(
740
+ OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::ImageGeneration,
741
+ OpenAI::Internal::AnyHash
742
+ )
743
+ end
744
+
745
+ # The tool to call. Always `image_generation`.
746
+ sig { returns(Symbol) }
747
+ attr_accessor :type
748
+
749
+ sig do
750
+ params(
751
+
752
+ type: Symbol
753
+ )
754
+ .returns(T.attached_class)
755
+ end
756
+ def self.new(
757
+
758
+ # The tool to call. Always `image_generation`.
759
+
760
+ type: :image_generation
761
+ )
762
+ end
763
+
764
+ sig do
765
+ override.returns(
766
+ {type: Symbol}
767
+ )
768
+ end
769
+ def to_hash
770
+ end
771
+
772
+ end
773
+
774
+ class Computer < OpenAI::Internal::Type::BaseModel
775
+ OrHash = T.type_alias do
776
+ T.any(
777
+ OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::Computer,
778
+ OpenAI::Internal::AnyHash
779
+ )
780
+ end
781
+
782
+ # The tool to call. Always `computer`.
783
+ sig { returns(Symbol) }
784
+ attr_accessor :type
785
+
786
+ sig do
787
+ params(
788
+
789
+ type: Symbol
790
+ )
791
+ .returns(T.attached_class)
792
+ end
793
+ def self.new(
794
+
795
+ # The tool to call. Always `computer`.
796
+
797
+ type: :computer
798
+ )
799
+ end
800
+
801
+ sig do
802
+ override.returns(
803
+ {type: Symbol}
804
+ )
805
+ end
806
+ def to_hash
807
+ end
808
+
809
+ end
810
+
811
+ class CodeInterpreter < OpenAI::Internal::Type::BaseModel
812
+ OrHash = T.type_alias do
813
+ T.any(
814
+ OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::CodeInterpreter,
815
+ OpenAI::Internal::AnyHash
816
+ )
817
+ end
818
+
819
+ # The tool to call. Always `code_interpreter`.
820
+ sig { returns(Symbol) }
821
+ attr_accessor :type
822
+
823
+ sig do
824
+ params(
825
+
826
+ type: Symbol
827
+ )
828
+ .returns(T.attached_class)
829
+ end
830
+ def self.new(
831
+
832
+ # The tool to call. Always `code_interpreter`.
833
+
834
+ type: :code_interpreter
835
+ )
836
+ end
837
+
838
+ sig do
839
+ override.returns(
840
+ {type: Symbol}
841
+ )
842
+ end
843
+ def to_hash
844
+ end
845
+
846
+ end
847
+
848
+ class ProgrammaticToolCalling < OpenAI::Internal::Type::BaseModel
849
+ OrHash = T.type_alias do
850
+ T.any(
851
+ OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::ProgrammaticToolCalling,
852
+ OpenAI::Internal::AnyHash
853
+ )
854
+ end
855
+
856
+ # The tool to call. Always `programmatic_tool_calling`.
857
+ sig { returns(Symbol) }
858
+ attr_accessor :type
859
+
860
+ sig do
861
+ params(
862
+
863
+ type: Symbol
864
+ )
865
+ .returns(T.attached_class)
866
+ end
867
+ def self.new(
868
+
869
+ # The tool to call. Always `programmatic_tool_calling`.
870
+
871
+ type: :programmatic_tool_calling
872
+ )
873
+ end
874
+
875
+ sig do
876
+ override.returns(
877
+ {type: Symbol}
878
+ )
879
+ end
880
+ def to_hash
881
+ end
882
+
883
+ end
884
+
885
+ class Shell < OpenAI::Internal::Type::BaseModel
886
+ OrHash = T.type_alias do
887
+ T.any(
888
+ OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::Shell,
889
+ OpenAI::Internal::AnyHash
890
+ )
891
+ end
892
+
893
+ # The tool to call. Always `shell`.
894
+ sig { returns(Symbol) }
895
+ attr_accessor :type
896
+
897
+ # Forces the model to call the shell tool when a tool call is required.
898
+ sig do
899
+ params(
900
+
901
+ type: Symbol
902
+ )
903
+ .returns(T.attached_class)
904
+ end
905
+ def self.new(
906
+
907
+ # The tool to call. Always `shell`.
908
+
909
+ type: :shell
910
+ )
911
+ end
912
+
913
+ sig do
914
+ override.returns(
915
+ {type: Symbol}
916
+ )
917
+ end
918
+ def to_hash
919
+ end
920
+
921
+ end
922
+
923
+ class Custom < OpenAI::Internal::Type::BaseModel
924
+ OrHash = T.type_alias do
925
+ T.any(
926
+ OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::Custom,
927
+ OpenAI::Internal::AnyHash
928
+ )
929
+ end
930
+
931
+ # The name of the custom tool to call.
932
+ sig { returns(String) }
933
+ attr_accessor :name
934
+
935
+ # The tool to call. Always `custom`.
936
+ sig { returns(Symbol) }
937
+ attr_accessor :type
938
+
939
+ sig do
940
+ params(
941
+
942
+ name: String,
943
+
944
+ type: Symbol
945
+ )
946
+ .returns(T.attached_class)
947
+ end
948
+ def self.new(
949
+
950
+ # The name of the custom tool to call.
951
+ name:,
952
+
953
+ # The tool to call. Always `custom`.
954
+
955
+ type: :custom
956
+ )
957
+ end
958
+
959
+ sig do
960
+ override.returns(
961
+ {name: String, type: Symbol}
962
+ )
963
+ end
964
+ def to_hash
965
+ end
966
+
967
+ end
968
+
969
+ class ApplyPatch < OpenAI::Internal::Type::BaseModel
970
+ OrHash = T.type_alias do
971
+ T.any(
972
+ OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::ApplyPatch,
973
+ OpenAI::Internal::AnyHash
974
+ )
975
+ end
976
+
977
+ # The tool to call. Always `apply_patch`.
978
+ sig { returns(Symbol) }
979
+ attr_accessor :type
980
+
981
+ # Forces the model to call the apply_patch tool when executing a tool call.
982
+ sig do
983
+ params(
984
+
985
+ type: Symbol
986
+ )
987
+ .returns(T.attached_class)
988
+ end
989
+ def self.new(
990
+
991
+ # The tool to call. Always `apply_patch`.
992
+
993
+ type: :apply_patch
994
+ )
995
+ end
996
+
997
+ sig do
998
+ override.returns(
999
+ {type: Symbol}
1000
+ )
1001
+ end
1002
+ def to_hash
1003
+ end
1004
+
1005
+ end
1006
+
1007
+ class LiveAllowedToolsChoiceParam < OpenAI::Internal::Type::BaseModel
1008
+ OrHash = T.type_alias do
1009
+ T.any(
1010
+ OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::LiveAllowedToolsChoiceParam,
1011
+ OpenAI::Internal::AnyHash
1012
+ )
1013
+ end
1014
+
1015
+ # The tools that the delegated Responses model may call.
1016
+ sig {
1017
+ returns(
1018
+ T::Array[
1019
+ T.any(
1020
+ OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::LiveAllowedToolsChoiceParam::Tool::Function,
1021
+ OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::LiveAllowedToolsChoiceParam::Tool::Mcp,
1022
+ OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::LiveAllowedToolsChoiceParam::Tool::FileSearch,
1023
+ OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::LiveAllowedToolsChoiceParam::Tool::WebSearch,
1024
+ OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::LiveAllowedToolsChoiceParam::Tool::WebSearchPreview,
1025
+ OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::LiveAllowedToolsChoiceParam::Tool::ImageGeneration,
1026
+ OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::LiveAllowedToolsChoiceParam::Tool::Computer,
1027
+ OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::LiveAllowedToolsChoiceParam::Tool::CodeInterpreter,
1028
+ OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::LiveAllowedToolsChoiceParam::Tool::ProgrammaticToolCalling,
1029
+ OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::LiveAllowedToolsChoiceParam::Tool::Shell,
1030
+ OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::LiveAllowedToolsChoiceParam::Tool::Custom,
1031
+ OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::LiveAllowedToolsChoiceParam::Tool::ApplyPatch
1032
+ )
1033
+ ]
1034
+ )
1035
+ }
1036
+ attr_accessor :tools
1037
+
1038
+ # The tool choice type. Always `allowed_tools`.
1039
+ sig { returns(Symbol) }
1040
+ attr_accessor :type
1041
+
1042
+ # How to select a tool from the allowed set.
1043
+ sig {
1044
+ returns(
1045
+ T.nilable(
1046
+ OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::LiveAllowedToolsChoiceParam::Mode::OrSymbol
1047
+ )
1048
+ )
1049
+ }
1050
+ attr_accessor :mode
1051
+
1052
+ sig do
1053
+ params(
1054
+
1055
+ tools: T::Array[
1056
+ T.any(
1057
+ OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::LiveAllowedToolsChoiceParam::Tool::Function::OrHash,
1058
+ OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::LiveAllowedToolsChoiceParam::Tool::Mcp::OrHash,
1059
+ OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::LiveAllowedToolsChoiceParam::Tool::FileSearch::OrHash,
1060
+ OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::LiveAllowedToolsChoiceParam::Tool::WebSearch::OrHash,
1061
+ OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::LiveAllowedToolsChoiceParam::Tool::WebSearchPreview::OrHash,
1062
+ OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::LiveAllowedToolsChoiceParam::Tool::ImageGeneration::OrHash,
1063
+ OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::LiveAllowedToolsChoiceParam::Tool::Computer::OrHash,
1064
+ OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::LiveAllowedToolsChoiceParam::Tool::CodeInterpreter::OrHash,
1065
+ OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::LiveAllowedToolsChoiceParam::Tool::ProgrammaticToolCalling::OrHash,
1066
+ OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::LiveAllowedToolsChoiceParam::Tool::Shell::OrHash,
1067
+ OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::LiveAllowedToolsChoiceParam::Tool::Custom::OrHash,
1068
+ OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::LiveAllowedToolsChoiceParam::Tool::ApplyPatch::OrHash
1069
+ )
1070
+ ],
1071
+
1072
+ mode: T.nilable(
1073
+ OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::LiveAllowedToolsChoiceParam::Mode::OrSymbol
1074
+ ),
1075
+
1076
+ type: Symbol
1077
+ )
1078
+ .returns(T.attached_class)
1079
+ end
1080
+ def self.new(
1081
+
1082
+ # The tools that the delegated Responses model may call.
1083
+ tools:,
1084
+
1085
+ # How to select a tool from the allowed set.
1086
+ mode: nil,
1087
+
1088
+ # The tool choice type. Always `allowed_tools`.
1089
+
1090
+ type: :allowed_tools
1091
+ )
1092
+ end
1093
+
1094
+ sig do
1095
+ override.returns(
1096
+ {
1097
+ tools: T::Array[
1098
+ T.any(
1099
+ OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::LiveAllowedToolsChoiceParam::Tool::Function,
1100
+ OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::LiveAllowedToolsChoiceParam::Tool::Mcp,
1101
+ OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::LiveAllowedToolsChoiceParam::Tool::FileSearch,
1102
+ OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::LiveAllowedToolsChoiceParam::Tool::WebSearch,
1103
+ OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::LiveAllowedToolsChoiceParam::Tool::WebSearchPreview,
1104
+ OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::LiveAllowedToolsChoiceParam::Tool::ImageGeneration,
1105
+ OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::LiveAllowedToolsChoiceParam::Tool::Computer,
1106
+ OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::LiveAllowedToolsChoiceParam::Tool::CodeInterpreter,
1107
+ OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::LiveAllowedToolsChoiceParam::Tool::ProgrammaticToolCalling,
1108
+ OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::LiveAllowedToolsChoiceParam::Tool::Shell,
1109
+ OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::LiveAllowedToolsChoiceParam::Tool::Custom,
1110
+ OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::LiveAllowedToolsChoiceParam::Tool::ApplyPatch
1111
+ )
1112
+ ],
1113
+ type: Symbol,
1114
+ mode: T.nilable(
1115
+ OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::LiveAllowedToolsChoiceParam::Mode::OrSymbol
1116
+ )
1117
+ }
1118
+ )
1119
+ end
1120
+ def to_hash
1121
+ end
1122
+
1123
+ # Forces the model to call the shell tool when a tool call is required.
1124
+ module Tool
1125
+ extend OpenAI::Internal::Type::Union
1126
+
1127
+ Variants = T.type_alias {
1128
+ T.any(
1129
+ OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::LiveAllowedToolsChoiceParam::Tool::Function,
1130
+ OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::LiveAllowedToolsChoiceParam::Tool::Mcp,
1131
+ OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::LiveAllowedToolsChoiceParam::Tool::FileSearch,
1132
+ OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::LiveAllowedToolsChoiceParam::Tool::WebSearch,
1133
+ OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::LiveAllowedToolsChoiceParam::Tool::WebSearchPreview,
1134
+ OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::LiveAllowedToolsChoiceParam::Tool::ImageGeneration,
1135
+ OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::LiveAllowedToolsChoiceParam::Tool::Computer,
1136
+ OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::LiveAllowedToolsChoiceParam::Tool::CodeInterpreter,
1137
+ OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::LiveAllowedToolsChoiceParam::Tool::ProgrammaticToolCalling,
1138
+ OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::LiveAllowedToolsChoiceParam::Tool::Shell,
1139
+ OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::LiveAllowedToolsChoiceParam::Tool::Custom,
1140
+ OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::LiveAllowedToolsChoiceParam::Tool::ApplyPatch
1141
+ )
1142
+ }
1143
+
1144
+ class Function < OpenAI::Internal::Type::BaseModel
1145
+ OrHash = T.type_alias do
1146
+ T.any(
1147
+ OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::LiveAllowedToolsChoiceParam::Tool::Function,
1148
+ OpenAI::Internal::AnyHash
1149
+ )
1150
+ end
1151
+
1152
+ sig { returns(String) }
1153
+ attr_accessor :name
1154
+
1155
+ sig { returns(Symbol) }
1156
+ attr_accessor :type
1157
+
1158
+ sig do
1159
+ params(
1160
+
1161
+ name: String,
1162
+
1163
+ type: Symbol
1164
+ )
1165
+ .returns(T.attached_class)
1166
+ end
1167
+ def self.new(
1168
+
1169
+ name:,
1170
+
1171
+ type: :function
1172
+ )
1173
+ end
1174
+
1175
+ sig do
1176
+ override.returns(
1177
+ {name: String, type: Symbol}
1178
+ )
1179
+ end
1180
+ def to_hash
1181
+ end
1182
+
1183
+ end
1184
+
1185
+ class Mcp < OpenAI::Internal::Type::BaseModel
1186
+ OrHash = T.type_alias do
1187
+ T.any(
1188
+ OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::LiveAllowedToolsChoiceParam::Tool::Mcp,
1189
+ OpenAI::Internal::AnyHash
1190
+ )
1191
+ end
1192
+
1193
+ sig { returns(String) }
1194
+ attr_accessor :name
1195
+
1196
+ sig { returns(String) }
1197
+ attr_accessor :server_label
1198
+
1199
+ sig { returns(Symbol) }
1200
+ attr_accessor :type
1201
+
1202
+ sig do
1203
+ params(
1204
+
1205
+ name: String,
1206
+
1207
+ server_label: String,
1208
+
1209
+ type: Symbol
1210
+ )
1211
+ .returns(T.attached_class)
1212
+ end
1213
+ def self.new(
1214
+
1215
+ name:,
1216
+
1217
+ server_label:,
1218
+
1219
+ type: :mcp
1220
+ )
1221
+ end
1222
+
1223
+ sig do
1224
+ override.returns(
1225
+ {name: String, server_label: String, type: Symbol}
1226
+ )
1227
+ end
1228
+ def to_hash
1229
+ end
1230
+
1231
+ end
1232
+
1233
+ class FileSearch < OpenAI::Internal::Type::BaseModel
1234
+ OrHash = T.type_alias do
1235
+ T.any(
1236
+ OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::LiveAllowedToolsChoiceParam::Tool::FileSearch,
1237
+ OpenAI::Internal::AnyHash
1238
+ )
1239
+ end
1240
+
1241
+ # The tool to call. Always `file_search`.
1242
+ sig { returns(Symbol) }
1243
+ attr_accessor :type
1244
+
1245
+ sig do
1246
+ params(
1247
+
1248
+ type: Symbol
1249
+ )
1250
+ .returns(T.attached_class)
1251
+ end
1252
+ def self.new(
1253
+
1254
+ # The tool to call. Always `file_search`.
1255
+
1256
+ type: :file_search
1257
+ )
1258
+ end
1259
+
1260
+ sig do
1261
+ override.returns(
1262
+ {type: Symbol}
1263
+ )
1264
+ end
1265
+ def to_hash
1266
+ end
1267
+
1268
+ end
1269
+
1270
+ class WebSearch < OpenAI::Internal::Type::BaseModel
1271
+ OrHash = T.type_alias do
1272
+ T.any(
1273
+ OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::LiveAllowedToolsChoiceParam::Tool::WebSearch,
1274
+ OpenAI::Internal::AnyHash
1275
+ )
1276
+ end
1277
+
1278
+ # The tool to call. Always `web_search`.
1279
+ sig { returns(Symbol) }
1280
+ attr_accessor :type
1281
+
1282
+ sig do
1283
+ params(
1284
+
1285
+ type: Symbol
1286
+ )
1287
+ .returns(T.attached_class)
1288
+ end
1289
+ def self.new(
1290
+
1291
+ # The tool to call. Always `web_search`.
1292
+
1293
+ type: :web_search
1294
+ )
1295
+ end
1296
+
1297
+ sig do
1298
+ override.returns(
1299
+ {type: Symbol}
1300
+ )
1301
+ end
1302
+ def to_hash
1303
+ end
1304
+
1305
+ end
1306
+
1307
+ class WebSearchPreview < OpenAI::Internal::Type::BaseModel
1308
+ OrHash = T.type_alias do
1309
+ T.any(
1310
+ OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::LiveAllowedToolsChoiceParam::Tool::WebSearchPreview,
1311
+ OpenAI::Internal::AnyHash
1312
+ )
1313
+ end
1314
+
1315
+ # The tool to call. Always `web_search_preview`.
1316
+ sig { returns(Symbol) }
1317
+ attr_accessor :type
1318
+
1319
+ sig do
1320
+ params(
1321
+
1322
+ type: Symbol
1323
+ )
1324
+ .returns(T.attached_class)
1325
+ end
1326
+ def self.new(
1327
+
1328
+ # The tool to call. Always `web_search_preview`.
1329
+
1330
+ type: :web_search_preview
1331
+ )
1332
+ end
1333
+
1334
+ sig do
1335
+ override.returns(
1336
+ {type: Symbol}
1337
+ )
1338
+ end
1339
+ def to_hash
1340
+ end
1341
+
1342
+ end
1343
+
1344
+ class ImageGeneration < OpenAI::Internal::Type::BaseModel
1345
+ OrHash = T.type_alias do
1346
+ T.any(
1347
+ OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::LiveAllowedToolsChoiceParam::Tool::ImageGeneration,
1348
+ OpenAI::Internal::AnyHash
1349
+ )
1350
+ end
1351
+
1352
+ # The tool to call. Always `image_generation`.
1353
+ sig { returns(Symbol) }
1354
+ attr_accessor :type
1355
+
1356
+ sig do
1357
+ params(
1358
+
1359
+ type: Symbol
1360
+ )
1361
+ .returns(T.attached_class)
1362
+ end
1363
+ def self.new(
1364
+
1365
+ # The tool to call. Always `image_generation`.
1366
+
1367
+ type: :image_generation
1368
+ )
1369
+ end
1370
+
1371
+ sig do
1372
+ override.returns(
1373
+ {type: Symbol}
1374
+ )
1375
+ end
1376
+ def to_hash
1377
+ end
1378
+
1379
+ end
1380
+
1381
+ class Computer < OpenAI::Internal::Type::BaseModel
1382
+ OrHash = T.type_alias do
1383
+ T.any(
1384
+ OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::LiveAllowedToolsChoiceParam::Tool::Computer,
1385
+ OpenAI::Internal::AnyHash
1386
+ )
1387
+ end
1388
+
1389
+ # The tool to call. Always `computer`.
1390
+ sig { returns(Symbol) }
1391
+ attr_accessor :type
1392
+
1393
+ sig do
1394
+ params(
1395
+
1396
+ type: Symbol
1397
+ )
1398
+ .returns(T.attached_class)
1399
+ end
1400
+ def self.new(
1401
+
1402
+ # The tool to call. Always `computer`.
1403
+
1404
+ type: :computer
1405
+ )
1406
+ end
1407
+
1408
+ sig do
1409
+ override.returns(
1410
+ {type: Symbol}
1411
+ )
1412
+ end
1413
+ def to_hash
1414
+ end
1415
+
1416
+ end
1417
+
1418
+ class CodeInterpreter < OpenAI::Internal::Type::BaseModel
1419
+ OrHash = T.type_alias do
1420
+ T.any(
1421
+ OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::LiveAllowedToolsChoiceParam::Tool::CodeInterpreter,
1422
+ OpenAI::Internal::AnyHash
1423
+ )
1424
+ end
1425
+
1426
+ # The tool to call. Always `code_interpreter`.
1427
+ sig { returns(Symbol) }
1428
+ attr_accessor :type
1429
+
1430
+ sig do
1431
+ params(
1432
+
1433
+ type: Symbol
1434
+ )
1435
+ .returns(T.attached_class)
1436
+ end
1437
+ def self.new(
1438
+
1439
+ # The tool to call. Always `code_interpreter`.
1440
+
1441
+ type: :code_interpreter
1442
+ )
1443
+ end
1444
+
1445
+ sig do
1446
+ override.returns(
1447
+ {type: Symbol}
1448
+ )
1449
+ end
1450
+ def to_hash
1451
+ end
1452
+
1453
+ end
1454
+
1455
+ class ProgrammaticToolCalling < OpenAI::Internal::Type::BaseModel
1456
+ OrHash = T.type_alias do
1457
+ T.any(
1458
+ OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::LiveAllowedToolsChoiceParam::Tool::ProgrammaticToolCalling,
1459
+ OpenAI::Internal::AnyHash
1460
+ )
1461
+ end
1462
+
1463
+ # The tool to call. Always `programmatic_tool_calling`.
1464
+ sig { returns(Symbol) }
1465
+ attr_accessor :type
1466
+
1467
+ sig do
1468
+ params(
1469
+
1470
+ type: Symbol
1471
+ )
1472
+ .returns(T.attached_class)
1473
+ end
1474
+ def self.new(
1475
+
1476
+ # The tool to call. Always `programmatic_tool_calling`.
1477
+
1478
+ type: :programmatic_tool_calling
1479
+ )
1480
+ end
1481
+
1482
+ sig do
1483
+ override.returns(
1484
+ {type: Symbol}
1485
+ )
1486
+ end
1487
+ def to_hash
1488
+ end
1489
+
1490
+ end
1491
+
1492
+ class Shell < OpenAI::Internal::Type::BaseModel
1493
+ OrHash = T.type_alias do
1494
+ T.any(
1495
+ OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::LiveAllowedToolsChoiceParam::Tool::Shell,
1496
+ OpenAI::Internal::AnyHash
1497
+ )
1498
+ end
1499
+
1500
+ # The tool to call. Always `shell`.
1501
+ sig { returns(Symbol) }
1502
+ attr_accessor :type
1503
+
1504
+ # Forces the model to call the shell tool when a tool call is required.
1505
+ sig do
1506
+ params(
1507
+
1508
+ type: Symbol
1509
+ )
1510
+ .returns(T.attached_class)
1511
+ end
1512
+ def self.new(
1513
+
1514
+ # The tool to call. Always `shell`.
1515
+
1516
+ type: :shell
1517
+ )
1518
+ end
1519
+
1520
+ sig do
1521
+ override.returns(
1522
+ {type: Symbol}
1523
+ )
1524
+ end
1525
+ def to_hash
1526
+ end
1527
+
1528
+ end
1529
+
1530
+ class Custom < OpenAI::Internal::Type::BaseModel
1531
+ OrHash = T.type_alias do
1532
+ T.any(
1533
+ OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::LiveAllowedToolsChoiceParam::Tool::Custom,
1534
+ OpenAI::Internal::AnyHash
1535
+ )
1536
+ end
1537
+
1538
+ # The name of the custom tool to call.
1539
+ sig { returns(String) }
1540
+ attr_accessor :name
1541
+
1542
+ # The tool to call. Always `custom`.
1543
+ sig { returns(Symbol) }
1544
+ attr_accessor :type
1545
+
1546
+ sig do
1547
+ params(
1548
+
1549
+ name: String,
1550
+
1551
+ type: Symbol
1552
+ )
1553
+ .returns(T.attached_class)
1554
+ end
1555
+ def self.new(
1556
+
1557
+ # The name of the custom tool to call.
1558
+ name:,
1559
+
1560
+ # The tool to call. Always `custom`.
1561
+
1562
+ type: :custom
1563
+ )
1564
+ end
1565
+
1566
+ sig do
1567
+ override.returns(
1568
+ {name: String, type: Symbol}
1569
+ )
1570
+ end
1571
+ def to_hash
1572
+ end
1573
+
1574
+ end
1575
+
1576
+ class ApplyPatch < OpenAI::Internal::Type::BaseModel
1577
+ OrHash = T.type_alias do
1578
+ T.any(
1579
+ OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::LiveAllowedToolsChoiceParam::Tool::ApplyPatch,
1580
+ OpenAI::Internal::AnyHash
1581
+ )
1582
+ end
1583
+
1584
+ # The tool to call. Always `apply_patch`.
1585
+ sig { returns(Symbol) }
1586
+ attr_accessor :type
1587
+
1588
+ # Forces the model to call the apply_patch tool when executing a tool call.
1589
+ sig do
1590
+ params(
1591
+
1592
+ type: Symbol
1593
+ )
1594
+ .returns(T.attached_class)
1595
+ end
1596
+ def self.new(
1597
+
1598
+ # The tool to call. Always `apply_patch`.
1599
+
1600
+ type: :apply_patch
1601
+ )
1602
+ end
1603
+
1604
+ sig do
1605
+ override.returns(
1606
+ {type: Symbol}
1607
+ )
1608
+ end
1609
+ def to_hash
1610
+ end
1611
+
1612
+ end
1613
+
1614
+ sig {
1615
+ override.returns(
1616
+ T::Array[
1617
+ OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::LiveAllowedToolsChoiceParam::Tool::Variants
1618
+ ]
1619
+ )
1620
+ }
1621
+ def self.variants
1622
+ end
1623
+
1624
+ end
1625
+
1626
+ # How to select a tool from the allowed set.
1627
+ module Mode
1628
+ extend OpenAI::Internal::Type::Enum
1629
+
1630
+ TaggedSymbol = T.type_alias {
1631
+ T.all(
1632
+ Symbol,
1633
+ OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::LiveAllowedToolsChoiceParam::Mode
1634
+ )
1635
+ }
1636
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
1637
+
1638
+ NONE = T.let(
1639
+ :none,
1640
+ OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::LiveAllowedToolsChoiceParam::Mode::TaggedSymbol
1641
+ )
1642
+ AUTO = T.let(
1643
+ :auto,
1644
+ OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::LiveAllowedToolsChoiceParam::Mode::TaggedSymbol
1645
+ )
1646
+ REQUIRED = T.let(
1647
+ :required,
1648
+ OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::LiveAllowedToolsChoiceParam::Mode::TaggedSymbol
1649
+ )
1650
+
1651
+ sig {
1652
+ override.returns(
1653
+ T::Array[
1654
+ OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::LiveAllowedToolsChoiceParam::Mode::TaggedSymbol
1655
+ ]
1656
+ )
1657
+ }
1658
+ def self.values
1659
+ end
1660
+ end
1661
+ end
1662
+
1663
+ sig { override.returns(T::Array[OpenAI::Live::ResponsesDelegationUpdateConfig::ToolChoice::Variants]) }
1664
+ def self.variants
1665
+ end
1666
+
1667
+ end
1668
+
1669
+ # A function tool available to the Responses backend when the Live model delegates
1670
+ # a task.
1671
+ module Tool
1672
+ extend OpenAI::Internal::Type::Union
1673
+
1674
+ Variants = T.type_alias {
1675
+ T.any(
1676
+ OpenAI::Live::FunctionTool,
1677
+ OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::WebSearch,
1678
+ OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::FileSearch,
1679
+ OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::CodeInterpreter,
1680
+ OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::Shell,
1681
+ OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::ImageGeneration,
1682
+ OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::Mcp,
1683
+ OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::Custom,
1684
+ OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::Namespace,
1685
+ OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::ToolSearch,
1686
+ OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::ProgrammaticToolCalling,
1687
+ OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::Computer,
1688
+ OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::ApplyPatch
1689
+ )
1690
+ }
1691
+
1692
+ class WebSearch < OpenAI::Internal::Type::BaseModel
1693
+ OrHash = T.type_alias do
1694
+ T.any(
1695
+ OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::WebSearch,
1696
+ OpenAI::Internal::AnyHash
1697
+ )
1698
+ end
1699
+
1700
+ # The tool type. Always `web_search`.
1701
+ sig { returns(Symbol) }
1702
+ attr_accessor :type
1703
+
1704
+ # A web search tool available to the Live session’s Responses backend.
1705
+ sig do
1706
+ params(
1707
+
1708
+ type: Symbol
1709
+ )
1710
+ .returns(T.attached_class)
1711
+ end
1712
+ def self.new(
1713
+
1714
+ # The tool type. Always `web_search`.
1715
+
1716
+ type: :web_search
1717
+ )
1718
+ end
1719
+
1720
+ sig do
1721
+ override.returns(
1722
+ {type: Symbol}
1723
+ )
1724
+ end
1725
+ def to_hash
1726
+ end
1727
+
1728
+ end
1729
+
1730
+ class FileSearch < OpenAI::Internal::Type::BaseModel
1731
+ OrHash = T.type_alias do
1732
+ T.any(
1733
+ OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::FileSearch,
1734
+ OpenAI::Internal::AnyHash
1735
+ )
1736
+ end
1737
+
1738
+ sig { returns(Symbol) }
1739
+ attr_accessor :type
1740
+
1741
+ sig do
1742
+ params(
1743
+
1744
+ type: Symbol
1745
+ )
1746
+ .returns(T.attached_class)
1747
+ end
1748
+ def self.new(
1749
+
1750
+ type: :file_search
1751
+ )
1752
+ end
1753
+
1754
+ sig do
1755
+ override.returns(
1756
+ {type: Symbol}
1757
+ )
1758
+ end
1759
+ def to_hash
1760
+ end
1761
+
1762
+ end
1763
+
1764
+ class CodeInterpreter < OpenAI::Internal::Type::BaseModel
1765
+ OrHash = T.type_alias do
1766
+ T.any(
1767
+ OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::CodeInterpreter,
1768
+ OpenAI::Internal::AnyHash
1769
+ )
1770
+ end
1771
+
1772
+ sig { returns(Symbol) }
1773
+ attr_accessor :type
1774
+
1775
+ sig do
1776
+ params(
1777
+
1778
+ type: Symbol
1779
+ )
1780
+ .returns(T.attached_class)
1781
+ end
1782
+ def self.new(
1783
+
1784
+ type: :code_interpreter
1785
+ )
1786
+ end
1787
+
1788
+ sig do
1789
+ override.returns(
1790
+ {type: Symbol}
1791
+ )
1792
+ end
1793
+ def to_hash
1794
+ end
1795
+
1796
+ end
1797
+
1798
+ class Shell < OpenAI::Internal::Type::BaseModel
1799
+ OrHash = T.type_alias do
1800
+ T.any(
1801
+ OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::Shell,
1802
+ OpenAI::Internal::AnyHash
1803
+ )
1804
+ end
1805
+
1806
+ sig { returns(Symbol) }
1807
+ attr_accessor :type
1808
+
1809
+ sig {
1810
+ returns(
1811
+ T.nilable(
1812
+ T.any(
1813
+ OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::Shell::Environment::ContainerAuto,
1814
+ OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::Shell::Environment::ContainerReference,
1815
+ OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::Shell::Environment::Local
1816
+ )
1817
+ )
1818
+ )
1819
+ }
1820
+ attr_accessor :environment
1821
+
1822
+ # A Responses shell tool. Use a hosted container or return local shell results
1823
+ # with response.item.create. Domain secrets are not supported.
1824
+ sig do
1825
+ params(
1826
+
1827
+ environment: T.nilable(
1828
+ T.any(
1829
+ OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::Shell::Environment::ContainerAuto::OrHash,
1830
+ OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::Shell::Environment::ContainerReference::OrHash,
1831
+ OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::Shell::Environment::Local::OrHash
1832
+ )
1833
+ ),
1834
+
1835
+ type: Symbol
1836
+ )
1837
+ .returns(T.attached_class)
1838
+ end
1839
+ def self.new(
1840
+
1841
+ environment: nil,
1842
+
1843
+ type: :shell
1844
+ )
1845
+ end
1846
+
1847
+ sig do
1848
+ override.returns(
1849
+ {
1850
+ type: Symbol,
1851
+ environment: T.nilable(
1852
+ T.any(
1853
+ OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::Shell::Environment::ContainerAuto,
1854
+ OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::Shell::Environment::ContainerReference,
1855
+ OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::Shell::Environment::Local
1856
+ )
1857
+ )
1858
+ }
1859
+ )
1860
+ end
1861
+ def to_hash
1862
+ end
1863
+
1864
+ module Environment
1865
+ extend OpenAI::Internal::Type::Union
1866
+
1867
+ Variants = T.type_alias {
1868
+ T.any(
1869
+ OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::Shell::Environment::ContainerAuto,
1870
+ OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::Shell::Environment::ContainerReference,
1871
+ OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::Shell::Environment::Local
1872
+ )
1873
+ }
1874
+
1875
+ class ContainerAuto < OpenAI::Internal::Type::BaseModel
1876
+ OrHash = T.type_alias do
1877
+ T.any(
1878
+ OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::Shell::Environment::ContainerAuto,
1879
+ OpenAI::Internal::AnyHash
1880
+ )
1881
+ end
1882
+
1883
+ # Automatically creates a container for this request
1884
+ sig { returns(Symbol) }
1885
+ attr_accessor :type
1886
+
1887
+ # An optional list of uploaded files to make available to your code.
1888
+ sig { returns(T.nilable(T::Array[String])) }
1889
+ attr_accessor :file_ids
1890
+
1891
+ # The memory limit for the container.
1892
+ sig {
1893
+ returns(
1894
+ T.nilable(
1895
+ OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::Shell::Environment::ContainerAuto::MemoryLimit::OrSymbol
1896
+ )
1897
+ )
1898
+ }
1899
+ attr_accessor :memory_limit
1900
+
1901
+ # Network access policy for the container.
1902
+ sig {
1903
+ returns(
1904
+ T.nilable(
1905
+ T.any(
1906
+ OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::Shell::Environment::ContainerAuto::NetworkPolicy::Disabled,
1907
+ OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::Shell::Environment::ContainerAuto::NetworkPolicy::Allowlist
1908
+ )
1909
+ )
1910
+ )
1911
+ }
1912
+ attr_accessor :network_policy
1913
+
1914
+ # An optional list of skills referenced by id or inline data.
1915
+ sig {
1916
+ returns(
1917
+ T.nilable(
1918
+ T::Array[
1919
+ T.any(
1920
+ OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::Shell::Environment::ContainerAuto::Skill::SkillReference,
1921
+ OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::Shell::Environment::ContainerAuto::Skill::Inline
1922
+ )
1923
+ ]
1924
+ )
1925
+ )
1926
+ }
1927
+ attr_accessor :skills
1928
+
1929
+ sig do
1930
+ params(
1931
+
1932
+ file_ids: T.nilable(T::Array[String]),
1933
+
1934
+ memory_limit: T.nilable(
1935
+ OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::Shell::Environment::ContainerAuto::MemoryLimit::OrSymbol
1936
+ ),
1937
+
1938
+ network_policy: T.nilable(
1939
+ T.any(
1940
+ OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::Shell::Environment::ContainerAuto::NetworkPolicy::Disabled::OrHash,
1941
+ OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::Shell::Environment::ContainerAuto::NetworkPolicy::Allowlist::OrHash
1942
+ )
1943
+ ),
1944
+
1945
+ skills: T.nilable(
1946
+ T::Array[
1947
+ T.any(
1948
+ OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::Shell::Environment::ContainerAuto::Skill::SkillReference::OrHash,
1949
+ OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::Shell::Environment::ContainerAuto::Skill::Inline::OrHash
1950
+ )
1951
+ ]
1952
+ ),
1953
+
1954
+ type: Symbol
1955
+ )
1956
+ .returns(T.attached_class)
1957
+ end
1958
+ def self.new(
1959
+
1960
+ # An optional list of uploaded files to make available to your code.
1961
+ file_ids: nil,
1962
+
1963
+ # The memory limit for the container.
1964
+ memory_limit: nil,
1965
+
1966
+ # Network access policy for the container.
1967
+ network_policy: nil,
1968
+
1969
+ # An optional list of skills referenced by id or inline data.
1970
+ skills: nil,
1971
+
1972
+ # Automatically creates a container for this request
1973
+
1974
+ type: :container_auto
1975
+ )
1976
+ end
1977
+
1978
+ sig do
1979
+ override.returns(
1980
+ {
1981
+ type: Symbol,
1982
+ file_ids: T.nilable(T::Array[String]),
1983
+ memory_limit: T.nilable(
1984
+ OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::Shell::Environment::ContainerAuto::MemoryLimit::OrSymbol
1985
+ ),
1986
+ network_policy: T.nilable(
1987
+ T.any(
1988
+ OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::Shell::Environment::ContainerAuto::NetworkPolicy::Disabled,
1989
+ OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::Shell::Environment::ContainerAuto::NetworkPolicy::Allowlist
1990
+ )
1991
+ ),
1992
+ skills: T.nilable(
1993
+ T::Array[
1994
+ T.any(
1995
+ OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::Shell::Environment::ContainerAuto::Skill::SkillReference,
1996
+ OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::Shell::Environment::ContainerAuto::Skill::Inline
1997
+ )
1998
+ ]
1999
+ )
2000
+ }
2001
+ )
2002
+ end
2003
+ def to_hash
2004
+ end
2005
+
2006
+ # The memory limit for the container.
2007
+ module MemoryLimit
2008
+ extend OpenAI::Internal::Type::Enum
2009
+
2010
+ TaggedSymbol = T.type_alias {
2011
+ T.all(
2012
+ Symbol,
2013
+ OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::Shell::Environment::ContainerAuto::MemoryLimit
2014
+ )
2015
+ }
2016
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
2017
+
2018
+ MEMORY_LIMIT_1G = T.let(
2019
+ :"1g",
2020
+ OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::Shell::Environment::ContainerAuto::MemoryLimit::TaggedSymbol
2021
+ )
2022
+ MEMORY_LIMIT_4G = T.let(
2023
+ :"4g",
2024
+ OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::Shell::Environment::ContainerAuto::MemoryLimit::TaggedSymbol
2025
+ )
2026
+ MEMORY_LIMIT_16G = T.let(
2027
+ :"16g",
2028
+ OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::Shell::Environment::ContainerAuto::MemoryLimit::TaggedSymbol
2029
+ )
2030
+ MEMORY_LIMIT_64G = T.let(
2031
+ :"64g",
2032
+ OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::Shell::Environment::ContainerAuto::MemoryLimit::TaggedSymbol
2033
+ )
2034
+
2035
+ sig {
2036
+ override.returns(
2037
+ T::Array[
2038
+ OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::Shell::Environment::ContainerAuto::MemoryLimit::TaggedSymbol
2039
+ ]
2040
+ )
2041
+ }
2042
+ def self.values
2043
+ end
2044
+ end
2045
+
2046
+ # Network access policy for the container.
2047
+ module NetworkPolicy
2048
+ extend OpenAI::Internal::Type::Union
2049
+
2050
+ Variants = T.type_alias {
2051
+ T.any(
2052
+ OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::Shell::Environment::ContainerAuto::NetworkPolicy::Disabled,
2053
+ OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::Shell::Environment::ContainerAuto::NetworkPolicy::Allowlist
2054
+ )
2055
+ }
2056
+
2057
+ class Disabled < OpenAI::Internal::Type::BaseModel
2058
+ OrHash = T.type_alias do
2059
+ T.any(
2060
+ OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::Shell::Environment::ContainerAuto::NetworkPolicy::Disabled,
2061
+ OpenAI::Internal::AnyHash
2062
+ )
2063
+ end
2064
+
2065
+ # Disable outbound network access. Always `disabled`.
2066
+ sig { returns(Symbol) }
2067
+ attr_accessor :type
2068
+
2069
+ sig do
2070
+ params(
2071
+
2072
+ type: Symbol
2073
+ )
2074
+ .returns(T.attached_class)
2075
+ end
2076
+ def self.new(
2077
+
2078
+ # Disable outbound network access. Always `disabled`.
2079
+
2080
+ type: :disabled
2081
+ )
2082
+ end
2083
+
2084
+ sig do
2085
+ override.returns(
2086
+ {type: Symbol}
2087
+ )
2088
+ end
2089
+ def to_hash
2090
+ end
2091
+
2092
+ end
2093
+
2094
+ class Allowlist < OpenAI::Internal::Type::BaseModel
2095
+ OrHash = T.type_alias do
2096
+ T.any(
2097
+ OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::Shell::Environment::ContainerAuto::NetworkPolicy::Allowlist,
2098
+ OpenAI::Internal::AnyHash
2099
+ )
2100
+ end
2101
+
2102
+ # A list of allowed domains when type is `allowlist`.
2103
+ sig { returns(T::Array[String]) }
2104
+ attr_accessor :allowed_domains
2105
+
2106
+ # Allow outbound network access only to specified domains. Always `allowlist`.
2107
+ sig { returns(Symbol) }
2108
+ attr_accessor :type
2109
+
2110
+ sig do
2111
+ params(
2112
+
2113
+ allowed_domains: T::Array[String],
2114
+
2115
+ type: Symbol
2116
+ )
2117
+ .returns(T.attached_class)
2118
+ end
2119
+ def self.new(
2120
+
2121
+ # A list of allowed domains when type is `allowlist`.
2122
+ allowed_domains:,
2123
+
2124
+ # Allow outbound network access only to specified domains. Always `allowlist`.
2125
+
2126
+ type: :allowlist
2127
+ )
2128
+ end
2129
+
2130
+ sig do
2131
+ override.returns(
2132
+ {allowed_domains: T::Array[String], type: Symbol}
2133
+ )
2134
+ end
2135
+ def to_hash
2136
+ end
2137
+
2138
+ end
2139
+
2140
+ sig {
2141
+ override.returns(
2142
+ T::Array[
2143
+ OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::Shell::Environment::ContainerAuto::NetworkPolicy::Variants
2144
+ ]
2145
+ )
2146
+ }
2147
+ def self.variants
2148
+ end
2149
+
2150
+ end
2151
+
2152
+ module Skill
2153
+ extend OpenAI::Internal::Type::Union
2154
+
2155
+ Variants = T.type_alias {
2156
+ T.any(
2157
+ OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::Shell::Environment::ContainerAuto::Skill::SkillReference,
2158
+ OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::Shell::Environment::ContainerAuto::Skill::Inline
2159
+ )
2160
+ }
2161
+
2162
+ class SkillReference < OpenAI::Internal::Type::BaseModel
2163
+ OrHash = T.type_alias do
2164
+ T.any(
2165
+ OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::Shell::Environment::ContainerAuto::Skill::SkillReference,
2166
+ OpenAI::Internal::AnyHash
2167
+ )
2168
+ end
2169
+
2170
+ # The ID of the referenced skill.
2171
+ sig { returns(String) }
2172
+ attr_accessor :skill_id
2173
+
2174
+ # References a skill created with the /v1/skills endpoint.
2175
+ sig { returns(Symbol) }
2176
+ attr_accessor :type
2177
+
2178
+ # Optional skill version. Use a positive integer or 'latest'. Omit for default.
2179
+ sig { returns(T.nilable(String)) }
2180
+ attr_accessor :version
2181
+
2182
+ sig do
2183
+ params(
2184
+
2185
+ skill_id: String,
2186
+
2187
+ version: T.nilable(String),
2188
+
2189
+ type: Symbol
2190
+ )
2191
+ .returns(T.attached_class)
2192
+ end
2193
+ def self.new(
2194
+
2195
+ # The ID of the referenced skill.
2196
+ skill_id:,
2197
+
2198
+ # Optional skill version. Use a positive integer or 'latest'. Omit for default.
2199
+ version: nil,
2200
+
2201
+ # References a skill created with the /v1/skills endpoint.
2202
+
2203
+ type: :skill_reference
2204
+ )
2205
+ end
2206
+
2207
+ sig do
2208
+ override.returns(
2209
+ {skill_id: String, type: Symbol, version: T.nilable(String)}
2210
+ )
2211
+ end
2212
+ def to_hash
2213
+ end
2214
+
2215
+ end
2216
+
2217
+ class Inline < OpenAI::Internal::Type::BaseModel
2218
+ OrHash = T.type_alias do
2219
+ T.any(
2220
+ OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::Shell::Environment::ContainerAuto::Skill::Inline,
2221
+ OpenAI::Internal::AnyHash
2222
+ )
2223
+ end
2224
+
2225
+ # The description of the skill.
2226
+ sig { returns(String) }
2227
+ attr_accessor :description
2228
+
2229
+ # The name of the skill.
2230
+ sig { returns(String) }
2231
+ attr_accessor :name
2232
+
2233
+ # Inline skill payload
2234
+ sig {
2235
+ returns(
2236
+ OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::Shell::Environment::ContainerAuto::Skill::Inline::Source
2237
+ )
2238
+ }
2239
+ attr_reader :source
2240
+
2241
+ sig {
2242
+ params(
2243
+ source: OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::Shell::Environment::ContainerAuto::Skill::Inline::Source::OrHash
2244
+ )
2245
+ .void
2246
+ }
2247
+ attr_writer :source
2248
+
2249
+ # Defines an inline skill for this request.
2250
+ sig { returns(Symbol) }
2251
+ attr_accessor :type
2252
+
2253
+ sig do
2254
+ params(
2255
+
2256
+ description: String,
2257
+
2258
+ name: String,
2259
+
2260
+ source: OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::Shell::Environment::ContainerAuto::Skill::Inline::Source::OrHash,
2261
+
2262
+ type: Symbol
2263
+ )
2264
+ .returns(T.attached_class)
2265
+ end
2266
+ def self.new(
2267
+
2268
+ # The description of the skill.
2269
+ description:,
2270
+
2271
+ # The name of the skill.
2272
+ name:,
2273
+
2274
+ # Inline skill payload
2275
+ source:,
2276
+
2277
+ # Defines an inline skill for this request.
2278
+
2279
+ type: :inline
2280
+ )
2281
+ end
2282
+
2283
+ sig do
2284
+ override.returns(
2285
+ {
2286
+ description: String,
2287
+ name: String,
2288
+ source: OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::Shell::Environment::ContainerAuto::Skill::Inline::Source,
2289
+ type: Symbol
2290
+ }
2291
+ )
2292
+ end
2293
+ def to_hash
2294
+ end
2295
+
2296
+ class Source < OpenAI::Internal::Type::BaseModel
2297
+ OrHash = T.type_alias do
2298
+ T.any(
2299
+ OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::Shell::Environment::ContainerAuto::Skill::Inline::Source,
2300
+ OpenAI::Internal::AnyHash
2301
+ )
2302
+ end
2303
+
2304
+ # Base64-encoded skill zip bundle.
2305
+ sig { returns(String) }
2306
+ attr_accessor :data
2307
+
2308
+ # The media type of the inline skill payload. Must be `application/zip`.
2309
+ sig {
2310
+ returns(
2311
+ OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::Shell::Environment::ContainerAuto::Skill::Inline::Source::MediaType::OrSymbol
2312
+ )
2313
+ }
2314
+ attr_accessor :media_type
2315
+
2316
+ # The type of the inline skill source. Must be `base64`.
2317
+ sig {
2318
+ returns(
2319
+ OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::Shell::Environment::ContainerAuto::Skill::Inline::Source::Type::OrSymbol
2320
+ )
2321
+ }
2322
+ attr_accessor :type
2323
+
2324
+ # Inline skill payload
2325
+ sig do
2326
+ params(
2327
+
2328
+ data: String,
2329
+
2330
+ media_type: OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::Shell::Environment::ContainerAuto::Skill::Inline::Source::MediaType::OrSymbol,
2331
+
2332
+ type: OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::Shell::Environment::ContainerAuto::Skill::Inline::Source::Type::OrSymbol
2333
+ )
2334
+ .returns(T.attached_class)
2335
+ end
2336
+ def self.new(
2337
+
2338
+ # Base64-encoded skill zip bundle.
2339
+ data:,
2340
+
2341
+ # The media type of the inline skill payload. Must be `application/zip`.
2342
+ media_type:,
2343
+
2344
+ # The type of the inline skill source. Must be `base64`.
2345
+
2346
+ type:
2347
+ )
2348
+ end
2349
+
2350
+ sig do
2351
+ override.returns(
2352
+ {
2353
+ data: String,
2354
+ media_type: OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::Shell::Environment::ContainerAuto::Skill::Inline::Source::MediaType::OrSymbol,
2355
+ type: OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::Shell::Environment::ContainerAuto::Skill::Inline::Source::Type::OrSymbol
2356
+ }
2357
+ )
2358
+ end
2359
+ def to_hash
2360
+ end
2361
+
2362
+ # The media type of the inline skill payload. Must be `application/zip`.
2363
+ module MediaType
2364
+ extend OpenAI::Internal::Type::Enum
2365
+
2366
+ TaggedSymbol = T.type_alias {
2367
+ T.all(
2368
+ Symbol,
2369
+ OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::Shell::Environment::ContainerAuto::Skill::Inline::Source::MediaType
2370
+ )
2371
+ }
2372
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
2373
+
2374
+ APPLICATION_ZIP = T.let(
2375
+ :"application/zip",
2376
+ OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::Shell::Environment::ContainerAuto::Skill::Inline::Source::MediaType::TaggedSymbol
2377
+ )
2378
+
2379
+ sig {
2380
+ override.returns(
2381
+ T::Array[
2382
+ OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::Shell::Environment::ContainerAuto::Skill::Inline::Source::MediaType::TaggedSymbol
2383
+ ]
2384
+ )
2385
+ }
2386
+ def self.values
2387
+ end
2388
+ end
2389
+
2390
+ # The type of the inline skill source. Must be `base64`.
2391
+ module Type
2392
+ extend OpenAI::Internal::Type::Enum
2393
+
2394
+ TaggedSymbol = T.type_alias {
2395
+ T.all(
2396
+ Symbol,
2397
+ OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::Shell::Environment::ContainerAuto::Skill::Inline::Source::Type
2398
+ )
2399
+ }
2400
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
2401
+
2402
+ BASE64 = T.let(
2403
+ :base64,
2404
+ OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::Shell::Environment::ContainerAuto::Skill::Inline::Source::Type::TaggedSymbol
2405
+ )
2406
+
2407
+ sig {
2408
+ override.returns(
2409
+ T::Array[
2410
+ OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::Shell::Environment::ContainerAuto::Skill::Inline::Source::Type::TaggedSymbol
2411
+ ]
2412
+ )
2413
+ }
2414
+ def self.values
2415
+ end
2416
+ end
2417
+ end
2418
+ end
2419
+
2420
+ sig {
2421
+ override.returns(
2422
+ T::Array[
2423
+ OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::Shell::Environment::ContainerAuto::Skill::Variants
2424
+ ]
2425
+ )
2426
+ }
2427
+ def self.variants
2428
+ end
2429
+
2430
+ end
2431
+ end
2432
+
2433
+ class ContainerReference < OpenAI::Internal::Type::BaseModel
2434
+ OrHash = T.type_alias do
2435
+ T.any(
2436
+ OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::Shell::Environment::ContainerReference,
2437
+ OpenAI::Internal::AnyHash
2438
+ )
2439
+ end
2440
+
2441
+ # The ID of the referenced container.
2442
+ sig { returns(String) }
2443
+ attr_accessor :container_id
2444
+
2445
+ # References a container created with the /v1/containers endpoint
2446
+ sig { returns(Symbol) }
2447
+ attr_accessor :type
2448
+
2449
+ sig do
2450
+ params(
2451
+
2452
+ container_id: String,
2453
+
2454
+ type: Symbol
2455
+ )
2456
+ .returns(T.attached_class)
2457
+ end
2458
+ def self.new(
2459
+
2460
+ # The ID of the referenced container.
2461
+ container_id:,
2462
+
2463
+ # References a container created with the /v1/containers endpoint
2464
+
2465
+ type: :container_reference
2466
+ )
2467
+ end
2468
+
2469
+ sig do
2470
+ override.returns(
2471
+ {container_id: String, type: Symbol}
2472
+ )
2473
+ end
2474
+ def to_hash
2475
+ end
2476
+
2477
+ end
2478
+
2479
+ class Local < OpenAI::Internal::Type::BaseModel
2480
+ OrHash = T.type_alias do
2481
+ T.any(
2482
+ OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::Shell::Environment::Local,
2483
+ OpenAI::Internal::AnyHash
2484
+ )
2485
+ end
2486
+
2487
+ # Use a local computer environment.
2488
+ sig { returns(Symbol) }
2489
+ attr_accessor :type
2490
+
2491
+ # An optional list of skills.
2492
+ sig {
2493
+ returns(
2494
+ T.nilable(
2495
+ T::Array[OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::Shell::Environment::Local::Skill]
2496
+ )
2497
+ )
2498
+ }
2499
+ attr_accessor :skills
2500
+
2501
+ sig do
2502
+ params(
2503
+
2504
+ skills: T.nilable(
2505
+ T::Array[
2506
+ OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::Shell::Environment::Local::Skill::OrHash
2507
+ ]
2508
+ ),
2509
+
2510
+ type: Symbol
2511
+ )
2512
+ .returns(T.attached_class)
2513
+ end
2514
+ def self.new(
2515
+
2516
+ # An optional list of skills.
2517
+ skills: nil,
2518
+
2519
+ # Use a local computer environment.
2520
+
2521
+ type: :local
2522
+ )
2523
+ end
2524
+
2525
+ sig do
2526
+ override.returns(
2527
+ {
2528
+ type: Symbol,
2529
+ skills: T.nilable(
2530
+ T::Array[OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::Shell::Environment::Local::Skill]
2531
+ )
2532
+ }
2533
+ )
2534
+ end
2535
+ def to_hash
2536
+ end
2537
+
2538
+ class Skill < OpenAI::Internal::Type::BaseModel
2539
+ OrHash = T.type_alias do
2540
+ T.any(
2541
+ OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::Shell::Environment::Local::Skill,
2542
+ OpenAI::Internal::AnyHash
2543
+ )
2544
+ end
2545
+
2546
+ # The description of the skill.
2547
+ sig { returns(String) }
2548
+ attr_accessor :description
2549
+
2550
+ # The name of the skill.
2551
+ sig { returns(String) }
2552
+ attr_accessor :name
2553
+
2554
+ # The path to the directory containing the skill.
2555
+ sig { returns(String) }
2556
+ attr_accessor :path
2557
+
2558
+ sig do
2559
+ params(
2560
+
2561
+ description: String,
2562
+
2563
+ name: String,
2564
+
2565
+ path: String
2566
+ )
2567
+ .returns(T.attached_class)
2568
+ end
2569
+ def self.new(
2570
+
2571
+ # The description of the skill.
2572
+ description:,
2573
+
2574
+ # The name of the skill.
2575
+ name:,
2576
+
2577
+ # The path to the directory containing the skill.
2578
+
2579
+ path:
2580
+ )
2581
+ end
2582
+
2583
+ sig do
2584
+ override.returns(
2585
+ {description: String, name: String, path: String}
2586
+ )
2587
+ end
2588
+ def to_hash
2589
+ end
2590
+
2591
+ end
2592
+ end
2593
+
2594
+ sig {
2595
+ override.returns(
2596
+ T::Array[OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::Shell::Environment::Variants]
2597
+ )
2598
+ }
2599
+ def self.variants
2600
+ end
2601
+
2602
+ end
2603
+ end
2604
+
2605
+ class ImageGeneration < OpenAI::Internal::Type::BaseModel
2606
+ OrHash = T.type_alias do
2607
+ T.any(
2608
+ OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::ImageGeneration,
2609
+ OpenAI::Internal::AnyHash
2610
+ )
2611
+ end
2612
+
2613
+ sig { returns(Symbol) }
2614
+ attr_accessor :type
2615
+
2616
+ sig do
2617
+ params(
2618
+
2619
+ type: Symbol
2620
+ )
2621
+ .returns(T.attached_class)
2622
+ end
2623
+ def self.new(
2624
+
2625
+ type: :image_generation
2626
+ )
2627
+ end
2628
+
2629
+ sig do
2630
+ override.returns(
2631
+ {type: Symbol}
2632
+ )
2633
+ end
2634
+ def to_hash
2635
+ end
2636
+
2637
+ end
2638
+
2639
+ class Mcp < OpenAI::Internal::Type::BaseModel
2640
+ OrHash = T.type_alias do
2641
+ T.any(
2642
+ OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::Mcp,
2643
+ OpenAI::Internal::AnyHash
2644
+ )
2645
+ end
2646
+
2647
+ sig { returns(Symbol) }
2648
+ attr_accessor :type
2649
+
2650
+ sig do
2651
+ params(
2652
+
2653
+ type: Symbol
2654
+ )
2655
+ .returns(T.attached_class)
2656
+ end
2657
+ def self.new(
2658
+
2659
+ type: :mcp
2660
+ )
2661
+ end
2662
+
2663
+ sig do
2664
+ override.returns(
2665
+ {type: Symbol}
2666
+ )
2667
+ end
2668
+ def to_hash
2669
+ end
2670
+
2671
+ end
2672
+
2673
+ class Custom < OpenAI::Internal::Type::BaseModel
2674
+ OrHash = T.type_alias do
2675
+ T.any(
2676
+ OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::Custom,
2677
+ OpenAI::Internal::AnyHash
2678
+ )
2679
+ end
2680
+
2681
+ sig { returns(Symbol) }
2682
+ attr_accessor :type
2683
+
2684
+ sig do
2685
+ params(
2686
+
2687
+ type: Symbol
2688
+ )
2689
+ .returns(T.attached_class)
2690
+ end
2691
+ def self.new(
2692
+
2693
+ type: :custom
2694
+ )
2695
+ end
2696
+
2697
+ sig do
2698
+ override.returns(
2699
+ {type: Symbol}
2700
+ )
2701
+ end
2702
+ def to_hash
2703
+ end
2704
+
2705
+ end
2706
+
2707
+ class Namespace < OpenAI::Internal::Type::BaseModel
2708
+ OrHash = T.type_alias do
2709
+ T.any(
2710
+ OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::Namespace,
2711
+ OpenAI::Internal::AnyHash
2712
+ )
2713
+ end
2714
+
2715
+ sig { returns(Symbol) }
2716
+ attr_accessor :type
2717
+
2718
+ sig do
2719
+ params(
2720
+
2721
+ type: Symbol
2722
+ )
2723
+ .returns(T.attached_class)
2724
+ end
2725
+ def self.new(
2726
+
2727
+ type: :namespace
2728
+ )
2729
+ end
2730
+
2731
+ sig do
2732
+ override.returns(
2733
+ {type: Symbol}
2734
+ )
2735
+ end
2736
+ def to_hash
2737
+ end
2738
+
2739
+ end
2740
+
2741
+ class ToolSearch < OpenAI::Internal::Type::BaseModel
2742
+ OrHash = T.type_alias do
2743
+ T.any(
2744
+ OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::ToolSearch,
2745
+ OpenAI::Internal::AnyHash
2746
+ )
2747
+ end
2748
+
2749
+ sig { returns(Symbol) }
2750
+ attr_accessor :type
2751
+
2752
+ sig do
2753
+ params(
2754
+
2755
+ type: Symbol
2756
+ )
2757
+ .returns(T.attached_class)
2758
+ end
2759
+ def self.new(
2760
+
2761
+ type: :tool_search
2762
+ )
2763
+ end
2764
+
2765
+ sig do
2766
+ override.returns(
2767
+ {type: Symbol}
2768
+ )
2769
+ end
2770
+ def to_hash
2771
+ end
2772
+
2773
+ end
2774
+
2775
+ class ProgrammaticToolCalling < OpenAI::Internal::Type::BaseModel
2776
+ OrHash = T.type_alias do
2777
+ T.any(
2778
+ OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::ProgrammaticToolCalling,
2779
+ OpenAI::Internal::AnyHash
2780
+ )
2781
+ end
2782
+
2783
+ sig { returns(Symbol) }
2784
+ attr_accessor :type
2785
+
2786
+ sig do
2787
+ params(
2788
+
2789
+ type: Symbol
2790
+ )
2791
+ .returns(T.attached_class)
2792
+ end
2793
+ def self.new(
2794
+
2795
+ type: :programmatic_tool_calling
2796
+ )
2797
+ end
2798
+
2799
+ sig do
2800
+ override.returns(
2801
+ {type: Symbol}
2802
+ )
2803
+ end
2804
+ def to_hash
2805
+ end
2806
+
2807
+ end
2808
+
2809
+ class Computer < OpenAI::Internal::Type::BaseModel
2810
+ OrHash = T.type_alias do
2811
+ T.any(
2812
+ OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::Computer,
2813
+ OpenAI::Internal::AnyHash
2814
+ )
2815
+ end
2816
+
2817
+ sig { returns(Symbol) }
2818
+ attr_accessor :type
2819
+
2820
+ sig do
2821
+ params(
2822
+
2823
+ type: Symbol
2824
+ )
2825
+ .returns(T.attached_class)
2826
+ end
2827
+ def self.new(
2828
+
2829
+ type: :computer
2830
+ )
2831
+ end
2832
+
2833
+ sig do
2834
+ override.returns(
2835
+ {type: Symbol}
2836
+ )
2837
+ end
2838
+ def to_hash
2839
+ end
2840
+
2841
+ end
2842
+
2843
+ class ApplyPatch < OpenAI::Internal::Type::BaseModel
2844
+ OrHash = T.type_alias do
2845
+ T.any(
2846
+ OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::ApplyPatch,
2847
+ OpenAI::Internal::AnyHash
2848
+ )
2849
+ end
2850
+
2851
+ sig { returns(Symbol) }
2852
+ attr_accessor :type
2853
+
2854
+ sig do
2855
+ params(
2856
+
2857
+ type: Symbol
2858
+ )
2859
+ .returns(T.attached_class)
2860
+ end
2861
+ def self.new(
2862
+
2863
+ type: :apply_patch
2864
+ )
2865
+ end
2866
+
2867
+ sig do
2868
+ override.returns(
2869
+ {type: Symbol}
2870
+ )
2871
+ end
2872
+ def to_hash
2873
+ end
2874
+
2875
+ end
2876
+
574
2877
  sig { override.returns(T::Array[OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::Variants]) }
575
2878
  def self.variants
576
2879
  end