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