openai 0.115.1 → 0.117.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (88) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +26 -0
  3. data/README.md +1 -1
  4. data/lib/openai/helpers/responses_websocket/incremental.rb +500 -154
  5. data/lib/openai/helpers/responses_websocket/session.rb +75 -2
  6. data/lib/openai/models/admin/organization/workload_identity_provider.rb +158 -0
  7. data/lib/openai/models/admin/organization/workload_identity_provider_create_params.rb +143 -0
  8. data/lib/openai/models/admin/organization/workload_identity_provider_delete_params.rb +24 -0
  9. data/lib/openai/models/admin/organization/workload_identity_provider_deleted.rb +32 -0
  10. data/lib/openai/models/admin/organization/workload_identity_provider_list_params.rb +58 -0
  11. data/lib/openai/models/admin/organization/workload_identity_provider_retrieve_params.rb +24 -0
  12. data/lib/openai/models/admin/organization/workload_identity_provider_update_params.rb +143 -0
  13. data/lib/openai/models/admin/organization/workload_identity_providers/federation_rule.rb +161 -0
  14. data/lib/openai/models/admin/organization/workload_identity_providers/federation_rule_create_params.rb +144 -0
  15. data/lib/openai/models/admin/organization/workload_identity_providers/federation_rule_delete_params.rb +32 -0
  16. data/lib/openai/models/admin/organization/workload_identity_providers/federation_rule_deleted.rb +34 -0
  17. data/lib/openai/models/admin/organization/workload_identity_providers/federation_rule_list_params.rb +85 -0
  18. data/lib/openai/models/admin/organization/workload_identity_providers/federation_rule_retrieve_params.rb +32 -0
  19. data/lib/openai/models/admin/organization/workload_identity_providers/federation_rule_update_params.rb +134 -0
  20. data/lib/openai/models/beta/chatkit/chat_session_workflow_param.rb +5 -3
  21. data/lib/openai/models/beta/chatkit_workflow.rb +5 -3
  22. data/lib/openai/models/live/responses_delegation_config.rb +999 -6
  23. data/lib/openai/models/live/responses_delegation_update_config.rb +1043 -6
  24. data/lib/openai/resources/admin/organization/workload_identity_providers/federation_rules.rb +198 -0
  25. data/lib/openai/resources/admin/organization/workload_identity_providers.rb +148 -0
  26. data/lib/openai/resources/admin/organization.rb +6 -0
  27. data/lib/openai/version.rb +1 -1
  28. data/lib/openai.rb +16 -0
  29. data/rbi/openai/helpers/responses_websocket/incremental.rbi +4 -0
  30. data/rbi/openai/models/admin/organization/workload_identity_provider.rbi +288 -0
  31. data/rbi/openai/models/admin/organization/workload_identity_provider_create_params.rbi +311 -0
  32. data/rbi/openai/models/admin/organization/workload_identity_provider_delete_params.rbi +57 -0
  33. data/rbi/openai/models/admin/organization/workload_identity_provider_deleted.rbi +64 -0
  34. data/rbi/openai/models/admin/organization/workload_identity_provider_list_params.rbi +111 -0
  35. data/rbi/openai/models/admin/organization/workload_identity_provider_retrieve_params.rbi +57 -0
  36. data/rbi/openai/models/admin/organization/workload_identity_provider_update_params.rbi +317 -0
  37. data/rbi/openai/models/admin/organization/workload_identity_providers/federation_rule.rbi +276 -0
  38. data/rbi/openai/models/admin/organization/workload_identity_providers/federation_rule_create_params.rbi +282 -0
  39. data/rbi/openai/models/admin/organization/workload_identity_providers/federation_rule_delete_params.rbi +72 -0
  40. data/rbi/openai/models/admin/organization/workload_identity_providers/federation_rule_deleted.rbi +68 -0
  41. data/rbi/openai/models/admin/organization/workload_identity_providers/federation_rule_list_params.rbi +153 -0
  42. data/rbi/openai/models/admin/organization/workload_identity_providers/federation_rule_retrieve_params.rbi +72 -0
  43. data/rbi/openai/models/admin/organization/workload_identity_providers/federation_rule_update_params.rbi +281 -0
  44. data/rbi/openai/models/beta/chatkit/chat_session_workflow_param.rbi +1 -1
  45. data/rbi/openai/models/beta/chatkit_workflow.rbi +1 -1
  46. data/rbi/openai/models/live/responses_delegation_config.rbi +2253 -24
  47. data/rbi/openai/models/live/responses_delegation_update_config.rbi +2327 -24
  48. data/rbi/openai/resources/admin/organization/workload_identity_providers/federation_rules.rbi +148 -0
  49. data/rbi/openai/resources/admin/organization/workload_identity_providers.rbi +123 -0
  50. data/rbi/openai/resources/admin/organization.rbi +3 -0
  51. data/responses-websocket.md +40 -2
  52. data/sig/openai/helpers/responses_websocket/incremental.rbs +1 -0
  53. data/sig/openai/models/admin/organization/external_key_create_params.rbs +9 -9
  54. data/sig/openai/models/admin/organization/workload_identity_provider.rbs +136 -0
  55. data/sig/openai/models/admin/organization/workload_identity_provider_create_params.rbs +140 -0
  56. data/sig/openai/models/admin/organization/workload_identity_provider_delete_params.rbs +30 -0
  57. data/sig/openai/models/admin/organization/workload_identity_provider_deleted.rbs +34 -0
  58. data/sig/openai/models/admin/organization/workload_identity_provider_list_params.rbs +59 -0
  59. data/sig/openai/models/admin/organization/workload_identity_provider_retrieve_params.rbs +30 -0
  60. data/sig/openai/models/admin/organization/workload_identity_provider_update_params.rbs +145 -0
  61. data/sig/openai/models/admin/organization/workload_identity_providers/federation_rule.rbs +124 -0
  62. data/sig/openai/models/admin/organization/workload_identity_providers/federation_rule_create_params.rbs +126 -0
  63. data/sig/openai/models/admin/organization/workload_identity_providers/federation_rule_delete_params.rbs +37 -0
  64. data/sig/openai/models/admin/organization/workload_identity_providers/federation_rule_deleted.rbs +36 -0
  65. data/sig/openai/models/admin/organization/workload_identity_providers/federation_rule_list_params.rbs +73 -0
  66. data/sig/openai/models/admin/organization/workload_identity_providers/federation_rule_retrieve_params.rbs +37 -0
  67. data/sig/openai/models/admin/organization/workload_identity_providers/federation_rule_update_params.rbs +123 -0
  68. data/sig/openai/models/audio/transcription_create_params.rbs +3 -3
  69. data/sig/openai/models/audio/voice_create_params.rbs +6 -6
  70. data/sig/openai/models/beta/assistant_create_params.rbs +14 -2
  71. data/sig/openai/models/beta/chatkit/chat_session_workflow_param.rbs +1 -1
  72. data/sig/openai/models/beta/chatkit_workflow.rbs +1 -1
  73. data/sig/openai/models/beta/thread_create_and_run_params.rbs +14 -2
  74. data/sig/openai/models/beta/thread_create_params.rbs +14 -2
  75. data/sig/openai/models/decision_create_params.rbs +42 -0
  76. data/sig/openai/models/eval_create_params.rbs +29 -2
  77. data/sig/openai/models/evals/run_create_params.rbs +53 -2
  78. data/sig/openai/models/live/responses_delegation_config.rbs +851 -0
  79. data/sig/openai/models/live/responses_delegation_update_config.rbs +871 -0
  80. data/sig/openai/resources/admin/organization/external_keys.rbs +3 -3
  81. data/sig/openai/resources/admin/organization/workload_identity_providers/federation_rules.rbs +61 -0
  82. data/sig/openai/resources/admin/organization/workload_identity_providers.rbs +58 -0
  83. data/sig/openai/resources/admin/organization.rbs +2 -0
  84. data/sig/openai/resources/audio/transcriptions.rbs +2 -2
  85. data/sig/openai/resources/audio/voices.rbs +2 -2
  86. data/sig/openai/resources/decisions.rbs +14 -0
  87. data/sig/openai/resources/evals.rbs +8 -1
  88. metadata +49 -1
@@ -224,6 +224,17 @@ module OpenAI
224
224
  OpenAI::Models::Live::ResponsesDelegationConfig::ToolChoice::live_tool_choice_enum
225
225
  | OpenAI::Live::ResponsesDelegationConfig::ToolChoice::LiveFunctionToolChoiceParam
226
226
  | OpenAI::Live::ResponsesDelegationConfig::ToolChoice::LiveMCPToolChoiceParam
227
+ | OpenAI::Live::ResponsesDelegationConfig::ToolChoice::FileSearch
228
+ | OpenAI::Live::ResponsesDelegationConfig::ToolChoice::WebSearch
229
+ | OpenAI::Live::ResponsesDelegationConfig::ToolChoice::WebSearchPreview
230
+ | OpenAI::Live::ResponsesDelegationConfig::ToolChoice::ImageGeneration
231
+ | OpenAI::Live::ResponsesDelegationConfig::ToolChoice::Computer
232
+ | OpenAI::Live::ResponsesDelegationConfig::ToolChoice::CodeInterpreter
233
+ | OpenAI::Live::ResponsesDelegationConfig::ToolChoice::ProgrammaticToolCalling
234
+ | OpenAI::Live::ResponsesDelegationConfig::ToolChoice::Shell
235
+ | OpenAI::Live::ResponsesDelegationConfig::ToolChoice::Custom
236
+ | OpenAI::Live::ResponsesDelegationConfig::ToolChoice::ApplyPatch
237
+ | OpenAI::Live::ResponsesDelegationConfig::ToolChoice::LiveAllowedToolsChoiceParam
227
238
 
228
239
  module ToolChoice
229
240
  extend OpenAI::Internal::Type::Union
@@ -272,12 +283,396 @@ module OpenAI
272
283
  def to_hash: -> { name: String, server_label: String, ?type: :mcp }
273
284
  end
274
285
 
286
+ type file_search = { ?type: :file_search }
287
+
288
+ class FileSearch < OpenAI::Internal::Type::BaseModel
289
+ # The tool to call. Always `file_search`.
290
+ attr_accessor type: :file_search
291
+
292
+ # @param type
293
+ # The tool to call. Always `file_search`.
294
+ def initialize: (?type: :file_search) -> void
295
+
296
+ def to_hash: -> { ?type: :file_search }
297
+ end
298
+
299
+ type web_search = { ?type: :web_search }
300
+
301
+ class WebSearch < OpenAI::Internal::Type::BaseModel
302
+ # The tool to call. Always `web_search`.
303
+ attr_accessor type: :web_search
304
+
305
+ # @param type
306
+ # The tool to call. Always `web_search`.
307
+ def initialize: (?type: :web_search) -> void
308
+
309
+ def to_hash: -> { ?type: :web_search }
310
+ end
311
+
312
+ type web_search_preview = { ?type: :web_search_preview }
313
+
314
+ class WebSearchPreview < OpenAI::Internal::Type::BaseModel
315
+ # The tool to call. Always `web_search_preview`.
316
+ attr_accessor type: :web_search_preview
317
+
318
+ # @param type
319
+ # The tool to call. Always `web_search_preview`.
320
+ def initialize: (?type: :web_search_preview) -> void
321
+
322
+ def to_hash: -> { ?type: :web_search_preview }
323
+ end
324
+
325
+ type image_generation = { ?type: :image_generation }
326
+
327
+ class ImageGeneration < OpenAI::Internal::Type::BaseModel
328
+ # The tool to call. Always `image_generation`.
329
+ attr_accessor type: :image_generation
330
+
331
+ # @param type
332
+ # The tool to call. Always `image_generation`.
333
+ def initialize: (?type: :image_generation) -> void
334
+
335
+ def to_hash: -> { ?type: :image_generation }
336
+ end
337
+
338
+ type computer = { ?type: :computer }
339
+
340
+ class Computer < OpenAI::Internal::Type::BaseModel
341
+ # The tool to call. Always `computer`.
342
+ attr_accessor type: :computer
343
+
344
+ # @param type
345
+ # The tool to call. Always `computer`.
346
+ def initialize: (?type: :computer) -> void
347
+
348
+ def to_hash: -> { ?type: :computer }
349
+ end
350
+
351
+ type code_interpreter = { ?type: :code_interpreter }
352
+
353
+ class CodeInterpreter < OpenAI::Internal::Type::BaseModel
354
+ # The tool to call. Always `code_interpreter`.
355
+ attr_accessor type: :code_interpreter
356
+
357
+ # @param type
358
+ # The tool to call. Always `code_interpreter`.
359
+ def initialize: (?type: :code_interpreter) -> void
360
+
361
+ def to_hash: -> { ?type: :code_interpreter }
362
+ end
363
+
364
+ type programmatic_tool_calling = { ?type: :programmatic_tool_calling }
365
+
366
+ class ProgrammaticToolCalling < OpenAI::Internal::Type::BaseModel
367
+ # The tool to call. Always `programmatic_tool_calling`.
368
+ attr_accessor type: :programmatic_tool_calling
369
+
370
+ # @param type
371
+ # The tool to call. Always `programmatic_tool_calling`.
372
+ def initialize: (?type: :programmatic_tool_calling) -> void
373
+
374
+ def to_hash: -> { ?type: :programmatic_tool_calling }
375
+ end
376
+
377
+ type shell = { ?type: :shell }
378
+
379
+ class Shell < OpenAI::Internal::Type::BaseModel
380
+ # The tool to call. Always `shell`.
381
+ attr_accessor type: :shell
382
+
383
+ # @param type
384
+ # The tool to call. Always `shell`.
385
+ def initialize: (?type: :shell) -> void
386
+
387
+ def to_hash: -> { ?type: :shell }
388
+ end
389
+
390
+ type custom = { name: String, ?type: :custom }
391
+
392
+ class Custom < OpenAI::Internal::Type::BaseModel
393
+ # The name of the custom tool to call.
394
+ attr_accessor name: String
395
+
396
+ # The tool to call. Always `custom`.
397
+ attr_accessor type: :custom
398
+
399
+ # @param name
400
+ # The name of the custom tool to call.
401
+ # @param type
402
+ # The tool to call. Always `custom`.
403
+ def initialize: (name: String, ?type: :custom) -> void
404
+
405
+ def to_hash: -> { name: String, ?type: :custom }
406
+ end
407
+
408
+ type apply_patch = { ?type: :apply_patch }
409
+
410
+ class ApplyPatch < OpenAI::Internal::Type::BaseModel
411
+ # The tool to call. Always `apply_patch`.
412
+ attr_accessor type: :apply_patch
413
+
414
+ # @param type
415
+ # The tool to call. Always `apply_patch`.
416
+ def initialize: (?type: :apply_patch) -> void
417
+
418
+ def to_hash: -> { ?type: :apply_patch }
419
+ end
420
+
421
+ type live_allowed_tools_choice_param =
422
+ {
423
+ tools: ::Array[OpenAI::Models::Live::ResponsesDelegationConfig::ToolChoice::LiveAllowedToolsChoiceParam::tool],
424
+ ?type: :allowed_tools,
425
+ ?mode: OpenAI::Models::Live::ResponsesDelegationConfig::ToolChoice::LiveAllowedToolsChoiceParam::mode?
426
+ }
427
+
428
+ class LiveAllowedToolsChoiceParam < OpenAI::Internal::Type::BaseModel
429
+ # The tools that the delegated Responses model may call.
430
+ attr_accessor tools: ::Array[OpenAI::Models::Live::ResponsesDelegationConfig::ToolChoice::LiveAllowedToolsChoiceParam::tool]
431
+
432
+ # The tool choice type. Always `allowed_tools`.
433
+ attr_accessor type: :allowed_tools
434
+
435
+ # How to select a tool from the allowed set.
436
+ attr_accessor mode: OpenAI::Models::Live::ResponsesDelegationConfig::ToolChoice::LiveAllowedToolsChoiceParam::mode?
437
+
438
+ # @param tools
439
+ # The tools that the delegated Responses model may call.
440
+ # @param mode
441
+ # How to select a tool from the allowed set.
442
+ # @param type
443
+ # The tool choice type. Always `allowed_tools`.
444
+ def initialize: (
445
+ tools: ::Array[OpenAI::Models::Live::ResponsesDelegationConfig::ToolChoice::LiveAllowedToolsChoiceParam::tool],
446
+ ?mode: OpenAI::Models::Live::ResponsesDelegationConfig::ToolChoice::LiveAllowedToolsChoiceParam::mode?,
447
+ ?type: :allowed_tools
448
+ ) -> void
449
+
450
+ def to_hash: -> {
451
+ tools: ::Array[OpenAI::Models::Live::ResponsesDelegationConfig::ToolChoice::LiveAllowedToolsChoiceParam::tool],
452
+ ?type: :allowed_tools,
453
+ ?mode: OpenAI::Models::Live::ResponsesDelegationConfig::ToolChoice::LiveAllowedToolsChoiceParam::mode?
454
+ }
455
+
456
+ type tool =
457
+ OpenAI::Live::ResponsesDelegationConfig::ToolChoice::LiveAllowedToolsChoiceParam::Tool::Function
458
+ | OpenAI::Live::ResponsesDelegationConfig::ToolChoice::LiveAllowedToolsChoiceParam::Tool::Mcp
459
+ | OpenAI::Live::ResponsesDelegationConfig::ToolChoice::LiveAllowedToolsChoiceParam::Tool::FileSearch
460
+ | OpenAI::Live::ResponsesDelegationConfig::ToolChoice::LiveAllowedToolsChoiceParam::Tool::WebSearch
461
+ | OpenAI::Live::ResponsesDelegationConfig::ToolChoice::LiveAllowedToolsChoiceParam::Tool::WebSearchPreview
462
+ | OpenAI::Live::ResponsesDelegationConfig::ToolChoice::LiveAllowedToolsChoiceParam::Tool::ImageGeneration
463
+ | OpenAI::Live::ResponsesDelegationConfig::ToolChoice::LiveAllowedToolsChoiceParam::Tool::Computer
464
+ | OpenAI::Live::ResponsesDelegationConfig::ToolChoice::LiveAllowedToolsChoiceParam::Tool::CodeInterpreter
465
+ | OpenAI::Live::ResponsesDelegationConfig::ToolChoice::LiveAllowedToolsChoiceParam::Tool::ProgrammaticToolCalling
466
+ | OpenAI::Live::ResponsesDelegationConfig::ToolChoice::LiveAllowedToolsChoiceParam::Tool::Shell
467
+ | OpenAI::Live::ResponsesDelegationConfig::ToolChoice::LiveAllowedToolsChoiceParam::Tool::Custom
468
+ | OpenAI::Live::ResponsesDelegationConfig::ToolChoice::LiveAllowedToolsChoiceParam::Tool::ApplyPatch
469
+
470
+ module Tool
471
+ extend OpenAI::Internal::Type::Union
472
+
473
+ type function = { name: String, ?type: :function }
474
+
475
+ class Function < OpenAI::Internal::Type::BaseModel
476
+ attr_accessor name: String
477
+
478
+ attr_accessor type: :function
479
+
480
+ def initialize: (name: String, ?type: :function) -> void
481
+
482
+ def to_hash: -> { name: String, ?type: :function }
483
+ end
484
+
485
+ type mcp = { name: String, server_label: String, ?type: :mcp }
486
+
487
+ class Mcp < OpenAI::Internal::Type::BaseModel
488
+ attr_accessor name: String
489
+
490
+ attr_accessor server_label: String
491
+
492
+ attr_accessor type: :mcp
493
+
494
+ def initialize: (
495
+ name: String,
496
+ server_label: String,
497
+ ?type: :mcp
498
+ ) -> void
499
+
500
+ def to_hash: -> {
501
+ name: String,
502
+ server_label: String,
503
+ ?type: :mcp
504
+ }
505
+ end
506
+
507
+ type file_search = { ?type: :file_search }
508
+
509
+ class FileSearch < OpenAI::Internal::Type::BaseModel
510
+ # The tool to call. Always `file_search`.
511
+ attr_accessor type: :file_search
512
+
513
+ # @param type
514
+ # The tool to call. Always `file_search`.
515
+ def initialize: (?type: :file_search) -> void
516
+
517
+ def to_hash: -> { ?type: :file_search }
518
+ end
519
+
520
+ type web_search = { ?type: :web_search }
521
+
522
+ class WebSearch < OpenAI::Internal::Type::BaseModel
523
+ # The tool to call. Always `web_search`.
524
+ attr_accessor type: :web_search
525
+
526
+ # @param type
527
+ # The tool to call. Always `web_search`.
528
+ def initialize: (?type: :web_search) -> void
529
+
530
+ def to_hash: -> { ?type: :web_search }
531
+ end
532
+
533
+ type web_search_preview = { ?type: :web_search_preview }
534
+
535
+ class WebSearchPreview < OpenAI::Internal::Type::BaseModel
536
+ # The tool to call. Always `web_search_preview`.
537
+ attr_accessor type: :web_search_preview
538
+
539
+ # @param type
540
+ # The tool to call. Always `web_search_preview`.
541
+ def initialize: (?type: :web_search_preview) -> void
542
+
543
+ def to_hash: -> { ?type: :web_search_preview }
544
+ end
545
+
546
+ type image_generation = { ?type: :image_generation }
547
+
548
+ class ImageGeneration < OpenAI::Internal::Type::BaseModel
549
+ # The tool to call. Always `image_generation`.
550
+ attr_accessor type: :image_generation
551
+
552
+ # @param type
553
+ # The tool to call. Always `image_generation`.
554
+ def initialize: (?type: :image_generation) -> void
555
+
556
+ def to_hash: -> { ?type: :image_generation }
557
+ end
558
+
559
+ type computer = { ?type: :computer }
560
+
561
+ class Computer < OpenAI::Internal::Type::BaseModel
562
+ # The tool to call. Always `computer`.
563
+ attr_accessor type: :computer
564
+
565
+ # @param type
566
+ # The tool to call. Always `computer`.
567
+ def initialize: (?type: :computer) -> void
568
+
569
+ def to_hash: -> { ?type: :computer }
570
+ end
571
+
572
+ type code_interpreter = { ?type: :code_interpreter }
573
+
574
+ class CodeInterpreter < OpenAI::Internal::Type::BaseModel
575
+ # The tool to call. Always `code_interpreter`.
576
+ attr_accessor type: :code_interpreter
577
+
578
+ # @param type
579
+ # The tool to call. Always `code_interpreter`.
580
+ def initialize: (?type: :code_interpreter) -> void
581
+
582
+ def to_hash: -> { ?type: :code_interpreter }
583
+ end
584
+
585
+ type programmatic_tool_calling =
586
+ { ?type: :programmatic_tool_calling }
587
+
588
+ class ProgrammaticToolCalling < OpenAI::Internal::Type::BaseModel
589
+ # The tool to call. Always `programmatic_tool_calling`.
590
+ attr_accessor type: :programmatic_tool_calling
591
+
592
+ # @param type
593
+ # The tool to call. Always `programmatic_tool_calling`.
594
+ def initialize: (?type: :programmatic_tool_calling) -> void
595
+
596
+ def to_hash: -> { ?type: :programmatic_tool_calling }
597
+ end
598
+
599
+ type shell = { ?type: :shell }
600
+
601
+ class Shell < OpenAI::Internal::Type::BaseModel
602
+ # The tool to call. Always `shell`.
603
+ attr_accessor type: :shell
604
+
605
+ # @param type
606
+ # The tool to call. Always `shell`.
607
+ def initialize: (?type: :shell) -> void
608
+
609
+ def to_hash: -> { ?type: :shell }
610
+ end
611
+
612
+ type custom = { name: String, ?type: :custom }
613
+
614
+ class Custom < OpenAI::Internal::Type::BaseModel
615
+ # The name of the custom tool to call.
616
+ attr_accessor name: String
617
+
618
+ # The tool to call. Always `custom`.
619
+ attr_accessor type: :custom
620
+
621
+ # @param name
622
+ # The name of the custom tool to call.
623
+ # @param type
624
+ # The tool to call. Always `custom`.
625
+ def initialize: (name: String, ?type: :custom) -> void
626
+
627
+ def to_hash: -> { name: String, ?type: :custom }
628
+ end
629
+
630
+ type apply_patch = { ?type: :apply_patch }
631
+
632
+ class ApplyPatch < OpenAI::Internal::Type::BaseModel
633
+ # The tool to call. Always `apply_patch`.
634
+ attr_accessor type: :apply_patch
635
+
636
+ # @param type
637
+ # The tool to call. Always `apply_patch`.
638
+ def initialize: (?type: :apply_patch) -> void
639
+
640
+ def to_hash: -> { ?type: :apply_patch }
641
+ end
642
+
643
+ def self?.variants: -> ::Array[OpenAI::Models::Live::ResponsesDelegationConfig::ToolChoice::LiveAllowedToolsChoiceParam::tool]
644
+ end
645
+
646
+ type mode = :none | :auto | :required
647
+
648
+ module Mode
649
+ extend OpenAI::Internal::Type::Enum
650
+
651
+ NONE: :none
652
+ AUTO: :auto
653
+ REQUIRED: :required
654
+
655
+ def self?.values: -> ::Array[OpenAI::Models::Live::ResponsesDelegationConfig::ToolChoice::LiveAllowedToolsChoiceParam::mode]
656
+ end
657
+ end
658
+
275
659
  def self?.variants: -> ::Array[OpenAI::Models::Live::ResponsesDelegationConfig::tool_choice]
276
660
  end
277
661
 
278
662
  type tool =
279
663
  OpenAI::Live::FunctionTool
280
664
  | OpenAI::Live::ResponsesDelegationConfig::Tool::WebSearch
665
+ | OpenAI::Live::ResponsesDelegationConfig::Tool::FileSearch
666
+ | OpenAI::Live::ResponsesDelegationConfig::Tool::CodeInterpreter
667
+ | OpenAI::Live::ResponsesDelegationConfig::Tool::Shell
668
+ | OpenAI::Live::ResponsesDelegationConfig::Tool::ImageGeneration
669
+ | OpenAI::Live::ResponsesDelegationConfig::Tool::Mcp
670
+ | OpenAI::Live::ResponsesDelegationConfig::Tool::Custom
671
+ | OpenAI::Live::ResponsesDelegationConfig::Tool::Namespace
672
+ | OpenAI::Live::ResponsesDelegationConfig::Tool::ToolSearch
673
+ | OpenAI::Live::ResponsesDelegationConfig::Tool::ProgrammaticToolCalling
674
+ | OpenAI::Live::ResponsesDelegationConfig::Tool::Computer
675
+ | OpenAI::Live::ResponsesDelegationConfig::Tool::ApplyPatch
281
676
 
282
677
  module Tool
283
678
  extend OpenAI::Internal::Type::Union
@@ -295,6 +690,462 @@ module OpenAI
295
690
  def to_hash: -> { ?type: :web_search }
296
691
  end
297
692
 
693
+ type file_search = { ?type: :file_search }
694
+
695
+ class FileSearch < OpenAI::Internal::Type::BaseModel
696
+ attr_accessor type: :file_search
697
+
698
+ def initialize: (?type: :file_search) -> void
699
+
700
+ def to_hash: -> { ?type: :file_search }
701
+ end
702
+
703
+ type code_interpreter = { ?type: :code_interpreter }
704
+
705
+ class CodeInterpreter < OpenAI::Internal::Type::BaseModel
706
+ attr_accessor type: :code_interpreter
707
+
708
+ def initialize: (?type: :code_interpreter) -> void
709
+
710
+ def to_hash: -> { ?type: :code_interpreter }
711
+ end
712
+
713
+ type shell =
714
+ {
715
+ ?type: :shell,
716
+ ?environment: OpenAI::Models::Live::ResponsesDelegationConfig::Tool::Shell::environment?
717
+ }
718
+
719
+ class Shell < OpenAI::Internal::Type::BaseModel
720
+ attr_accessor type: :shell
721
+
722
+ attr_accessor environment: OpenAI::Models::Live::ResponsesDelegationConfig::Tool::Shell::environment?
723
+
724
+ def initialize: (
725
+ ?environment: OpenAI::Models::Live::ResponsesDelegationConfig::Tool::Shell::environment?,
726
+ ?type: :shell
727
+ ) -> void
728
+
729
+ def to_hash: -> {
730
+ ?type: :shell,
731
+ ?environment: OpenAI::Models::Live::ResponsesDelegationConfig::Tool::Shell::environment?
732
+ }
733
+
734
+ type environment =
735
+ OpenAI::Live::ResponsesDelegationConfig::Tool::Shell::Environment::ContainerAuto
736
+ | OpenAI::Live::ResponsesDelegationConfig::Tool::Shell::Environment::ContainerReference
737
+ | OpenAI::Live::ResponsesDelegationConfig::Tool::Shell::Environment::Local
738
+
739
+ module Environment
740
+ extend OpenAI::Internal::Type::Union
741
+
742
+ type container_auto =
743
+ {
744
+ ?type: :container_auto,
745
+ ?file_ids: ::Array[String]?,
746
+ ?memory_limit: OpenAI::Models::Live::ResponsesDelegationConfig::Tool::Shell::Environment::ContainerAuto::memory_limit?,
747
+ ?network_policy: OpenAI::Models::Live::ResponsesDelegationConfig::Tool::Shell::Environment::ContainerAuto::network_policy?,
748
+ ?skills: ::Array[OpenAI::Models::Live::ResponsesDelegationConfig::Tool::Shell::Environment::ContainerAuto::skill]?
749
+ }
750
+
751
+ class ContainerAuto < OpenAI::Internal::Type::BaseModel
752
+ # Automatically creates a container for this request
753
+ attr_accessor type: :container_auto
754
+
755
+ # An optional list of uploaded files to make available to your code.
756
+ attr_accessor file_ids: ::Array[String]?
757
+
758
+ # The memory limit for the container.
759
+ attr_accessor memory_limit: OpenAI::Models::Live::ResponsesDelegationConfig::Tool::Shell::Environment::ContainerAuto::memory_limit?
760
+
761
+ # Network access policy for the container.
762
+ attr_accessor network_policy: OpenAI::Models::Live::ResponsesDelegationConfig::Tool::Shell::Environment::ContainerAuto::network_policy?
763
+
764
+ # An optional list of skills referenced by id or inline data.
765
+ attr_accessor skills: ::Array[OpenAI::Models::Live::ResponsesDelegationConfig::Tool::Shell::Environment::ContainerAuto::skill]?
766
+
767
+ # @param file_ids
768
+ # An optional list of uploaded files to make available to your code.
769
+ # @param memory_limit
770
+ # The memory limit for the container.
771
+ # @param network_policy
772
+ # Network access policy for the container.
773
+ # @param skills
774
+ # An optional list of skills referenced by id or inline data.
775
+ # @param type
776
+ # Automatically creates a container for this request
777
+ def initialize: (
778
+ ?file_ids: ::Array[String]?,
779
+ ?memory_limit: OpenAI::Models::Live::ResponsesDelegationConfig::Tool::Shell::Environment::ContainerAuto::memory_limit?,
780
+ ?network_policy: OpenAI::Models::Live::ResponsesDelegationConfig::Tool::Shell::Environment::ContainerAuto::network_policy?,
781
+ ?skills: ::Array[OpenAI::Models::Live::ResponsesDelegationConfig::Tool::Shell::Environment::ContainerAuto::skill]?,
782
+ ?type: :container_auto
783
+ ) -> void
784
+
785
+ def to_hash: -> {
786
+ ?type: :container_auto,
787
+ ?file_ids: ::Array[String]?,
788
+ ?memory_limit: OpenAI::Models::Live::ResponsesDelegationConfig::Tool::Shell::Environment::ContainerAuto::memory_limit?,
789
+ ?network_policy: OpenAI::Models::Live::ResponsesDelegationConfig::Tool::Shell::Environment::ContainerAuto::network_policy?,
790
+ ?skills: ::Array[OpenAI::Models::Live::ResponsesDelegationConfig::Tool::Shell::Environment::ContainerAuto::skill]?
791
+ }
792
+
793
+ type memory_limit = :"1g" | :"4g" | :"16g" | :"64g"
794
+
795
+ module MemoryLimit
796
+ extend OpenAI::Internal::Type::Enum
797
+
798
+ MEMORY_LIMIT_1G: :"1g"
799
+ MEMORY_LIMIT_4G: :"4g"
800
+ MEMORY_LIMIT_16G: :"16g"
801
+ MEMORY_LIMIT_64G: :"64g"
802
+
803
+ def self?.values: -> ::Array[OpenAI::Models::Live::ResponsesDelegationConfig::Tool::Shell::Environment::ContainerAuto::memory_limit]
804
+ end
805
+
806
+ type network_policy =
807
+ OpenAI::Live::ResponsesDelegationConfig::Tool::Shell::Environment::ContainerAuto::NetworkPolicy::Disabled
808
+ | OpenAI::Live::ResponsesDelegationConfig::Tool::Shell::Environment::ContainerAuto::NetworkPolicy::Allowlist
809
+
810
+ module NetworkPolicy
811
+ extend OpenAI::Internal::Type::Union
812
+
813
+ type disabled = { ?type: :disabled }
814
+
815
+ class Disabled < OpenAI::Internal::Type::BaseModel
816
+ # Disable outbound network access. Always `disabled`.
817
+ attr_accessor type: :disabled
818
+
819
+ # @param type
820
+ # Disable outbound network access. Always `disabled`.
821
+ def initialize: (?type: :disabled) -> void
822
+
823
+ def to_hash: -> { ?type: :disabled }
824
+ end
825
+
826
+ type allowlist =
827
+ { allowed_domains: ::Array[String], ?type: :allowlist }
828
+
829
+ class Allowlist < OpenAI::Internal::Type::BaseModel
830
+ # A list of allowed domains when type is `allowlist`.
831
+ attr_accessor allowed_domains: ::Array[String]
832
+
833
+ # Allow outbound network access only to specified domains. Always `allowlist`.
834
+ attr_accessor type: :allowlist
835
+
836
+ # @param allowed_domains
837
+ # A list of allowed domains when type is `allowlist`.
838
+ # @param type
839
+ # Allow outbound network access only to specified domains. Always `allowlist`.
840
+ def initialize: (
841
+ allowed_domains: ::Array[String],
842
+ ?type: :allowlist
843
+ ) -> void
844
+
845
+ def to_hash: -> {
846
+ allowed_domains: ::Array[String],
847
+ ?type: :allowlist
848
+ }
849
+ end
850
+
851
+ def self?.variants: -> ::Array[OpenAI::Models::Live::ResponsesDelegationConfig::Tool::Shell::Environment::ContainerAuto::network_policy]
852
+ end
853
+
854
+ type skill =
855
+ OpenAI::Live::ResponsesDelegationConfig::Tool::Shell::Environment::ContainerAuto::Skill::SkillReference
856
+ | OpenAI::Live::ResponsesDelegationConfig::Tool::Shell::Environment::ContainerAuto::Skill::Inline
857
+
858
+ module Skill
859
+ extend OpenAI::Internal::Type::Union
860
+
861
+ type skill_reference =
862
+ {
863
+ skill_id: String,
864
+ ?type: :skill_reference,
865
+ ?version: String?
866
+ }
867
+
868
+ class SkillReference < OpenAI::Internal::Type::BaseModel
869
+ # The ID of the referenced skill.
870
+ attr_accessor skill_id: String
871
+
872
+ # References a skill created with the /v1/skills endpoint.
873
+ attr_accessor type: :skill_reference
874
+
875
+ # Optional skill version. Use a positive integer or 'latest'. Omit for default.
876
+ attr_accessor version: String?
877
+
878
+ # @param skill_id
879
+ # The ID of the referenced skill.
880
+ # @param version
881
+ # Optional skill version. Use a positive integer or 'latest'. Omit for default.
882
+ # @param type
883
+ # References a skill created with the /v1/skills endpoint.
884
+ def initialize: (
885
+ skill_id: String,
886
+ ?version: String?,
887
+ ?type: :skill_reference
888
+ ) -> void
889
+
890
+ def to_hash: -> {
891
+ skill_id: String,
892
+ ?type: :skill_reference,
893
+ ?version: String?
894
+ }
895
+ end
896
+
897
+ type inline =
898
+ {
899
+ description: String,
900
+ name: String,
901
+ source: OpenAI::Live::ResponsesDelegationConfig::Tool::Shell::Environment::ContainerAuto::Skill::Inline::Source,
902
+ ?type: :inline
903
+ }
904
+
905
+ class Inline < OpenAI::Internal::Type::BaseModel
906
+ # The description of the skill.
907
+ attr_accessor description: String
908
+
909
+ # The name of the skill.
910
+ attr_accessor name: String
911
+
912
+ # Inline skill payload
913
+ attr_accessor source: OpenAI::Live::ResponsesDelegationConfig::Tool::Shell::Environment::ContainerAuto::Skill::Inline::Source
914
+
915
+ # Defines an inline skill for this request.
916
+ attr_accessor type: :inline
917
+
918
+ # @param description
919
+ # The description of the skill.
920
+ # @param name
921
+ # The name of the skill.
922
+ # @param source
923
+ # Inline skill payload
924
+ # @param type
925
+ # Defines an inline skill for this request.
926
+ def initialize: (
927
+ description: String,
928
+ name: String,
929
+ source: OpenAI::Live::ResponsesDelegationConfig::Tool::Shell::Environment::ContainerAuto::Skill::Inline::Source,
930
+ ?type: :inline
931
+ ) -> void
932
+
933
+ def to_hash: -> {
934
+ description: String,
935
+ name: String,
936
+ source: OpenAI::Live::ResponsesDelegationConfig::Tool::Shell::Environment::ContainerAuto::Skill::Inline::Source,
937
+ ?type: :inline
938
+ }
939
+
940
+ type source =
941
+ {
942
+ data: String,
943
+ ?media_type: :"application/zip",
944
+ ?type: :base64
945
+ }
946
+
947
+ class Source < OpenAI::Internal::Type::BaseModel
948
+ # Base64-encoded skill zip bundle.
949
+ attr_accessor data: String
950
+
951
+ # The media type of the inline skill payload. Must be `application/zip`.
952
+ attr_accessor media_type: :"application/zip"
953
+
954
+ # The type of the inline skill source. Must be `base64`.
955
+ attr_accessor type: :base64
956
+
957
+ # @param data
958
+ # Base64-encoded skill zip bundle.
959
+ # @param media_type
960
+ # The media type of the inline skill payload. Must be `application/zip`.
961
+ # @param type
962
+ # The type of the inline skill source. Must be `base64`.
963
+ def initialize: (
964
+ data: String,
965
+ ?media_type: :"application/zip",
966
+ ?type: :base64
967
+ ) -> void
968
+
969
+ def to_hash: -> {
970
+ data: String,
971
+ ?media_type: :"application/zip",
972
+ ?type: :base64
973
+ }
974
+ end
975
+ end
976
+
977
+ def self?.variants: -> ::Array[OpenAI::Models::Live::ResponsesDelegationConfig::Tool::Shell::Environment::ContainerAuto::skill]
978
+ end
979
+ end
980
+
981
+ type container_reference =
982
+ { container_id: String, ?type: :container_reference }
983
+
984
+ class ContainerReference < OpenAI::Internal::Type::BaseModel
985
+ # The ID of the referenced container.
986
+ attr_accessor container_id: String
987
+
988
+ # References a container created with the /v1/containers endpoint
989
+ attr_accessor type: :container_reference
990
+
991
+ # @param container_id
992
+ # The ID of the referenced container.
993
+ # @param type
994
+ # References a container created with the /v1/containers endpoint
995
+ def initialize: (
996
+ container_id: String,
997
+ ?type: :container_reference
998
+ ) -> void
999
+
1000
+ def to_hash: -> {
1001
+ container_id: String,
1002
+ ?type: :container_reference
1003
+ }
1004
+ end
1005
+
1006
+ type local =
1007
+ {
1008
+ ?type: :local,
1009
+ ?skills: ::Array[OpenAI::Live::ResponsesDelegationConfig::Tool::Shell::Environment::Local::Skill]?
1010
+ }
1011
+
1012
+ class Local < OpenAI::Internal::Type::BaseModel
1013
+ # Use a local computer environment.
1014
+ attr_accessor type: :local
1015
+
1016
+ # An optional list of skills.
1017
+ attr_accessor skills: ::Array[OpenAI::Live::ResponsesDelegationConfig::Tool::Shell::Environment::Local::Skill]?
1018
+
1019
+ # @param skills
1020
+ # An optional list of skills.
1021
+ # @param type
1022
+ # Use a local computer environment.
1023
+ def initialize: (
1024
+ ?skills: ::Array[OpenAI::Live::ResponsesDelegationConfig::Tool::Shell::Environment::Local::Skill]?,
1025
+ ?type: :local
1026
+ ) -> void
1027
+
1028
+ def to_hash: -> {
1029
+ ?type: :local,
1030
+ ?skills: ::Array[OpenAI::Live::ResponsesDelegationConfig::Tool::Shell::Environment::Local::Skill]?
1031
+ }
1032
+
1033
+ type skill = { description: String, name: String, path: String }
1034
+
1035
+ class Skill < OpenAI::Internal::Type::BaseModel
1036
+ # The description of the skill.
1037
+ attr_accessor description: String
1038
+
1039
+ # The name of the skill.
1040
+ attr_accessor name: String
1041
+
1042
+ # The path to the directory containing the skill.
1043
+ attr_accessor path: String
1044
+
1045
+ # @param description
1046
+ # The description of the skill.
1047
+ # @param name
1048
+ # The name of the skill.
1049
+ # @param path
1050
+ # The path to the directory containing the skill.
1051
+ def initialize: (
1052
+ description: String,
1053
+ name: String,
1054
+ path: String
1055
+ ) -> void
1056
+
1057
+ def to_hash: -> {
1058
+ description: String,
1059
+ name: String,
1060
+ path: String
1061
+ }
1062
+ end
1063
+ end
1064
+
1065
+ def self?.variants: -> ::Array[OpenAI::Models::Live::ResponsesDelegationConfig::Tool::Shell::environment]
1066
+ end
1067
+ end
1068
+
1069
+ type image_generation = { ?type: :image_generation }
1070
+
1071
+ class ImageGeneration < OpenAI::Internal::Type::BaseModel
1072
+ attr_accessor type: :image_generation
1073
+
1074
+ def initialize: (?type: :image_generation) -> void
1075
+
1076
+ def to_hash: -> { ?type: :image_generation }
1077
+ end
1078
+
1079
+ type mcp = { ?type: :mcp }
1080
+
1081
+ class Mcp < OpenAI::Internal::Type::BaseModel
1082
+ attr_accessor type: :mcp
1083
+
1084
+ def initialize: (?type: :mcp) -> void
1085
+
1086
+ def to_hash: -> { ?type: :mcp }
1087
+ end
1088
+
1089
+ type custom = { ?type: :custom }
1090
+
1091
+ class Custom < OpenAI::Internal::Type::BaseModel
1092
+ attr_accessor type: :custom
1093
+
1094
+ def initialize: (?type: :custom) -> void
1095
+
1096
+ def to_hash: -> { ?type: :custom }
1097
+ end
1098
+
1099
+ type namespace = { ?type: :namespace }
1100
+
1101
+ class Namespace < OpenAI::Internal::Type::BaseModel
1102
+ attr_accessor type: :namespace
1103
+
1104
+ def initialize: (?type: :namespace) -> void
1105
+
1106
+ def to_hash: -> { ?type: :namespace }
1107
+ end
1108
+
1109
+ type tool_search = { ?type: :tool_search }
1110
+
1111
+ class ToolSearch < OpenAI::Internal::Type::BaseModel
1112
+ attr_accessor type: :tool_search
1113
+
1114
+ def initialize: (?type: :tool_search) -> void
1115
+
1116
+ def to_hash: -> { ?type: :tool_search }
1117
+ end
1118
+
1119
+ type programmatic_tool_calling = { ?type: :programmatic_tool_calling }
1120
+
1121
+ class ProgrammaticToolCalling < OpenAI::Internal::Type::BaseModel
1122
+ attr_accessor type: :programmatic_tool_calling
1123
+
1124
+ def initialize: (?type: :programmatic_tool_calling) -> void
1125
+
1126
+ def to_hash: -> { ?type: :programmatic_tool_calling }
1127
+ end
1128
+
1129
+ type computer = { ?type: :computer }
1130
+
1131
+ class Computer < OpenAI::Internal::Type::BaseModel
1132
+ attr_accessor type: :computer
1133
+
1134
+ def initialize: (?type: :computer) -> void
1135
+
1136
+ def to_hash: -> { ?type: :computer }
1137
+ end
1138
+
1139
+ type apply_patch = { ?type: :apply_patch }
1140
+
1141
+ class ApplyPatch < OpenAI::Internal::Type::BaseModel
1142
+ attr_accessor type: :apply_patch
1143
+
1144
+ def initialize: (?type: :apply_patch) -> void
1145
+
1146
+ def to_hash: -> { ?type: :apply_patch }
1147
+ end
1148
+
298
1149
  def self?.variants: -> ::Array[OpenAI::Models::Live::ResponsesDelegationConfig::tool]
299
1150
  end
300
1151
  end