openai 0.36.0 → 0.37.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 (139) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +22 -0
  3. data/README.md +1 -1
  4. data/lib/openai/models/all_models.rb +1 -0
  5. data/lib/openai/models/beta/assistant_create_params.rb +4 -3
  6. data/lib/openai/models/beta/assistant_update_params.rb +4 -3
  7. data/lib/openai/models/beta/threads/run_create_params.rb +4 -3
  8. data/lib/openai/models/chat/completion_create_params.rb +4 -3
  9. data/lib/openai/models/container_create_params.rb +22 -1
  10. data/lib/openai/models/container_create_response.rb +32 -1
  11. data/lib/openai/models/container_list_response.rb +32 -1
  12. data/lib/openai/models/container_retrieve_response.rb +32 -1
  13. data/lib/openai/models/conversations/conversation_create_params.rb +2 -2
  14. data/lib/openai/models/conversations/item_create_params.rb +2 -2
  15. data/lib/openai/models/evals/create_eval_completions_run_data_source.rb +4 -3
  16. data/lib/openai/models/evals/run_cancel_response.rb +8 -6
  17. data/lib/openai/models/evals/run_create_params.rb +8 -6
  18. data/lib/openai/models/evals/run_create_response.rb +8 -6
  19. data/lib/openai/models/evals/run_list_response.rb +8 -6
  20. data/lib/openai/models/evals/run_retrieve_response.rb +8 -6
  21. data/lib/openai/models/graders/score_model_grader.rb +4 -3
  22. data/lib/openai/models/realtime/input_audio_buffer_dtmf_event_received_event.rb +43 -0
  23. data/lib/openai/models/realtime/output_audio_buffer_clear_event.rb +4 -4
  24. data/lib/openai/models/realtime/realtime_audio_input_turn_detection.rb +13 -5
  25. data/lib/openai/models/realtime/realtime_client_event.rb +1 -1
  26. data/lib/openai/models/realtime/realtime_server_event.rb +16 -9
  27. data/lib/openai/models/realtime/realtime_session.rb +13 -5
  28. data/lib/openai/models/realtime/realtime_session_create_request.rb +14 -9
  29. data/lib/openai/models/realtime/realtime_session_create_response.rb +27 -14
  30. data/lib/openai/models/realtime/realtime_transcription_session_audio_input_turn_detection.rb +13 -5
  31. data/lib/openai/models/realtime/realtime_truncation.rb +14 -9
  32. data/lib/openai/models/reasoning.rb +4 -3
  33. data/lib/openai/models/reasoning_effort.rb +5 -3
  34. data/lib/openai/models/responses/compacted_response.rb +56 -0
  35. data/lib/openai/models/responses/input_token_count_params.rb +4 -4
  36. data/lib/openai/models/responses/response.rb +6 -6
  37. data/lib/openai/models/responses/response_apply_patch_tool_call.rb +23 -23
  38. data/lib/openai/models/responses/response_apply_patch_tool_call_output.rb +9 -9
  39. data/lib/openai/models/responses/response_compact_params.rb +344 -0
  40. data/lib/openai/models/responses/response_compaction_item.rb +43 -0
  41. data/lib/openai/models/responses/response_compaction_item_param.rb +36 -0
  42. data/lib/openai/models/responses/response_create_params.rb +4 -4
  43. data/lib/openai/models/responses/response_function_shell_call_output_content.rb +10 -10
  44. data/lib/openai/models/responses/response_function_shell_tool_call.rb +5 -5
  45. data/lib/openai/models/responses/response_function_shell_tool_call_output.rb +2 -2
  46. data/lib/openai/models/responses/response_input_item.rb +22 -19
  47. data/lib/openai/models/responses/response_output_item.rb +4 -1
  48. data/lib/openai/models/responses/response_output_item_added_event.rb +2 -2
  49. data/lib/openai/models/responses/response_output_item_done_event.rb +2 -2
  50. data/lib/openai/models/responses/tool.rb +4 -2
  51. data/lib/openai/models/responses/tool_choice_shell.rb +1 -1
  52. data/lib/openai/models/responses_model.rb +1 -0
  53. data/lib/openai/models/video_create_params.rb +11 -6
  54. data/lib/openai/resources/containers.rb +3 -1
  55. data/lib/openai/resources/conversations/items.rb +1 -1
  56. data/lib/openai/resources/conversations.rb +1 -1
  57. data/lib/openai/resources/responses/input_tokens.rb +1 -1
  58. data/lib/openai/resources/responses.rb +33 -2
  59. data/lib/openai/resources/videos.rb +6 -3
  60. data/lib/openai/resources/webhooks.rb +0 -3
  61. data/lib/openai/version.rb +1 -1
  62. data/lib/openai.rb +6 -0
  63. data/manifest.yaml +1 -0
  64. data/rbi/openai/models/all_models.rbi +5 -0
  65. data/rbi/openai/models/beta/assistant_create_params.rbi +8 -6
  66. data/rbi/openai/models/beta/assistant_update_params.rbi +8 -6
  67. data/rbi/openai/models/beta/threads/run_create_params.rbi +8 -6
  68. data/rbi/openai/models/chat/completion_create_params.rbi +8 -6
  69. data/rbi/openai/models/container_create_params.rbi +51 -0
  70. data/rbi/openai/models/container_create_response.rbi +81 -3
  71. data/rbi/openai/models/container_list_response.rbi +80 -3
  72. data/rbi/openai/models/container_retrieve_response.rbi +83 -3
  73. data/rbi/openai/models/conversations/conversation_create_params.rbi +3 -0
  74. data/rbi/openai/models/conversations/item_create_params.rbi +3 -0
  75. data/rbi/openai/models/evals/create_eval_completions_run_data_source.rbi +8 -6
  76. data/rbi/openai/models/evals/run_cancel_response.rbi +16 -12
  77. data/rbi/openai/models/evals/run_create_params.rbi +16 -12
  78. data/rbi/openai/models/evals/run_create_response.rbi +16 -12
  79. data/rbi/openai/models/evals/run_list_response.rbi +16 -12
  80. data/rbi/openai/models/evals/run_retrieve_response.rbi +16 -12
  81. data/rbi/openai/models/graders/score_model_grader.rbi +8 -6
  82. data/rbi/openai/models/realtime/input_audio_buffer_dtmf_event_received_event.rbi +56 -0
  83. data/rbi/openai/models/realtime/output_audio_buffer_clear_event.rbi +4 -4
  84. data/rbi/openai/models/realtime/realtime_audio_input_turn_detection.rbi +24 -8
  85. data/rbi/openai/models/realtime/realtime_server_event.rbi +6 -5
  86. data/rbi/openai/models/realtime/realtime_session.rbi +24 -8
  87. data/rbi/openai/models/realtime/realtime_session_create_request.rbi +28 -18
  88. data/rbi/openai/models/realtime/realtime_session_create_response.rbi +52 -26
  89. data/rbi/openai/models/realtime/realtime_transcription_session_audio_input_turn_detection.rbi +24 -8
  90. data/rbi/openai/models/realtime/realtime_truncation.rbi +14 -9
  91. data/rbi/openai/models/reasoning.rbi +8 -6
  92. data/rbi/openai/models/reasoning_effort.rbi +5 -3
  93. data/rbi/openai/models/responses/compacted_response.rbi +105 -0
  94. data/rbi/openai/models/responses/response.rbi +1 -0
  95. data/rbi/openai/models/responses/response_apply_patch_tool_call.rbi +53 -67
  96. data/rbi/openai/models/responses/response_apply_patch_tool_call_output.rbi +9 -9
  97. data/rbi/openai/models/responses/response_compact_params.rbi +593 -0
  98. data/rbi/openai/models/responses/response_compaction_item.rbi +67 -0
  99. data/rbi/openai/models/responses/response_compaction_item_param.rbi +54 -0
  100. data/rbi/openai/models/responses/response_function_shell_call_output_content.rbi +9 -9
  101. data/rbi/openai/models/responses/response_function_shell_tool_call.rbi +6 -6
  102. data/rbi/openai/models/responses/response_function_shell_tool_call_output.rbi +1 -1
  103. data/rbi/openai/models/responses/response_input_item.rbi +21 -23
  104. data/rbi/openai/models/responses/response_output_item.rbi +1 -0
  105. data/rbi/openai/models/responses/response_output_item_added_event.rbi +1 -0
  106. data/rbi/openai/models/responses/response_output_item_done_event.rbi +1 -0
  107. data/rbi/openai/models/responses/tool.rbi +6 -3
  108. data/rbi/openai/models/responses/tool_choice_shell.rbi +1 -1
  109. data/rbi/openai/models/responses_model.rbi +5 -0
  110. data/rbi/openai/models/video_create_params.rbi +10 -6
  111. data/rbi/openai/resources/beta/assistants.rbi +8 -6
  112. data/rbi/openai/resources/beta/threads/runs.rbi +8 -6
  113. data/rbi/openai/resources/chat/completions.rbi +8 -6
  114. data/rbi/openai/resources/containers.rbi +3 -0
  115. data/rbi/openai/resources/conversations/items.rbi +1 -0
  116. data/rbi/openai/resources/conversations.rbi +1 -0
  117. data/rbi/openai/resources/realtime/calls.rbi +14 -9
  118. data/rbi/openai/resources/responses.rbi +42 -0
  119. data/rbi/openai/resources/videos.rbi +5 -3
  120. data/sig/openai/models/all_models.rbs +2 -0
  121. data/sig/openai/models/container_create_params.rbs +23 -1
  122. data/sig/openai/models/container_create_response.rbs +32 -3
  123. data/sig/openai/models/container_list_response.rbs +32 -3
  124. data/sig/openai/models/container_retrieve_response.rbs +32 -3
  125. data/sig/openai/models/realtime/input_audio_buffer_dtmf_event_received_event.rbs +32 -0
  126. data/sig/openai/models/realtime/realtime_server_event.rbs +1 -0
  127. data/sig/openai/models/reasoning_effort.rbs +2 -1
  128. data/sig/openai/models/responses/compacted_response.rbs +42 -0
  129. data/sig/openai/models/responses/response_apply_patch_tool_call.rbs +18 -22
  130. data/sig/openai/models/responses/response_apply_patch_tool_call_output.rbs +7 -7
  131. data/sig/openai/models/responses/response_compact_params.rbs +226 -0
  132. data/sig/openai/models/responses/response_compaction_item.rbs +39 -0
  133. data/sig/openai/models/responses/response_compaction_item_param.rbs +28 -0
  134. data/sig/openai/models/responses/response_input_item.rbs +5 -6
  135. data/sig/openai/models/responses/response_output_item.rbs +1 -0
  136. data/sig/openai/models/responses_model.rbs +2 -0
  137. data/sig/openai/resources/containers.rbs +1 -0
  138. data/sig/openai/resources/responses.rbs +8 -0
  139. metadata +31 -2
@@ -49,6 +49,31 @@ module OpenAI
49
49
  end
50
50
  attr_writer :expires_after
51
51
 
52
+ # Unix timestamp (in seconds) when the container was last active.
53
+ sig { returns(T.nilable(Integer)) }
54
+ attr_reader :last_active_at
55
+
56
+ sig { params(last_active_at: Integer).void }
57
+ attr_writer :last_active_at
58
+
59
+ # The memory limit configured for the container.
60
+ sig do
61
+ returns(
62
+ T.nilable(
63
+ OpenAI::Models::ContainerRetrieveResponse::MemoryLimit::TaggedSymbol
64
+ )
65
+ )
66
+ end
67
+ attr_reader :memory_limit
68
+
69
+ sig do
70
+ params(
71
+ memory_limit:
72
+ OpenAI::Models::ContainerRetrieveResponse::MemoryLimit::OrSymbol
73
+ ).void
74
+ end
75
+ attr_writer :memory_limit
76
+
52
77
  sig do
53
78
  params(
54
79
  id: String,
@@ -57,7 +82,10 @@ module OpenAI
57
82
  object: String,
58
83
  status: String,
59
84
  expires_after:
60
- OpenAI::Models::ContainerRetrieveResponse::ExpiresAfter::OrHash
85
+ OpenAI::Models::ContainerRetrieveResponse::ExpiresAfter::OrHash,
86
+ last_active_at: Integer,
87
+ memory_limit:
88
+ OpenAI::Models::ContainerRetrieveResponse::MemoryLimit::OrSymbol
61
89
  ).returns(T.attached_class)
62
90
  end
63
91
  def self.new(
@@ -74,7 +102,11 @@ module OpenAI
74
102
  # The container will expire after this time period. The anchor is the reference
75
103
  # point for the expiration. The minutes is the number of minutes after the anchor
76
104
  # before the container expires.
77
- expires_after: nil
105
+ expires_after: nil,
106
+ # Unix timestamp (in seconds) when the container was last active.
107
+ last_active_at: nil,
108
+ # The memory limit configured for the container.
109
+ memory_limit: nil
78
110
  )
79
111
  end
80
112
 
@@ -87,7 +119,10 @@ module OpenAI
87
119
  object: String,
88
120
  status: String,
89
121
  expires_after:
90
- OpenAI::Models::ContainerRetrieveResponse::ExpiresAfter
122
+ OpenAI::Models::ContainerRetrieveResponse::ExpiresAfter,
123
+ last_active_at: Integer,
124
+ memory_limit:
125
+ OpenAI::Models::ContainerRetrieveResponse::MemoryLimit::TaggedSymbol
91
126
  }
92
127
  )
93
128
  end
@@ -188,6 +223,51 @@ module OpenAI
188
223
  end
189
224
  end
190
225
  end
226
+
227
+ # The memory limit configured for the container.
228
+ module MemoryLimit
229
+ extend OpenAI::Internal::Type::Enum
230
+
231
+ TaggedSymbol =
232
+ T.type_alias do
233
+ T.all(
234
+ Symbol,
235
+ OpenAI::Models::ContainerRetrieveResponse::MemoryLimit
236
+ )
237
+ end
238
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
239
+
240
+ MEMORY_LIMIT_1G =
241
+ T.let(
242
+ :"1g",
243
+ OpenAI::Models::ContainerRetrieveResponse::MemoryLimit::TaggedSymbol
244
+ )
245
+ MEMORY_LIMIT_4G =
246
+ T.let(
247
+ :"4g",
248
+ OpenAI::Models::ContainerRetrieveResponse::MemoryLimit::TaggedSymbol
249
+ )
250
+ MEMORY_LIMIT_16G =
251
+ T.let(
252
+ :"16g",
253
+ OpenAI::Models::ContainerRetrieveResponse::MemoryLimit::TaggedSymbol
254
+ )
255
+ MEMORY_LIMIT_64G =
256
+ T.let(
257
+ :"64g",
258
+ OpenAI::Models::ContainerRetrieveResponse::MemoryLimit::TaggedSymbol
259
+ )
260
+
261
+ sig do
262
+ override.returns(
263
+ T::Array[
264
+ OpenAI::Models::ContainerRetrieveResponse::MemoryLimit::TaggedSymbol
265
+ ]
266
+ )
267
+ end
268
+ def self.values
269
+ end
270
+ end
191
271
  end
192
272
  end
193
273
  end
@@ -32,6 +32,7 @@ module OpenAI
32
32
  OpenAI::Responses::ResponseFunctionToolCall,
33
33
  OpenAI::Responses::ResponseInputItem::FunctionCallOutput,
34
34
  OpenAI::Responses::ResponseReasoningItem,
35
+ OpenAI::Responses::ResponseCompactionItemParam,
35
36
  OpenAI::Responses::ResponseInputItem::ImageGenerationCall,
36
37
  OpenAI::Responses::ResponseCodeInterpreterToolCall,
37
38
  OpenAI::Responses::ResponseInputItem::LocalShellCall,
@@ -79,6 +80,7 @@ module OpenAI
79
80
  OpenAI::Responses::ResponseFunctionToolCall::OrHash,
80
81
  OpenAI::Responses::ResponseInputItem::FunctionCallOutput::OrHash,
81
82
  OpenAI::Responses::ResponseReasoningItem::OrHash,
83
+ OpenAI::Responses::ResponseCompactionItemParam::OrHash,
82
84
  OpenAI::Responses::ResponseInputItem::ImageGenerationCall::OrHash,
83
85
  OpenAI::Responses::ResponseCodeInterpreterToolCall::OrHash,
84
86
  OpenAI::Responses::ResponseInputItem::LocalShellCall::OrHash,
@@ -133,6 +135,7 @@ module OpenAI
133
135
  OpenAI::Responses::ResponseFunctionToolCall,
134
136
  OpenAI::Responses::ResponseInputItem::FunctionCallOutput,
135
137
  OpenAI::Responses::ResponseReasoningItem,
138
+ OpenAI::Responses::ResponseCompactionItemParam,
136
139
  OpenAI::Responses::ResponseInputItem::ImageGenerationCall,
137
140
  OpenAI::Responses::ResponseCodeInterpreterToolCall,
138
141
  OpenAI::Responses::ResponseInputItem::LocalShellCall,
@@ -30,6 +30,7 @@ module OpenAI
30
30
  OpenAI::Responses::ResponseFunctionToolCall,
31
31
  OpenAI::Responses::ResponseInputItem::FunctionCallOutput,
32
32
  OpenAI::Responses::ResponseReasoningItem,
33
+ OpenAI::Responses::ResponseCompactionItemParam,
33
34
  OpenAI::Responses::ResponseInputItem::ImageGenerationCall,
34
35
  OpenAI::Responses::ResponseCodeInterpreterToolCall,
35
36
  OpenAI::Responses::ResponseInputItem::LocalShellCall,
@@ -83,6 +84,7 @@ module OpenAI
83
84
  OpenAI::Responses::ResponseFunctionToolCall::OrHash,
84
85
  OpenAI::Responses::ResponseInputItem::FunctionCallOutput::OrHash,
85
86
  OpenAI::Responses::ResponseReasoningItem::OrHash,
87
+ OpenAI::Responses::ResponseCompactionItemParam::OrHash,
86
88
  OpenAI::Responses::ResponseInputItem::ImageGenerationCall::OrHash,
87
89
  OpenAI::Responses::ResponseCodeInterpreterToolCall::OrHash,
88
90
  OpenAI::Responses::ResponseInputItem::LocalShellCall::OrHash,
@@ -131,6 +133,7 @@ module OpenAI
131
133
  OpenAI::Responses::ResponseFunctionToolCall,
132
134
  OpenAI::Responses::ResponseInputItem::FunctionCallOutput,
133
135
  OpenAI::Responses::ResponseReasoningItem,
136
+ OpenAI::Responses::ResponseCompactionItemParam,
134
137
  OpenAI::Responses::ResponseInputItem::ImageGenerationCall,
135
138
  OpenAI::Responses::ResponseCodeInterpreterToolCall,
136
139
  OpenAI::Responses::ResponseInputItem::LocalShellCall,
@@ -889,9 +889,9 @@ module OpenAI
889
889
 
890
890
  # Constrains effort on reasoning for
891
891
  # [reasoning models](https://platform.openai.com/docs/guides/reasoning). Currently
892
- # supported values are `none`, `minimal`, `low`, `medium`, and `high`. Reducing
893
- # reasoning effort can result in faster responses and fewer tokens used on
894
- # reasoning in a response.
892
+ # supported values are `none`, `minimal`, `low`, `medium`, `high`, and `xhigh`.
893
+ # Reducing reasoning effort can result in faster responses and fewer tokens used
894
+ # on reasoning in a response.
895
895
  #
896
896
  # - `gpt-5.1` defaults to `none`, which does not perform reasoning. The supported
897
897
  # reasoning values for `gpt-5.1` are `none`, `low`, `medium`, and `high`. Tool
@@ -899,6 +899,7 @@ module OpenAI
899
899
  # - All models before `gpt-5.1` default to `medium` reasoning effort, and do not
900
900
  # support `none`.
901
901
  # - The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort.
902
+ # - `xhigh` is currently only supported for `gpt-5.1-codex-max`.
902
903
  sig { returns(T.nilable(OpenAI::ReasoningEffort::OrSymbol)) }
903
904
  attr_accessor :reasoning_effort
904
905
 
@@ -996,9 +997,9 @@ module OpenAI
996
997
  max_completion_tokens: nil,
997
998
  # Constrains effort on reasoning for
998
999
  # [reasoning models](https://platform.openai.com/docs/guides/reasoning). Currently
999
- # supported values are `none`, `minimal`, `low`, `medium`, and `high`. Reducing
1000
- # reasoning effort can result in faster responses and fewer tokens used on
1001
- # reasoning in a response.
1000
+ # supported values are `none`, `minimal`, `low`, `medium`, `high`, and `xhigh`.
1001
+ # Reducing reasoning effort can result in faster responses and fewer tokens used
1002
+ # on reasoning in a response.
1002
1003
  #
1003
1004
  # - `gpt-5.1` defaults to `none`, which does not perform reasoning. The supported
1004
1005
  # reasoning values for `gpt-5.1` are `none`, `low`, `medium`, and `high`. Tool
@@ -1006,6 +1007,7 @@ module OpenAI
1006
1007
  # - All models before `gpt-5.1` default to `medium` reasoning effort, and do not
1007
1008
  # support `none`.
1008
1009
  # - The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort.
1010
+ # - `xhigh` is currently only supported for `gpt-5.1-codex-max`.
1009
1011
  reasoning_effort: nil,
1010
1012
  # An object specifying the format that the model must output.
1011
1013
  #
@@ -512,9 +512,9 @@ module OpenAI
512
512
 
513
513
  # Constrains effort on reasoning for
514
514
  # [reasoning models](https://platform.openai.com/docs/guides/reasoning). Currently
515
- # supported values are `none`, `minimal`, `low`, `medium`, and `high`. Reducing
516
- # reasoning effort can result in faster responses and fewer tokens used on
517
- # reasoning in a response.
515
+ # supported values are `none`, `minimal`, `low`, `medium`, `high`, and `xhigh`.
516
+ # Reducing reasoning effort can result in faster responses and fewer tokens used
517
+ # on reasoning in a response.
518
518
  #
519
519
  # - `gpt-5.1` defaults to `none`, which does not perform reasoning. The supported
520
520
  # reasoning values for `gpt-5.1` are `none`, `low`, `medium`, and `high`. Tool
@@ -522,6 +522,7 @@ module OpenAI
522
522
  # - All models before `gpt-5.1` default to `medium` reasoning effort, and do not
523
523
  # support `none`.
524
524
  # - The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort.
525
+ # - `xhigh` is currently only supported for `gpt-5.1-codex-max`.
525
526
  sig do
526
527
  returns(T.nilable(OpenAI::ReasoningEffort::TaggedSymbol))
527
528
  end
@@ -578,9 +579,9 @@ module OpenAI
578
579
  model: nil,
579
580
  # Constrains effort on reasoning for
580
581
  # [reasoning models](https://platform.openai.com/docs/guides/reasoning). Currently
581
- # supported values are `none`, `minimal`, `low`, `medium`, and `high`. Reducing
582
- # reasoning effort can result in faster responses and fewer tokens used on
583
- # reasoning in a response.
582
+ # supported values are `none`, `minimal`, `low`, `medium`, `high`, and `xhigh`.
583
+ # Reducing reasoning effort can result in faster responses and fewer tokens used
584
+ # on reasoning in a response.
584
585
  #
585
586
  # - `gpt-5.1` defaults to `none`, which does not perform reasoning. The supported
586
587
  # reasoning values for `gpt-5.1` are `none`, `low`, `medium`, and `high`. Tool
@@ -588,6 +589,7 @@ module OpenAI
588
589
  # - All models before `gpt-5.1` default to `medium` reasoning effort, and do not
589
590
  # support `none`.
590
591
  # - The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort.
592
+ # - `xhigh` is currently only supported for `gpt-5.1-codex-max`.
591
593
  reasoning_effort: nil,
592
594
  # Sampling temperature. This is a query parameter used to select responses.
593
595
  temperature: nil,
@@ -1131,9 +1133,9 @@ module OpenAI
1131
1133
 
1132
1134
  # Constrains effort on reasoning for
1133
1135
  # [reasoning models](https://platform.openai.com/docs/guides/reasoning). Currently
1134
- # supported values are `none`, `minimal`, `low`, `medium`, and `high`. Reducing
1135
- # reasoning effort can result in faster responses and fewer tokens used on
1136
- # reasoning in a response.
1136
+ # supported values are `none`, `minimal`, `low`, `medium`, `high`, and `xhigh`.
1137
+ # Reducing reasoning effort can result in faster responses and fewer tokens used
1138
+ # on reasoning in a response.
1137
1139
  #
1138
1140
  # - `gpt-5.1` defaults to `none`, which does not perform reasoning. The supported
1139
1141
  # reasoning values for `gpt-5.1` are `none`, `low`, `medium`, and `high`. Tool
@@ -1141,6 +1143,7 @@ module OpenAI
1141
1143
  # - All models before `gpt-5.1` default to `medium` reasoning effort, and do not
1142
1144
  # support `none`.
1143
1145
  # - The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort.
1146
+ # - `xhigh` is currently only supported for `gpt-5.1-codex-max`.
1144
1147
  sig { returns(T.nilable(OpenAI::ReasoningEffort::TaggedSymbol)) }
1145
1148
  attr_accessor :reasoning_effort
1146
1149
 
@@ -1263,9 +1266,9 @@ module OpenAI
1263
1266
  max_completion_tokens: nil,
1264
1267
  # Constrains effort on reasoning for
1265
1268
  # [reasoning models](https://platform.openai.com/docs/guides/reasoning). Currently
1266
- # supported values are `none`, `minimal`, `low`, `medium`, and `high`. Reducing
1267
- # reasoning effort can result in faster responses and fewer tokens used on
1268
- # reasoning in a response.
1269
+ # supported values are `none`, `minimal`, `low`, `medium`, `high`, and `xhigh`.
1270
+ # Reducing reasoning effort can result in faster responses and fewer tokens used
1271
+ # on reasoning in a response.
1269
1272
  #
1270
1273
  # - `gpt-5.1` defaults to `none`, which does not perform reasoning. The supported
1271
1274
  # reasoning values for `gpt-5.1` are `none`, `low`, `medium`, and `high`. Tool
@@ -1273,6 +1276,7 @@ module OpenAI
1273
1276
  # - All models before `gpt-5.1` default to `medium` reasoning effort, and do not
1274
1277
  # support `none`.
1275
1278
  # - The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort.
1279
+ # - `xhigh` is currently only supported for `gpt-5.1-codex-max`.
1276
1280
  reasoning_effort: nil,
1277
1281
  # A seed value to initialize the randomness, during sampling.
1278
1282
  seed: nil,
@@ -422,9 +422,9 @@ module OpenAI
422
422
 
423
423
  # Constrains effort on reasoning for
424
424
  # [reasoning models](https://platform.openai.com/docs/guides/reasoning). Currently
425
- # supported values are `none`, `minimal`, `low`, `medium`, and `high`. Reducing
426
- # reasoning effort can result in faster responses and fewer tokens used on
427
- # reasoning in a response.
425
+ # supported values are `none`, `minimal`, `low`, `medium`, `high`, and `xhigh`.
426
+ # Reducing reasoning effort can result in faster responses and fewer tokens used
427
+ # on reasoning in a response.
428
428
  #
429
429
  # - `gpt-5.1` defaults to `none`, which does not perform reasoning. The supported
430
430
  # reasoning values for `gpt-5.1` are `none`, `low`, `medium`, and `high`. Tool
@@ -432,6 +432,7 @@ module OpenAI
432
432
  # - All models before `gpt-5.1` default to `medium` reasoning effort, and do not
433
433
  # support `none`.
434
434
  # - The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort.
435
+ # - `xhigh` is currently only supported for `gpt-5.1-codex-max`.
435
436
  sig { returns(T.nilable(OpenAI::ReasoningEffort::OrSymbol)) }
436
437
  attr_accessor :reasoning_effort
437
438
 
@@ -486,9 +487,9 @@ module OpenAI
486
487
  model: nil,
487
488
  # Constrains effort on reasoning for
488
489
  # [reasoning models](https://platform.openai.com/docs/guides/reasoning). Currently
489
- # supported values are `none`, `minimal`, `low`, `medium`, and `high`. Reducing
490
- # reasoning effort can result in faster responses and fewer tokens used on
491
- # reasoning in a response.
490
+ # supported values are `none`, `minimal`, `low`, `medium`, `high`, and `xhigh`.
491
+ # Reducing reasoning effort can result in faster responses and fewer tokens used
492
+ # on reasoning in a response.
492
493
  #
493
494
  # - `gpt-5.1` defaults to `none`, which does not perform reasoning. The supported
494
495
  # reasoning values for `gpt-5.1` are `none`, `low`, `medium`, and `high`. Tool
@@ -496,6 +497,7 @@ module OpenAI
496
497
  # - All models before `gpt-5.1` default to `medium` reasoning effort, and do not
497
498
  # support `none`.
498
499
  # - The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort.
500
+ # - `xhigh` is currently only supported for `gpt-5.1-codex-max`.
499
501
  reasoning_effort: nil,
500
502
  # Sampling temperature. This is a query parameter used to select responses.
501
503
  temperature: nil,
@@ -1089,9 +1091,9 @@ module OpenAI
1089
1091
 
1090
1092
  # Constrains effort on reasoning for
1091
1093
  # [reasoning models](https://platform.openai.com/docs/guides/reasoning). Currently
1092
- # supported values are `none`, `minimal`, `low`, `medium`, and `high`. Reducing
1093
- # reasoning effort can result in faster responses and fewer tokens used on
1094
- # reasoning in a response.
1094
+ # supported values are `none`, `minimal`, `low`, `medium`, `high`, and `xhigh`.
1095
+ # Reducing reasoning effort can result in faster responses and fewer tokens used
1096
+ # on reasoning in a response.
1095
1097
  #
1096
1098
  # - `gpt-5.1` defaults to `none`, which does not perform reasoning. The supported
1097
1099
  # reasoning values for `gpt-5.1` are `none`, `low`, `medium`, and `high`. Tool
@@ -1099,6 +1101,7 @@ module OpenAI
1099
1101
  # - All models before `gpt-5.1` default to `medium` reasoning effort, and do not
1100
1102
  # support `none`.
1101
1103
  # - The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort.
1104
+ # - `xhigh` is currently only supported for `gpt-5.1-codex-max`.
1102
1105
  sig { returns(T.nilable(OpenAI::ReasoningEffort::OrSymbol)) }
1103
1106
  attr_accessor :reasoning_effort
1104
1107
 
@@ -1240,9 +1243,9 @@ module OpenAI
1240
1243
  max_completion_tokens: nil,
1241
1244
  # Constrains effort on reasoning for
1242
1245
  # [reasoning models](https://platform.openai.com/docs/guides/reasoning). Currently
1243
- # supported values are `none`, `minimal`, `low`, `medium`, and `high`. Reducing
1244
- # reasoning effort can result in faster responses and fewer tokens used on
1245
- # reasoning in a response.
1246
+ # supported values are `none`, `minimal`, `low`, `medium`, `high`, and `xhigh`.
1247
+ # Reducing reasoning effort can result in faster responses and fewer tokens used
1248
+ # on reasoning in a response.
1246
1249
  #
1247
1250
  # - `gpt-5.1` defaults to `none`, which does not perform reasoning. The supported
1248
1251
  # reasoning values for `gpt-5.1` are `none`, `low`, `medium`, and `high`. Tool
@@ -1250,6 +1253,7 @@ module OpenAI
1250
1253
  # - All models before `gpt-5.1` default to `medium` reasoning effort, and do not
1251
1254
  # support `none`.
1252
1255
  # - The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort.
1256
+ # - `xhigh` is currently only supported for `gpt-5.1-codex-max`.
1253
1257
  reasoning_effort: nil,
1254
1258
  # A seed value to initialize the randomness, during sampling.
1255
1259
  seed: nil,
@@ -512,9 +512,9 @@ module OpenAI
512
512
 
513
513
  # Constrains effort on reasoning for
514
514
  # [reasoning models](https://platform.openai.com/docs/guides/reasoning). Currently
515
- # supported values are `none`, `minimal`, `low`, `medium`, and `high`. Reducing
516
- # reasoning effort can result in faster responses and fewer tokens used on
517
- # reasoning in a response.
515
+ # supported values are `none`, `minimal`, `low`, `medium`, `high`, and `xhigh`.
516
+ # Reducing reasoning effort can result in faster responses and fewer tokens used
517
+ # on reasoning in a response.
518
518
  #
519
519
  # - `gpt-5.1` defaults to `none`, which does not perform reasoning. The supported
520
520
  # reasoning values for `gpt-5.1` are `none`, `low`, `medium`, and `high`. Tool
@@ -522,6 +522,7 @@ module OpenAI
522
522
  # - All models before `gpt-5.1` default to `medium` reasoning effort, and do not
523
523
  # support `none`.
524
524
  # - The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort.
525
+ # - `xhigh` is currently only supported for `gpt-5.1-codex-max`.
525
526
  sig do
526
527
  returns(T.nilable(OpenAI::ReasoningEffort::TaggedSymbol))
527
528
  end
@@ -578,9 +579,9 @@ module OpenAI
578
579
  model: nil,
579
580
  # Constrains effort on reasoning for
580
581
  # [reasoning models](https://platform.openai.com/docs/guides/reasoning). Currently
581
- # supported values are `none`, `minimal`, `low`, `medium`, and `high`. Reducing
582
- # reasoning effort can result in faster responses and fewer tokens used on
583
- # reasoning in a response.
582
+ # supported values are `none`, `minimal`, `low`, `medium`, `high`, and `xhigh`.
583
+ # Reducing reasoning effort can result in faster responses and fewer tokens used
584
+ # on reasoning in a response.
584
585
  #
585
586
  # - `gpt-5.1` defaults to `none`, which does not perform reasoning. The supported
586
587
  # reasoning values for `gpt-5.1` are `none`, `low`, `medium`, and `high`. Tool
@@ -588,6 +589,7 @@ module OpenAI
588
589
  # - All models before `gpt-5.1` default to `medium` reasoning effort, and do not
589
590
  # support `none`.
590
591
  # - The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort.
592
+ # - `xhigh` is currently only supported for `gpt-5.1-codex-max`.
591
593
  reasoning_effort: nil,
592
594
  # Sampling temperature. This is a query parameter used to select responses.
593
595
  temperature: nil,
@@ -1131,9 +1133,9 @@ module OpenAI
1131
1133
 
1132
1134
  # Constrains effort on reasoning for
1133
1135
  # [reasoning models](https://platform.openai.com/docs/guides/reasoning). Currently
1134
- # supported values are `none`, `minimal`, `low`, `medium`, and `high`. Reducing
1135
- # reasoning effort can result in faster responses and fewer tokens used on
1136
- # reasoning in a response.
1136
+ # supported values are `none`, `minimal`, `low`, `medium`, `high`, and `xhigh`.
1137
+ # Reducing reasoning effort can result in faster responses and fewer tokens used
1138
+ # on reasoning in a response.
1137
1139
  #
1138
1140
  # - `gpt-5.1` defaults to `none`, which does not perform reasoning. The supported
1139
1141
  # reasoning values for `gpt-5.1` are `none`, `low`, `medium`, and `high`. Tool
@@ -1141,6 +1143,7 @@ module OpenAI
1141
1143
  # - All models before `gpt-5.1` default to `medium` reasoning effort, and do not
1142
1144
  # support `none`.
1143
1145
  # - The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort.
1146
+ # - `xhigh` is currently only supported for `gpt-5.1-codex-max`.
1144
1147
  sig { returns(T.nilable(OpenAI::ReasoningEffort::TaggedSymbol)) }
1145
1148
  attr_accessor :reasoning_effort
1146
1149
 
@@ -1263,9 +1266,9 @@ module OpenAI
1263
1266
  max_completion_tokens: nil,
1264
1267
  # Constrains effort on reasoning for
1265
1268
  # [reasoning models](https://platform.openai.com/docs/guides/reasoning). Currently
1266
- # supported values are `none`, `minimal`, `low`, `medium`, and `high`. Reducing
1267
- # reasoning effort can result in faster responses and fewer tokens used on
1268
- # reasoning in a response.
1269
+ # supported values are `none`, `minimal`, `low`, `medium`, `high`, and `xhigh`.
1270
+ # Reducing reasoning effort can result in faster responses and fewer tokens used
1271
+ # on reasoning in a response.
1269
1272
  #
1270
1273
  # - `gpt-5.1` defaults to `none`, which does not perform reasoning. The supported
1271
1274
  # reasoning values for `gpt-5.1` are `none`, `low`, `medium`, and `high`. Tool
@@ -1273,6 +1276,7 @@ module OpenAI
1273
1276
  # - All models before `gpt-5.1` default to `medium` reasoning effort, and do not
1274
1277
  # support `none`.
1275
1278
  # - The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort.
1279
+ # - `xhigh` is currently only supported for `gpt-5.1-codex-max`.
1276
1280
  reasoning_effort: nil,
1277
1281
  # A seed value to initialize the randomness, during sampling.
1278
1282
  seed: nil,
@@ -508,9 +508,9 @@ module OpenAI
508
508
 
509
509
  # Constrains effort on reasoning for
510
510
  # [reasoning models](https://platform.openai.com/docs/guides/reasoning). Currently
511
- # supported values are `none`, `minimal`, `low`, `medium`, and `high`. Reducing
512
- # reasoning effort can result in faster responses and fewer tokens used on
513
- # reasoning in a response.
511
+ # supported values are `none`, `minimal`, `low`, `medium`, `high`, and `xhigh`.
512
+ # Reducing reasoning effort can result in faster responses and fewer tokens used
513
+ # on reasoning in a response.
514
514
  #
515
515
  # - `gpt-5.1` defaults to `none`, which does not perform reasoning. The supported
516
516
  # reasoning values for `gpt-5.1` are `none`, `low`, `medium`, and `high`. Tool
@@ -518,6 +518,7 @@ module OpenAI
518
518
  # - All models before `gpt-5.1` default to `medium` reasoning effort, and do not
519
519
  # support `none`.
520
520
  # - The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort.
521
+ # - `xhigh` is currently only supported for `gpt-5.1-codex-max`.
521
522
  sig do
522
523
  returns(T.nilable(OpenAI::ReasoningEffort::TaggedSymbol))
523
524
  end
@@ -574,9 +575,9 @@ module OpenAI
574
575
  model: nil,
575
576
  # Constrains effort on reasoning for
576
577
  # [reasoning models](https://platform.openai.com/docs/guides/reasoning). Currently
577
- # supported values are `none`, `minimal`, `low`, `medium`, and `high`. Reducing
578
- # reasoning effort can result in faster responses and fewer tokens used on
579
- # reasoning in a response.
578
+ # supported values are `none`, `minimal`, `low`, `medium`, `high`, and `xhigh`.
579
+ # Reducing reasoning effort can result in faster responses and fewer tokens used
580
+ # on reasoning in a response.
580
581
  #
581
582
  # - `gpt-5.1` defaults to `none`, which does not perform reasoning. The supported
582
583
  # reasoning values for `gpt-5.1` are `none`, `low`, `medium`, and `high`. Tool
@@ -584,6 +585,7 @@ module OpenAI
584
585
  # - All models before `gpt-5.1` default to `medium` reasoning effort, and do not
585
586
  # support `none`.
586
587
  # - The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort.
588
+ # - `xhigh` is currently only supported for `gpt-5.1-codex-max`.
587
589
  reasoning_effort: nil,
588
590
  # Sampling temperature. This is a query parameter used to select responses.
589
591
  temperature: nil,
@@ -1127,9 +1129,9 @@ module OpenAI
1127
1129
 
1128
1130
  # Constrains effort on reasoning for
1129
1131
  # [reasoning models](https://platform.openai.com/docs/guides/reasoning). Currently
1130
- # supported values are `none`, `minimal`, `low`, `medium`, and `high`. Reducing
1131
- # reasoning effort can result in faster responses and fewer tokens used on
1132
- # reasoning in a response.
1132
+ # supported values are `none`, `minimal`, `low`, `medium`, `high`, and `xhigh`.
1133
+ # Reducing reasoning effort can result in faster responses and fewer tokens used
1134
+ # on reasoning in a response.
1133
1135
  #
1134
1136
  # - `gpt-5.1` defaults to `none`, which does not perform reasoning. The supported
1135
1137
  # reasoning values for `gpt-5.1` are `none`, `low`, `medium`, and `high`. Tool
@@ -1137,6 +1139,7 @@ module OpenAI
1137
1139
  # - All models before `gpt-5.1` default to `medium` reasoning effort, and do not
1138
1140
  # support `none`.
1139
1141
  # - The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort.
1142
+ # - `xhigh` is currently only supported for `gpt-5.1-codex-max`.
1140
1143
  sig { returns(T.nilable(OpenAI::ReasoningEffort::TaggedSymbol)) }
1141
1144
  attr_accessor :reasoning_effort
1142
1145
 
@@ -1259,9 +1262,9 @@ module OpenAI
1259
1262
  max_completion_tokens: nil,
1260
1263
  # Constrains effort on reasoning for
1261
1264
  # [reasoning models](https://platform.openai.com/docs/guides/reasoning). Currently
1262
- # supported values are `none`, `minimal`, `low`, `medium`, and `high`. Reducing
1263
- # reasoning effort can result in faster responses and fewer tokens used on
1264
- # reasoning in a response.
1265
+ # supported values are `none`, `minimal`, `low`, `medium`, `high`, and `xhigh`.
1266
+ # Reducing reasoning effort can result in faster responses and fewer tokens used
1267
+ # on reasoning in a response.
1265
1268
  #
1266
1269
  # - `gpt-5.1` defaults to `none`, which does not perform reasoning. The supported
1267
1270
  # reasoning values for `gpt-5.1` are `none`, `low`, `medium`, and `high`. Tool
@@ -1269,6 +1272,7 @@ module OpenAI
1269
1272
  # - All models before `gpt-5.1` default to `medium` reasoning effort, and do not
1270
1273
  # support `none`.
1271
1274
  # - The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort.
1275
+ # - `xhigh` is currently only supported for `gpt-5.1-codex-max`.
1272
1276
  reasoning_effort: nil,
1273
1277
  # A seed value to initialize the randomness, during sampling.
1274
1278
  seed: nil,
@@ -514,9 +514,9 @@ module OpenAI
514
514
 
515
515
  # Constrains effort on reasoning for
516
516
  # [reasoning models](https://platform.openai.com/docs/guides/reasoning). Currently
517
- # supported values are `none`, `minimal`, `low`, `medium`, and `high`. Reducing
518
- # reasoning effort can result in faster responses and fewer tokens used on
519
- # reasoning in a response.
517
+ # supported values are `none`, `minimal`, `low`, `medium`, `high`, and `xhigh`.
518
+ # Reducing reasoning effort can result in faster responses and fewer tokens used
519
+ # on reasoning in a response.
520
520
  #
521
521
  # - `gpt-5.1` defaults to `none`, which does not perform reasoning. The supported
522
522
  # reasoning values for `gpt-5.1` are `none`, `low`, `medium`, and `high`. Tool
@@ -524,6 +524,7 @@ module OpenAI
524
524
  # - All models before `gpt-5.1` default to `medium` reasoning effort, and do not
525
525
  # support `none`.
526
526
  # - The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort.
527
+ # - `xhigh` is currently only supported for `gpt-5.1-codex-max`.
527
528
  sig do
528
529
  returns(T.nilable(OpenAI::ReasoningEffort::TaggedSymbol))
529
530
  end
@@ -580,9 +581,9 @@ module OpenAI
580
581
  model: nil,
581
582
  # Constrains effort on reasoning for
582
583
  # [reasoning models](https://platform.openai.com/docs/guides/reasoning). Currently
583
- # supported values are `none`, `minimal`, `low`, `medium`, and `high`. Reducing
584
- # reasoning effort can result in faster responses and fewer tokens used on
585
- # reasoning in a response.
584
+ # supported values are `none`, `minimal`, `low`, `medium`, `high`, and `xhigh`.
585
+ # Reducing reasoning effort can result in faster responses and fewer tokens used
586
+ # on reasoning in a response.
586
587
  #
587
588
  # - `gpt-5.1` defaults to `none`, which does not perform reasoning. The supported
588
589
  # reasoning values for `gpt-5.1` are `none`, `low`, `medium`, and `high`. Tool
@@ -590,6 +591,7 @@ module OpenAI
590
591
  # - All models before `gpt-5.1` default to `medium` reasoning effort, and do not
591
592
  # support `none`.
592
593
  # - The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort.
594
+ # - `xhigh` is currently only supported for `gpt-5.1-codex-max`.
593
595
  reasoning_effort: nil,
594
596
  # Sampling temperature. This is a query parameter used to select responses.
595
597
  temperature: nil,
@@ -1133,9 +1135,9 @@ module OpenAI
1133
1135
 
1134
1136
  # Constrains effort on reasoning for
1135
1137
  # [reasoning models](https://platform.openai.com/docs/guides/reasoning). Currently
1136
- # supported values are `none`, `minimal`, `low`, `medium`, and `high`. Reducing
1137
- # reasoning effort can result in faster responses and fewer tokens used on
1138
- # reasoning in a response.
1138
+ # supported values are `none`, `minimal`, `low`, `medium`, `high`, and `xhigh`.
1139
+ # Reducing reasoning effort can result in faster responses and fewer tokens used
1140
+ # on reasoning in a response.
1139
1141
  #
1140
1142
  # - `gpt-5.1` defaults to `none`, which does not perform reasoning. The supported
1141
1143
  # reasoning values for `gpt-5.1` are `none`, `low`, `medium`, and `high`. Tool
@@ -1143,6 +1145,7 @@ module OpenAI
1143
1145
  # - All models before `gpt-5.1` default to `medium` reasoning effort, and do not
1144
1146
  # support `none`.
1145
1147
  # - The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort.
1148
+ # - `xhigh` is currently only supported for `gpt-5.1-codex-max`.
1146
1149
  sig { returns(T.nilable(OpenAI::ReasoningEffort::TaggedSymbol)) }
1147
1150
  attr_accessor :reasoning_effort
1148
1151
 
@@ -1265,9 +1268,9 @@ module OpenAI
1265
1268
  max_completion_tokens: nil,
1266
1269
  # Constrains effort on reasoning for
1267
1270
  # [reasoning models](https://platform.openai.com/docs/guides/reasoning). Currently
1268
- # supported values are `none`, `minimal`, `low`, `medium`, and `high`. Reducing
1269
- # reasoning effort can result in faster responses and fewer tokens used on
1270
- # reasoning in a response.
1271
+ # supported values are `none`, `minimal`, `low`, `medium`, `high`, and `xhigh`.
1272
+ # Reducing reasoning effort can result in faster responses and fewer tokens used
1273
+ # on reasoning in a response.
1271
1274
  #
1272
1275
  # - `gpt-5.1` defaults to `none`, which does not perform reasoning. The supported
1273
1276
  # reasoning values for `gpt-5.1` are `none`, `low`, `medium`, and `high`. Tool
@@ -1275,6 +1278,7 @@ module OpenAI
1275
1278
  # - All models before `gpt-5.1` default to `medium` reasoning effort, and do not
1276
1279
  # support `none`.
1277
1280
  # - The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort.
1281
+ # - `xhigh` is currently only supported for `gpt-5.1-codex-max`.
1278
1282
  reasoning_effort: nil,
1279
1283
  # A seed value to initialize the randomness, during sampling.
1280
1284
  seed: nil,