openai 0.43.0 → 0.46.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 (43) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +54 -0
  3. data/README.md +11 -11
  4. data/lib/openai/internal/transport/pooled_net_requester.rb +1 -1
  5. data/lib/openai/internal/util.rb +1 -1
  6. data/lib/openai/models/beta/assistant.rb +2 -0
  7. data/lib/openai/models/file_create_params.rb +9 -5
  8. data/lib/openai/models/file_purpose.rb +8 -4
  9. data/lib/openai/models/image_edit_params.rb +4 -4
  10. data/lib/openai/models/realtime/conversation_item_create_event.rb +9 -5
  11. data/lib/openai/models/realtime/response_function_call_arguments_done_event.rb +9 -1
  12. data/lib/openai/models/responses/response_computer_tool_call.rb +6 -6
  13. data/lib/openai/models/responses/response_create_params.rb +32 -1
  14. data/lib/openai/models/responses/response_function_shell_tool_call_output.rb +25 -1
  15. data/lib/openai/models/responses/response_function_web_search.rb +15 -15
  16. data/lib/openai/models/responses/response_input_item.rb +27 -1
  17. data/lib/openai/models/responses/tool.rb +30 -5
  18. data/lib/openai/resources/beta/assistants.rb +10 -0
  19. data/lib/openai/resources/files.rb +3 -3
  20. data/lib/openai/resources/responses.rb +6 -2
  21. data/lib/openai/version.rb +1 -1
  22. data/rbi/openai/internal/util.rbi +1 -1
  23. data/rbi/openai/models/file_create_params.rbi +16 -8
  24. data/rbi/openai/models/file_purpose.rbi +8 -4
  25. data/rbi/openai/models/image_edit_params.rbi +6 -6
  26. data/rbi/openai/models/realtime/conversation_item_create_event.rbi +16 -8
  27. data/rbi/openai/models/realtime/response_function_call_arguments_done_event.rbi +8 -0
  28. data/rbi/openai/models/responses/response_create_params.rbi +65 -0
  29. data/rbi/openai/models/responses/response_function_shell_tool_call_output.rbi +57 -0
  30. data/rbi/openai/models/responses/response_function_web_search.rbi +13 -9
  31. data/rbi/openai/models/responses/response_input_item.rbi +61 -1
  32. data/rbi/openai/models/responses/tool.rbi +71 -6
  33. data/rbi/openai/resources/files.rbi +10 -6
  34. data/rbi/openai/resources/images.rbi +4 -4
  35. data/rbi/openai/resources/responses.rbi +16 -0
  36. data/sig/openai/models/realtime/response_function_call_arguments_done_event.rbs +5 -0
  37. data/sig/openai/models/responses/response_create_params.rbs +17 -0
  38. data/sig/openai/models/responses/response_function_shell_tool_call_output.rbs +17 -0
  39. data/sig/openai/models/responses/response_function_web_search.rbs +17 -8
  40. data/sig/openai/models/responses/response_input_item.rbs +19 -2
  41. data/sig/openai/models/responses/tool.rbs +24 -1
  42. data/sig/openai/resources/responses.rbs +2 -0
  43. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d4083372aec70ae767e55529226345fd14c51b526994a100ac2985ab1990cd48
4
- data.tar.gz: 79cc5f4c8ad7b26a1ec05490a80b55105393750839b2ecb3bf4da1a22385952d
3
+ metadata.gz: 319786b20e6239f01ec9d26047bae8fa9259e141f95baa7d24b22ff3b417aac8
4
+ data.tar.gz: 85a7e695dedbad2fbdc305dc2ee5e1843ef3793fcf50d2bfe3efd6be294cfa37
5
5
  SHA512:
6
- metadata.gz: 95ff955307367382d388f0d575f733a7c384b513a72be89010dfe70aefa1868c39c36c9a49c7130ea124f793feed59543b7f837facbd738082cd1e0db1e2d658
7
- data.tar.gz: 378b3dc58226b56d9a362578a879fc3f48acdcfecbea44507798bbfb53ed4fc8f96a5b2849004db91aeab9acadcde2829be897321e38bafa987e819e0ca1aa1a
6
+ metadata.gz: bcf2cc4be6392d80121ff4371946fb56e255dbb6f75564251690db6f825155e35cafe7fbfd91f5937e275a458cd8bd8641b92b5c05ccbd242bbc9720b7cd01f3
7
+ data.tar.gz: 8d0417477c03208b215fb0ddb36947d73a6e25bd55243c2a137a09437920b52c814e22f5ea78113c42b59426bf5d929cdbfd03a3d5d4554ff8c698fd87b463d9
data/CHANGELOG.md CHANGED
@@ -1,5 +1,59 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.46.0 (2026-02-08)
4
+
5
+ Full Changelog: [v0.45.0...v0.46.0](https://github.com/openai/openai-ruby/compare/v0.45.0...v0.46.0)
6
+
7
+ ### Features
8
+
9
+ * **api:** responses context_management ([d954f15](https://github.com/openai/openai-ruby/commit/d954f152ff59cc30baec8d7bba91f1575bfa29f4))
10
+
11
+
12
+ ### Bug Fixes
13
+
14
+ * **client:** loosen json header parsing ([8b7f68c](https://github.com/openai/openai-ruby/commit/8b7f68c3b866daba39ed4bf83a724990891de69a))
15
+
16
+ ## 0.45.0 (2026-02-04)
17
+
18
+ Full Changelog: [v0.44.0...v0.45.0](https://github.com/openai/openai-ruby/compare/v0.44.0...v0.45.0)
19
+
20
+ ### Features
21
+
22
+ * **api:** add shell_call_output status field ([b235617](https://github.com/openai/openai-ruby/commit/b2356174e90b573b98f16a3176a51cc2b4a108b4))
23
+ * **api:** image generation actions for responses; ResponseFunctionCallArgumentsDoneEvent.name ([da359de](https://github.com/openai/openai-ruby/commit/da359de522a5532b287094b04f625248687d08f3))
24
+
25
+
26
+ ### Bug Fixes
27
+
28
+ * **client:** always add content-length to post body, even when empty ([b6faa94](https://github.com/openai/openai-ruby/commit/b6faa94ec4454515c576c067a584e2a62fa33666))
29
+ * **client:** undo change to web search Find action ([e10a7dd](https://github.com/openai/openai-ruby/commit/e10a7dd8f601a66b5b1e7c769623f51f9e191a9f))
30
+ * **client:** update type for `find_in_page` action ([dd727fa](https://github.com/openai/openai-ruby/commit/dd727fadbd82ae42181fae53582043809e4dd391))
31
+
32
+
33
+ ### Chores
34
+
35
+ * **client:** improve example values ([3c8e152](https://github.com/openai/openai-ruby/commit/3c8e1520fd7bea47442814fe2a4196c68f2062c7))
36
+ * **docs:** remove www prefix ([6ef56a3](https://github.com/openai/openai-ruby/commit/6ef56a36260ed01f4ea302ae69a73aed366e5e94))
37
+
38
+ ## 0.44.0 (2026-01-27)
39
+
40
+ Full Changelog: [v0.43.0...v0.44.0](https://github.com/openai/openai-ruby/compare/v0.43.0...v0.44.0)
41
+
42
+ ### Features
43
+
44
+ * **api:** api update ([407360e](https://github.com/openai/openai-ruby/commit/407360eb65bd70de1e4398e2b892624d0d674ea9))
45
+ * **api:** api updates ([d3b882e](https://github.com/openai/openai-ruby/commit/d3b882ec9547197583f8002395842cc861b08774))
46
+
47
+
48
+ ### Bug Fixes
49
+
50
+ * **api:** mark assistants as deprecated ([5baf7da](https://github.com/openai/openai-ruby/commit/5baf7dab0fecd0fb64720ce586377e9999d76b9e))
51
+
52
+
53
+ ### Chores
54
+
55
+ * **internal:** update `actions/checkout` version ([78251bd](https://github.com/openai/openai-ruby/commit/78251bd3cdaccc09f57feda8ee5b73cab03d6625))
56
+
3
57
  ## 0.43.0 (2026-01-09)
4
58
 
5
59
  Full Changelog: [v0.42.0...v0.43.0](https://github.com/openai/openai-ruby/compare/v0.42.0...v0.43.0)
data/README.md CHANGED
@@ -15,7 +15,7 @@ To use this gem, install via Bundler by adding the following to your application
15
15
  <!-- x-release-please-start-version -->
16
16
 
17
17
  ```ruby
18
- gem "openai", "~> 0.43.0"
18
+ gem "openai", "~> 0.46.0"
19
19
  ```
20
20
 
21
21
  <!-- x-release-please-end -->
@@ -30,7 +30,7 @@ openai = OpenAI::Client.new(
30
30
  api_key: ENV["OPENAI_API_KEY"] # This is the default and can be omitted
31
31
  )
32
32
 
33
- chat_completion = openai.chat.completions.create(messages: [{role: "user", content: "Say this is a test"}], model: "gpt-4o")
33
+ chat_completion = openai.chat.completions.create(messages: [{role: "user", content: "Say this is a test"}], model: "gpt-5.2")
34
34
 
35
35
  puts(chat_completion)
36
36
  ```
@@ -42,7 +42,7 @@ We provide support for streaming responses using Server-Sent Events (SSE).
42
42
  ```ruby
43
43
  stream = openai.responses.stream(
44
44
  input: "Write a haiku about OpenAI.",
45
- model: "gpt-4o"
45
+ model: "gpt-5.2"
46
46
  )
47
47
 
48
48
  stream.each do |event|
@@ -211,7 +211,7 @@ end
211
211
  client = OpenAI::Client.new
212
212
 
213
213
  response = client.responses.create(
214
- model: "gpt-4o-2024-08-06",
214
+ model: "gpt-5.2",
215
215
  input: [
216
216
  {role: :system, content: "Extract the event information."},
217
217
  {
@@ -247,7 +247,7 @@ To make the equivalent request using raw JSON schema format, you would do the fo
247
247
 
248
248
  ```ruby
249
249
  response = client.responses.create(
250
- model: "gpt-4o-2024-08-06",
250
+ model: "gpt-5.2",
251
251
  input: [
252
252
  {role: :system, content: "Extract the event information."},
253
253
  {
@@ -340,7 +340,7 @@ openai = OpenAI::Client.new(
340
340
  # Or, configure per-request:
341
341
  openai.chat.completions.create(
342
342
  messages: [{role: "user", content: "How can I get the name of the current day in JavaScript?"}],
343
- model: "gpt-4o",
343
+ model: "gpt-5.2",
344
344
  request_options: {max_retries: 5}
345
345
  )
346
346
  ```
@@ -358,7 +358,7 @@ openai = OpenAI::Client.new(
358
358
  # Or, configure per-request:
359
359
  openai.chat.completions.create(
360
360
  messages: [{role: "user", content: "How can I list all files in a directory using Python?"}],
361
- model: "gpt-4o",
361
+ model: "gpt-5.2",
362
362
  request_options: {timeout: 5}
363
363
  )
364
364
  ```
@@ -393,7 +393,7 @@ Note: the `extra_` parameters of the same name overrides the documented paramete
393
393
  chat_completion =
394
394
  openai.chat.completions.create(
395
395
  messages: [{role: "user", content: "How can I get the name of the current day in JavaScript?"}],
396
- model: "gpt-4o",
396
+ model: "gpt-5.2",
397
397
  request_options: {
398
398
  extra_query: {my_query_parameter: value},
399
399
  extra_body: {my_body_parameter: value},
@@ -441,7 +441,7 @@ You can provide typesafe request parameters like so:
441
441
  ```ruby
442
442
  openai.chat.completions.create(
443
443
  messages: [OpenAI::Chat::ChatCompletionUserMessageParam.new(content: "Say this is a test")],
444
- model: "gpt-4o"
444
+ model: "gpt-5.2"
445
445
  )
446
446
  ```
447
447
 
@@ -449,12 +449,12 @@ Or, equivalently:
449
449
 
450
450
  ```ruby
451
451
  # Hashes work, but are not typesafe:
452
- openai.chat.completions.create(messages: [{role: "user", content: "Say this is a test"}], model: "gpt-4o")
452
+ openai.chat.completions.create(messages: [{role: "user", content: "Say this is a test"}], model: "gpt-5.2")
453
453
 
454
454
  # You can also splat a full Params class:
455
455
  params = OpenAI::Chat::CompletionCreateParams.new(
456
456
  messages: [OpenAI::Chat::ChatCompletionUserMessageParam.new(content: "Say this is a test")],
457
- model: "gpt-4o"
457
+ model: "gpt-5.2"
458
458
  )
459
459
  openai.chat.completions.create(**params)
460
460
  ```
@@ -75,7 +75,7 @@ module OpenAI
75
75
 
76
76
  case body
77
77
  in nil
78
- nil
78
+ req["content-length"] ||= 0 unless req["transfer-encoding"]
79
79
  in String
80
80
  req["content-length"] ||= body.bytesize.to_s unless req["transfer-encoding"]
81
81
  req.body_stream = OpenAI::Internal::Util::ReadIOAdapter.new(body, &blk)
@@ -485,7 +485,7 @@ module OpenAI
485
485
  end
486
486
 
487
487
  # @type [Regexp]
488
- JSON_CONTENT = %r{^application/(?:vnd(?:\.[^.]+)*\+)?json(?!l)}
488
+ JSON_CONTENT = %r{^application/(?:[a-zA-Z0-9.-]+\+)?json(?!l)}
489
489
  # @type [Regexp]
490
490
  JSONL_CONTENT = %r{^application/(:?x-(?:n|l)djson)|(:?(?:x-)?jsonl)}
491
491
 
@@ -3,6 +3,8 @@
3
3
  module OpenAI
4
4
  module Models
5
5
  module Beta
6
+ # @deprecated
7
+ #
6
8
  # @see OpenAI::Resources::Beta::Assistants#create
7
9
  class Assistant < OpenAI::Internal::Type::BaseModel
8
10
  # @!attribute id
@@ -14,10 +14,14 @@ module OpenAI
14
14
  required :file, OpenAI::Internal::Type::FileInput
15
15
 
16
16
  # @!attribute purpose
17
- # The intended purpose of the uploaded file. One of: - `assistants`: Used in the
18
- # Assistants API - `batch`: Used in the Batch API - `fine-tune`: Used for
19
- # fine-tuning - `vision`: Images used for vision fine-tuning - `user_data`:
20
- # Flexible file type for any purpose - `evals`: Used for eval data sets
17
+ # The intended purpose of the uploaded file. One of:
18
+ #
19
+ # - `assistants`: Used in the Assistants API
20
+ # - `batch`: Used in the Batch API
21
+ # - `fine-tune`: Used for fine-tuning
22
+ # - `vision`: Images used for vision fine-tuning
23
+ # - `user_data`: Flexible file type for any purpose
24
+ # - `evals`: Used for eval data sets
21
25
  #
22
26
  # @return [Symbol, OpenAI::Models::FilePurpose]
23
27
  required :purpose, enum: -> { OpenAI::FilePurpose }
@@ -35,7 +39,7 @@ module OpenAI
35
39
  #
36
40
  # @param file [Pathname, StringIO, IO, String, OpenAI::FilePart] The File object (not file name) to be uploaded.
37
41
  #
38
- # @param purpose [Symbol, OpenAI::Models::FilePurpose] The intended purpose of the uploaded file. One of: - `assistants`: Used in the A
42
+ # @param purpose [Symbol, OpenAI::Models::FilePurpose] The intended purpose of the uploaded file. One of:
39
43
  #
40
44
  # @param expires_after [OpenAI::Models::FileCreateParams::ExpiresAfter] The expiration policy for a file. By default, files with `purpose=batch` expire
41
45
  #
@@ -2,10 +2,14 @@
2
2
 
3
3
  module OpenAI
4
4
  module Models
5
- # The intended purpose of the uploaded file. One of: - `assistants`: Used in the
6
- # Assistants API - `batch`: Used in the Batch API - `fine-tune`: Used for
7
- # fine-tuning - `vision`: Images used for vision fine-tuning - `user_data`:
8
- # Flexible file type for any purpose - `evals`: Used for eval data sets
5
+ # The intended purpose of the uploaded file. One of:
6
+ #
7
+ # - `assistants`: Used in the Assistants API
8
+ # - `batch`: Used in the Batch API
9
+ # - `fine-tune`: Used for fine-tuning
10
+ # - `vision`: Images used for vision fine-tuning
11
+ # - `user_data`: Flexible file type for any purpose
12
+ # - `evals`: Used for eval data sets
9
13
  module FilePurpose
10
14
  extend OpenAI::Internal::Type::Enum
11
15
 
@@ -44,8 +44,8 @@ module OpenAI
44
44
  # @!attribute input_fidelity
45
45
  # Control how much effort the model will exert to match the style and features,
46
46
  # especially facial features, of input images. This parameter is only supported
47
- # for `gpt-image-1`. Unsupported for `gpt-image-1-mini`. Supports `high` and
48
- # `low`. Defaults to `low`.
47
+ # for `gpt-image-1` and `gpt-image-1.5` and later models, unsupported for
48
+ # `gpt-image-1-mini`. Supports `high` and `low`. Defaults to `low`.
49
49
  #
50
50
  # @return [Symbol, OpenAI::Models::ImageEditParams::InputFidelity, nil]
51
51
  optional :input_fidelity, enum: -> { OpenAI::ImageEditParams::InputFidelity }, nil?: true
@@ -209,8 +209,8 @@ module OpenAI
209
209
 
210
210
  # Control how much effort the model will exert to match the style and features,
211
211
  # especially facial features, of input images. This parameter is only supported
212
- # for `gpt-image-1`. Unsupported for `gpt-image-1-mini`. Supports `high` and
213
- # `low`. Defaults to `low`.
212
+ # for `gpt-image-1` and `gpt-image-1.5` and later models, unsupported for
213
+ # `gpt-image-1-mini`. Supports `high` and `low`. Defaults to `low`.
214
214
  module InputFidelity
215
215
  extend OpenAI::Internal::Type::Enum
216
216
 
@@ -24,10 +24,14 @@ module OpenAI
24
24
 
25
25
  # @!attribute previous_item_id
26
26
  # The ID of the preceding item after which the new item will be inserted. If not
27
- # set, the new item will be appended to the end of the conversation. If set to
28
- # `root`, the new item will be added to the beginning of the conversation. If set
29
- # to an existing ID, it allows an item to be inserted mid-conversation. If the ID
30
- # cannot be found, an error will be returned and the item will not be added.
27
+ # set, the new item will be appended to the end of the conversation.
28
+ #
29
+ # If set to `root`, the new item will be added to the beginning of the
30
+ # conversation.
31
+ #
32
+ # If set to an existing ID, it allows an item to be inserted mid-conversation. If
33
+ # the ID cannot be found, an error will be returned and the item will not be
34
+ # added.
31
35
  #
32
36
  # @return [String, nil]
33
37
  optional :previous_item_id, String
@@ -48,7 +52,7 @@ module OpenAI
48
52
  #
49
53
  # @param event_id [String] Optional client-generated ID used to identify this event.
50
54
  #
51
- # @param previous_item_id [String] The ID of the preceding item after which the new item will be inserted.
55
+ # @param previous_item_id [String] The ID of the preceding item after which the new item will be inserted. If not s
52
56
  #
53
57
  # @param type [Symbol, :"conversation.item.create"] The event type, must be `conversation.item.create`.
54
58
  end
@@ -28,6 +28,12 @@ module OpenAI
28
28
  # @return [String]
29
29
  required :item_id, String
30
30
 
31
+ # @!attribute name
32
+ # The name of the function that was called.
33
+ #
34
+ # @return [String]
35
+ required :name, String
36
+
31
37
  # @!attribute output_index
32
38
  # The index of the output item in the response.
33
39
  #
@@ -46,7 +52,7 @@ module OpenAI
46
52
  # @return [Symbol, :"response.function_call_arguments.done"]
47
53
  required :type, const: :"response.function_call_arguments.done"
48
54
 
49
- # @!method initialize(arguments:, call_id:, event_id:, item_id:, output_index:, response_id:, type: :"response.function_call_arguments.done")
55
+ # @!method initialize(arguments:, call_id:, event_id:, item_id:, name:, output_index:, response_id:, type: :"response.function_call_arguments.done")
50
56
  # Some parameter documentations has been truncated, see
51
57
  # {OpenAI::Models::Realtime::ResponseFunctionCallArgumentsDoneEvent} for more
52
58
  # details.
@@ -62,6 +68,8 @@ module OpenAI
62
68
  #
63
69
  # @param item_id [String] The ID of the function call item.
64
70
  #
71
+ # @param name [String] The name of the function that was called.
72
+ #
65
73
  # @param output_index [Integer] The index of the output item in the response.
66
74
  #
67
75
  # @param response_id [String] The ID of the response.
@@ -222,7 +222,7 @@ module OpenAI
222
222
  #
223
223
  # @param path [Array<OpenAI::Models::Responses::ResponseComputerToolCall::Action::Drag::Path>] An array of coordinates representing the path of the drag action. Coordinates wi
224
224
  #
225
- # @param type [Symbol, :drag] Specifies the event type. For a drag action, this property is
225
+ # @param type [Symbol, :drag] Specifies the event type. For a drag action, this property is always set to `dra
226
226
 
227
227
  class Path < OpenAI::Internal::Type::BaseModel
228
228
  # @!attribute x
@@ -304,7 +304,7 @@ module OpenAI
304
304
  #
305
305
  # @param y_ [Integer] The y-coordinate to move to.
306
306
  #
307
- # @param type [Symbol, :move] Specifies the event type. For a move action, this property is
307
+ # @param type [Symbol, :move] Specifies the event type. For a move action, this property is always set to `mov
308
308
  end
309
309
 
310
310
  class Screenshot < OpenAI::Internal::Type::BaseModel
@@ -322,7 +322,7 @@ module OpenAI
322
322
  #
323
323
  # A screenshot action.
324
324
  #
325
- # @param type [Symbol, :screenshot] Specifies the event type. For a screenshot action, this property is
325
+ # @param type [Symbol, :screenshot] Specifies the event type. For a screenshot action, this property is always set t
326
326
  end
327
327
 
328
328
  class Scroll < OpenAI::Internal::Type::BaseModel
@@ -372,7 +372,7 @@ module OpenAI
372
372
  #
373
373
  # @param y_ [Integer] The y-coordinate where the scroll occurred.
374
374
  #
375
- # @param type [Symbol, :scroll] Specifies the event type. For a scroll action, this property is
375
+ # @param type [Symbol, :scroll] Specifies the event type. For a scroll action, this property is always set to `s
376
376
  end
377
377
 
378
378
  class Type < OpenAI::Internal::Type::BaseModel
@@ -398,7 +398,7 @@ module OpenAI
398
398
  #
399
399
  # @param text [String] The text to type.
400
400
  #
401
- # @param type [Symbol, :type] Specifies the event type. For a type action, this property is
401
+ # @param type [Symbol, :type] Specifies the event type. For a type action, this property is always set to `typ
402
402
  end
403
403
 
404
404
  class Wait < OpenAI::Internal::Type::BaseModel
@@ -416,7 +416,7 @@ module OpenAI
416
416
  #
417
417
  # A wait action.
418
418
  #
419
- # @param type [Symbol, :wait] Specifies the event type. For a wait action, this property is
419
+ # @param type [Symbol, :wait] Specifies the event type. For a wait action, this property is always set to `wai
420
420
  end
421
421
 
422
422
  # @!method self.variants
@@ -17,6 +17,16 @@ module OpenAI
17
17
  # @return [Boolean, nil]
18
18
  optional :background, OpenAI::Internal::Type::Boolean, nil?: true
19
19
 
20
+ # @!attribute context_management
21
+ # Context management configuration for this request.
22
+ #
23
+ # @return [Array<OpenAI::Models::Responses::ResponseCreateParams::ContextManagement>, nil]
24
+ optional :context_management,
25
+ -> {
26
+ OpenAI::Internal::Type::ArrayOf[OpenAI::Responses::ResponseCreateParams::ContextManagement]
27
+ },
28
+ nil?: true
29
+
20
30
  # @!attribute conversation
21
31
  # The conversation that this response belongs to. Items from this conversation are
22
32
  # prepended to `input_items` for this response request. Input items and output
@@ -308,12 +318,14 @@ module OpenAI
308
318
  # @return [String, nil]
309
319
  optional :user, String
310
320
 
311
- # @!method initialize(background: nil, conversation: nil, include: nil, input: nil, instructions: nil, max_output_tokens: nil, max_tool_calls: nil, metadata: nil, model: nil, parallel_tool_calls: nil, previous_response_id: nil, prompt: nil, prompt_cache_key: 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: {})
321
+ # @!method initialize(background: nil, context_management: nil, conversation: nil, include: nil, input: nil, instructions: nil, max_output_tokens: nil, max_tool_calls: nil, metadata: nil, model: nil, parallel_tool_calls: nil, previous_response_id: nil, prompt: nil, prompt_cache_key: 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: {})
312
322
  # Some parameter documentations has been truncated, see
313
323
  # {OpenAI::Models::Responses::ResponseCreateParams} for more details.
314
324
  #
315
325
  # @param background [Boolean, nil] Whether to run the model response in the background.
316
326
  #
327
+ # @param context_management [Array<OpenAI::Models::Responses::ResponseCreateParams::ContextManagement>, nil] Context management configuration for this request.
328
+ #
317
329
  # @param conversation [String, OpenAI::Models::Responses::ResponseConversationParam, nil] The conversation that this response belongs to. Items from this conversation are
318
330
  #
319
331
  # @param include [Array<Symbol, OpenAI::Models::Responses::ResponseIncludable>, nil] Specify additional output data to include in the model response. Currently suppo
@@ -368,6 +380,25 @@ module OpenAI
368
380
  #
369
381
  # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}]
370
382
 
383
+ class ContextManagement < OpenAI::Internal::Type::BaseModel
384
+ # @!attribute type
385
+ # The context management entry type. Currently only 'compaction' is supported.
386
+ #
387
+ # @return [String]
388
+ required :type, String
389
+
390
+ # @!attribute compact_threshold
391
+ # Token threshold at which compaction should be triggered for this entry.
392
+ #
393
+ # @return [Integer, nil]
394
+ optional :compact_threshold, Integer, nil?: true
395
+
396
+ # @!method initialize(type:, compact_threshold: nil)
397
+ # @param type [String] The context management entry type. Currently only 'compaction' is supported.
398
+ #
399
+ # @param compact_threshold [Integer, nil] Token threshold at which compaction should be triggered for this entry.
400
+ end
401
+
371
402
  # The conversation that this response belongs to. Items from this conversation are
372
403
  # prepended to `input_items` for this response request. Input items and output
373
404
  # items from this response are automatically added to this conversation after this
@@ -31,6 +31,13 @@ module OpenAI
31
31
  required :output,
32
32
  -> { OpenAI::Internal::Type::ArrayOf[OpenAI::Responses::ResponseFunctionShellToolCallOutput::Output] }
33
33
 
34
+ # @!attribute status
35
+ # The status of the shell call output. One of `in_progress`, `completed`, or
36
+ # `incomplete`.
37
+ #
38
+ # @return [Symbol, OpenAI::Models::Responses::ResponseFunctionShellToolCallOutput::Status]
39
+ required :status, enum: -> { OpenAI::Responses::ResponseFunctionShellToolCallOutput::Status }
40
+
34
41
  # @!attribute type
35
42
  # The type of the shell call output. Always `shell_call_output`.
36
43
  #
@@ -43,7 +50,7 @@ module OpenAI
43
50
  # @return [String, nil]
44
51
  optional :created_by, String
45
52
 
46
- # @!method initialize(id:, call_id:, max_output_length:, output:, created_by: nil, type: :shell_call_output)
53
+ # @!method initialize(id:, call_id:, max_output_length:, output:, status:, created_by: nil, type: :shell_call_output)
47
54
  # Some parameter documentations has been truncated, see
48
55
  # {OpenAI::Models::Responses::ResponseFunctionShellToolCallOutput} for more
49
56
  # details.
@@ -58,6 +65,8 @@ module OpenAI
58
65
  #
59
66
  # @param output [Array<OpenAI::Models::Responses::ResponseFunctionShellToolCallOutput::Output>] An array of shell call output contents
60
67
  #
68
+ # @param status [Symbol, OpenAI::Models::Responses::ResponseFunctionShellToolCallOutput::Status] The status of the shell call output. One of `in_progress`, `completed`, or `inco
69
+ #
61
70
  # @param created_by [String] The identifier of the actor that created the item.
62
71
  #
63
72
  # @param type [Symbol, :shell_call_output] The type of the shell call output. Always `shell_call_output`.
@@ -156,6 +165,21 @@ module OpenAI
156
165
  # @return [Array(OpenAI::Models::Responses::ResponseFunctionShellToolCallOutput::Output::Outcome::Timeout, OpenAI::Models::Responses::ResponseFunctionShellToolCallOutput::Output::Outcome::Exit)]
157
166
  end
158
167
  end
168
+
169
+ # The status of the shell call output. One of `in_progress`, `completed`, or
170
+ # `incomplete`.
171
+ #
172
+ # @see OpenAI::Models::Responses::ResponseFunctionShellToolCallOutput#status
173
+ module Status
174
+ extend OpenAI::Internal::Type::Enum
175
+
176
+ IN_PROGRESS = :in_progress
177
+ COMPLETED = :completed
178
+ INCOMPLETE = :incomplete
179
+
180
+ # @!method self.values
181
+ # @return [Array<Symbol>]
182
+ end
159
183
  end
160
184
  end
161
185
  end
@@ -12,7 +12,7 @@ module OpenAI
12
12
 
13
13
  # @!attribute action
14
14
  # An object describing the specific action taken in this web search call. Includes
15
- # details on how the model used the web (search, open_page, find).
15
+ # details on how the model used the web (search, open_page, find_in_page).
16
16
  #
17
17
  # @return [OpenAI::Models::Responses::ResponseFunctionWebSearch::Action::Search, OpenAI::Models::Responses::ResponseFunctionWebSearch::Action::OpenPage, OpenAI::Models::Responses::ResponseFunctionWebSearch::Action::Find]
18
18
  required :action, union: -> { OpenAI::Responses::ResponseFunctionWebSearch::Action }
@@ -46,7 +46,7 @@ module OpenAI
46
46
  # @param type [Symbol, :web_search_call] The type of the web search tool call. Always `web_search_call`.
47
47
 
48
48
  # An object describing the specific action taken in this web search call. Includes
49
- # details on how the model used the web (search, open_page, find).
49
+ # details on how the model used the web (search, open_page, find_in_page).
50
50
  #
51
51
  # @see OpenAI::Models::Responses::ResponseFunctionWebSearch#action
52
52
  module Action
@@ -60,8 +60,8 @@ module OpenAI
60
60
  # Action type "open_page" - Opens a specific URL from search results.
61
61
  variant :open_page, -> { OpenAI::Responses::ResponseFunctionWebSearch::Action::OpenPage }
62
62
 
63
- # Action type "find": Searches for a pattern within a loaded page.
64
- variant :find, -> { OpenAI::Responses::ResponseFunctionWebSearch::Action::Find }
63
+ # Action type "find_in_page": Searches for a pattern within a loaded page.
64
+ variant :find_in_page, -> { OpenAI::Responses::ResponseFunctionWebSearch::Action::Find }
65
65
 
66
66
  class Search < OpenAI::Internal::Type::BaseModel
67
67
  # @!attribute query
@@ -140,17 +140,17 @@ module OpenAI
140
140
  # @!attribute url
141
141
  # The URL opened by the model.
142
142
  #
143
- # @return [String]
144
- required :url, String
143
+ # @return [String, nil]
144
+ optional :url, String, nil?: true
145
145
 
146
- # @!method initialize(url:, type: :open_page)
146
+ # @!method initialize(url: nil, type: :open_page)
147
147
  # Some parameter documentations has been truncated, see
148
148
  # {OpenAI::Models::Responses::ResponseFunctionWebSearch::Action::OpenPage} for
149
149
  # more details.
150
150
  #
151
151
  # Action type "open_page" - Opens a specific URL from search results.
152
152
  #
153
- # @param url [String] The URL opened by the model.
153
+ # @param url [String, nil] The URL opened by the model.
154
154
  #
155
155
  # @param type [Symbol, :open_page] The action type.
156
156
  end
@@ -165,8 +165,8 @@ module OpenAI
165
165
  # @!attribute type
166
166
  # The action type.
167
167
  #
168
- # @return [Symbol, :find]
169
- required :type, const: :find
168
+ # @return [Symbol, :find_in_page]
169
+ required :type, const: :find_in_page
170
170
 
171
171
  # @!attribute url
172
172
  # The URL of the page searched for the pattern.
@@ -174,18 +174,18 @@ module OpenAI
174
174
  # @return [String]
175
175
  required :url, String
176
176
 
177
- # @!method initialize(pattern:, url:, type: :find)
177
+ # @!method initialize(pattern:, url:, type: :find_in_page)
178
178
  # Some parameter documentations has been truncated, see
179
- # {OpenAI::Models::Responses::ResponseFunctionWebSearch::Action::Find} for more
180
- # details.
179
+ # {OpenAI::Models::Responses::ResponseFunctionWebSearch::Action::Find} for
180
+ # more details.
181
181
  #
182
- # Action type "find": Searches for a pattern within a loaded page.
182
+ # Action type "find_in_page": Searches for a pattern within a loaded page.
183
183
  #
184
184
  # @param pattern [String] The pattern or text to search for within the page.
185
185
  #
186
186
  # @param url [String] The URL of the page searched for the pattern.
187
187
  #
188
- # @param type [Symbol, :find] The action type.
188
+ # @param type [Symbol, :find_in_page] The action type.
189
189
  end
190
190
 
191
191
  # @!method self.variants
@@ -746,7 +746,17 @@ module OpenAI
746
746
  # @return [Integer, nil]
747
747
  optional :max_output_length, Integer, nil?: true
748
748
 
749
- # @!method initialize(call_id:, output:, id: nil, max_output_length: nil, type: :shell_call_output)
749
+ # @!attribute status
750
+ # The status of the shell call output.
751
+ #
752
+ # @return [Symbol, OpenAI::Models::Responses::ResponseInputItem::ShellCallOutput::Status, nil]
753
+ optional :status,
754
+ enum: -> {
755
+ OpenAI::Responses::ResponseInputItem::ShellCallOutput::Status
756
+ },
757
+ nil?: true
758
+
759
+ # @!method initialize(call_id:, output:, id: nil, max_output_length: nil, status: nil, type: :shell_call_output)
750
760
  # Some parameter documentations has been truncated, see
751
761
  # {OpenAI::Models::Responses::ResponseInputItem::ShellCallOutput} for more
752
762
  # details.
@@ -761,7 +771,23 @@ module OpenAI
761
771
  #
762
772
  # @param max_output_length [Integer, nil] The maximum number of UTF-8 characters captured for this shell call's combined o
763
773
  #
774
+ # @param status [Symbol, OpenAI::Models::Responses::ResponseInputItem::ShellCallOutput::Status, nil] The status of the shell call output.
775
+ #
764
776
  # @param type [Symbol, :shell_call_output] The type of the item. Always `shell_call_output`.
777
+
778
+ # The status of the shell call output.
779
+ #
780
+ # @see OpenAI::Models::Responses::ResponseInputItem::ShellCallOutput#status
781
+ module Status
782
+ extend OpenAI::Internal::Type::Enum
783
+
784
+ IN_PROGRESS = :in_progress
785
+ COMPLETED = :completed
786
+ INCOMPLETE = :incomplete
787
+
788
+ # @!method self.values
789
+ # @return [Array<Symbol>]
790
+ end
765
791
  end
766
792
 
767
793
  class ApplyPatchCall < OpenAI::Internal::Type::BaseModel