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
@@ -17,6 +17,19 @@ module OpenAI
17
17
  # @return [Array<String>, nil]
18
18
  optional :capability_directories, OpenAI::Internal::Type::ArrayOf[String], nil?: true
19
19
 
20
+ # @!attribute desktop
21
+ # Desktop provisioning. Omission or null inherits the template setting, or
22
+ # defaults to disabled.
23
+ #
24
+ # @return [OpenAI::Models::Beta::Agents::Environments::TemplateCreateParams::Desktop, nil]
25
+ optional(
26
+ :desktop,
27
+ -> {
28
+ OpenAI::Beta::Agents::Environments::TemplateCreateParams::Desktop
29
+ },
30
+ nil?: true
31
+ )
32
+
20
33
  # @!attribute env
21
34
  # Environment variables made available to the agent.
22
35
  #
@@ -97,11 +110,15 @@ module OpenAI
97
110
  nil?: true
98
111
  )
99
112
 
100
- # @!method initialize(capability_directories: nil, env: nil, files: nil, name: nil, network: nil, packages: nil, plugins: nil, setup_commands: nil, skills: nil, request_options: {})
113
+ # @!method initialize(capability_directories: nil, desktop: nil, env: nil, files: nil, name: nil, network: nil, packages: nil, plugins: nil, setup_commands: nil, skills: nil, request_options: {})
101
114
  # @param capability_directories [Array<String>, nil]
102
115
  # Directories that contain capabilities exposed to the agent. Defaults to an empty
103
116
  # list.
104
117
  #
118
+ # @param desktop [OpenAI::Models::Beta::Agents::Environments::TemplateCreateParams::Desktop, nil]
119
+ # Desktop provisioning. Omission or null inherits the template setting, or
120
+ # defaults to disabled.
121
+ #
105
122
  # @param env [Hash{Symbol=>String}, nil]
106
123
  # Environment variables made available to the agent.
107
124
  #
@@ -130,6 +147,21 @@ module OpenAI
130
147
  #
131
148
  # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}]
132
149
 
150
+ class Desktop < OpenAI::Internal::Type::BaseModel
151
+ # @!attribute enabled
152
+ # Whether to provision the desktop and its browser proxy.
153
+ #
154
+ # @return [Boolean]
155
+ required :enabled, OpenAI::Internal::Type::Boolean
156
+
157
+ # @!method initialize(enabled:)
158
+ # Desktop provisioning. Omission or null inherits the template setting, or
159
+ # defaults to disabled.
160
+ #
161
+ # @param enabled [Boolean]
162
+ # Whether to provision the desktop and its browser proxy.
163
+ end
164
+
133
165
  class Network < OpenAI::Internal::Type::BaseModel
134
166
  # @!attribute access
135
167
  # The environment's network access mode.
@@ -143,7 +175,15 @@ module OpenAI
143
175
  # @return [Array<String>, nil]
144
176
  optional :allowed_domains, OpenAI::Internal::Type::ArrayOf[String], nil?: true
145
177
 
146
- # @!method initialize(access:, allowed_domains: nil)
178
+ # @!attribute blocked_domains
179
+ # Domains blocked for both executor and browser when access is restricted. A
180
+ # nonempty list requires `access: restricted` and cannot be combined with nonempty
181
+ # `allowed_domains`. Wildcard domains are not supported.
182
+ #
183
+ # @return [Array<String>, nil]
184
+ optional :blocked_domains, OpenAI::Internal::Type::ArrayOf[String], nil?: true
185
+
186
+ # @!method initialize(access:, allowed_domains: nil, blocked_domains: nil)
147
187
  # Network access policy for the environment. Defaults to disabled for GA requests
148
188
  # and enabled for beta requests.
149
189
  #
@@ -152,6 +192,11 @@ module OpenAI
152
192
  #
153
193
  # @param allowed_domains [Array<String>, nil]
154
194
  # Domains the environment may access when network access is restricted.
195
+ #
196
+ # @param blocked_domains [Array<String>, nil]
197
+ # Domains blocked for both executor and browser when access is restricted. A
198
+ # nonempty list requires `access: restricted` and cannot be combined with nonempty
199
+ # `allowed_domains`. Wildcard domains are not supported.
155
200
 
156
201
  # The environment's network access mode.
157
202
  #
@@ -165,7 +210,7 @@ module OpenAI
165
210
  # Disables network access.
166
211
  DISABLED = :disabled
167
212
 
168
- # Allows access only to configured domains.
213
+ # Applies the configured domain restrictions.
169
214
  RESTRICTED = :restricted
170
215
 
171
216
  # @!method self.values
@@ -21,6 +21,18 @@ module OpenAI
21
21
  # @return [Array<String>, nil]
22
22
  optional :capability_directories, OpenAI::Internal::Type::ArrayOf[String], nil?: true
23
23
 
24
+ # @!attribute desktop
25
+ # Replacement desktop configuration, or null to disable the desktop.
26
+ #
27
+ # @return [OpenAI::Models::Beta::Agents::Environments::TemplateUpdateParams::Desktop, nil]
28
+ optional(
29
+ :desktop,
30
+ -> {
31
+ OpenAI::Beta::Agents::Environments::TemplateUpdateParams::Desktop
32
+ },
33
+ nil?: true
34
+ )
35
+
24
36
  # @!attribute env
25
37
  # Replacement confidential environment values.
26
38
  #
@@ -101,12 +113,15 @@ module OpenAI
101
113
  nil?: true
102
114
  )
103
115
 
104
- # @!method initialize(environment_template_id:, capability_directories: nil, env: nil, files: nil, name: nil, network: nil, packages: nil, plugins: nil, setup_commands: nil, skills: nil, request_options: {})
116
+ # @!method initialize(environment_template_id:, capability_directories: nil, desktop: nil, env: nil, files: nil, name: nil, network: nil, packages: nil, plugins: nil, setup_commands: nil, skills: nil, request_options: {})
105
117
  # @param environment_template_id [String]
106
118
  #
107
119
  # @param capability_directories [Array<String>, nil]
108
120
  # Directories that expose capabilities to the agent.
109
121
  #
122
+ # @param desktop [OpenAI::Models::Beta::Agents::Environments::TemplateUpdateParams::Desktop, nil]
123
+ # Replacement desktop configuration, or null to disable the desktop.
124
+ #
110
125
  # @param env [Hash{Symbol=>String}, nil]
111
126
  # Replacement confidential environment values.
112
127
  #
@@ -135,6 +150,20 @@ module OpenAI
135
150
  #
136
151
  # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}]
137
152
 
153
+ class Desktop < OpenAI::Internal::Type::BaseModel
154
+ # @!attribute enabled
155
+ # Whether to provision the desktop and its browser proxy.
156
+ #
157
+ # @return [Boolean]
158
+ required :enabled, OpenAI::Internal::Type::Boolean
159
+
160
+ # @!method initialize(enabled:)
161
+ # Replacement desktop configuration, or null to disable the desktop.
162
+ #
163
+ # @param enabled [Boolean]
164
+ # Whether to provision the desktop and its browser proxy.
165
+ end
166
+
138
167
  class Network < OpenAI::Internal::Type::BaseModel
139
168
  # @!attribute access
140
169
  # The environment's network access mode.
@@ -148,7 +177,15 @@ module OpenAI
148
177
  # @return [Array<String>, nil]
149
178
  optional :allowed_domains, OpenAI::Internal::Type::ArrayOf[String], nil?: true
150
179
 
151
- # @!method initialize(access:, allowed_domains: nil)
180
+ # @!attribute blocked_domains
181
+ # Domains blocked for both executor and browser when access is restricted. A
182
+ # nonempty list requires `access: restricted` and cannot be combined with nonempty
183
+ # `allowed_domains`. Wildcard domains are not supported.
184
+ #
185
+ # @return [Array<String>, nil]
186
+ optional :blocked_domains, OpenAI::Internal::Type::ArrayOf[String], nil?: true
187
+
188
+ # @!method initialize(access:, allowed_domains: nil, blocked_domains: nil)
152
189
  # Network access available after setup completes. Omit to preserve the current
153
190
  # policy, or pass `null` to reset to disabled for GA requests or enabled for beta
154
191
  # requests.
@@ -158,6 +195,11 @@ module OpenAI
158
195
  #
159
196
  # @param allowed_domains [Array<String>, nil]
160
197
  # Domains the environment may access when network access is restricted.
198
+ #
199
+ # @param blocked_domains [Array<String>, nil]
200
+ # Domains blocked for both executor and browser when access is restricted. A
201
+ # nonempty list requires `access: restricted` and cannot be combined with nonempty
202
+ # `allowed_domains`. Wildcard domains are not supported.
161
203
 
162
204
  # The environment's network access mode.
163
205
  #
@@ -171,7 +213,7 @@ module OpenAI
171
213
  # Disables network access.
172
214
  DISABLED = :disabled
173
215
 
174
- # Allows access only to configured domains.
216
+ # Applies the configured domain restrictions.
175
217
  RESTRICTED = :restricted
176
218
 
177
219
  # @!method self.values
@@ -126,7 +126,7 @@ module OpenAI
126
126
  # @!attribute tools
127
127
  # Tools available to the agent. Omit to inherit, or pass null to clear them.
128
128
  #
129
- # @return [Array<OpenAI::Models::Beta::AgentToolParam::Function, OpenAI::Models::Beta::AgentToolParam::ToolSearch, OpenAI::Models::Beta::AgentToolParam::ProgrammaticToolCalling, OpenAI::Models::Beta::AgentToolParam::Mcp, OpenAI::Models::Beta::AgentToolParam::WebSearch>, nil]
129
+ # @return [Array<OpenAI::Models::Beta::AgentToolParam::Function, OpenAI::Models::Beta::AgentToolParam::ToolSearch, OpenAI::Models::Beta::AgentToolParam::ProgrammaticToolCalling, OpenAI::Models::Beta::AgentToolParam::Mcp, OpenAI::Models::Beta::AgentToolParam::WebSearch, OpenAI::Models::Beta::AgentToolParam::ComputerUse>, nil]
130
130
  optional(
131
131
  :tools,
132
132
  -> {
@@ -159,7 +159,7 @@ module OpenAI
159
159
  # @param text [OpenAI::Models::Beta::AgentTextParam, nil]
160
160
  # Configuration for text generated by the agent.
161
161
  #
162
- # @param tools [Array<OpenAI::Models::Beta::AgentToolParam::Function, OpenAI::Models::Beta::AgentToolParam::ToolSearch, OpenAI::Models::Beta::AgentToolParam::ProgrammaticToolCalling, OpenAI::Models::Beta::AgentToolParam::Mcp, OpenAI::Models::Beta::AgentToolParam::WebSearch>, nil]
162
+ # @param tools [Array<OpenAI::Models::Beta::AgentToolParam::Function, OpenAI::Models::Beta::AgentToolParam::ToolSearch, OpenAI::Models::Beta::AgentToolParam::ProgrammaticToolCalling, OpenAI::Models::Beta::AgentToolParam::Mcp, OpenAI::Models::Beta::AgentToolParam::WebSearch, OpenAI::Models::Beta::AgentToolParam::ComputerUse>, nil]
163
163
  # Tools available to the agent. Omit to inherit, or pass null to clear them.
164
164
 
165
165
  # The service tier used for model requests.
@@ -18,7 +18,7 @@ module OpenAI
18
18
  # @!attribute events
19
19
  # The input events to submit to the session.
20
20
  #
21
- # @return [Array<OpenAI::Models::Beta::AgentSessionInputParam::AgentSessionInputMessage, OpenAI::Models::Beta::AgentSessionInputParam::AgentSessionInputCancel, OpenAI::Models::Beta::AgentSessionInputParam::AgentSessionInputToolResult>]
21
+ # @return [Array<OpenAI::Models::Beta::AgentSessionInputParam::AgentSessionInputComputerUseApprovalRequestResult, OpenAI::Models::Beta::AgentSessionInputParam::AgentSessionInputMessage, OpenAI::Models::Beta::AgentSessionInputParam::AgentSessionInputCancel, OpenAI::Models::Beta::AgentSessionInputParam::AgentSessionInputToolResult>]
22
22
  required :events, -> { OpenAI::Internal::Type::ArrayOf[union: OpenAI::Beta::AgentSessionInputParam] }
23
23
 
24
24
  # @!attribute idempotency_key
@@ -29,7 +29,7 @@ module OpenAI
29
29
  # @!method initialize(session_id:, events:, idempotency_key: nil, request_options: {})
30
30
  # @param session_id [String]
31
31
  #
32
- # @param events [Array<OpenAI::Models::Beta::AgentSessionInputParam::AgentSessionInputMessage, OpenAI::Models::Beta::AgentSessionInputParam::AgentSessionInputCancel, OpenAI::Models::Beta::AgentSessionInputParam::AgentSessionInputToolResult>]
32
+ # @param events [Array<OpenAI::Models::Beta::AgentSessionInputParam::AgentSessionInputComputerUseApprovalRequestResult, OpenAI::Models::Beta::AgentSessionInputParam::AgentSessionInputMessage, OpenAI::Models::Beta::AgentSessionInputParam::AgentSessionInputCancel, OpenAI::Models::Beta::AgentSessionInputParam::AgentSessionInputToolResult>]
33
33
  # The input events to submit to the session.
34
34
  #
35
35
  # @param idempotency_key [String]
@@ -82,7 +82,13 @@ module OpenAI
82
82
  # @return [Symbol, :openai_hosted]
83
83
  required :type, const: :openai_hosted
84
84
 
85
- # @!method initialize(id:, capability_directories:, files:, network:, packages:, plugins:, skills:, type: :openai_hosted)
85
+ # @!attribute desktop
86
+ # The effective desktop configuration.
87
+ #
88
+ # @return [OpenAI::Models::Beta::Environment::OpenAIHosted::Desktop, nil]
89
+ optional :desktop, -> { OpenAI::Beta::Environment::OpenAIHosted::Desktop }
90
+
91
+ # @!method initialize(id:, capability_directories:, files:, network:, packages:, plugins:, skills:, desktop: nil, type: :openai_hosted)
86
92
  # An environment hosted by OpenAI.
87
93
  #
88
94
  # @param id [String]
@@ -106,6 +112,9 @@ module OpenAI
106
112
  # @param skills [Array<OpenAI::Models::Beta::HostedSkillReference, OpenAI::Models::Beta::HostedSkill::Inline>]
107
113
  # Skills installed in the environment, excluding their archive contents.
108
114
  #
115
+ # @param desktop [OpenAI::Models::Beta::Environment::OpenAIHosted::Desktop]
116
+ # The effective desktop configuration.
117
+ #
109
118
  # @param type [Symbol, :openai_hosted]
110
119
  # The type of the object. Always `openai_hosted`.
111
120
 
@@ -144,7 +153,7 @@ module OpenAI
144
153
  # Disables network access.
145
154
  DISABLED = :disabled
146
155
 
147
- # Allows access only to configured domains.
156
+ # Applies the configured domain restrictions.
148
157
  RESTRICTED = :restricted
149
158
 
150
159
  # @!method self.values
@@ -184,6 +193,21 @@ module OpenAI
184
193
  # @param system_ [Array<String>]
185
194
  # System packages installed in the environment.
186
195
  end
196
+
197
+ # @see OpenAI::Models::Beta::Environment::OpenAIHosted#desktop
198
+ class Desktop < OpenAI::Internal::Type::BaseModel
199
+ # @!attribute enabled
200
+ # Whether the environment provisions a desktop and browser proxy.
201
+ #
202
+ # @return [Boolean]
203
+ required :enabled, OpenAI::Internal::Type::Boolean
204
+
205
+ # @!method initialize(enabled:)
206
+ # The effective desktop configuration.
207
+ #
208
+ # @param enabled [Boolean]
209
+ # Whether the environment provisions a desktop and browser proxy.
210
+ end
187
211
  end
188
212
 
189
213
  class SelfHosted < OpenAI::Internal::Type::BaseModel
@@ -46,6 +46,13 @@ module OpenAI
46
46
  # @return [Array<String>, nil]
47
47
  optional :capability_directories, OpenAI::Internal::Type::ArrayOf[String], nil?: true
48
48
 
49
+ # @!attribute desktop
50
+ # Desktop provisioning. Omission or null inherits the template setting, or
51
+ # defaults to disabled.
52
+ #
53
+ # @return [OpenAI::Models::Beta::EnvironmentParam::OpenAIHosted::Desktop, nil]
54
+ optional :desktop, -> { OpenAI::Beta::EnvironmentParam::OpenAIHosted::Desktop }, nil?: true
55
+
49
56
  # @!attribute env
50
57
  # Environment variables made available to the agent.
51
58
  #
@@ -115,7 +122,7 @@ module OpenAI
115
122
  nil?: true
116
123
  )
117
124
 
118
- # @!method initialize(capability_directories: nil, env: nil, environment_template_id: nil, files: nil, network: nil, packages: nil, plugins: nil, setup_commands: nil, skills: nil, type: :openai_hosted)
125
+ # @!method initialize(capability_directories: nil, desktop: nil, env: nil, environment_template_id: nil, files: nil, network: nil, packages: nil, plugins: nil, setup_commands: nil, skills: nil, type: :openai_hosted)
119
126
  # An existing OpenAI-hosted environment or new inline/template-based hosted
120
127
  # configuration.
121
128
  #
@@ -123,6 +130,10 @@ module OpenAI
123
130
  # Directories that contain capabilities exposed to the agent. Defaults to an empty
124
131
  # list.
125
132
  #
133
+ # @param desktop [OpenAI::Models::Beta::EnvironmentParam::OpenAIHosted::Desktop, nil]
134
+ # Desktop provisioning. Omission or null inherits the template setting, or
135
+ # defaults to disabled.
136
+ #
126
137
  # @param env [Hash{Symbol=>String}, nil]
127
138
  # Environment variables made available to the agent.
128
139
  #
@@ -153,6 +164,22 @@ module OpenAI
153
164
  # @param type [Symbol, :openai_hosted]
154
165
  # The type of the object. Always `openai_hosted`.
155
166
 
167
+ # @see OpenAI::Models::Beta::EnvironmentParam::OpenAIHosted#desktop
168
+ class Desktop < OpenAI::Internal::Type::BaseModel
169
+ # @!attribute enabled
170
+ # Whether to provision the desktop and its browser proxy.
171
+ #
172
+ # @return [Boolean]
173
+ required :enabled, OpenAI::Internal::Type::Boolean
174
+
175
+ # @!method initialize(enabled:)
176
+ # Desktop provisioning. Omission or null inherits the template setting, or
177
+ # defaults to disabled.
178
+ #
179
+ # @param enabled [Boolean]
180
+ # Whether to provision the desktop and its browser proxy.
181
+ end
182
+
156
183
  # @see OpenAI::Models::Beta::EnvironmentParam::OpenAIHosted#network
157
184
  class Network < OpenAI::Internal::Type::BaseModel
158
185
  # @!attribute access
@@ -167,7 +194,15 @@ module OpenAI
167
194
  # @return [Array<String>, nil]
168
195
  optional :allowed_domains, OpenAI::Internal::Type::ArrayOf[String], nil?: true
169
196
 
170
- # @!method initialize(access:, allowed_domains: nil)
197
+ # @!attribute blocked_domains
198
+ # Domains blocked for both executor and browser when access is restricted. A
199
+ # nonempty list requires `access: restricted` and cannot be combined with nonempty
200
+ # `allowed_domains`. Wildcard domains are not supported.
201
+ #
202
+ # @return [Array<String>, nil]
203
+ optional :blocked_domains, OpenAI::Internal::Type::ArrayOf[String], nil?: true
204
+
205
+ # @!method initialize(access:, allowed_domains: nil, blocked_domains: nil)
171
206
  # Network access policy for the environment. Defaults to disabled for GA requests
172
207
  # and enabled for beta requests.
173
208
  #
@@ -176,6 +211,11 @@ module OpenAI
176
211
  #
177
212
  # @param allowed_domains [Array<String>, nil]
178
213
  # Domains the environment may access when network access is restricted.
214
+ #
215
+ # @param blocked_domains [Array<String>, nil]
216
+ # Domains blocked for both executor and browser when access is restricted. A
217
+ # nonempty list requires `access: restricted` and cannot be combined with nonempty
218
+ # `allowed_domains`. Wildcard domains are not supported.
179
219
 
180
220
  # The environment's network access mode.
181
221
  #
@@ -189,7 +229,7 @@ module OpenAI
189
229
  # Disables network access.
190
230
  DISABLED = :disabled
191
231
 
192
- # Allows access only to configured domains.
232
+ # Applies the configured domain restrictions.
193
233
  RESTRICTED = :restricted
194
234
 
195
235
  # @!method self.values
@@ -24,6 +24,9 @@ module OpenAI
24
24
  # Web search.
25
25
  variant :web_search, -> { OpenAI::Beta::PersistedAgentTool::WebSearch }
26
26
 
27
+ # Browser use in an OpenAI-hosted session.
28
+ variant :computer_use, -> { OpenAI::Beta::PersistedAgentTool::ComputerUse }
29
+
27
30
  class Function < OpenAI::Internal::Type::BaseModel
28
31
  # @!attribute defer_loading
29
32
  # Whether the function is deferred and discovered through tool search.
@@ -321,8 +324,31 @@ module OpenAI
321
324
  end
322
325
  end
323
326
 
327
+ class ComputerUse < OpenAI::Internal::Type::BaseModel
328
+ # @!attribute include_screenshots
329
+ # Whether computer tool outputs include screenshots.
330
+ #
331
+ # @return [Boolean]
332
+ required :include_screenshots, OpenAI::Internal::Type::Boolean
333
+
334
+ # @!attribute type
335
+ # The type of the object. Always `computer_use`.
336
+ #
337
+ # @return [Symbol, :computer_use]
338
+ required :type, const: :computer_use
339
+
340
+ # @!method initialize(include_screenshots:, type: :computer_use)
341
+ # Browser use in an OpenAI-hosted session.
342
+ #
343
+ # @param include_screenshots [Boolean]
344
+ # Whether computer tool outputs include screenshots.
345
+ #
346
+ # @param type [Symbol, :computer_use]
347
+ # The type of the object. Always `computer_use`.
348
+ end
349
+
324
350
  # @!method self.variants
325
- # @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)]
351
+ # @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)]
326
352
  end
327
353
  end
328
354
  end
@@ -24,6 +24,9 @@ module OpenAI
24
24
  # Web search.
25
25
  variant :web_search, -> { OpenAI::Beta::PersistedAgentToolParam::WebSearch }
26
26
 
27
+ # Browser use in an OpenAI-hosted session.
28
+ variant :computer_use, -> { OpenAI::Beta::PersistedAgentToolParam::ComputerUse }
29
+
27
30
  class Function < OpenAI::Internal::Type::BaseModel
28
31
  # @!attribute description
29
32
  # A description of what the function does.
@@ -347,8 +350,31 @@ module OpenAI
347
350
  end
348
351
  end
349
352
 
353
+ class ComputerUse < OpenAI::Internal::Type::BaseModel
354
+ # @!attribute type
355
+ # The type of the object. Always `computer_use`.
356
+ #
357
+ # @return [Symbol, :computer_use]
358
+ required :type, const: :computer_use
359
+
360
+ # @!attribute include_screenshots
361
+ # Whether computer tool outputs include screenshots. Defaults to `false`.
362
+ #
363
+ # @return [Boolean, nil]
364
+ optional :include_screenshots, OpenAI::Internal::Type::Boolean
365
+
366
+ # @!method initialize(include_screenshots: nil, type: :computer_use)
367
+ # Browser use in an OpenAI-hosted session.
368
+ #
369
+ # @param include_screenshots [Boolean]
370
+ # Whether computer tool outputs include screenshots. Defaults to `false`.
371
+ #
372
+ # @param type [Symbol, :computer_use]
373
+ # The type of the object. Always `computer_use`.
374
+ end
375
+
350
376
  # @!method self.variants
351
- # @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)]
377
+ # @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)]
352
378
  end
353
379
  end
354
380
  end
@@ -10,12 +10,16 @@ module OpenAI
10
10
  # commands or environment values. See
11
11
  # [reusing a hosted setup](https://developers.openai.com/api/docs/guides/agents-api/tools#reuse-a-hosted-plugin-setup).
12
12
  #
13
- # @overload create(capability_directories: nil, env: nil, files: nil, name: nil, network: nil, packages: nil, plugins: nil, setup_commands: nil, skills: nil, request_options: {})
13
+ # @overload create(capability_directories: nil, desktop: nil, env: nil, files: nil, name: nil, network: nil, packages: nil, plugins: nil, setup_commands: nil, skills: nil, request_options: {})
14
14
  #
15
15
  # @param capability_directories [Array<String>, nil]
16
16
  # Directories that contain capabilities exposed to the agent. Defaults to an empty
17
17
  # list.
18
18
  #
19
+ # @param desktop [OpenAI::Models::Beta::Agents::Environments::TemplateCreateParams::Desktop, nil]
20
+ # Desktop provisioning. Omission or null inherits the template setting, or
21
+ # defaults to disabled.
22
+ #
19
23
  # @param env [Hash{Symbol=>String}, nil]
20
24
  # Environment variables made available to the agent.
21
25
  #
@@ -87,7 +91,7 @@ module OpenAI
87
91
  # values. See
88
92
  # [reusing a hosted setup](https://developers.openai.com/api/docs/guides/agents-api/tools#reuse-a-hosted-plugin-setup).
89
93
  #
90
- # @overload update(environment_template_id, capability_directories: nil, env: nil, files: nil, name: nil, network: nil, packages: nil, plugins: nil, setup_commands: nil, skills: nil, request_options: {})
94
+ # @overload update(environment_template_id, capability_directories: nil, desktop: nil, env: nil, files: nil, name: nil, network: nil, packages: nil, plugins: nil, setup_commands: nil, skills: nil, request_options: {})
91
95
  #
92
96
  # @param environment_template_id [String]
93
97
  # The ID of the reusable environment template.
@@ -95,6 +99,9 @@ module OpenAI
95
99
  # @param capability_directories [Array<String>, nil]
96
100
  # Directories that expose capabilities to the agent.
97
101
  #
102
+ # @param desktop [OpenAI::Models::Beta::Agents::Environments::TemplateUpdateParams::Desktop, nil]
103
+ # Replacement desktop configuration, or null to disable the desktop.
104
+ #
98
105
  # @param env [Hash{Symbol=>String}, nil]
99
106
  # Replacement confidential environment values.
100
107
  #
@@ -18,7 +18,7 @@ module OpenAI
18
18
  # @param session_id [String]
19
19
  # Path param: The ID of the session.
20
20
  #
21
- # @param events [Array<OpenAI::Models::Beta::AgentSessionInputParam::AgentSessionInputMessage, OpenAI::Models::Beta::AgentSessionInputParam::AgentSessionInputCancel, OpenAI::Models::Beta::AgentSessionInputParam::AgentSessionInputToolResult>]
21
+ # @param events [Array<OpenAI::Models::Beta::AgentSessionInputParam::AgentSessionInputComputerUseApprovalRequestResult, OpenAI::Models::Beta::AgentSessionInputParam::AgentSessionInputMessage, OpenAI::Models::Beta::AgentSessionInputParam::AgentSessionInputCancel, OpenAI::Models::Beta::AgentSessionInputParam::AgentSessionInputToolResult>]
22
22
  # Body param: The input events to submit to the session.
23
23
  #
24
24
  # @param idempotency_key [String]
@@ -26,7 +26,7 @@ module OpenAI
26
26
  #
27
27
  # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil]
28
28
  #
29
- # @return [OpenAI::Internal::CursorPage<OpenAI::Models::Beta::AgentSessionMessage, OpenAI::Models::Beta::AgentReasoningItem, OpenAI::Models::Beta::AgentFunctionCallItem, OpenAI::Models::Beta::AgentSessionItem::FunctionCallOutput, OpenAI::Models::Beta::AgentSessionItem::AgentMessage, 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>]
29
+ # @return [OpenAI::Internal::CursorPage<OpenAI::Models::Beta::AgentSessionMessage, OpenAI::Models::Beta::AgentReasoningItem, OpenAI::Models::Beta::AgentFunctionCallItem, OpenAI::Models::Beta::AgentSessionItem::FunctionCallOutput, OpenAI::Models::Beta::AgentSessionItem::AgentMessage, OpenAI::Models::Beta::AgentMcpCallItem, OpenAI::Models::Beta::AgentSessionItem::ComputerUseCall, OpenAI::Models::Beta::AgentSessionItem::ComputerUseApprovalRequest, OpenAI::Models::Beta::AgentSessionItem::ComputerUseApprovalRequestResult, 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>]
30
30
  #
31
31
  # @see OpenAI::Models::Beta::Agents::Sessions::ItemListParams
32
32
  def list(session_id, params = {})
@@ -30,7 +30,7 @@ module OpenAI
30
30
  #
31
31
  # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil]
32
32
  #
33
- # @return [OpenAI::Internal::CursorPage<OpenAI::Models::Beta::AgentSessionMessage, OpenAI::Models::Beta::AgentReasoningItem, OpenAI::Models::Beta::AgentFunctionCallItem, OpenAI::Models::Beta::AgentSessionItem::FunctionCallOutput, OpenAI::Models::Beta::AgentSessionItem::AgentMessage, 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>]
33
+ # @return [OpenAI::Internal::CursorPage<OpenAI::Models::Beta::AgentSessionMessage, OpenAI::Models::Beta::AgentReasoningItem, OpenAI::Models::Beta::AgentFunctionCallItem, OpenAI::Models::Beta::AgentSessionItem::FunctionCallOutput, OpenAI::Models::Beta::AgentSessionItem::AgentMessage, OpenAI::Models::Beta::AgentMcpCallItem, OpenAI::Models::Beta::AgentSessionItem::ComputerUseCall, OpenAI::Models::Beta::AgentSessionItem::ComputerUseApprovalRequest, OpenAI::Models::Beta::AgentSessionItem::ComputerUseApprovalRequestResult, 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>]
34
34
  #
35
35
  # @see OpenAI::Models::Beta::Agents::Sessions::Subagents::ItemListParams
36
36
  def list(subagent_id, params)
@@ -34,7 +34,7 @@ module OpenAI
34
34
  #
35
35
  # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil]
36
36
  #
37
- # @return [OpenAI::Internal::CursorPage<OpenAI::Models::Beta::AgentSessionMessage, OpenAI::Models::Beta::AgentReasoningItem, OpenAI::Models::Beta::AgentFunctionCallItem, OpenAI::Models::Beta::AgentSessionItem::FunctionCallOutput, OpenAI::Models::Beta::AgentSessionItem::AgentMessage, 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>]
37
+ # @return [OpenAI::Internal::CursorPage<OpenAI::Models::Beta::AgentSessionMessage, OpenAI::Models::Beta::AgentReasoningItem, OpenAI::Models::Beta::AgentFunctionCallItem, OpenAI::Models::Beta::AgentSessionItem::FunctionCallOutput, OpenAI::Models::Beta::AgentSessionItem::AgentMessage, OpenAI::Models::Beta::AgentMcpCallItem, OpenAI::Models::Beta::AgentSessionItem::ComputerUseCall, OpenAI::Models::Beta::AgentSessionItem::ComputerUseApprovalRequest, OpenAI::Models::Beta::AgentSessionItem::ComputerUseApprovalRequestResult, 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>]
38
38
  #
39
39
  # @see OpenAI::Models::Beta::Agents::Sessions::Subagents::Turns::ItemListParams
40
40
  def list(turn_id, params)
@@ -46,7 +46,7 @@ module OpenAI
46
46
  # Configuration for generated text. Defaults to the `text` format and medium
47
47
  # verbosity.
48
48
  #
49
- # @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]
49
+ # @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]
50
50
  # Tools available to the agent. Defaults to an empty list.
51
51
  #
52
52
  # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil]
@@ -125,7 +125,7 @@ module OpenAI
125
125
  # @param text [OpenAI::Models::Beta::AgentTextParam, nil]
126
126
  # Configuration for text generated by the agent.
127
127
  #
128
- # @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]
128
+ # @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]
129
129
  # Tools available to the agent.
130
130
  #
131
131
  # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil]
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module OpenAI
4
- VERSION = "0.96.0"
4
+ VERSION = "0.97.0"
5
5
  end
data/lib/openai.rb CHANGED
@@ -465,6 +465,9 @@ require_relative "openai/models/batch_request_counts"
465
465
  require_relative "openai/models/batch_retrieve_params"
466
466
  require_relative "openai/models/batch_usage"
467
467
  require_relative "openai/models/beta/agent"
468
+ require_relative "openai/models/beta/agent_browser_authentication_cancel_param"
469
+ require_relative "openai/models/beta/agent_browser_authentication_submit_param"
470
+ require_relative "openai/models/beta/agent_browser_origin_access_param"
468
471
  require_relative "openai/models/beta/agent_close_subagent_call_item"
469
472
  require_relative "openai/models/beta/agent_command_execution_item"
470
473
  require_relative "openai/models/beta/agent_content"
@@ -106,7 +106,8 @@ module OpenAI
106
106
  OpenAI::Beta::PersistedAgentTool::ToolSearch::OrHash,
107
107
  OpenAI::Beta::PersistedAgentTool::ProgrammaticToolCalling::OrHash,
108
108
  OpenAI::Beta::PersistedAgentTool::Mcp::OrHash,
109
- OpenAI::Beta::PersistedAgentTool::WebSearch::OrHash
109
+ OpenAI::Beta::PersistedAgentTool::WebSearch::OrHash,
110
+ OpenAI::Beta::PersistedAgentTool::ComputerUse::OrHash
110
111
  )
111
112
  ],
112
113
 
@@ -0,0 +1,53 @@
1
+ # typed: strong
2
+
3
+ module OpenAI
4
+ module Models
5
+
6
+ module Beta
7
+
8
+ class AgentBrowserAuthenticationCancelParam < OpenAI::Internal::Type::BaseModel
9
+
10
+ OrHash = T.type_alias do
11
+ T.any(
12
+ OpenAI::Beta::AgentBrowserAuthenticationCancelParam,
13
+ OpenAI::Internal::AnyHash
14
+ )
15
+ end
16
+
17
+ sig { returns(Symbol) }
18
+ attr_accessor :action
19
+
20
+ sig { returns(Symbol) }
21
+ attr_accessor :type
22
+
23
+ sig do
24
+ params(
25
+
26
+ action: Symbol,
27
+
28
+ type: Symbol
29
+ )
30
+ .returns(T.attached_class)
31
+ end
32
+ def self.new(
33
+
34
+ action: :cancel,
35
+
36
+ type: :browser_authentication
37
+ )
38
+ end
39
+
40
+ sig do
41
+ override.returns(
42
+ {action: Symbol, type: Symbol}
43
+ )
44
+ end
45
+ def to_hash
46
+ end
47
+
48
+ end
49
+
50
+ end
51
+
52
+ end
53
+ end