openai 0.56.0 → 0.58.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 (89) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +60 -0
  3. data/README.md +98 -1
  4. data/lib/openai/auth/subject_token_provider.rb +15 -0
  5. data/lib/openai/auth/subject_token_providers/azure_managed_identity_token_provider.rb +88 -0
  6. data/lib/openai/auth/subject_token_providers/gcp_id_token_provider.rb +66 -0
  7. data/lib/openai/auth/subject_token_providers/k8s_service_account_token_provider.rb +37 -0
  8. data/lib/openai/auth/token_type.rb +10 -0
  9. data/lib/openai/auth/workload_identity.rb +23 -0
  10. data/lib/openai/auth/workload_identity_auth.rb +176 -0
  11. data/lib/openai/client.rb +59 -4
  12. data/lib/openai/errors.rb +39 -0
  13. data/lib/openai/internal/util.rb +22 -7
  14. data/lib/openai/models/conversations/conversation_item.rb +4 -1
  15. data/lib/openai/models/conversations/conversation_item_list.rb +2 -2
  16. data/lib/openai/models/conversations/message.rb +28 -1
  17. data/lib/openai/models/oauth_error_code.rb +29 -0
  18. data/lib/openai/models/realtime/realtime_session_create_request.rb +4 -3
  19. data/lib/openai/models/realtime/realtime_session_create_response.rb +7 -5
  20. data/lib/openai/models/realtime/realtime_tracing_config.rb +3 -2
  21. data/lib/openai/models/responses/compacted_response.rb +2 -2
  22. data/lib/openai/models/responses/computer_action.rb +45 -5
  23. data/lib/openai/models/responses/response.rb +2 -2
  24. data/lib/openai/models/responses/response_computer_tool_call.rb +45 -5
  25. data/lib/openai/models/responses/response_computer_tool_call_output_item.rb +31 -22
  26. data/lib/openai/models/responses/response_custom_tool_call_item.rb +53 -0
  27. data/lib/openai/models/responses/response_custom_tool_call_output_item.rb +53 -0
  28. data/lib/openai/models/responses/response_function_tool_call_item.rb +31 -1
  29. data/lib/openai/models/responses/response_function_tool_call_output_item.rb +14 -6
  30. data/lib/openai/models/responses/response_input_message_item.rb +8 -20
  31. data/lib/openai/models/responses/response_item.rb +16 -1
  32. data/lib/openai/models/responses/response_item_list.rb +2 -2
  33. data/lib/openai/models/responses/response_output_item.rb +120 -1
  34. data/lib/openai/models/responses/response_output_item_added_event.rb +2 -2
  35. data/lib/openai/models/responses/response_output_item_done_event.rb +2 -2
  36. data/lib/openai/models/vector_stores/file_batch_create_params.rb +9 -5
  37. data/lib/openai/models/vector_stores/file_create_params.rb +3 -1
  38. data/lib/openai/models.rb +2 -0
  39. data/lib/openai/resources/conversations/items.rb +2 -2
  40. data/lib/openai/resources/realtime/calls.rb +1 -1
  41. data/lib/openai/resources/responses/input_items.rb +1 -1
  42. data/lib/openai/version.rb +1 -1
  43. data/lib/openai.rb +12 -2
  44. data/rbi/openai/auth.rbi +55 -0
  45. data/rbi/openai/internal/util.rbi +8 -0
  46. data/rbi/openai/models/conversations/conversation_item.rbi +1 -0
  47. data/rbi/openai/models/conversations/conversation_item_list.rbi +1 -0
  48. data/rbi/openai/models/conversations/message.rbi +53 -1
  49. data/rbi/openai/models/oauth_error_code.rbi +24 -0
  50. data/rbi/openai/models/realtime/realtime_session_create_request.rbi +6 -4
  51. data/rbi/openai/models/realtime/realtime_session_create_response.rbi +9 -6
  52. data/rbi/openai/models/realtime/realtime_tracing_config.rbi +3 -2
  53. data/rbi/openai/models/responses/compacted_response.rbi +6 -1
  54. data/rbi/openai/models/responses/computer_action.rbi +71 -11
  55. data/rbi/openai/models/responses/response.rbi +6 -1
  56. data/rbi/openai/models/responses/response_computer_tool_call.rbi +71 -11
  57. data/rbi/openai/models/responses/response_computer_tool_call_output_item.rbi +71 -65
  58. data/rbi/openai/models/responses/response_custom_tool_call_item.rbi +111 -0
  59. data/rbi/openai/models/responses/response_custom_tool_call_output_item.rbi +111 -0
  60. data/rbi/openai/models/responses/response_function_tool_call_item.rbi +81 -3
  61. data/rbi/openai/models/responses/response_function_tool_call_output_item.rbi +19 -18
  62. data/rbi/openai/models/responses/response_input_message_item.rbi +8 -49
  63. data/rbi/openai/models/responses/response_item.rbi +5 -1
  64. data/rbi/openai/models/responses/response_item_list.rbi +5 -1
  65. data/rbi/openai/models/responses/response_output_item.rbi +186 -1
  66. data/rbi/openai/models/responses/response_output_item_added_event.rbi +6 -1
  67. data/rbi/openai/models/responses/response_output_item_done_event.rbi +6 -1
  68. data/rbi/openai/models/vector_stores/file_batch_create_params.rbi +18 -10
  69. data/rbi/openai/models/vector_stores/file_create_params.rbi +6 -2
  70. data/rbi/openai/models.rbi +2 -0
  71. data/rbi/openai/resources/realtime/calls.rbi +3 -2
  72. data/rbi/openai/resources/vector_stores/file_batches.rbi +6 -4
  73. data/rbi/openai/resources/vector_stores/files.rbi +3 -1
  74. data/sig/openai/internal/util.rbs +4 -0
  75. data/sig/openai/models/conversations/conversation_item.rbs +1 -0
  76. data/sig/openai/models/conversations/message.rbs +18 -2
  77. data/sig/openai/models/oauth_error_code.rbs +14 -0
  78. data/sig/openai/models/responses/computer_action.rbs +53 -11
  79. data/sig/openai/models/responses/response_computer_tool_call.rbs +53 -11
  80. data/sig/openai/models/responses/response_computer_tool_call_output_item.rbs +23 -19
  81. data/sig/openai/models/responses/response_custom_tool_call_item.rbs +52 -0
  82. data/sig/openai/models/responses/response_custom_tool_call_output_item.rbs +52 -0
  83. data/sig/openai/models/responses/response_function_tool_call_item.rbs +38 -3
  84. data/sig/openai/models/responses/response_function_tool_call_output_item.rbs +10 -7
  85. data/sig/openai/models/responses/response_input_message_item.rbs +7 -21
  86. data/sig/openai/models/responses/response_item.rbs +4 -0
  87. data/sig/openai/models/responses/response_output_item.rbs +86 -0
  88. data/sig/openai/models.rbs +2 -0
  89. metadata +19 -2
@@ -209,8 +209,9 @@ module OpenAI
209
209
  attr_writer :tools
210
210
 
211
211
  # Realtime API can write session traces to the
212
- # [Traces Dashboard](/logs?api=traces). Set to null to disable tracing. Once
213
- # tracing is enabled for a session, the configuration cannot be modified.
212
+ # [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to
213
+ # disable tracing. Once tracing is enabled for a session, the configuration cannot
214
+ # be modified.
214
215
  #
215
216
  # `auto` will create a trace for the session with default values for the workflow
216
217
  # name, group id, and metadata.
@@ -351,8 +352,9 @@ module OpenAI
351
352
  # Tools available to the model.
352
353
  tools: nil,
353
354
  # Realtime API can write session traces to the
354
- # [Traces Dashboard](/logs?api=traces). Set to null to disable tracing. Once
355
- # tracing is enabled for a session, the configuration cannot be modified.
355
+ # [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to
356
+ # disable tracing. Once tracing is enabled for a session, the configuration cannot
357
+ # be modified.
356
358
  #
357
359
  # `auto` will create a trace for the session with default values for the workflow
358
360
  # name, group id, and metadata.
@@ -2091,8 +2093,9 @@ module OpenAI
2091
2093
  end
2092
2094
 
2093
2095
  # Realtime API can write session traces to the
2094
- # [Traces Dashboard](/logs?api=traces). Set to null to disable tracing. Once
2095
- # tracing is enabled for a session, the configuration cannot be modified.
2096
+ # [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to
2097
+ # disable tracing. Once tracing is enabled for a session, the configuration cannot
2098
+ # be modified.
2096
2099
  #
2097
2100
  # `auto` will create a trace for the session with default values for the workflow
2098
2101
  # name, group id, and metadata.
@@ -4,8 +4,9 @@ module OpenAI
4
4
  module Models
5
5
  module Realtime
6
6
  # Realtime API can write session traces to the
7
- # [Traces Dashboard](/logs?api=traces). Set to null to disable tracing. Once
8
- # tracing is enabled for a session, the configuration cannot be modified.
7
+ # [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to
8
+ # disable tracing. Once tracing is enabled for a session, the configuration cannot
9
+ # be modified.
9
10
  #
10
11
  # `auto` will create a trace for the session with default values for the workflow
11
12
  # name, group id, and metadata.
@@ -49,8 +49,10 @@ module OpenAI
49
49
  OpenAI::Responses::ResponseOutputMessage::OrHash,
50
50
  OpenAI::Responses::ResponseFileSearchToolCall::OrHash,
51
51
  OpenAI::Responses::ResponseFunctionToolCall::OrHash,
52
+ OpenAI::Responses::ResponseFunctionToolCallOutputItem::OrHash,
52
53
  OpenAI::Responses::ResponseFunctionWebSearch::OrHash,
53
54
  OpenAI::Responses::ResponseComputerToolCall::OrHash,
55
+ OpenAI::Responses::ResponseComputerToolCallOutputItem::OrHash,
54
56
  OpenAI::Responses::ResponseReasoningItem::OrHash,
55
57
  OpenAI::Responses::ResponseToolSearchCall::OrHash,
56
58
  OpenAI::Responses::ResponseToolSearchOutputItem::OrHash,
@@ -58,6 +60,7 @@ module OpenAI
58
60
  OpenAI::Responses::ResponseOutputItem::ImageGenerationCall::OrHash,
59
61
  OpenAI::Responses::ResponseCodeInterpreterToolCall::OrHash,
60
62
  OpenAI::Responses::ResponseOutputItem::LocalShellCall::OrHash,
63
+ OpenAI::Responses::ResponseOutputItem::LocalShellCallOutput::OrHash,
61
64
  OpenAI::Responses::ResponseFunctionShellToolCall::OrHash,
62
65
  OpenAI::Responses::ResponseFunctionShellToolCallOutput::OrHash,
63
66
  OpenAI::Responses::ResponseApplyPatchToolCall::OrHash,
@@ -65,7 +68,9 @@ module OpenAI
65
68
  OpenAI::Responses::ResponseOutputItem::McpCall::OrHash,
66
69
  OpenAI::Responses::ResponseOutputItem::McpListTools::OrHash,
67
70
  OpenAI::Responses::ResponseOutputItem::McpApprovalRequest::OrHash,
68
- OpenAI::Responses::ResponseCustomToolCall::OrHash
71
+ OpenAI::Responses::ResponseOutputItem::McpApprovalResponse::OrHash,
72
+ OpenAI::Responses::ResponseCustomToolCall::OrHash,
73
+ OpenAI::Responses::ResponseCustomToolCallOutputItem::OrHash
69
74
  )
70
75
  ],
71
76
  usage: OpenAI::Responses::ResponseUsage::OrHash,
@@ -50,6 +50,10 @@ module OpenAI
50
50
  sig { returns(Integer) }
51
51
  attr_accessor :y_
52
52
 
53
+ # The keys being held while clicking.
54
+ sig { returns(T.nilable(T::Array[String])) }
55
+ attr_accessor :keys
56
+
53
57
  # A click action.
54
58
  sig do
55
59
  params(
@@ -57,6 +61,7 @@ module OpenAI
57
61
  OpenAI::Responses::ComputerAction::Click::Button::OrSymbol,
58
62
  x: Integer,
59
63
  y_: Integer,
64
+ keys: T.nilable(T::Array[String]),
60
65
  type: Symbol
61
66
  ).returns(T.attached_class)
62
67
  end
@@ -68,6 +73,8 @@ module OpenAI
68
73
  x:,
69
74
  # The y-coordinate where the click occurred.
70
75
  y_:,
76
+ # The keys being held while clicking.
77
+ keys: nil,
71
78
  # Specifies the event type. For a click action, this property is always `click`.
72
79
  type: :click
73
80
  )
@@ -80,7 +87,8 @@ module OpenAI
80
87
  OpenAI::Responses::ComputerAction::Click::Button::OrSymbol,
81
88
  type: Symbol,
82
89
  x: Integer,
83
- y_: Integer
90
+ y_: Integer,
91
+ keys: T.nilable(T::Array[String])
84
92
  }
85
93
  )
86
94
  end
@@ -145,6 +153,10 @@ module OpenAI
145
153
  )
146
154
  end
147
155
 
156
+ # The keys being held while double-clicking.
157
+ sig { returns(T.nilable(T::Array[String])) }
158
+ attr_accessor :keys
159
+
148
160
  # Specifies the event type. For a double click action, this property is always set
149
161
  # to `double_click`.
150
162
  sig { returns(Symbol) }
@@ -160,11 +172,16 @@ module OpenAI
160
172
 
161
173
  # A double click action.
162
174
  sig do
163
- params(x: Integer, y_: Integer, type: Symbol).returns(
164
- T.attached_class
165
- )
175
+ params(
176
+ keys: T.nilable(T::Array[String]),
177
+ x: Integer,
178
+ y_: Integer,
179
+ type: Symbol
180
+ ).returns(T.attached_class)
166
181
  end
167
182
  def self.new(
183
+ # The keys being held while double-clicking.
184
+ keys:,
168
185
  # The x-coordinate where the double click occurred.
169
186
  x:,
170
187
  # The y-coordinate where the double click occurred.
@@ -175,7 +192,16 @@ module OpenAI
175
192
  )
176
193
  end
177
194
 
178
- sig { override.returns({ type: Symbol, x: Integer, y_: Integer }) }
195
+ sig do
196
+ override.returns(
197
+ {
198
+ keys: T.nilable(T::Array[String]),
199
+ type: Symbol,
200
+ x: Integer,
201
+ y_: Integer
202
+ }
203
+ )
204
+ end
179
205
  def to_hash
180
206
  end
181
207
  end
@@ -208,11 +234,16 @@ module OpenAI
208
234
  sig { returns(Symbol) }
209
235
  attr_accessor :type
210
236
 
237
+ # The keys being held while dragging the mouse.
238
+ sig { returns(T.nilable(T::Array[String])) }
239
+ attr_accessor :keys
240
+
211
241
  # A drag action.
212
242
  sig do
213
243
  params(
214
244
  path:
215
245
  T::Array[OpenAI::Responses::ComputerAction::Drag::Path::OrHash],
246
+ keys: T.nilable(T::Array[String]),
216
247
  type: Symbol
217
248
  ).returns(T.attached_class)
218
249
  end
@@ -227,6 +258,8 @@ module OpenAI
227
258
  # ]
228
259
  # ```
229
260
  path:,
261
+ # The keys being held while dragging the mouse.
262
+ keys: nil,
230
263
  # Specifies the event type. For a drag action, this property is always set to
231
264
  # `drag`.
232
265
  type: :drag
@@ -237,7 +270,8 @@ module OpenAI
237
270
  override.returns(
238
271
  {
239
272
  path: T::Array[OpenAI::Responses::ComputerAction::Drag::Path],
240
- type: Symbol
273
+ type: Symbol,
274
+ keys: T.nilable(T::Array[String])
241
275
  }
242
276
  )
243
277
  end
@@ -339,24 +373,42 @@ module OpenAI
339
373
  sig { returns(Integer) }
340
374
  attr_accessor :y_
341
375
 
376
+ # The keys being held while moving the mouse.
377
+ sig { returns(T.nilable(T::Array[String])) }
378
+ attr_accessor :keys
379
+
342
380
  # A mouse move action.
343
381
  sig do
344
- params(x: Integer, y_: Integer, type: Symbol).returns(
345
- T.attached_class
346
- )
382
+ params(
383
+ x: Integer,
384
+ y_: Integer,
385
+ keys: T.nilable(T::Array[String]),
386
+ type: Symbol
387
+ ).returns(T.attached_class)
347
388
  end
348
389
  def self.new(
349
390
  # The x-coordinate to move to.
350
391
  x:,
351
392
  # The y-coordinate to move to.
352
393
  y_:,
394
+ # The keys being held while moving the mouse.
395
+ keys: nil,
353
396
  # Specifies the event type. For a move action, this property is always set to
354
397
  # `move`.
355
398
  type: :move
356
399
  )
357
400
  end
358
401
 
359
- sig { override.returns({ type: Symbol, x: Integer, y_: Integer }) }
402
+ sig do
403
+ override.returns(
404
+ {
405
+ type: Symbol,
406
+ x: Integer,
407
+ y_: Integer,
408
+ keys: T.nilable(T::Array[String])
409
+ }
410
+ )
411
+ end
360
412
  def to_hash
361
413
  end
362
414
  end
@@ -419,6 +471,10 @@ module OpenAI
419
471
  sig { returns(Integer) }
420
472
  attr_accessor :y_
421
473
 
474
+ # The keys being held while scrolling.
475
+ sig { returns(T.nilable(T::Array[String])) }
476
+ attr_accessor :keys
477
+
422
478
  # A scroll action.
423
479
  sig do
424
480
  params(
@@ -426,6 +482,7 @@ module OpenAI
426
482
  scroll_y: Integer,
427
483
  x: Integer,
428
484
  y_: Integer,
485
+ keys: T.nilable(T::Array[String]),
429
486
  type: Symbol
430
487
  ).returns(T.attached_class)
431
488
  end
@@ -438,6 +495,8 @@ module OpenAI
438
495
  x:,
439
496
  # The y-coordinate where the scroll occurred.
440
497
  y_:,
498
+ # The keys being held while scrolling.
499
+ keys: nil,
441
500
  # Specifies the event type. For a scroll action, this property is always set to
442
501
  # `scroll`.
443
502
  type: :scroll
@@ -451,7 +510,8 @@ module OpenAI
451
510
  scroll_y: Integer,
452
511
  type: Symbol,
453
512
  x: Integer,
454
- y_: Integer
513
+ y_: Integer,
514
+ keys: T.nilable(T::Array[String])
455
515
  }
456
516
  )
457
517
  end
@@ -337,8 +337,10 @@ module OpenAI
337
337
  OpenAI::Responses::ResponseOutputMessage::OrHash,
338
338
  OpenAI::Responses::ResponseFileSearchToolCall::OrHash,
339
339
  OpenAI::Responses::ResponseFunctionToolCall::OrHash,
340
+ OpenAI::Responses::ResponseFunctionToolCallOutputItem::OrHash,
340
341
  OpenAI::Responses::ResponseFunctionWebSearch::OrHash,
341
342
  OpenAI::Responses::ResponseComputerToolCall::OrHash,
343
+ OpenAI::Responses::ResponseComputerToolCallOutputItem::OrHash,
342
344
  OpenAI::Responses::ResponseReasoningItem::OrHash,
343
345
  OpenAI::Responses::ResponseToolSearchCall::OrHash,
344
346
  OpenAI::Responses::ResponseToolSearchOutputItem::OrHash,
@@ -346,6 +348,7 @@ module OpenAI
346
348
  OpenAI::Responses::ResponseOutputItem::ImageGenerationCall::OrHash,
347
349
  OpenAI::Responses::ResponseCodeInterpreterToolCall::OrHash,
348
350
  OpenAI::Responses::ResponseOutputItem::LocalShellCall::OrHash,
351
+ OpenAI::Responses::ResponseOutputItem::LocalShellCallOutput::OrHash,
349
352
  OpenAI::Responses::ResponseFunctionShellToolCall::OrHash,
350
353
  OpenAI::Responses::ResponseFunctionShellToolCallOutput::OrHash,
351
354
  OpenAI::Responses::ResponseApplyPatchToolCall::OrHash,
@@ -353,7 +356,9 @@ module OpenAI
353
356
  OpenAI::Responses::ResponseOutputItem::McpCall::OrHash,
354
357
  OpenAI::Responses::ResponseOutputItem::McpListTools::OrHash,
355
358
  OpenAI::Responses::ResponseOutputItem::McpApprovalRequest::OrHash,
356
- OpenAI::Responses::ResponseCustomToolCall::OrHash
359
+ OpenAI::Responses::ResponseOutputItem::McpApprovalResponse::OrHash,
360
+ OpenAI::Responses::ResponseCustomToolCall::OrHash,
361
+ OpenAI::Responses::ResponseCustomToolCallOutputItem::OrHash
357
362
  )
358
363
  ],
359
364
  parallel_tool_calls: T::Boolean,
@@ -396,6 +396,10 @@ module OpenAI
396
396
  sig { returns(Integer) }
397
397
  attr_accessor :y_
398
398
 
399
+ # The keys being held while clicking.
400
+ sig { returns(T.nilable(T::Array[String])) }
401
+ attr_accessor :keys
402
+
399
403
  # A click action.
400
404
  sig do
401
405
  params(
@@ -403,6 +407,7 @@ module OpenAI
403
407
  OpenAI::Responses::ResponseComputerToolCall::Action::Click::Button::OrSymbol,
404
408
  x: Integer,
405
409
  y_: Integer,
410
+ keys: T.nilable(T::Array[String]),
406
411
  type: Symbol
407
412
  ).returns(T.attached_class)
408
413
  end
@@ -414,6 +419,8 @@ module OpenAI
414
419
  x:,
415
420
  # The y-coordinate where the click occurred.
416
421
  y_:,
422
+ # The keys being held while clicking.
423
+ keys: nil,
417
424
  # Specifies the event type. For a click action, this property is always `click`.
418
425
  type: :click
419
426
  )
@@ -426,7 +433,8 @@ module OpenAI
426
433
  OpenAI::Responses::ResponseComputerToolCall::Action::Click::Button::OrSymbol,
427
434
  type: Symbol,
428
435
  x: Integer,
429
- y_: Integer
436
+ y_: Integer,
437
+ keys: T.nilable(T::Array[String])
430
438
  }
431
439
  )
432
440
  end
@@ -494,6 +502,10 @@ module OpenAI
494
502
  )
495
503
  end
496
504
 
505
+ # The keys being held while double-clicking.
506
+ sig { returns(T.nilable(T::Array[String])) }
507
+ attr_accessor :keys
508
+
497
509
  # Specifies the event type. For a double click action, this property is always set
498
510
  # to `double_click`.
499
511
  sig { returns(Symbol) }
@@ -509,11 +521,16 @@ module OpenAI
509
521
 
510
522
  # A double click action.
511
523
  sig do
512
- params(x: Integer, y_: Integer, type: Symbol).returns(
513
- T.attached_class
514
- )
524
+ params(
525
+ keys: T.nilable(T::Array[String]),
526
+ x: Integer,
527
+ y_: Integer,
528
+ type: Symbol
529
+ ).returns(T.attached_class)
515
530
  end
516
531
  def self.new(
532
+ # The keys being held while double-clicking.
533
+ keys:,
517
534
  # The x-coordinate where the double click occurred.
518
535
  x:,
519
536
  # The y-coordinate where the double click occurred.
@@ -524,7 +541,16 @@ module OpenAI
524
541
  )
525
542
  end
526
543
 
527
- sig { override.returns({ type: Symbol, x: Integer, y_: Integer }) }
544
+ sig do
545
+ override.returns(
546
+ {
547
+ keys: T.nilable(T::Array[String]),
548
+ type: Symbol,
549
+ x: Integer,
550
+ y_: Integer
551
+ }
552
+ )
553
+ end
528
554
  def to_hash
529
555
  end
530
556
  end
@@ -561,6 +587,10 @@ module OpenAI
561
587
  sig { returns(Symbol) }
562
588
  attr_accessor :type
563
589
 
590
+ # The keys being held while dragging the mouse.
591
+ sig { returns(T.nilable(T::Array[String])) }
592
+ attr_accessor :keys
593
+
564
594
  # A drag action.
565
595
  sig do
566
596
  params(
@@ -568,6 +598,7 @@ module OpenAI
568
598
  T::Array[
569
599
  OpenAI::Responses::ResponseComputerToolCall::Action::Drag::Path::OrHash
570
600
  ],
601
+ keys: T.nilable(T::Array[String]),
571
602
  type: Symbol
572
603
  ).returns(T.attached_class)
573
604
  end
@@ -582,6 +613,8 @@ module OpenAI
582
613
  # ]
583
614
  # ```
584
615
  path:,
616
+ # The keys being held while dragging the mouse.
617
+ keys: nil,
585
618
  # Specifies the event type. For a drag action, this property is always set to
586
619
  # `drag`.
587
620
  type: :drag
@@ -595,7 +628,8 @@ module OpenAI
595
628
  T::Array[
596
629
  OpenAI::Responses::ResponseComputerToolCall::Action::Drag::Path
597
630
  ],
598
- type: Symbol
631
+ type: Symbol,
632
+ keys: T.nilable(T::Array[String])
599
633
  }
600
634
  )
601
635
  end
@@ -697,24 +731,42 @@ module OpenAI
697
731
  sig { returns(Integer) }
698
732
  attr_accessor :y_
699
733
 
734
+ # The keys being held while moving the mouse.
735
+ sig { returns(T.nilable(T::Array[String])) }
736
+ attr_accessor :keys
737
+
700
738
  # A mouse move action.
701
739
  sig do
702
- params(x: Integer, y_: Integer, type: Symbol).returns(
703
- T.attached_class
704
- )
740
+ params(
741
+ x: Integer,
742
+ y_: Integer,
743
+ keys: T.nilable(T::Array[String]),
744
+ type: Symbol
745
+ ).returns(T.attached_class)
705
746
  end
706
747
  def self.new(
707
748
  # The x-coordinate to move to.
708
749
  x:,
709
750
  # The y-coordinate to move to.
710
751
  y_:,
752
+ # The keys being held while moving the mouse.
753
+ keys: nil,
711
754
  # Specifies the event type. For a move action, this property is always set to
712
755
  # `move`.
713
756
  type: :move
714
757
  )
715
758
  end
716
759
 
717
- sig { override.returns({ type: Symbol, x: Integer, y_: Integer }) }
760
+ sig do
761
+ override.returns(
762
+ {
763
+ type: Symbol,
764
+ x: Integer,
765
+ y_: Integer,
766
+ keys: T.nilable(T::Array[String])
767
+ }
768
+ )
769
+ end
718
770
  def to_hash
719
771
  end
720
772
  end
@@ -777,6 +829,10 @@ module OpenAI
777
829
  sig { returns(Integer) }
778
830
  attr_accessor :y_
779
831
 
832
+ # The keys being held while scrolling.
833
+ sig { returns(T.nilable(T::Array[String])) }
834
+ attr_accessor :keys
835
+
780
836
  # A scroll action.
781
837
  sig do
782
838
  params(
@@ -784,6 +840,7 @@ module OpenAI
784
840
  scroll_y: Integer,
785
841
  x: Integer,
786
842
  y_: Integer,
843
+ keys: T.nilable(T::Array[String]),
787
844
  type: Symbol
788
845
  ).returns(T.attached_class)
789
846
  end
@@ -796,6 +853,8 @@ module OpenAI
796
853
  x:,
797
854
  # The y-coordinate where the scroll occurred.
798
855
  y_:,
856
+ # The keys being held while scrolling.
857
+ keys: nil,
799
858
  # Specifies the event type. For a scroll action, this property is always set to
800
859
  # `scroll`.
801
860
  type: :scroll
@@ -809,7 +868,8 @@ module OpenAI
809
868
  scroll_y: Integer,
810
869
  type: Symbol,
811
870
  x: Integer,
812
- y_: Integer
871
+ y_: Integer,
872
+ keys: T.nilable(T::Array[String])
813
873
  }
814
874
  )
815
875
  end