openai 0.96.0 → 0.97.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 (78) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +7 -0
  3. data/README.md +1 -1
  4. data/lib/openai/models/beta/agent.rb +2 -2
  5. data/lib/openai/models/beta/agent_browser_authentication_cancel_param.rb +23 -0
  6. data/lib/openai/models/beta/agent_browser_authentication_submit_param.rb +70 -0
  7. data/lib/openai/models/beta/agent_browser_origin_access_param.rb +45 -0
  8. data/lib/openai/models/beta/agent_create_params.rb +2 -2
  9. data/lib/openai/models/beta/agent_output_item.rb +276 -1
  10. data/lib/openai/models/beta/agent_session.rb +251 -5
  11. data/lib/openai/models/beta/agent_session_input_param.rb +64 -1
  12. data/lib/openai/models/beta/agent_session_item.rb +391 -1
  13. data/lib/openai/models/beta/agent_session_turn_item_added_event.rb +2 -2
  14. data/lib/openai/models/beta/agent_session_turn_item_done_event.rb +2 -2
  15. data/lib/openai/models/beta/agent_tool.rb +27 -1
  16. data/lib/openai/models/beta/agent_tool_param.rb +27 -1
  17. data/lib/openai/models/beta/agent_update_params.rb +2 -2
  18. data/lib/openai/models/beta/agents/environments/environment_template.rb +26 -2
  19. data/lib/openai/models/beta/agents/environments/template_create_params.rb +48 -3
  20. data/lib/openai/models/beta/agents/environments/template_update_params.rb +45 -3
  21. data/lib/openai/models/beta/agents/session_create_params.rb +2 -2
  22. data/lib/openai/models/beta/agents/sessions/event_create_params.rb +2 -2
  23. data/lib/openai/models/beta/environment.rb +26 -2
  24. data/lib/openai/models/beta/environment_param.rb +43 -3
  25. data/lib/openai/models/beta/persisted_agent_tool.rb +27 -1
  26. data/lib/openai/models/beta/persisted_agent_tool_param.rb +27 -1
  27. data/lib/openai/resources/beta/agents/environments/templates.rb +9 -2
  28. data/lib/openai/resources/beta/agents/sessions/events.rb +1 -1
  29. data/lib/openai/resources/beta/agents/sessions/items.rb +1 -1
  30. data/lib/openai/resources/beta/agents/sessions/subagents/items.rb +1 -1
  31. data/lib/openai/resources/beta/agents/sessions/subagents/turns/items.rb +1 -1
  32. data/lib/openai/resources/beta/agents.rb +2 -2
  33. data/lib/openai/version.rb +1 -1
  34. data/lib/openai.rb +3 -0
  35. data/rbi/openai/models/beta/agent.rbi +2 -1
  36. data/rbi/openai/models/beta/agent_browser_authentication_cancel_param.rbi +53 -0
  37. data/rbi/openai/models/beta/agent_browser_authentication_submit_param.rbi +125 -0
  38. data/rbi/openai/models/beta/agent_browser_origin_access_param.rbi +76 -0
  39. data/rbi/openai/models/beta/agent_create_params.rbi +6 -3
  40. data/rbi/openai/models/beta/agent_output_item.rbi +422 -0
  41. data/rbi/openai/models/beta/agent_session.rbi +373 -1
  42. data/rbi/openai/models/beta/agent_session_input_param.rbi +102 -0
  43. data/rbi/openai/models/beta/agent_session_item.rbi +614 -0
  44. data/rbi/openai/models/beta/agent_session_turn_item_added_event.rbi +3 -0
  45. data/rbi/openai/models/beta/agent_session_turn_item_done_event.rbi +2 -0
  46. data/rbi/openai/models/beta/agent_tool.rbi +49 -1
  47. data/rbi/openai/models/beta/agent_tool_param.rbi +52 -1
  48. data/rbi/openai/models/beta/agent_update_params.rbi +6 -3
  49. data/rbi/openai/models/beta/agents/environments/environment_template.rbi +53 -2
  50. data/rbi/openai/models/beta/agents/environments/template_create_params.rbi +74 -4
  51. data/rbi/openai/models/beta/agents/environments/template_update_params.rbi +71 -4
  52. data/rbi/openai/models/beta/agents/session_create_params.rbi +6 -3
  53. data/rbi/openai/models/beta/agents/sessions/event_create_params.rbi +3 -0
  54. data/rbi/openai/models/beta/environment.rbi +53 -2
  55. data/rbi/openai/models/beta/environment_param.rbi +72 -4
  56. data/rbi/openai/models/beta/persisted_agent_tool.rbi +49 -1
  57. data/rbi/openai/models/beta/persisted_agent_tool_param.rbi +52 -1
  58. data/rbi/openai/resources/beta/agents/environments/templates.rbi +7 -0
  59. data/rbi/openai/resources/beta/agents/sessions/events.rbi +1 -0
  60. data/rbi/openai/resources/beta/agents.rbi +4 -2
  61. data/sig/openai/models/beta/agent_browser_authentication_cancel_param.rbs +21 -0
  62. data/sig/openai/models/beta/agent_browser_authentication_submit_param.rbs +63 -0
  63. data/sig/openai/models/beta/agent_browser_origin_access_param.rbs +47 -0
  64. data/sig/openai/models/beta/agent_output_item.rbs +254 -0
  65. data/sig/openai/models/beta/agent_session.rbs +215 -1
  66. data/sig/openai/models/beta/agent_session_input_param.rbs +51 -1
  67. data/sig/openai/models/beta/agent_session_item.rbs +362 -0
  68. data/sig/openai/models/beta/agent_tool.rbs +22 -0
  69. data/sig/openai/models/beta/agent_tool_param.rbs +25 -0
  70. data/sig/openai/models/beta/agents/environments/environment_template.rbs +29 -3
  71. data/sig/openai/models/beta/agents/environments/template_create_params.rbs +39 -4
  72. data/sig/openai/models/beta/agents/environments/template_update_params.rbs +37 -4
  73. data/sig/openai/models/beta/environment.rbs +29 -3
  74. data/sig/openai/models/beta/environment_param.rbs +39 -4
  75. data/sig/openai/models/beta/persisted_agent_tool.rbs +22 -0
  76. data/sig/openai/models/beta/persisted_agent_tool_param.rbs +25 -0
  77. data/sig/openai/resources/beta/agents/environments/templates.rbs +2 -0
  78. metadata +10 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 45b725bdf2e7a6b6837d634f0a91df36e77e4051d3a44019742cd9176ecf53ec
4
- data.tar.gz: d42beb5a3f77a5cb8ef597fa8ce4bb80c6a5485252becedbd67ec4e65ef5f674
3
+ metadata.gz: ad027591f42a7f1aed3f0ac973b22b81f8d4a1171e30d311845b8ece12b0cc30
4
+ data.tar.gz: 70db67b389fe4053242e587dad3ea8a7fb9477f160278e213c4206cbe03d6289
5
5
  SHA512:
6
- metadata.gz: 9ac89793e8ba7b821b5d98dbff7b8bf366d6ab251c06fdc2f23422347de291443267343bb5fac7c4c17e4fee1e357873681fdbd761aa16db0d6d59cca7a85c1e
7
- data.tar.gz: 284f3124b3d366c6bd1ab7bc9955ed29ce4e5a6da39e08320fcc575847b7bf95f0246208cdb06042c049ef3226c2e3bae6f8551aca343f724c5ced65532b456a
6
+ metadata.gz: e14a2a0287715824fe9271eed406677661ac595d8b3851f2e24480b3c6d365362f067ad8e207e99cff2246cedd247f6d82a7007a487a37bd8c381dce3b8479d3
7
+ data.tar.gz: 647c42ecf4d655d2148e23c42253d057ffc569189541fd58333144b73663c3b4cf3adf9d9cfb51b0d98123cdabcd9c8458c2d3f8c169347e3e70a0bcc1978571
data/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.97.0](https://github.com/openai/openai-ruby/compare/v0.96.0...v0.97.0) (2026-09-29)
4
+
5
+
6
+ ### Features
7
+
8
+ * **api:** add computer use to beta agents ([#782](https://github.com/openai/openai-ruby/issues/782)) ([c765120](https://github.com/openai/openai-ruby/commit/c765120933dfab5c9a4cfb1e5eec83faa9b35ee1))
9
+
3
10
  ## [0.96.0](https://github.com/openai/openai-ruby/compare/v0.95.0...v0.96.0) (2026-09-29)
4
11
 
5
12
 
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.96.0"
18
+ gem "openai", "~> 0.97.0"
19
19
  ```
20
20
 
21
21
  <!-- x-release-please-end -->
@@ -75,7 +75,7 @@ module OpenAI
75
75
  # @!attribute tools
76
76
  # Tools available to the agent.
77
77
  #
78
- # @return [Array<OpenAI::Models::Beta::PersistedAgentTool::Function, OpenAI::Models::Beta::PersistedAgentTool::ToolSearch, OpenAI::Models::Beta::PersistedAgentTool::ProgrammaticToolCalling, OpenAI::Models::Beta::PersistedAgentTool::Mcp, OpenAI::Models::Beta::PersistedAgentTool::WebSearch>]
78
+ # @return [Array<OpenAI::Models::Beta::PersistedAgentTool::Function, OpenAI::Models::Beta::PersistedAgentTool::ToolSearch, OpenAI::Models::Beta::PersistedAgentTool::ProgrammaticToolCalling, OpenAI::Models::Beta::PersistedAgentTool::Mcp, OpenAI::Models::Beta::PersistedAgentTool::WebSearch, OpenAI::Models::Beta::PersistedAgentTool::ComputerUse>]
79
79
  required :tools, -> { OpenAI::Internal::Type::ArrayOf[union: OpenAI::Beta::PersistedAgentTool] }
80
80
 
81
81
  # @!attribute updated_at
@@ -118,7 +118,7 @@ module OpenAI
118
118
  # @param text [OpenAI::Models::Beta::AgentText]
119
119
  # The resolved configuration for text generated by the agent.
120
120
  #
121
- # @param tools [Array<OpenAI::Models::Beta::PersistedAgentTool::Function, OpenAI::Models::Beta::PersistedAgentTool::ToolSearch, OpenAI::Models::Beta::PersistedAgentTool::ProgrammaticToolCalling, OpenAI::Models::Beta::PersistedAgentTool::Mcp, OpenAI::Models::Beta::PersistedAgentTool::WebSearch>]
121
+ # @param tools [Array<OpenAI::Models::Beta::PersistedAgentTool::Function, OpenAI::Models::Beta::PersistedAgentTool::ToolSearch, OpenAI::Models::Beta::PersistedAgentTool::ProgrammaticToolCalling, OpenAI::Models::Beta::PersistedAgentTool::Mcp, OpenAI::Models::Beta::PersistedAgentTool::WebSearch, OpenAI::Models::Beta::PersistedAgentTool::ComputerUse>]
122
122
  # Tools available to the agent.
123
123
  #
124
124
  # @param updated_at [Integer]
@@ -0,0 +1,23 @@
1
+ # frozen_string_literal: true
2
+
3
+ module OpenAI
4
+ module Models
5
+ module Beta
6
+ class AgentBrowserAuthenticationCancelParam < OpenAI::Internal::Type::BaseModel
7
+ # @!attribute action
8
+ #
9
+ # @return [Symbol, :cancel]
10
+ required :action, const: :cancel
11
+
12
+ # @!attribute type
13
+ #
14
+ # @return [Symbol, :browser_authentication]
15
+ required :type, const: :browser_authentication
16
+
17
+ # @!method initialize(action: :cancel, type: :browser_authentication)
18
+ # @param action [Symbol, :cancel]
19
+ # @param type [Symbol, :browser_authentication]
20
+ end
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,70 @@
1
+ # frozen_string_literal: true
2
+
3
+ module OpenAI
4
+ module Models
5
+ module Beta
6
+ class AgentBrowserAuthenticationSubmitParam < OpenAI::Internal::Type::BaseModel
7
+ # @!attribute action
8
+ #
9
+ # @return [Symbol, :submit]
10
+ required :action, const: :submit
11
+
12
+ # @!attribute fields
13
+ # Values for up to six active fields in the required action. The submitted
14
+ # field-value mapping and selected option must fit within 120 KiB of JSON.
15
+ #
16
+ # @return [Array<OpenAI::Models::Beta::AgentBrowserAuthenticationSubmitParam::Field>]
17
+ required(
18
+ :fields,
19
+ -> { OpenAI::Internal::Type::ArrayOf[OpenAI::Beta::AgentBrowserAuthenticationSubmitParam::Field] }
20
+ )
21
+
22
+ # @!attribute type
23
+ #
24
+ # @return [Symbol, :browser_authentication]
25
+ required :type, const: :browser_authentication
26
+
27
+ # @!attribute selected_option
28
+ # The chosen method. Required when the required action contains options.
29
+ #
30
+ # @return [String, nil]
31
+ optional :selected_option, String, nil?: true
32
+
33
+ # @!method initialize(fields:, selected_option: nil, action: :submit, type: :browser_authentication)
34
+ # @param fields [Array<OpenAI::Models::Beta::AgentBrowserAuthenticationSubmitParam::Field>]
35
+ # Values for up to six active fields in the required action. The submitted
36
+ # field-value mapping and selected option must fit within 120 KiB of JSON.
37
+ #
38
+ # @param selected_option [String, nil]
39
+ # The chosen method. Required when the required action contains options.
40
+ #
41
+ # @param action [Symbol, :submit]
42
+ #
43
+ # @param type [Symbol, :browser_authentication]
44
+
45
+ class Field < OpenAI::Internal::Type::BaseModel
46
+ # @!attribute field_id
47
+ # The field ID from the required action.
48
+ #
49
+ # @return [String]
50
+ required :field_id, String
51
+
52
+ # @!attribute value
53
+ # The value to enter into the registered control.
54
+ #
55
+ # @return [String]
56
+ required :value, String
57
+
58
+ # @!method initialize(field_id:, value:)
59
+ # One user-entered value, including non-password fields such as an email address.
60
+ #
61
+ # @param field_id [String]
62
+ # The field ID from the required action.
63
+ #
64
+ # @param value [String]
65
+ # The value to enter into the registered control.
66
+ end
67
+ end
68
+ end
69
+ end
70
+ end
@@ -0,0 +1,45 @@
1
+ # frozen_string_literal: true
2
+
3
+ module OpenAI
4
+ module Models
5
+ module Beta
6
+ class AgentBrowserOriginAccessParam < OpenAI::Internal::Type::BaseModel
7
+ # @!attribute decision
8
+ # Whether to allow, deny, or cancel the requested origin access.
9
+ #
10
+ # @return [Symbol, OpenAI::Models::Beta::AgentBrowserOriginAccessParam::Decision]
11
+ required :decision, enum: -> { OpenAI::Beta::AgentBrowserOriginAccessParam::Decision }
12
+
13
+ # @!attribute type
14
+ #
15
+ # @return [Symbol, :browser_origin_access]
16
+ required :type, const: :browser_origin_access
17
+
18
+ # @!method initialize(decision:, type: :browser_origin_access)
19
+ # @param decision [Symbol, OpenAI::Models::Beta::AgentBrowserOriginAccessParam::Decision]
20
+ # Whether to allow, deny, or cancel the requested origin access.
21
+ #
22
+ # @param type [Symbol, :browser_origin_access]
23
+
24
+ # Whether to allow, deny, or cancel the requested origin access.
25
+ #
26
+ # @see OpenAI::Models::Beta::AgentBrowserOriginAccessParam#decision
27
+ module Decision
28
+ extend OpenAI::Internal::Type::Enum
29
+
30
+ # Allow the browser to access this origin.
31
+ APPROVE = :approve
32
+
33
+ # Deny access to this origin.
34
+ DENY = :deny
35
+
36
+ # Dismiss this request without approving access.
37
+ CANCEL = :cancel
38
+
39
+ # @!method self.values
40
+ # @return [Array<Symbol>]
41
+ end
42
+ end
43
+ end
44
+ end
45
+ end
@@ -63,7 +63,7 @@ module OpenAI
63
63
  # @!attribute tools
64
64
  # Tools available to the agent. Defaults to an empty list.
65
65
  #
66
- # @return [Array<OpenAI::Models::Beta::PersistedAgentToolParam::Function, OpenAI::Models::Beta::PersistedAgentToolParam::ToolSearch, OpenAI::Models::Beta::PersistedAgentToolParam::ProgrammaticToolCalling, OpenAI::Models::Beta::PersistedAgentToolParam::Mcp, OpenAI::Models::Beta::PersistedAgentToolParam::WebSearch>, nil]
66
+ # @return [Array<OpenAI::Models::Beta::PersistedAgentToolParam::Function, OpenAI::Models::Beta::PersistedAgentToolParam::ToolSearch, OpenAI::Models::Beta::PersistedAgentToolParam::ProgrammaticToolCalling, OpenAI::Models::Beta::PersistedAgentToolParam::Mcp, OpenAI::Models::Beta::PersistedAgentToolParam::WebSearch, OpenAI::Models::Beta::PersistedAgentToolParam::ComputerUse>, nil]
67
67
  optional(
68
68
  :tools,
69
69
  -> { OpenAI::Internal::Type::ArrayOf[union: OpenAI::Beta::PersistedAgentToolParam] },
@@ -99,7 +99,7 @@ module OpenAI
99
99
  # Configuration for generated text. Defaults to the `text` format and medium
100
100
  # verbosity.
101
101
  #
102
- # @param tools [Array<OpenAI::Models::Beta::PersistedAgentToolParam::Function, OpenAI::Models::Beta::PersistedAgentToolParam::ToolSearch, OpenAI::Models::Beta::PersistedAgentToolParam::ProgrammaticToolCalling, OpenAI::Models::Beta::PersistedAgentToolParam::Mcp, OpenAI::Models::Beta::PersistedAgentToolParam::WebSearch>, nil]
102
+ # @param tools [Array<OpenAI::Models::Beta::PersistedAgentToolParam::Function, OpenAI::Models::Beta::PersistedAgentToolParam::ToolSearch, OpenAI::Models::Beta::PersistedAgentToolParam::ProgrammaticToolCalling, OpenAI::Models::Beta::PersistedAgentToolParam::Mcp, OpenAI::Models::Beta::PersistedAgentToolParam::WebSearch, OpenAI::Models::Beta::PersistedAgentToolParam::ComputerUse>, nil]
103
103
  # Tools available to the agent. Defaults to an empty list.
104
104
  #
105
105
  # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}]
@@ -21,6 +21,12 @@ module OpenAI
21
21
  # A call to a tool on an MCP server.
22
22
  variant :mcp_call, -> { OpenAI::Beta::AgentMcpCallItem }
23
23
 
24
+ # One execution of the platform-provided computer-use capability.
25
+ variant :computer_use_call, -> { OpenAI::Beta::AgentOutputItem::ComputerUseCall }
26
+
27
+ # A credential-free history record of the emitted login request.
28
+ variant :computer_use_approval_request, -> { OpenAI::Beta::AgentOutputItem::ComputerUseApprovalRequest }
29
+
24
30
  # A web search call produced by the agent.
25
31
  variant :web_search_call, -> { OpenAI::Beta::AgentWebSearchCallItem }
26
32
 
@@ -45,8 +51,277 @@ module OpenAI
45
51
  # A request to close a subagent.
46
52
  variant :close_subagent_call, -> { OpenAI::Beta::AgentCloseSubagentCallItem }
47
53
 
54
+ class ComputerUseCall < OpenAI::Internal::Type::BaseModel
55
+ # @!attribute id
56
+ # The ID of the activity item.
57
+ #
58
+ # @return [String]
59
+ required :id, String
60
+
61
+ # @!attribute output
62
+ # The last screenshot emitted by the model. Null when screenshot inclusion is
63
+ # disabled or the call emitted no screenshot.
64
+ #
65
+ # @return [OpenAI::Models::Beta::AgentOutputItem::ComputerUseCall::Output, nil]
66
+ required :output, -> { OpenAI::Beta::AgentOutputItem::ComputerUseCall::Output }, nil?: true
67
+
68
+ # @!attribute status
69
+ # The execution status of the activity.
70
+ #
71
+ # @return [Symbol, OpenAI::Models::Beta::AgentFunctionCallStatus]
72
+ required :status, enum: -> { OpenAI::Beta::AgentFunctionCallStatus }
73
+
74
+ # @!attribute title
75
+ # A model-generated description of the activity, when available.
76
+ #
77
+ # @return [String, nil]
78
+ required :title, String, nil?: true
79
+
80
+ # @!attribute turn_id
81
+ # The ID of the turn that contains this item.
82
+ #
83
+ # @return [String]
84
+ required :turn_id, String
85
+
86
+ # @!attribute type
87
+ # The item type. Always `computer_use_call`.
88
+ #
89
+ # @return [Symbol, :computer_use_call]
90
+ required :type, const: :computer_use_call
91
+
92
+ # @!method initialize(id:, output:, status:, title:, turn_id:, type: :computer_use_call)
93
+ # One execution of the platform-provided computer-use capability.
94
+ #
95
+ # @param id [String]
96
+ # The ID of the activity item.
97
+ #
98
+ # @param output [OpenAI::Models::Beta::AgentOutputItem::ComputerUseCall::Output, nil]
99
+ # The last screenshot emitted by the model. Null when screenshot inclusion is
100
+ # disabled or the call emitted no screenshot.
101
+ #
102
+ # @param status [Symbol, OpenAI::Models::Beta::AgentFunctionCallStatus]
103
+ # The execution status of the activity.
104
+ #
105
+ # @param title [String, nil]
106
+ # A model-generated description of the activity, when available.
107
+ #
108
+ # @param turn_id [String]
109
+ # The ID of the turn that contains this item.
110
+ #
111
+ # @param type [Symbol, :computer_use_call]
112
+ # The item type. Always `computer_use_call`.
113
+
114
+ # @see OpenAI::Models::Beta::AgentOutputItem::ComputerUseCall#output
115
+ class Output < OpenAI::Internal::Type::BaseModel
116
+ # @!attribute image_url
117
+ # The complete JPEG image as a base64 data URL.
118
+ #
119
+ # @return [String]
120
+ required :image_url, String
121
+
122
+ # @!attribute type
123
+ # The content type. Always `computer_screenshot`.
124
+ #
125
+ # @return [Symbol, :computer_screenshot]
126
+ required :type, const: :computer_screenshot
127
+
128
+ # @!method initialize(image_url:, type: :computer_screenshot)
129
+ # The last screenshot emitted by the model. Null when screenshot inclusion is
130
+ # disabled or the call emitted no screenshot.
131
+ #
132
+ # @param image_url [String]
133
+ # The complete JPEG image as a base64 data URL.
134
+ #
135
+ # @param type [Symbol, :computer_screenshot]
136
+ # The content type. Always `computer_screenshot`.
137
+ end
138
+ end
139
+
140
+ class ComputerUseApprovalRequest < OpenAI::Internal::Type::BaseModel
141
+ # @!attribute id
142
+ # The stable history item ID.
143
+ #
144
+ # @return [String]
145
+ required :id, String
146
+
147
+ # @!attribute request
148
+ # A registered form awaiting the application's response.
149
+ #
150
+ # @return [OpenAI::Models::Beta::AgentOutputItem::ComputerUseApprovalRequest::Request]
151
+ required :request, -> { OpenAI::Beta::AgentOutputItem::ComputerUseApprovalRequest::Request }
152
+
153
+ # @!attribute request_id
154
+ #
155
+ # @return [String]
156
+ required :request_id, String
157
+
158
+ # @!attribute turn_id
159
+ #
160
+ # @return [String]
161
+ required :turn_id, String
162
+
163
+ # @!attribute type
164
+ # The item type. Always computer_use_approval_request.
165
+ #
166
+ # @return [Symbol, :computer_use_approval_request]
167
+ required :type, const: :computer_use_approval_request
168
+
169
+ # @!method initialize(id:, request:, request_id:, turn_id:, type: :computer_use_approval_request)
170
+ # A credential-free history record of the emitted login request.
171
+ #
172
+ # @param id [String]
173
+ # The stable history item ID.
174
+ #
175
+ # @param request [OpenAI::Models::Beta::AgentOutputItem::ComputerUseApprovalRequest::Request]
176
+ # A registered form awaiting the application's response.
177
+ #
178
+ # @param request_id [String]
179
+ #
180
+ # @param turn_id [String]
181
+ #
182
+ # @param type [Symbol, :computer_use_approval_request]
183
+ # The item type. Always computer_use_approval_request.
184
+
185
+ # @see OpenAI::Models::Beta::AgentOutputItem::ComputerUseApprovalRequest#request
186
+ class Request < OpenAI::Internal::Type::BaseModel
187
+ # @!attribute credential_origin
188
+ # The registered form or frame origin where values will be entered.
189
+ #
190
+ # @return [String, nil]
191
+ required :credential_origin, String, nil?: true
192
+
193
+ # @!attribute fields
194
+ # Controls to render. All submitted values are sensitive.
195
+ #
196
+ # @return [Array<OpenAI::Models::Beta::AgentOutputItem::ComputerUseApprovalRequest::Request::Field>]
197
+ required(
198
+ :fields,
199
+ -> {
200
+ OpenAI::Internal::Type::ArrayOf[
201
+ OpenAI::Beta::AgentOutputItem::ComputerUseApprovalRequest::Request::Field
202
+ ]
203
+ }
204
+ )
205
+
206
+ # @!attribute options
207
+ # Sign-in methods. Empty for a plain form.
208
+ #
209
+ # @return [Array<OpenAI::Models::Beta::AgentOutputItem::ComputerUseApprovalRequest::Request::Option>]
210
+ required(
211
+ :options,
212
+ -> {
213
+ OpenAI::Internal::Type::ArrayOf[
214
+ OpenAI::Beta::AgentOutputItem::ComputerUseApprovalRequest::Request::Option
215
+ ]
216
+ }
217
+ )
218
+
219
+ # @!attribute reason
220
+ # Why the agent needs the user to sign in.
221
+ #
222
+ # @return [String, nil]
223
+ required :reason, String, nil?: true
224
+
225
+ # @!attribute type
226
+ # The type of the object. Always `browser_authentication`.
227
+ #
228
+ # @return [Symbol, :browser_authentication]
229
+ required :type, const: :browser_authentication
230
+
231
+ # @!method initialize(credential_origin:, fields:, options:, reason:, type: :browser_authentication)
232
+ # A registered form awaiting the application's response.
233
+ #
234
+ # @param credential_origin [String, nil]
235
+ # The registered form or frame origin where values will be entered.
236
+ #
237
+ # @param fields [Array<OpenAI::Models::Beta::AgentOutputItem::ComputerUseApprovalRequest::Request::Field>]
238
+ # Controls to render. All submitted values are sensitive.
239
+ #
240
+ # @param options [Array<OpenAI::Models::Beta::AgentOutputItem::ComputerUseApprovalRequest::Request::Option>]
241
+ # Sign-in methods. Empty for a plain form.
242
+ #
243
+ # @param reason [String, nil]
244
+ # Why the agent needs the user to sign in.
245
+ #
246
+ # @param type [Symbol, :browser_authentication]
247
+ # The type of the object. Always `browser_authentication`.
248
+ class Field < OpenAI::Internal::Type::BaseModel
249
+ # @!attribute id
250
+ # The field ID to submit as field_id in a fields entry.
251
+ #
252
+ # @return [String]
253
+ required :id, String
254
+
255
+ # @!attribute label
256
+ # The label to display beside the control.
257
+ #
258
+ # @return [String]
259
+ required :label, String
260
+
261
+ # @!attribute required
262
+ # Whether this control requires a nonempty value.
263
+ #
264
+ # @return [Boolean]
265
+ required :required, OpenAI::Internal::Type::Boolean
266
+
267
+ # @!attribute type
268
+ # The rendering type, such as email, password, or text.
269
+ #
270
+ # @return [String]
271
+ required :type, String
272
+
273
+ # @!method initialize(id:, label:, required:, type:)
274
+ # A control in a registered browser-login form.
275
+ #
276
+ # @param id [String]
277
+ # The field ID to submit as field_id in a fields entry.
278
+ #
279
+ # @param label [String]
280
+ # The label to display beside the control.
281
+ #
282
+ # @param required [Boolean]
283
+ # Whether this control requires a nonempty value.
284
+ #
285
+ # @param type [String]
286
+ # The rendering type, such as email, password, or text.
287
+ end
288
+
289
+ class Option < OpenAI::Internal::Type::BaseModel
290
+ # @!attribute id
291
+ # The option ID to submit as selected_option.
292
+ #
293
+ # @return [String]
294
+ required :id, String
295
+
296
+ # @!attribute field_ids
297
+ # IDs from the registered fields that this method accepts.
298
+ #
299
+ # @return [Array<String>]
300
+ required :field_ids, OpenAI::Internal::Type::ArrayOf[String]
301
+
302
+ # @!attribute label
303
+ # The method label to display.
304
+ #
305
+ # @return [String]
306
+ required :label, String
307
+
308
+ # @!method initialize(id:, field_ids:, label:)
309
+ # A sign-in method and the fields that belong to it.
310
+ #
311
+ # @param id [String]
312
+ # The option ID to submit as selected_option.
313
+ #
314
+ # @param field_ids [Array<String>]
315
+ # IDs from the registered fields that this method accepts.
316
+ #
317
+ # @param label [String]
318
+ # The method label to display.
319
+ end
320
+ end
321
+ end
322
+
48
323
  # @!method self.variants
49
- # @return [Array(OpenAI::Models::Beta::AgentSessionAssistantMessage, OpenAI::Models::Beta::AgentReasoningItem, OpenAI::Models::Beta::AgentFunctionCallItem, OpenAI::Models::Beta::AgentMcpCallItem, OpenAI::Models::Beta::AgentWebSearchCallItem, OpenAI::Models::Beta::AgentCommandExecutionItem, OpenAI::Models::Beta::AgentCreateSubagentCallItem, OpenAI::Models::Beta::AgentSendSubagentInputCallItem, OpenAI::Models::Beta::AgentResumeSubagentCallItem, OpenAI::Models::Beta::AgentWaitForSubagentsCallItem, OpenAI::Models::Beta::AgentInterruptSubagentCallItem, OpenAI::Models::Beta::AgentCloseSubagentCallItem)]
324
+ # @return [Array(OpenAI::Models::Beta::AgentSessionAssistantMessage, OpenAI::Models::Beta::AgentReasoningItem, OpenAI::Models::Beta::AgentFunctionCallItem, OpenAI::Models::Beta::AgentMcpCallItem, OpenAI::Models::Beta::AgentOutputItem::ComputerUseCall, OpenAI::Models::Beta::AgentOutputItem::ComputerUseApprovalRequest, OpenAI::Models::Beta::AgentWebSearchCallItem, OpenAI::Models::Beta::AgentCommandExecutionItem, OpenAI::Models::Beta::AgentCreateSubagentCallItem, OpenAI::Models::Beta::AgentSendSubagentInputCallItem, OpenAI::Models::Beta::AgentResumeSubagentCallItem, OpenAI::Models::Beta::AgentWaitForSubagentsCallItem, OpenAI::Models::Beta::AgentInterruptSubagentCallItem, OpenAI::Models::Beta::AgentCloseSubagentCallItem)]
50
325
  end
51
326
  end
52
327
  end