openai 0.124.0 → 0.126.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 (85) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +18 -0
  3. data/README.md +1 -1
  4. data/lib/openai/internal/stream.rb +1 -1
  5. data/lib/openai/internal/transport/base_client.rb +11 -2
  6. data/lib/openai/internal/type/base_stream.rb +10 -0
  7. data/lib/openai/models/all_models.rb +1 -0
  8. data/lib/openai/models/beta/agent.rb +2 -2
  9. data/lib/openai/models/beta/agent_create_params.rb +9 -9
  10. data/lib/openai/models/beta/agent_session.rb +2 -2
  11. data/lib/openai/models/beta/agent_update_params.rb +9 -12
  12. data/lib/openai/models/beta/agents/automation_agent_config.rb +2 -2
  13. data/lib/openai/models/beta/agents/automation_target_param.rb +9 -12
  14. data/lib/openai/models/beta/agents/one_time_automation.rb +28 -1
  15. data/lib/openai/models/beta/agents/periodic_automation.rb +28 -1
  16. data/lib/openai/models/beta/agents/session_create_params.rb +9 -12
  17. data/lib/openai/models/beta/beta_response.rb +9 -0
  18. data/lib/openai/models/beta/beta_responses_client_event.rb +76 -1
  19. data/lib/openai/models/beta/response_compact_params.rb +9 -0
  20. data/lib/openai/models/beta/response_create_params.rb +70 -1
  21. data/lib/openai/models/chat_model.rb +2 -0
  22. data/lib/openai/models/live/session_config.rb +12 -1
  23. data/lib/openai/models/live/session_resource.rb +12 -1
  24. data/lib/openai/models/responses/response_compact_params.rb +9 -0
  25. data/lib/openai/models/responses/response_create_params.rb +61 -1
  26. data/lib/openai/models/responses/responses_client_event.rb +65 -1
  27. data/lib/openai/models/responses_model.rb +1 -0
  28. data/lib/openai/resources/beta/agents/sessions/events.rb +1 -0
  29. data/lib/openai/resources/beta/agents/sessions.rb +1 -0
  30. data/lib/openai/resources/beta/agents.rb +2 -3
  31. data/lib/openai/resources/beta/responses.rb +12 -2
  32. data/lib/openai/resources/responses.rb +12 -2
  33. data/lib/openai/version.rb +1 -1
  34. data/rbi/openai/internal/transport/base_client.rbi +4 -1
  35. data/rbi/openai/internal/type/base_stream.rbi +5 -0
  36. data/rbi/openai/models/all_models.rbi +1 -0
  37. data/rbi/openai/models/beta/agent.rbi +2 -2
  38. data/rbi/openai/models/beta/agent_create_params.rbi +9 -9
  39. data/rbi/openai/models/beta/agent_session.rbi +2 -2
  40. data/rbi/openai/models/beta/agent_update_params.rbi +9 -12
  41. data/rbi/openai/models/beta/agents/automation_agent_config.rbi +2 -2
  42. data/rbi/openai/models/beta/agents/automation_target_param.rbi +9 -12
  43. data/rbi/openai/models/beta/agents/one_time_automation.rbi +28 -1
  44. data/rbi/openai/models/beta/agents/periodic_automation.rbi +28 -1
  45. data/rbi/openai/models/beta/agents/session_create_params.rbi +9 -12
  46. data/rbi/openai/models/beta/beta_response.rbi +3 -0
  47. data/rbi/openai/models/beta/beta_responses_client_event.rbi +145 -0
  48. data/rbi/openai/models/beta/response_compact_params.rbi +3 -0
  49. data/rbi/openai/models/beta/response_create_params.rbi +116 -0
  50. data/rbi/openai/models/chat_model.rbi +2 -0
  51. data/rbi/openai/models/live/session_config.rbi +12 -0
  52. data/rbi/openai/models/live/session_resource.rbi +12 -0
  53. data/rbi/openai/models/responses/response_compact_params.rbi +3 -0
  54. data/rbi/openai/models/responses/response_create_params.rbi +117 -0
  55. data/rbi/openai/models/responses/responses_client_event.rbi +135 -0
  56. data/rbi/openai/models/responses_model.rbi +1 -0
  57. data/rbi/openai/resources/beta/agents.rbi +2 -3
  58. data/rbi/openai/resources/beta/responses.rbi +10 -0
  59. data/rbi/openai/resources/responses.rbi +12 -0
  60. data/sig/openai/internal/transport/base_client.rbs +1 -0
  61. data/sig/openai/internal/type/base_stream.rbs +2 -0
  62. data/sig/openai/models/all_models.rbs +2 -0
  63. data/sig/openai/models/beta/agent.rbs +2 -2
  64. data/sig/openai/models/beta/agent_create_params.rbs +8 -8
  65. data/sig/openai/models/beta/agent_session.rbs +2 -2
  66. data/sig/openai/models/beta/agent_update_params.rbs +8 -10
  67. data/sig/openai/models/beta/agents/automation_agent_config.rbs +2 -2
  68. data/sig/openai/models/beta/agents/automation_target_param.rbs +8 -10
  69. data/sig/openai/models/beta/agents/one_time_automation.rbs +20 -2
  70. data/sig/openai/models/beta/agents/periodic_automation.rbs +20 -2
  71. data/sig/openai/models/beta/agents/session_create_params.rbs +8 -10
  72. data/sig/openai/models/beta/beta_response.rbs +6 -0
  73. data/sig/openai/models/beta/beta_responses_client_event.rbs +79 -0
  74. data/sig/openai/models/beta/response_compact_params.rbs +6 -0
  75. data/sig/openai/models/beta/response_create_params.rbs +79 -0
  76. data/sig/openai/models/chat_model.rbs +4 -0
  77. data/sig/openai/models/live/session_config.rbs +10 -0
  78. data/sig/openai/models/live/session_resource.rbs +10 -0
  79. data/sig/openai/models/responses/response_compact_params.rbs +6 -0
  80. data/sig/openai/models/responses/response_create_params.rbs +73 -0
  81. data/sig/openai/models/responses/responses_client_event.rbs +73 -0
  82. data/sig/openai/models/responses_model.rbs +2 -0
  83. data/sig/openai/resources/beta/responses.rbs +2 -0
  84. data/sig/openai/resources/responses.rbs +3 -0
  85. metadata +1 -1
@@ -74,6 +74,17 @@ module OpenAI
74
74
  # @return [Boolean, nil]
75
75
  optional :background, OpenAI::Internal::Type::Boolean, nil?: true
76
76
 
77
+ # @!attribute background_options
78
+ # Options for background execution on HTTP requests. The `2h` and `8h` completion
79
+ # windows require `background: true`, Standard processing, and `stream: false` or
80
+ # omitted.
81
+ #
82
+ # @return [OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::BackgroundOptions, nil]
83
+ optional(
84
+ :background_options,
85
+ -> { OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::BackgroundOptions }
86
+ )
87
+
77
88
  # @!attribute context_management
78
89
  # Context management configuration for this request.
79
90
  #
@@ -498,7 +509,7 @@ module OpenAI
498
509
  # @return [String, nil]
499
510
  optional :user, String
500
511
 
501
- # @!method initialize(access_programs: nil, background: nil, context_management: nil, conversation: nil, generate: nil, image: nil, include: nil, input: nil, instructions: nil, max_output_tokens: nil, max_tool_calls: nil, metadata: nil, model: nil, moderation: nil, multi_agent: nil, parallel_tool_calls: nil, previous_response_id: nil, prompt: nil, prompt_cache_key: nil, prompt_cache_options: nil, prompt_cache_retention: nil, reasoning: nil, safety_identifier: nil, service_tier: nil, store: nil, stream: nil, stream_id: nil, stream_options: nil, temperature: nil, text: nil, tool_choice: nil, tools: nil, top_logprobs: nil, top_p: nil, truncation: nil, user: nil, type: :"response.create")
512
+ # @!method initialize(access_programs: nil, background: nil, background_options: nil, context_management: nil, conversation: nil, generate: nil, image: nil, include: nil, input: nil, instructions: nil, max_output_tokens: nil, max_tool_calls: nil, metadata: nil, model: nil, moderation: nil, multi_agent: nil, parallel_tool_calls: nil, previous_response_id: nil, prompt: nil, prompt_cache_key: nil, prompt_cache_options: nil, prompt_cache_retention: nil, reasoning: nil, safety_identifier: nil, service_tier: nil, store: nil, stream: nil, stream_id: nil, stream_options: nil, temperature: nil, text: nil, tool_choice: nil, tools: nil, top_logprobs: nil, top_p: nil, truncation: nil, user: nil, type: :"response.create")
502
513
  # Client event for creating a response over a persistent WebSocket connection.
503
514
  # This payload uses the same top-level fields as `POST /v1/responses`, plus
504
515
  # WebSocket-only envelope metadata.
@@ -516,6 +527,11 @@ module OpenAI
516
527
  # Whether to run the model response in the background.
517
528
  # [Learn more](https://developers.openai.com/api/docs/guides/background).
518
529
  #
530
+ # @param background_options [OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::BackgroundOptions]
531
+ # Options for background execution on HTTP requests. The `2h` and `8h` completion
532
+ # windows require `background: true`, Standard processing, and `stream: false` or
533
+ # omitted.
534
+ #
519
535
  # @param context_management [Array<OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::ContextManagement>, nil]
520
536
  # Context management configuration for this request.
521
537
  #
@@ -847,6 +863,54 @@ module OpenAI
847
863
  end
848
864
  end
849
865
 
866
+ # @see OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate#background_options
867
+ class BackgroundOptions < OpenAI::Internal::Type::BaseModel
868
+ # @!attribute completion_window
869
+ # The completion window for background execution. Defaults to `soonest`; `2h` and
870
+ # `8h` select discounted background execution.
871
+ #
872
+ # @return [Symbol, OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::BackgroundOptions::CompletionWindow, nil]
873
+ optional(
874
+ :completion_window,
875
+ enum: -> { OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::BackgroundOptions::CompletionWindow }
876
+ )
877
+
878
+ # @!attribute continuation_id
879
+ # A customer-provided opaque identifier used to prioritize related background
880
+ # requests. It does not add prior history to the input.
881
+ #
882
+ # @return [String, nil]
883
+ optional :continuation_id, String
884
+
885
+ # @!method initialize(completion_window: nil, continuation_id: nil)
886
+ # Options for background execution on HTTP requests. The `2h` and `8h` completion
887
+ # windows require `background: true`, Standard processing, and `stream: false` or
888
+ # omitted.
889
+ #
890
+ # @param completion_window [Symbol, OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::BackgroundOptions::CompletionWindow]
891
+ # The completion window for background execution. Defaults to `soonest`; `2h` and
892
+ # `8h` select discounted background execution.
893
+ #
894
+ # @param continuation_id [String]
895
+ # A customer-provided opaque identifier used to prioritize related background
896
+ # requests. It does not add prior history to the input.
897
+
898
+ # The completion window for background execution. Defaults to `soonest`; `2h` and
899
+ # `8h` select discounted background execution.
900
+ #
901
+ # @see OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::BackgroundOptions#completion_window
902
+ module CompletionWindow
903
+ extend OpenAI::Internal::Type::Enum
904
+
905
+ SOONEST = :soonest
906
+ COMPLETION_WINDOW_2H = :"2h"
907
+ COMPLETION_WINDOW_8H = :"8h"
908
+
909
+ # @!method self.values
910
+ # @return [Array<Symbol>]
911
+ end
912
+ end
913
+
850
914
  class ContextManagement < OpenAI::Internal::Type::BaseModel
851
915
  # @!attribute type
852
916
  # The context management entry type. Currently only 'compaction' is supported.
@@ -963,8 +1027,12 @@ module OpenAI
963
1027
 
964
1028
  variant const: -> { OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::Model::GPT_6_ASTRA }
965
1029
 
1030
+ variant const: -> { OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::Model::GPT_6_2_ASTRA }
1031
+
966
1032
  variant const: -> { OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::Model::GPT_6_1_SOL }
967
1033
 
1034
+ variant const: -> { OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::Model::GPT_6_2_SOL }
1035
+
968
1036
  variant const: -> { OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::Model::GPT_6_1_TERRA }
969
1037
 
970
1038
  variant const: -> { OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::Model::GPT_6_SOL }
@@ -1367,6 +1435,10 @@ module OpenAI
1367
1435
 
1368
1436
  variant const: -> { OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::Model::GPT_6_ROSALIND }
1369
1437
 
1438
+ variant(
1439
+ const: -> { OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::Model::GPT_6_2_ASTRA_LAW }
1440
+ )
1441
+
1370
1442
  variant String
1371
1443
 
1372
1444
  # @!method self.variants
@@ -1381,7 +1453,9 @@ module OpenAI
1381
1453
  # @!group
1382
1454
 
1383
1455
  GPT_6_ASTRA = :"gpt-6-astra"
1456
+ GPT_6_2_ASTRA = :"gpt-6.2-astra"
1384
1457
  GPT_6_1_SOL = :"gpt-6.1-sol"
1458
+ GPT_6_2_SOL = :"gpt-6.2-sol"
1385
1459
  GPT_6_1_TERRA = :"gpt-6.1-terra"
1386
1460
  GPT_6_SOL = :"gpt-6-sol"
1387
1461
  GPT_6_LUNA = :"gpt-6-luna"
@@ -1751,6 +1825,7 @@ module OpenAI
1751
1825
  GPT_6_CYBER = :"gpt-6-cyber"
1752
1826
  GPT_ROSALIND_RESEARCH = :"gpt-rosalind-research"
1753
1827
  GPT_6_ROSALIND = :"gpt-6-rosalind"
1828
+ GPT_6_2_ASTRA_LAW = :"gpt-6.2-astra-law"
1754
1829
 
1755
1830
  # @!endgroup
1756
1831
  end
@@ -189,8 +189,12 @@ module OpenAI
189
189
 
190
190
  variant const: -> { OpenAI::Models::Beta::ResponseCompactParams::Model::GPT_6_ASTRA }
191
191
 
192
+ variant const: -> { OpenAI::Models::Beta::ResponseCompactParams::Model::GPT_6_2_ASTRA }
193
+
192
194
  variant const: -> { OpenAI::Models::Beta::ResponseCompactParams::Model::GPT_6_1_SOL }
193
195
 
196
+ variant const: -> { OpenAI::Models::Beta::ResponseCompactParams::Model::GPT_6_2_SOL }
197
+
194
198
  variant const: -> { OpenAI::Models::Beta::ResponseCompactParams::Model::GPT_6_1_TERRA }
195
199
 
196
200
  variant const: -> { OpenAI::Models::Beta::ResponseCompactParams::Model::GPT_6_SOL }
@@ -415,6 +419,8 @@ module OpenAI
415
419
 
416
420
  variant const: -> { OpenAI::Models::Beta::ResponseCompactParams::Model::GPT_6_ROSALIND }
417
421
 
422
+ variant const: -> { OpenAI::Models::Beta::ResponseCompactParams::Model::GPT_6_2_ASTRA_LAW }
423
+
418
424
  variant String
419
425
 
420
426
  # @!method self.variants
@@ -427,7 +433,9 @@ module OpenAI
427
433
  # @!group
428
434
 
429
435
  GPT_6_ASTRA = :"gpt-6-astra"
436
+ GPT_6_2_ASTRA = :"gpt-6.2-astra"
430
437
  GPT_6_1_SOL = :"gpt-6.1-sol"
438
+ GPT_6_2_SOL = :"gpt-6.2-sol"
431
439
  GPT_6_1_TERRA = :"gpt-6.1-terra"
432
440
  GPT_6_SOL = :"gpt-6-sol"
433
441
  GPT_6_LUNA = :"gpt-6-luna"
@@ -797,6 +805,7 @@ module OpenAI
797
805
  GPT_6_CYBER = :"gpt-6-cyber"
798
806
  GPT_ROSALIND_RESEARCH = :"gpt-rosalind-research"
799
807
  GPT_6_ROSALIND = :"gpt-6-rosalind"
808
+ GPT_6_2_ASTRA_LAW = :"gpt-6.2-astra-law"
800
809
 
801
810
  # @!endgroup
802
811
  end
@@ -23,6 +23,14 @@ module OpenAI
23
23
  # @return [Boolean, nil]
24
24
  optional :background, OpenAI::Internal::Type::Boolean, nil?: true
25
25
 
26
+ # @!attribute background_options
27
+ # Options for background execution on HTTP requests. The `2h` and `8h` completion
28
+ # windows require `background: true`, Standard processing, and `stream: false` or
29
+ # omitted.
30
+ #
31
+ # @return [OpenAI::Models::Beta::ResponseCreateParams::BackgroundOptions, nil]
32
+ optional :background_options, -> { OpenAI::Beta::ResponseCreateParams::BackgroundOptions }
33
+
26
34
  # @!attribute context_management
27
35
  # Context management configuration for this request.
28
36
  #
@@ -390,7 +398,7 @@ module OpenAI
390
398
  # @return [Array<Symbol, OpenAI::Models::Beta::ResponseCreateParams::Beta>, nil]
391
399
  optional :betas, -> { OpenAI::Internal::Type::ArrayOf[enum: OpenAI::Beta::ResponseCreateParams::Beta] }
392
400
 
393
- # @!method initialize(access_programs: nil, background: nil, context_management: nil, conversation: nil, image: nil, include: nil, input: nil, instructions: nil, max_output_tokens: nil, max_tool_calls: nil, metadata: nil, model: nil, moderation: nil, multi_agent: nil, parallel_tool_calls: nil, previous_response_id: nil, prompt: nil, prompt_cache_key: nil, prompt_cache_options: nil, prompt_cache_retention: nil, reasoning: nil, safety_identifier: nil, service_tier: nil, store: nil, stream_options: nil, temperature: nil, text: nil, tool_choice: nil, tools: nil, top_logprobs: nil, top_p: nil, truncation: nil, user: nil, betas: nil, request_options: {})
401
+ # @!method initialize(access_programs: nil, background: nil, background_options: nil, context_management: nil, conversation: nil, image: nil, include: nil, input: nil, instructions: nil, max_output_tokens: nil, max_tool_calls: nil, metadata: nil, model: nil, moderation: nil, multi_agent: nil, parallel_tool_calls: nil, previous_response_id: nil, prompt: nil, prompt_cache_key: nil, prompt_cache_options: nil, prompt_cache_retention: nil, reasoning: nil, safety_identifier: nil, service_tier: nil, store: nil, stream_options: nil, temperature: nil, text: nil, tool_choice: nil, tools: nil, top_logprobs: nil, top_p: nil, truncation: nil, user: nil, betas: nil, request_options: {})
394
402
  # @param access_programs [OpenAI::Models::Beta::ResponseCreateParams::AccessPrograms]
395
403
  # Domain-specific access programs to use for this request.
396
404
  #
@@ -398,6 +406,11 @@ module OpenAI
398
406
  # Whether to run the model response in the background.
399
407
  # [Learn more](https://developers.openai.com/api/docs/guides/background).
400
408
  #
409
+ # @param background_options [OpenAI::Models::Beta::ResponseCreateParams::BackgroundOptions]
410
+ # Options for background execution on HTTP requests. The `2h` and `8h` completion
411
+ # windows require `background: true`, Standard processing, and `stream: false` or
412
+ # omitted.
413
+ #
401
414
  # @param context_management [Array<OpenAI::Models::Beta::ResponseCreateParams::ContextManagement>, nil]
402
415
  # Context management configuration for this request.
403
416
  #
@@ -706,6 +719,53 @@ module OpenAI
706
719
  end
707
720
  end
708
721
 
722
+ class BackgroundOptions < OpenAI::Internal::Type::BaseModel
723
+ # @!attribute completion_window
724
+ # The completion window for background execution. Defaults to `soonest`; `2h` and
725
+ # `8h` select discounted background execution.
726
+ #
727
+ # @return [Symbol, OpenAI::Models::Beta::ResponseCreateParams::BackgroundOptions::CompletionWindow, nil]
728
+ optional(
729
+ :completion_window,
730
+ enum: -> { OpenAI::Beta::ResponseCreateParams::BackgroundOptions::CompletionWindow }
731
+ )
732
+
733
+ # @!attribute continuation_id
734
+ # A customer-provided opaque identifier used to prioritize related background
735
+ # requests. It does not add prior history to the input.
736
+ #
737
+ # @return [String, nil]
738
+ optional :continuation_id, String
739
+
740
+ # @!method initialize(completion_window: nil, continuation_id: nil)
741
+ # Options for background execution on HTTP requests. The `2h` and `8h` completion
742
+ # windows require `background: true`, Standard processing, and `stream: false` or
743
+ # omitted.
744
+ #
745
+ # @param completion_window [Symbol, OpenAI::Models::Beta::ResponseCreateParams::BackgroundOptions::CompletionWindow]
746
+ # The completion window for background execution. Defaults to `soonest`; `2h` and
747
+ # `8h` select discounted background execution.
748
+ #
749
+ # @param continuation_id [String]
750
+ # A customer-provided opaque identifier used to prioritize related background
751
+ # requests. It does not add prior history to the input.
752
+
753
+ # The completion window for background execution. Defaults to `soonest`; `2h` and
754
+ # `8h` select discounted background execution.
755
+ #
756
+ # @see OpenAI::Models::Beta::ResponseCreateParams::BackgroundOptions#completion_window
757
+ module CompletionWindow
758
+ extend OpenAI::Internal::Type::Enum
759
+
760
+ SOONEST = :soonest
761
+ COMPLETION_WINDOW_2H = :"2h"
762
+ COMPLETION_WINDOW_8H = :"8h"
763
+
764
+ # @!method self.values
765
+ # @return [Array<Symbol>]
766
+ end
767
+ end
768
+
709
769
  class ContextManagement < OpenAI::Internal::Type::BaseModel
710
770
  # @!attribute type
711
771
  # The context management entry type. Currently only 'compaction' is supported.
@@ -812,8 +872,12 @@ module OpenAI
812
872
 
813
873
  variant const: -> { OpenAI::Models::Beta::ResponseCreateParams::Model::GPT_6_ASTRA }
814
874
 
875
+ variant const: -> { OpenAI::Models::Beta::ResponseCreateParams::Model::GPT_6_2_ASTRA }
876
+
815
877
  variant const: -> { OpenAI::Models::Beta::ResponseCreateParams::Model::GPT_6_1_SOL }
816
878
 
879
+ variant const: -> { OpenAI::Models::Beta::ResponseCreateParams::Model::GPT_6_2_SOL }
880
+
817
881
  variant const: -> { OpenAI::Models::Beta::ResponseCreateParams::Model::GPT_6_1_TERRA }
818
882
 
819
883
  variant const: -> { OpenAI::Models::Beta::ResponseCreateParams::Model::GPT_6_SOL }
@@ -1036,6 +1100,8 @@ module OpenAI
1036
1100
 
1037
1101
  variant const: -> { OpenAI::Models::Beta::ResponseCreateParams::Model::GPT_6_ROSALIND }
1038
1102
 
1103
+ variant const: -> { OpenAI::Models::Beta::ResponseCreateParams::Model::GPT_6_2_ASTRA_LAW }
1104
+
1039
1105
  variant String
1040
1106
 
1041
1107
  # @!method self.variants
@@ -1048,7 +1114,9 @@ module OpenAI
1048
1114
  # @!group
1049
1115
 
1050
1116
  GPT_6_ASTRA = :"gpt-6-astra"
1117
+ GPT_6_2_ASTRA = :"gpt-6.2-astra"
1051
1118
  GPT_6_1_SOL = :"gpt-6.1-sol"
1119
+ GPT_6_2_SOL = :"gpt-6.2-sol"
1052
1120
  GPT_6_1_TERRA = :"gpt-6.1-terra"
1053
1121
  GPT_6_SOL = :"gpt-6-sol"
1054
1122
  GPT_6_LUNA = :"gpt-6-luna"
@@ -1418,6 +1486,7 @@ module OpenAI
1418
1486
  GPT_6_CYBER = :"gpt-6-cyber"
1419
1487
  GPT_ROSALIND_RESEARCH = :"gpt-rosalind-research"
1420
1488
  GPT_6_ROSALIND = :"gpt-6-rosalind"
1489
+ GPT_6_2_ASTRA_LAW = :"gpt-6.2-astra-law"
1421
1490
 
1422
1491
  # @!endgroup
1423
1492
  end
@@ -6,7 +6,9 @@ module OpenAI
6
6
  extend OpenAI::Internal::Type::Enum
7
7
 
8
8
  GPT_6_ASTRA = :"gpt-6-astra"
9
+ GPT_6_2_ASTRA = :"gpt-6.2-astra"
9
10
  GPT_6_1_SOL = :"gpt-6.1-sol"
11
+ GPT_6_2_SOL = :"gpt-6.2-sol"
10
12
  GPT_6_1_TERRA = :"gpt-6.1-terra"
11
13
  GPT_6_SOL = :"gpt-6-sol"
12
14
  GPT_6_LUNA = :"gpt-6-luna"
@@ -54,6 +54,13 @@ module OpenAI
54
54
  # @return [String, nil]
55
55
  optional :instructions, String, nil?: true
56
56
 
57
+ # @!attribute safety_identifier
58
+ # A stable identifier for your end user, used for safety monitoring and abuse
59
+ # detection.
60
+ #
61
+ # @return [String, nil]
62
+ optional :safety_identifier, String, nil?: true
63
+
57
64
  # @!attribute store
58
65
  # Whether to store the session for later forking and recording download. Defaults
59
66
  # to false for new sessions.
@@ -70,7 +77,7 @@ module OpenAI
70
77
  # @return [Array<OpenAI::Models::Live::DecisionTrigger>, nil]
71
78
  optional :triggers, -> { OpenAI::Internal::Type::ArrayOf[OpenAI::Live::DecisionTrigger] }
72
79
 
73
- # @!method initialize(model:, audio: nil, client: nil, delegation: nil, input: nil, instructions: nil, store: nil, triggers: nil)
80
+ # @!method initialize(model:, audio: nil, client: nil, delegation: nil, input: nil, instructions: nil, safety_identifier: nil, store: nil, triggers: nil)
74
81
  # Initial configuration for a Live session, including its model, conversation
75
82
  # instructions, audio, and delegated task handling.
76
83
  #
@@ -106,6 +113,10 @@ module OpenAI
106
113
  # Limited to 16,384 client-supplied tokens. Omitted or blank instructions use
107
114
  # server defaults. Immutable after startup.
108
115
  #
116
+ # @param safety_identifier [String, nil]
117
+ # A stable identifier for your end user, used for safety monitoring and abuse
118
+ # detection.
119
+ #
109
120
  # @param store [Boolean]
110
121
  # Whether to store the session for later forking and recording download. Defaults
111
122
  # to false for new sessions.
@@ -75,6 +75,13 @@ module OpenAI
75
75
  # @return [String, nil]
76
76
  optional :instructions, String, nil?: true
77
77
 
78
+ # @!attribute safety_identifier
79
+ # A stable identifier for your end user, used for safety monitoring and abuse
80
+ # detection.
81
+ #
82
+ # @return [String, nil]
83
+ optional :safety_identifier, String, nil?: true
84
+
78
85
  # @!attribute store
79
86
  # Whether to store the session for later forking and recording download. Defaults
80
87
  # to false for new sessions.
@@ -91,7 +98,7 @@ module OpenAI
91
98
  # @return [Array<OpenAI::Models::Live::DecisionTrigger>, nil]
92
99
  optional :triggers, -> { OpenAI::Internal::Type::ArrayOf[OpenAI::Live::DecisionTrigger] }
93
100
 
94
- # @!method initialize(id:, expires_at:, model:, audio: nil, client: nil, delegation: nil, input: nil, instructions: nil, store: nil, triggers: nil, status: :active)
101
+ # @!method initialize(id:, expires_at:, model:, audio: nil, client: nil, delegation: nil, input: nil, instructions: nil, safety_identifier: nil, store: nil, triggers: nil, status: :active)
95
102
  # The resolved Live session configuration and server-assigned session metadata.
96
103
  #
97
104
  # @param id [String]
@@ -133,6 +140,10 @@ module OpenAI
133
140
  # Limited to 16,384 client-supplied tokens. Omitted or blank instructions use
134
141
  # server defaults. Immutable after startup.
135
142
  #
143
+ # @param safety_identifier [String, nil]
144
+ # A stable identifier for your end user, used for safety monitoring and abuse
145
+ # detection.
146
+ #
136
147
  # @param store [Boolean]
137
148
  # Whether to store the session for later forking and recording download. Defaults
138
149
  # to false for new sessions.
@@ -180,8 +180,12 @@ module OpenAI
180
180
 
181
181
  variant const: -> { OpenAI::Models::Responses::ResponseCompactParams::Model::GPT_6_ASTRA }
182
182
 
183
+ variant const: -> { OpenAI::Models::Responses::ResponseCompactParams::Model::GPT_6_2_ASTRA }
184
+
183
185
  variant const: -> { OpenAI::Models::Responses::ResponseCompactParams::Model::GPT_6_1_SOL }
184
186
 
187
+ variant const: -> { OpenAI::Models::Responses::ResponseCompactParams::Model::GPT_6_2_SOL }
188
+
185
189
  variant const: -> { OpenAI::Models::Responses::ResponseCompactParams::Model::GPT_6_1_TERRA }
186
190
 
187
191
  variant const: -> { OpenAI::Models::Responses::ResponseCompactParams::Model::GPT_6_SOL }
@@ -420,6 +424,8 @@ module OpenAI
420
424
 
421
425
  variant const: -> { OpenAI::Models::Responses::ResponseCompactParams::Model::GPT_6_ROSALIND }
422
426
 
427
+ variant const: -> { OpenAI::Models::Responses::ResponseCompactParams::Model::GPT_6_2_ASTRA_LAW }
428
+
423
429
  variant String
424
430
 
425
431
  # @!method self.variants
@@ -432,7 +438,9 @@ module OpenAI
432
438
  # @!group
433
439
 
434
440
  GPT_6_ASTRA = :"gpt-6-astra"
441
+ GPT_6_2_ASTRA = :"gpt-6.2-astra"
435
442
  GPT_6_1_SOL = :"gpt-6.1-sol"
443
+ GPT_6_2_SOL = :"gpt-6.2-sol"
436
444
  GPT_6_1_TERRA = :"gpt-6.1-terra"
437
445
  GPT_6_SOL = :"gpt-6-sol"
438
446
  GPT_6_LUNA = :"gpt-6-luna"
@@ -802,6 +810,7 @@ module OpenAI
802
810
  GPT_6_CYBER = :"gpt-6-cyber"
803
811
  GPT_ROSALIND_RESEARCH = :"gpt-rosalind-research"
804
812
  GPT_6_ROSALIND = :"gpt-6-rosalind"
813
+ GPT_6_2_ASTRA_LAW = :"gpt-6.2-astra-law"
805
814
 
806
815
  # @!endgroup
807
816
  end
@@ -23,6 +23,14 @@ module OpenAI
23
23
  # @return [Boolean, nil]
24
24
  optional :background, OpenAI::Internal::Type::Boolean, nil?: true
25
25
 
26
+ # @!attribute background_options
27
+ # Options for background execution on HTTP requests. The `2h` and `8h` completion
28
+ # windows require `background: true`, Standard processing, and `stream: false` or
29
+ # omitted.
30
+ #
31
+ # @return [OpenAI::Models::Responses::ResponseCreateParams::BackgroundOptions, nil]
32
+ optional :background_options, -> { OpenAI::Responses::ResponseCreateParams::BackgroundOptions }
33
+
26
34
  # @!attribute context_management
27
35
  # Context management configuration for this request.
28
36
  #
@@ -390,7 +398,7 @@ module OpenAI
390
398
  # @return [String, nil]
391
399
  optional :user, String
392
400
 
393
- # @!method initialize(access_programs: nil, background: nil, context_management: nil, conversation: nil, image: nil, include: nil, input: nil, instructions: nil, max_output_tokens: nil, max_tool_calls: nil, metadata: nil, model: nil, moderation: nil, parallel_tool_calls: nil, previous_response_id: nil, prompt: nil, prompt_cache_key: nil, prompt_cache_options: nil, prompt_cache_retention: nil, reasoning: nil, safety_identifier: nil, service_tier: nil, store: nil, stream_options: nil, temperature: nil, text: nil, tool_choice: nil, tools: nil, top_logprobs: nil, top_p: nil, truncation: nil, user: nil, request_options: {})
401
+ # @!method initialize(access_programs: nil, background: nil, background_options: nil, context_management: nil, conversation: nil, image: nil, include: nil, input: nil, instructions: nil, max_output_tokens: nil, max_tool_calls: nil, metadata: nil, model: nil, moderation: nil, parallel_tool_calls: nil, previous_response_id: nil, prompt: nil, prompt_cache_key: nil, prompt_cache_options: nil, prompt_cache_retention: nil, reasoning: nil, safety_identifier: nil, service_tier: nil, store: nil, stream_options: nil, temperature: nil, text: nil, tool_choice: nil, tools: nil, top_logprobs: nil, top_p: nil, truncation: nil, user: nil, request_options: {})
394
402
  # @param access_programs [OpenAI::Models::Responses::ResponseCreateParams::AccessPrograms]
395
403
  # Domain-specific access programs to use for this request.
396
404
  #
@@ -398,6 +406,11 @@ module OpenAI
398
406
  # Whether to run the model response in the background.
399
407
  # [Learn more](https://developers.openai.com/api/docs/guides/background).
400
408
  #
409
+ # @param background_options [OpenAI::Models::Responses::ResponseCreateParams::BackgroundOptions]
410
+ # Options for background execution on HTTP requests. The `2h` and `8h` completion
411
+ # windows require `background: true`, Standard processing, and `stream: false` or
412
+ # omitted.
413
+ #
401
414
  # @param context_management [Array<OpenAI::Models::Responses::ResponseCreateParams::ContextManagement>, nil]
402
415
  # Context management configuration for this request.
403
416
  #
@@ -701,6 +714,53 @@ module OpenAI
701
714
  end
702
715
  end
703
716
 
717
+ class BackgroundOptions < OpenAI::Internal::Type::BaseModel
718
+ # @!attribute completion_window
719
+ # The completion window for background execution. Defaults to `soonest`; `2h` and
720
+ # `8h` select discounted background execution.
721
+ #
722
+ # @return [Symbol, OpenAI::Models::Responses::ResponseCreateParams::BackgroundOptions::CompletionWindow, nil]
723
+ optional(
724
+ :completion_window,
725
+ enum: -> { OpenAI::Responses::ResponseCreateParams::BackgroundOptions::CompletionWindow }
726
+ )
727
+
728
+ # @!attribute continuation_id
729
+ # A customer-provided opaque identifier used to prioritize related background
730
+ # requests. It does not add prior history to the input.
731
+ #
732
+ # @return [String, nil]
733
+ optional :continuation_id, String
734
+
735
+ # @!method initialize(completion_window: nil, continuation_id: nil)
736
+ # Options for background execution on HTTP requests. The `2h` and `8h` completion
737
+ # windows require `background: true`, Standard processing, and `stream: false` or
738
+ # omitted.
739
+ #
740
+ # @param completion_window [Symbol, OpenAI::Models::Responses::ResponseCreateParams::BackgroundOptions::CompletionWindow]
741
+ # The completion window for background execution. Defaults to `soonest`; `2h` and
742
+ # `8h` select discounted background execution.
743
+ #
744
+ # @param continuation_id [String]
745
+ # A customer-provided opaque identifier used to prioritize related background
746
+ # requests. It does not add prior history to the input.
747
+
748
+ # The completion window for background execution. Defaults to `soonest`; `2h` and
749
+ # `8h` select discounted background execution.
750
+ #
751
+ # @see OpenAI::Models::Responses::ResponseCreateParams::BackgroundOptions#completion_window
752
+ module CompletionWindow
753
+ extend OpenAI::Internal::Type::Enum
754
+
755
+ SOONEST = :soonest
756
+ COMPLETION_WINDOW_2H = :"2h"
757
+ COMPLETION_WINDOW_8H = :"8h"
758
+
759
+ # @!method self.values
760
+ # @return [Array<Symbol>]
761
+ end
762
+ end
763
+
704
764
  class ContextManagement < OpenAI::Internal::Type::BaseModel
705
765
  # @!attribute type
706
766
  # The context management entry type. Currently only 'compaction' is supported.
@@ -69,6 +69,17 @@ module OpenAI
69
69
  # @return [Boolean, nil]
70
70
  optional :background, OpenAI::Internal::Type::Boolean, nil?: true
71
71
 
72
+ # @!attribute background_options
73
+ # Options for background execution on HTTP requests. The `2h` and `8h` completion
74
+ # windows require `background: true`, Standard processing, and `stream: false` or
75
+ # omitted.
76
+ #
77
+ # @return [OpenAI::Models::Responses::ResponsesClientEvent::ResponseCreate::BackgroundOptions, nil]
78
+ optional(
79
+ :background_options,
80
+ -> { OpenAI::Responses::ResponsesClientEvent::ResponseCreate::BackgroundOptions }
81
+ )
82
+
72
83
  # @!attribute context_management
73
84
  # Context management configuration for this request.
74
85
  #
@@ -479,7 +490,7 @@ module OpenAI
479
490
  # @return [String, nil]
480
491
  optional :user, String
481
492
 
482
- # @!method initialize(access_programs: nil, background: nil, context_management: nil, conversation: nil, generate: nil, image: nil, include: nil, input: nil, instructions: nil, max_output_tokens: nil, max_tool_calls: nil, metadata: nil, model: nil, moderation: nil, parallel_tool_calls: nil, previous_response_id: nil, prompt: nil, prompt_cache_key: nil, prompt_cache_options: nil, prompt_cache_retention: nil, reasoning: nil, safety_identifier: nil, service_tier: nil, store: nil, stream: nil, stream_id: nil, stream_options: nil, temperature: nil, text: nil, tool_choice: nil, tools: nil, top_logprobs: nil, top_p: nil, truncation: nil, user: nil, type: :"response.create")
493
+ # @!method initialize(access_programs: nil, background: nil, background_options: nil, context_management: nil, conversation: nil, generate: nil, image: nil, include: nil, input: nil, instructions: nil, max_output_tokens: nil, max_tool_calls: nil, metadata: nil, model: nil, moderation: nil, parallel_tool_calls: nil, previous_response_id: nil, prompt: nil, prompt_cache_key: nil, prompt_cache_options: nil, prompt_cache_retention: nil, reasoning: nil, safety_identifier: nil, service_tier: nil, store: nil, stream: nil, stream_id: nil, stream_options: nil, temperature: nil, text: nil, tool_choice: nil, tools: nil, top_logprobs: nil, top_p: nil, truncation: nil, user: nil, type: :"response.create")
483
494
  # Client event for creating a response over a persistent WebSocket connection.
484
495
  # This payload uses the same top-level fields as `POST /v1/responses`, plus
485
496
  # WebSocket-only envelope metadata.
@@ -497,6 +508,11 @@ module OpenAI
497
508
  # Whether to run the model response in the background.
498
509
  # [Learn more](https://developers.openai.com/api/docs/guides/background).
499
510
  #
511
+ # @param background_options [OpenAI::Models::Responses::ResponsesClientEvent::ResponseCreate::BackgroundOptions]
512
+ # Options for background execution on HTTP requests. The `2h` and `8h` completion
513
+ # windows require `background: true`, Standard processing, and `stream: false` or
514
+ # omitted.
515
+ #
500
516
  # @param context_management [Array<OpenAI::Models::Responses::ResponsesClientEvent::ResponseCreate::ContextManagement>, nil]
501
517
  # Context management configuration for this request.
502
518
  #
@@ -825,6 +841,54 @@ module OpenAI
825
841
  end
826
842
  end
827
843
 
844
+ # @see OpenAI::Models::Responses::ResponsesClientEvent::ResponseCreate#background_options
845
+ class BackgroundOptions < OpenAI::Internal::Type::BaseModel
846
+ # @!attribute completion_window
847
+ # The completion window for background execution. Defaults to `soonest`; `2h` and
848
+ # `8h` select discounted background execution.
849
+ #
850
+ # @return [Symbol, OpenAI::Models::Responses::ResponsesClientEvent::ResponseCreate::BackgroundOptions::CompletionWindow, nil]
851
+ optional(
852
+ :completion_window,
853
+ enum: -> { OpenAI::Responses::ResponsesClientEvent::ResponseCreate::BackgroundOptions::CompletionWindow }
854
+ )
855
+
856
+ # @!attribute continuation_id
857
+ # A customer-provided opaque identifier used to prioritize related background
858
+ # requests. It does not add prior history to the input.
859
+ #
860
+ # @return [String, nil]
861
+ optional :continuation_id, String
862
+
863
+ # @!method initialize(completion_window: nil, continuation_id: nil)
864
+ # Options for background execution on HTTP requests. The `2h` and `8h` completion
865
+ # windows require `background: true`, Standard processing, and `stream: false` or
866
+ # omitted.
867
+ #
868
+ # @param completion_window [Symbol, OpenAI::Models::Responses::ResponsesClientEvent::ResponseCreate::BackgroundOptions::CompletionWindow]
869
+ # The completion window for background execution. Defaults to `soonest`; `2h` and
870
+ # `8h` select discounted background execution.
871
+ #
872
+ # @param continuation_id [String]
873
+ # A customer-provided opaque identifier used to prioritize related background
874
+ # requests. It does not add prior history to the input.
875
+
876
+ # The completion window for background execution. Defaults to `soonest`; `2h` and
877
+ # `8h` select discounted background execution.
878
+ #
879
+ # @see OpenAI::Models::Responses::ResponsesClientEvent::ResponseCreate::BackgroundOptions#completion_window
880
+ module CompletionWindow
881
+ extend OpenAI::Internal::Type::Enum
882
+
883
+ SOONEST = :soonest
884
+ COMPLETION_WINDOW_2H = :"2h"
885
+ COMPLETION_WINDOW_8H = :"8h"
886
+
887
+ # @!method self.values
888
+ # @return [Array<Symbol>]
889
+ end
890
+ end
891
+
828
892
  class ContextManagement < OpenAI::Internal::Type::BaseModel
829
893
  # @!attribute type
830
894
  # The context management entry type. Currently only 'compaction' is supported.
@@ -78,6 +78,7 @@ module OpenAI
78
78
  GPT_6_CYBER = :"gpt-6-cyber"
79
79
  GPT_ROSALIND_RESEARCH = :"gpt-rosalind-research"
80
80
  GPT_6_ROSALIND = :"gpt-6-rosalind"
81
+ GPT_6_2_ASTRA_LAW = :"gpt-6.2-astra-law"
81
82
 
82
83
  # @!method self.values
83
84
  # @return [Array<Symbol>]
@@ -76,6 +76,7 @@ module OpenAI
76
76
  "accept" => "text/event-stream",
77
77
  "accept-encoding" => "identity"
78
78
  },
79
+ stream_mode: :events,
79
80
  stream: OpenAI::Internal::Stream,
80
81
  model: OpenAI::Beta::AgentSessionEvent,
81
82
  security: {bearer_auth: true},
@@ -172,6 +172,7 @@ module OpenAI
172
172
  "accept-encoding" => "identity"
173
173
  },
174
174
  body: parsed,
175
+ stream_mode: :events,
175
176
  stream: OpenAI::Helpers::Beta::Agents::CreationStream,
176
177
  model: OpenAI::Beta::AgentSessionEvent,
177
178
  security: {bearer_auth: true},
@@ -25,7 +25,7 @@ module OpenAI
25
25
  # The model to use for the agent. The requested model name is preserved.
26
26
  #
27
27
  # @param compaction [OpenAI::Models::Beta::AgentCreateParams::Compaction, nil]
28
- # Context compaction settings. Omission or null enables background compaction.
28
+ # Context compaction settings. Omission or null uses blocking compaction.
29
29
  #
30
30
  # @param experimental [OpenAI::Models::Beta::AgentCreateParams::Experimental]
31
31
  # Experimental agent settings. All experimental features default to disabled.
@@ -111,8 +111,7 @@ module OpenAI
111
111
  #
112
112
  # @param compaction [OpenAI::Models::Beta::AgentUpdateParams::Compaction, nil]
113
113
  # Context compaction settings. Omit to keep the current settings. A supplied
114
- # object replaces the settings; null or an empty object enables background
115
- # compaction.
114
+ # object replaces the settings; null or an empty object uses blocking compaction.
116
115
  #
117
116
  # @param experimental [OpenAI::Models::Beta::AgentUpdateParams::Experimental]
118
117
  # Experimental settings to merge by key. Omitted settings keep their current