openai 0.127.0 → 0.128.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 (54) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +17 -0
  3. data/README.md +1 -1
  4. data/lib/openai/helpers/agents/session_stream.rb +8 -3
  5. data/lib/openai/helpers/beta/agents/result.rb +12 -4
  6. data/lib/openai/models/beta/agent_session.rb +1 -43
  7. data/lib/openai/models/beta/agent_session_event.rb +1 -4
  8. data/lib/openai/models/beta/agents/session_create_params.rb +1 -33
  9. data/lib/openai/models/beta/agents/session_update_params.rb +1 -33
  10. data/lib/openai/models/beta/session_turn_error.rb +0 -3
  11. data/lib/openai/models/csam_moderation.rb +131 -0
  12. data/lib/openai/models/csam_moderation_response.rb +27 -0
  13. data/lib/openai/models/live/mcp_require_approval_filter.rb +28 -0
  14. data/lib/openai/models/live/mcp_tool.rb +181 -0
  15. data/lib/openai/models/live/mcp_tool_filter.rb +28 -0
  16. data/lib/openai/models/live/responses_delegation_config.rb +7 -14
  17. data/lib/openai/models/live/responses_delegation_update_config.rb +7 -14
  18. data/lib/openai/models.rb +4 -0
  19. data/lib/openai/resources/beta/agents/sessions/events.rb +1 -1
  20. data/lib/openai/resources/beta/agents/sessions.rb +3 -15
  21. data/lib/openai/version.rb +1 -1
  22. data/lib/openai.rb +5 -1
  23. data/rbi/openai/models/beta/agent_session.rbi +1 -70
  24. data/rbi/openai/models/beta/agent_session_event.rbi +0 -1
  25. data/rbi/openai/models/beta/agents/session_create_params.rbi +0 -56
  26. data/rbi/openai/models/beta/agents/session_update_params.rbi +0 -56
  27. data/rbi/openai/models/beta/session_turn_error.rbi +0 -3
  28. data/rbi/openai/models/csam_moderation.rbi +248 -0
  29. data/rbi/openai/models/csam_moderation_response.rbi +56 -0
  30. data/rbi/openai/models/live/mcp_require_approval_filter.rbi +64 -0
  31. data/rbi/openai/models/live/mcp_tool.rbi +253 -0
  32. data/rbi/openai/models/live/mcp_tool_filter.rbi +58 -0
  33. data/rbi/openai/models/live/responses_delegation_config.rbi +7 -39
  34. data/rbi/openai/models/live/responses_delegation_update_config.rbi +7 -39
  35. data/rbi/openai/models.rbi +4 -0
  36. data/rbi/openai/resources/beta/agents/sessions.rbi +0 -12
  37. data/sig/openai/models/beta/agent_session.rbs +3 -44
  38. data/sig/openai/models/beta/agent_session_event.rbs +0 -1
  39. data/sig/openai/models/beta/agents/session_create_params.rbs +0 -23
  40. data/sig/openai/models/beta/agents/session_update_params.rbs +0 -23
  41. data/sig/openai/models/beta/session_turn_error.rbs +0 -4
  42. data/sig/openai/models/csam_moderation.rbs +113 -0
  43. data/sig/openai/models/csam_moderation_response.rbs +30 -0
  44. data/sig/openai/models/live/mcp_require_approval_filter.rbs +33 -0
  45. data/sig/openai/models/live/mcp_tool.rbs +159 -0
  46. data/sig/openai/models/live/mcp_tool_filter.rbs +27 -0
  47. data/sig/openai/models/live/responses_delegation_config.rbs +5 -11
  48. data/sig/openai/models/live/responses_delegation_update_config.rbs +5 -11
  49. data/sig/openai/models.rbs +4 -0
  50. data/sig/openai/resources/beta/agents/sessions.rbs +0 -3
  51. metadata +16 -4
  52. data/lib/openai/models/beta/agent_session_budget_reached_event.rb +0 -48
  53. data/rbi/openai/models/beta/agent_session_budget_reached_event.rbi +0 -83
  54. data/sig/openai/models/beta/agent_session_budget_reached_event.rbs +0 -52
@@ -0,0 +1,253 @@
1
+ # typed: strong
2
+
3
+ module OpenAI
4
+ module Models
5
+
6
+ module Live
7
+
8
+ class McpTool < OpenAI::Internal::Type::BaseModel
9
+
10
+ OrHash = T.type_alias do
11
+ T.any(
12
+ OpenAI::Live::McpTool,
13
+ OpenAI::Internal::AnyHash
14
+ )
15
+ end
16
+
17
+ sig { returns(Symbol) }
18
+ attr_accessor :type
19
+
20
+ # The tool invocation context(s).
21
+ sig { returns(T.nilable(T::Array[OpenAI::Live::McpTool::AllowedCaller::OrSymbol])) }
22
+ attr_accessor :allowed_callers
23
+
24
+ # A list of MCP tool names that are allowed for this server.
25
+ sig { returns(T.nilable(T.any(T::Array[String], OpenAI::Live::McpToolFilter))) }
26
+ attr_accessor :allowed_tools
27
+
28
+ # The ID of a built-in MCP connector. This field is deprecated for models released
29
+ # after September 1, 2026. Use `server_url` to connect to a remote MCP server, or
30
+ # `tunnel_id` to connect to a local MCP server.
31
+ sig { returns(T.nilable(String)) }
32
+ attr_accessor :connector_id
33
+
34
+ # Whether this MCP tool should be deferred and discovered via tool search.
35
+ sig { returns(T.nilable(T::Boolean)) }
36
+ attr_accessor :defer_loading
37
+
38
+ # Controls which MCP tools require explicit user approval before execution.
39
+ sig {
40
+ returns(
41
+ T.nilable(
42
+ T.any(
43
+ OpenAI::Live::McpRequireApprovalFilter,
44
+ OpenAI::Live::McpTool::RequireApproval::LiveMCPRequireApprovalAPIEnum::OrSymbol
45
+ )
46
+ )
47
+ )
48
+ }
49
+ attr_accessor :require_approval
50
+
51
+ # An optional human-readable description of the MCP server.
52
+ sig { returns(T.nilable(String)) }
53
+ attr_accessor :server_description
54
+
55
+ # A label used to identify the MCP server.
56
+ sig { returns(T.nilable(String)) }
57
+ attr_reader :server_label
58
+
59
+ sig { params(server_label: String).void }
60
+ attr_writer :server_label
61
+
62
+ # The URL of the MCP server to connect to.
63
+ sig { returns(T.nilable(String)) }
64
+ attr_accessor :server_url
65
+
66
+ # The Secure MCP Tunnel ID to use instead of a direct server URL.
67
+ sig { returns(T.nilable(String)) }
68
+ attr_accessor :tunnel_id
69
+
70
+ # This value is omitted from returned Live session data.
71
+ sig { returns(T.nilable(String)) }
72
+ attr_accessor :authorization
73
+
74
+ # Optional HTTP headers to send when connecting to the MCP server.
75
+ sig { returns(T.nilable(T::Hash[Symbol, String])) }
76
+ attr_accessor :headers
77
+
78
+ sig do
79
+ params(
80
+
81
+ allowed_callers: T.nilable(T::Array[OpenAI::Live::McpTool::AllowedCaller::OrSymbol]),
82
+
83
+ allowed_tools: T.nilable(T.any(T::Array[String], OpenAI::Live::McpToolFilter::OrHash)),
84
+
85
+ authorization: T.nilable(String),
86
+
87
+ connector_id: T.nilable(String),
88
+
89
+ defer_loading: T.nilable(T::Boolean),
90
+
91
+ headers: T.nilable(T::Hash[Symbol, String]),
92
+
93
+ require_approval: T.nilable(
94
+ T.any(
95
+ OpenAI::Live::McpRequireApprovalFilter::OrHash,
96
+ OpenAI::Live::McpTool::RequireApproval::LiveMCPRequireApprovalAPIEnum::OrSymbol
97
+ )
98
+ ),
99
+
100
+ server_description: T.nilable(String),
101
+
102
+ server_label: String,
103
+
104
+ server_url: T.nilable(String),
105
+
106
+ tunnel_id: T.nilable(String),
107
+
108
+ type: Symbol
109
+ )
110
+ .returns(T.attached_class)
111
+ end
112
+ def self.new(
113
+
114
+ # The tool invocation context(s).
115
+ allowed_callers: nil,
116
+
117
+ # A list of MCP tool names that are allowed for this server.
118
+ allowed_tools: nil,
119
+
120
+ # This value is omitted from returned Live session data.
121
+ authorization: nil,
122
+
123
+ # The ID of a built-in MCP connector. This field is deprecated for models released
124
+ # after September 1, 2026. Use `server_url` to connect to a remote MCP server, or
125
+ # `tunnel_id` to connect to a local MCP server.
126
+ connector_id: nil,
127
+
128
+ # Whether this MCP tool should be deferred and discovered via tool search.
129
+ defer_loading: nil,
130
+
131
+ # Optional HTTP headers to send when connecting to the MCP server.
132
+ headers: nil,
133
+
134
+ # Controls which MCP tools require explicit user approval before execution.
135
+ require_approval: nil,
136
+
137
+ # An optional human-readable description of the MCP server.
138
+ server_description: nil,
139
+
140
+ # A label used to identify the MCP server.
141
+ server_label: nil,
142
+
143
+ # The URL of the MCP server to connect to.
144
+ server_url: nil,
145
+
146
+ # The Secure MCP Tunnel ID to use instead of a direct server URL.
147
+ tunnel_id: nil,
148
+
149
+ type: :mcp
150
+ )
151
+ end
152
+
153
+ sig do
154
+ override.returns(
155
+ {
156
+ type: Symbol,
157
+ allowed_callers: T.nilable(T::Array[OpenAI::Live::McpTool::AllowedCaller::OrSymbol]),
158
+ allowed_tools: T.nilable(T.any(T::Array[String], OpenAI::Live::McpToolFilter)),
159
+ authorization: T.nilable(String),
160
+ connector_id: T.nilable(String),
161
+ defer_loading: T.nilable(T::Boolean),
162
+ headers: T.nilable(T::Hash[Symbol, String]),
163
+ require_approval: T.nilable(
164
+ T.any(
165
+ OpenAI::Live::McpRequireApprovalFilter,
166
+ OpenAI::Live::McpTool::RequireApproval::LiveMCPRequireApprovalAPIEnum::OrSymbol
167
+ )
168
+ ),
169
+ server_description: T.nilable(String),
170
+ server_label: String,
171
+ server_url: T.nilable(String),
172
+ tunnel_id: T.nilable(String)
173
+ }
174
+ )
175
+ end
176
+ def to_hash
177
+ end
178
+
179
+ module AllowedCaller
180
+ extend OpenAI::Internal::Type::Enum
181
+
182
+ TaggedSymbol = T.type_alias { T.all(Symbol, OpenAI::Live::McpTool::AllowedCaller) }
183
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
184
+
185
+ DIRECT = T.let(:direct, OpenAI::Live::McpTool::AllowedCaller::TaggedSymbol)
186
+ PROGRAMMATIC = T.let(:programmatic, OpenAI::Live::McpTool::AllowedCaller::TaggedSymbol)
187
+
188
+ sig { override.returns(T::Array[OpenAI::Live::McpTool::AllowedCaller::TaggedSymbol]) }
189
+ def self.values
190
+ end
191
+ end
192
+
193
+ # A list of MCP tool names that are allowed for this server.
194
+ module AllowedTools
195
+ extend OpenAI::Internal::Type::Union
196
+
197
+ Variants = T.type_alias { T.any(T::Array[String], OpenAI::Live::McpToolFilter) }
198
+
199
+ sig { override.returns(T::Array[OpenAI::Live::McpTool::AllowedTools::Variants]) }
200
+ def self.variants
201
+ end
202
+
203
+ StringArray = T.let(
204
+ OpenAI::Internal::Type::ArrayOf[String],
205
+ OpenAI::Internal::Type::Converter
206
+ )
207
+
208
+ end
209
+
210
+ # Controls which MCP tools require explicit user approval before execution.
211
+ module RequireApproval
212
+ extend OpenAI::Internal::Type::Union
213
+
214
+ Variants = T.type_alias {
215
+ T.any(
216
+ OpenAI::Live::McpRequireApprovalFilter,
217
+ OpenAI::Live::McpTool::RequireApproval::LiveMCPRequireApprovalAPIEnum::TaggedSymbol
218
+ )
219
+ }
220
+
221
+ # Default approval behavior for MCP tool calls.
222
+ module LiveMCPRequireApprovalAPIEnum
223
+ extend OpenAI::Internal::Type::Enum
224
+
225
+ TaggedSymbol = T.type_alias {
226
+ T.all(Symbol, OpenAI::Live::McpTool::RequireApproval::LiveMCPRequireApprovalAPIEnum)
227
+ }
228
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
229
+
230
+ ALWAYS = T.let(:always, OpenAI::Live::McpTool::RequireApproval::LiveMCPRequireApprovalAPIEnum::TaggedSymbol)
231
+ NEVER = T.let(:never, OpenAI::Live::McpTool::RequireApproval::LiveMCPRequireApprovalAPIEnum::TaggedSymbol)
232
+
233
+ sig {
234
+ override.returns(
235
+ T::Array[OpenAI::Live::McpTool::RequireApproval::LiveMCPRequireApprovalAPIEnum::TaggedSymbol]
236
+ )
237
+ }
238
+ def self.values
239
+ end
240
+ end
241
+
242
+ sig { override.returns(T::Array[OpenAI::Live::McpTool::RequireApproval::Variants]) }
243
+ def self.variants
244
+ end
245
+
246
+ end
247
+
248
+ end
249
+
250
+ end
251
+
252
+ end
253
+ end
@@ -0,0 +1,58 @@
1
+ # typed: strong
2
+
3
+ module OpenAI
4
+ module Models
5
+
6
+ module Live
7
+
8
+ class McpToolFilter < OpenAI::Internal::Type::BaseModel
9
+
10
+ OrHash = T.type_alias do
11
+ T.any(
12
+ OpenAI::Live::McpToolFilter,
13
+ OpenAI::Internal::AnyHash
14
+ )
15
+ end
16
+
17
+ # Whether to allow only read-only tools for matching entries.
18
+ sig { returns(T.nilable(T::Boolean)) }
19
+ attr_accessor :read_only
20
+
21
+ # A list of tool names to match against.
22
+ sig { returns(T.nilable(T::Array[String])) }
23
+ attr_accessor :tool_names
24
+
25
+ sig do
26
+ params(
27
+
28
+ read_only: T.nilable(T::Boolean),
29
+
30
+ tool_names: T.nilable(T::Array[String])
31
+ )
32
+ .returns(T.attached_class)
33
+ end
34
+ def self.new(
35
+
36
+ # Whether to allow only read-only tools for matching entries.
37
+ read_only: nil,
38
+
39
+ # A list of tool names to match against.
40
+
41
+ tool_names: nil
42
+ )
43
+ end
44
+
45
+ sig do
46
+ override.returns(
47
+ {read_only: T.nilable(T::Boolean), tool_names: T.nilable(T::Array[String])}
48
+ )
49
+ end
50
+ def to_hash
51
+ end
52
+
53
+ end
54
+
55
+ end
56
+
57
+ end
58
+ end
@@ -113,7 +113,7 @@ module OpenAI
113
113
  OpenAI::Live::ResponsesDelegationConfig::Tool::CodeInterpreter,
114
114
  OpenAI::Live::ResponsesDelegationConfig::Tool::Shell,
115
115
  OpenAI::Live::ResponsesDelegationConfig::Tool::ImageGeneration,
116
- OpenAI::Live::ResponsesDelegationConfig::Tool::Mcp,
116
+ OpenAI::Live::McpTool,
117
117
  OpenAI::Live::ResponsesDelegationConfig::Tool::Custom,
118
118
  OpenAI::Live::ResponsesDelegationConfig::Tool::Namespace,
119
119
  OpenAI::Live::ResponsesDelegationConfig::Tool::ToolSearch,
@@ -137,7 +137,7 @@ module OpenAI
137
137
  OpenAI::Live::ResponsesDelegationConfig::Tool::CodeInterpreter::OrHash,
138
138
  OpenAI::Live::ResponsesDelegationConfig::Tool::Shell::OrHash,
139
139
  OpenAI::Live::ResponsesDelegationConfig::Tool::ImageGeneration::OrHash,
140
- OpenAI::Live::ResponsesDelegationConfig::Tool::Mcp::OrHash,
140
+ OpenAI::Live::McpTool::OrHash,
141
141
  OpenAI::Live::ResponsesDelegationConfig::Tool::Custom::OrHash,
142
142
  OpenAI::Live::ResponsesDelegationConfig::Tool::Namespace::OrHash,
143
143
  OpenAI::Live::ResponsesDelegationConfig::Tool::ToolSearch::OrHash,
@@ -195,7 +195,7 @@ module OpenAI
195
195
  OpenAI::Live::ResponsesDelegationConfig::Tool::CodeInterpreter::OrHash,
196
196
  OpenAI::Live::ResponsesDelegationConfig::Tool::Shell::OrHash,
197
197
  OpenAI::Live::ResponsesDelegationConfig::Tool::ImageGeneration::OrHash,
198
- OpenAI::Live::ResponsesDelegationConfig::Tool::Mcp::OrHash,
198
+ OpenAI::Live::McpTool::OrHash,
199
199
  OpenAI::Live::ResponsesDelegationConfig::Tool::Custom::OrHash,
200
200
  OpenAI::Live::ResponsesDelegationConfig::Tool::Namespace::OrHash,
201
201
  OpenAI::Live::ResponsesDelegationConfig::Tool::ToolSearch::OrHash,
@@ -278,7 +278,7 @@ module OpenAI
278
278
  OpenAI::Live::ResponsesDelegationConfig::Tool::CodeInterpreter,
279
279
  OpenAI::Live::ResponsesDelegationConfig::Tool::Shell,
280
280
  OpenAI::Live::ResponsesDelegationConfig::Tool::ImageGeneration,
281
- OpenAI::Live::ResponsesDelegationConfig::Tool::Mcp,
281
+ OpenAI::Live::McpTool,
282
282
  OpenAI::Live::ResponsesDelegationConfig::Tool::Custom,
283
283
  OpenAI::Live::ResponsesDelegationConfig::Tool::Namespace,
284
284
  OpenAI::Live::ResponsesDelegationConfig::Tool::ToolSearch,
@@ -1647,6 +1647,8 @@ module OpenAI
1647
1647
  module Tool
1648
1648
  extend OpenAI::Internal::Type::Union
1649
1649
 
1650
+ Mcp = ::OpenAI::Models::Live::McpTool
1651
+
1650
1652
  Variants = T.type_alias {
1651
1653
  T.any(
1652
1654
  OpenAI::Live::FunctionTool,
@@ -1655,7 +1657,7 @@ module OpenAI
1655
1657
  OpenAI::Live::ResponsesDelegationConfig::Tool::CodeInterpreter,
1656
1658
  OpenAI::Live::ResponsesDelegationConfig::Tool::Shell,
1657
1659
  OpenAI::Live::ResponsesDelegationConfig::Tool::ImageGeneration,
1658
- OpenAI::Live::ResponsesDelegationConfig::Tool::Mcp,
1660
+ OpenAI::Live::McpTool,
1659
1661
  OpenAI::Live::ResponsesDelegationConfig::Tool::Custom,
1660
1662
  OpenAI::Live::ResponsesDelegationConfig::Tool::Namespace,
1661
1663
  OpenAI::Live::ResponsesDelegationConfig::Tool::ToolSearch,
@@ -2539,40 +2541,6 @@ module OpenAI
2539
2541
 
2540
2542
  end
2541
2543
 
2542
- class Mcp < OpenAI::Internal::Type::BaseModel
2543
- OrHash = T.type_alias do
2544
- T.any(
2545
- OpenAI::Live::ResponsesDelegationConfig::Tool::Mcp,
2546
- OpenAI::Internal::AnyHash
2547
- )
2548
- end
2549
-
2550
- sig { returns(Symbol) }
2551
- attr_accessor :type
2552
-
2553
- sig do
2554
- params(
2555
-
2556
- type: Symbol
2557
- )
2558
- .returns(T.attached_class)
2559
- end
2560
- def self.new(
2561
-
2562
- type: :mcp
2563
- )
2564
- end
2565
-
2566
- sig do
2567
- override.returns(
2568
- {type: Symbol}
2569
- )
2570
- end
2571
- def to_hash
2572
- end
2573
-
2574
- end
2575
-
2576
2544
  class Custom < OpenAI::Internal::Type::BaseModel
2577
2545
  OrHash = T.type_alias do
2578
2546
  T.any(
@@ -117,7 +117,7 @@ module OpenAI
117
117
  OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::CodeInterpreter,
118
118
  OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::Shell,
119
119
  OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::ImageGeneration,
120
- OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::Mcp,
120
+ OpenAI::Live::McpTool,
121
121
  OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::Custom,
122
122
  OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::Namespace,
123
123
  OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::ToolSearch,
@@ -141,7 +141,7 @@ module OpenAI
141
141
  OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::CodeInterpreter::OrHash,
142
142
  OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::Shell::OrHash,
143
143
  OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::ImageGeneration::OrHash,
144
- OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::Mcp::OrHash,
144
+ OpenAI::Live::McpTool::OrHash,
145
145
  OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::Custom::OrHash,
146
146
  OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::Namespace::OrHash,
147
147
  OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::ToolSearch::OrHash,
@@ -199,7 +199,7 @@ module OpenAI
199
199
  OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::CodeInterpreter::OrHash,
200
200
  OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::Shell::OrHash,
201
201
  OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::ImageGeneration::OrHash,
202
- OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::Mcp::OrHash,
202
+ OpenAI::Live::McpTool::OrHash,
203
203
  OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::Custom::OrHash,
204
204
  OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::Namespace::OrHash,
205
205
  OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::ToolSearch::OrHash,
@@ -283,7 +283,7 @@ module OpenAI
283
283
  OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::CodeInterpreter,
284
284
  OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::Shell,
285
285
  OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::ImageGeneration,
286
- OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::Mcp,
286
+ OpenAI::Live::McpTool,
287
287
  OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::Custom,
288
288
  OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::Namespace,
289
289
  OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::ToolSearch,
@@ -1671,6 +1671,8 @@ module OpenAI
1671
1671
  module Tool
1672
1672
  extend OpenAI::Internal::Type::Union
1673
1673
 
1674
+ Mcp = ::OpenAI::Models::Live::McpTool
1675
+
1674
1676
  Variants = T.type_alias {
1675
1677
  T.any(
1676
1678
  OpenAI::Live::FunctionTool,
@@ -1679,7 +1681,7 @@ module OpenAI
1679
1681
  OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::CodeInterpreter,
1680
1682
  OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::Shell,
1681
1683
  OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::ImageGeneration,
1682
- OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::Mcp,
1684
+ OpenAI::Live::McpTool,
1683
1685
  OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::Custom,
1684
1686
  OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::Namespace,
1685
1687
  OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::ToolSearch,
@@ -2636,40 +2638,6 @@ module OpenAI
2636
2638
 
2637
2639
  end
2638
2640
 
2639
- class Mcp < OpenAI::Internal::Type::BaseModel
2640
- OrHash = T.type_alias do
2641
- T.any(
2642
- OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::Mcp,
2643
- OpenAI::Internal::AnyHash
2644
- )
2645
- end
2646
-
2647
- sig { returns(Symbol) }
2648
- attr_accessor :type
2649
-
2650
- sig do
2651
- params(
2652
-
2653
- type: Symbol
2654
- )
2655
- .returns(T.attached_class)
2656
- end
2657
- def self.new(
2658
-
2659
- type: :mcp
2660
- )
2661
- end
2662
-
2663
- sig do
2664
- override.returns(
2665
- {type: Symbol}
2666
- )
2667
- end
2668
- def to_hash
2669
- end
2670
-
2671
- end
2672
-
2673
2641
  class Custom < OpenAI::Internal::Type::BaseModel
2674
2642
  OrHash = T.type_alias do
2675
2643
  T.any(
@@ -66,6 +66,10 @@ module OpenAI
66
66
 
67
67
  CreateEmbeddingResponse = OpenAI::Models::CreateEmbeddingResponse
68
68
 
69
+ CsamModeration = OpenAI::Models::CsamModeration
70
+
71
+ CsamModerationResponse = OpenAI::Models::CsamModerationResponse
72
+
69
73
  CustomToolInputFormat = OpenAI::Models::CustomToolInputFormat
70
74
 
71
75
  Decision = OpenAI::Models::Decision
@@ -46,7 +46,6 @@ module OpenAI
46
46
  metadata: T.nilable(T::Hash[Symbol, String]),
47
47
  prompt_cache_options: T.nilable(OpenAI::Beta::Agents::SessionCreateParams::PromptCacheOptions::OrHash),
48
48
  review: OpenAI::Beta::Agents::SessionCreateParams::Review::OrSymbol,
49
- spend_control: T.nilable(OpenAI::Beta::Agents::SessionCreateParams::SpendControl::OrHash),
50
49
  stream_options: OpenAI::Beta::Agents::SessionCreateParams::StreamOptions::OrHash,
51
50
  vault_ids: T.nilable(T::Array[String]),
52
51
  stream: T.noreturn,
@@ -76,9 +75,6 @@ module OpenAI
76
75
  prompt_cache_options: nil,
77
76
  # Action review mode. Omit to use none.
78
77
  review: nil,
79
- # Optional spending limit in USD cents. Omission or null creates an unlimited
80
- # session.
81
- spend_control: nil,
82
78
  # Options for the event stream. Only allowed when `stream` is `true`.
83
79
  stream_options: nil,
84
80
  # The IDs of vaults made available to the session.
@@ -111,7 +107,6 @@ module OpenAI
111
107
  metadata: T.nilable(T::Hash[Symbol, String]),
112
108
  prompt_cache_options: T.nilable(OpenAI::Beta::Agents::SessionCreateParams::PromptCacheOptions::OrHash),
113
109
  review: OpenAI::Beta::Agents::SessionCreateParams::Review::OrSymbol,
114
- spend_control: T.nilable(OpenAI::Beta::Agents::SessionCreateParams::SpendControl::OrHash),
115
110
  stream_options: OpenAI::Beta::Agents::SessionCreateParams::StreamOptions::OrHash,
116
111
  vault_ids: T.nilable(T::Array[String]),
117
112
  stream: T.noreturn,
@@ -143,9 +138,6 @@ module OpenAI
143
138
  prompt_cache_options: nil,
144
139
  # Action review mode. Omit to use none.
145
140
  review: nil,
146
- # Optional spending limit in USD cents. Omission or null creates an unlimited
147
- # session.
148
- spend_control: nil,
149
141
  # Options for the event stream. Only allowed when `stream` is `true`.
150
142
  stream_options: nil,
151
143
  # The IDs of vaults made available to the session.
@@ -182,7 +174,6 @@ module OpenAI
182
174
  metadata: T.nilable(T::Hash[Symbol, String]),
183
175
  prompt_cache_options: T.nilable(OpenAI::Beta::Agents::SessionUpdateParams::PromptCacheOptions::OrHash),
184
176
  review: OpenAI::Beta::Agents::SessionUpdateParams::Review::OrSymbol,
185
- spend_control: T.nilable(OpenAI::Beta::Agents::SessionUpdateParams::SpendControl::OrHash),
186
177
  request_options: OpenAI::RequestOptions::OrHash
187
178
  )
188
179
  .returns(OpenAI::Beta::AgentSession)
@@ -202,9 +193,6 @@ module OpenAI
202
193
  # Default action review for new root turns. Existing turns and their subagents
203
194
  # keep their review mode.
204
195
  review: nil,
205
- # Omit to retain the limit; null or a null limit removes it without resetting
206
- # spend.
207
- spend_control: nil,
208
196
  request_options: {}
209
197
  )
210
198
  end
@@ -16,8 +16,7 @@ module OpenAI
16
16
  usage: OpenAI::Beta::TokenUsage?,
17
17
  vault_ids: ::Array[String],
18
18
  ?prompt_cache_options: OpenAI::Beta::AgentSession::PromptCacheOptions?,
19
- ?review: OpenAI::Models::Beta::AgentSession::review,
20
- ?spend_control: OpenAI::Beta::AgentSession::SpendControl
19
+ ?review: OpenAI::Models::Beta::AgentSession::review
21
20
  }
22
21
 
23
22
  class AgentSession < OpenAI::Internal::Type::BaseModel
@@ -71,18 +70,6 @@ module OpenAI
71
70
  OpenAI::Models::Beta::AgentSession::review
72
71
  ) -> OpenAI::Models::Beta::AgentSession::review
73
72
 
74
- # Spending limit and best-effort consumption, in USD cents. Present when
75
- # spending-control visibility is enabled; limit is null without a cap. Older
76
- # server responses may omit this object.
77
- attr_reader spend_control: OpenAI::Beta::AgentSession::SpendControl?
78
-
79
- # Spending limit and best-effort consumption, in USD cents. Present when
80
- # spending-control visibility is enabled; limit is null without a cap. Older
81
- # server responses may omit this object.
82
- def spend_control=: (
83
- OpenAI::Beta::AgentSession::SpendControl
84
- ) -> OpenAI::Beta::AgentSession::SpendControl
85
-
86
73
  # @param id
87
74
  # The ID of the session.
88
75
  # @param agent
@@ -111,10 +98,6 @@ module OpenAI
111
98
  # @param review
112
99
  # Review applied to eligible actions in this session. Omitted when review is none
113
100
  # and automatic review is not enabled. Omission means none.
114
- # @param spend_control
115
- # Spending limit and best-effort consumption, in USD cents. Present when
116
- # spending-control visibility is enabled; limit is null without a cap. Older
117
- # server responses may omit this object.
118
101
  # @param object
119
102
  # The object type. Always `agent.session`.
120
103
  def initialize: (
@@ -131,7 +114,6 @@ module OpenAI
131
114
  vault_ids: ::Array[String],
132
115
  ?prompt_cache_options: OpenAI::Beta::AgentSession::PromptCacheOptions?,
133
116
  ?review: OpenAI::Models::Beta::AgentSession::review,
134
- ?spend_control: OpenAI::Beta::AgentSession::SpendControl,
135
117
  ?object: :"agent.session"
136
118
  ) -> void
137
119
 
@@ -149,8 +131,7 @@ module OpenAI
149
131
  usage: OpenAI::Beta::TokenUsage?,
150
132
  vault_ids: ::Array[String],
151
133
  ?prompt_cache_options: OpenAI::Beta::AgentSession::PromptCacheOptions?,
152
- ?review: OpenAI::Models::Beta::AgentSession::review,
153
- ?spend_control: OpenAI::Beta::AgentSession::SpendControl
134
+ ?review: OpenAI::Models::Beta::AgentSession::review
154
135
  }
155
136
 
156
137
  type agent =
@@ -699,8 +680,7 @@ module OpenAI
699
680
  def self?.variants: -> ::Array[OpenAI::Models::Beta::AgentSession::required_action]
700
681
  end
701
682
 
702
- type status =
703
- :idle | :in_progress | :requires_action | :failed | :budget_reached
683
+ type status = :idle | :in_progress | :requires_action | :failed
704
684
 
705
685
  module Status
706
686
  extend OpenAI::Internal::Type::Enum
@@ -717,9 +697,6 @@ module OpenAI
717
697
  # The session failed.
718
698
  FAILED: :failed
719
699
 
720
- # The session is paused because its spending limit was reached.
721
- BUDGET_REACHED: :budget_reached
722
-
723
700
  def self?.values: -> ::Array[OpenAI::Models::Beta::AgentSession::status]
724
701
  end
725
702
 
@@ -759,24 +736,6 @@ module OpenAI
759
736
 
760
737
  def self?.values: -> ::Array[OpenAI::Models::Beta::AgentSession::review]
761
738
  end
762
-
763
- type spend_control = { consumed: Integer?, limit: Integer? }
764
-
765
- class SpendControl < OpenAI::Internal::Type::BaseModel
766
- # Best-effort recorded spend floored to whole USD cents, or null when unavailable.
767
- attr_accessor consumed: Integer?
768
-
769
- # The configured positive limit in USD cents, or null when unlimited.
770
- attr_accessor limit: Integer?
771
-
772
- # @param consumed
773
- # Best-effort recorded spend floored to whole USD cents, or null when unavailable.
774
- # @param limit
775
- # The configured positive limit in USD cents, or null when unlimited.
776
- def initialize: (consumed: Integer?, limit: Integer?) -> void
777
-
778
- def to_hash: -> { consumed: Integer?, limit: Integer? }
779
- end
780
739
  end
781
740
  end
782
741
  end
@@ -16,7 +16,6 @@ module OpenAI
16
16
  | OpenAI::Beta::AgentSessionTurnCancelledEvent
17
17
  | OpenAI::Beta::AgentSessionTurnItemAddedEvent
18
18
  | OpenAI::Beta::AgentSessionIdleEvent
19
- | OpenAI::Beta::AgentSessionBudgetReachedEvent
20
19
  | OpenAI::Beta::AgentSessionInProgressEvent
21
20
  | OpenAI::Beta::AgentSessionRequiresActionEvent
22
21
  | OpenAI::Beta::AgentSessionFailedEvent