openai 0.126.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 (47) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +24 -0
  3. data/README.md +1 -1
  4. data/lib/openai/helpers/agents/session_stream.rb +8 -0
  5. data/lib/openai/helpers/beta/agents/result.rb +14 -1
  6. data/lib/openai/models/beta/agent_session.rb +1 -37
  7. data/lib/openai/models/beta/agents/session_create_params.rb +1 -33
  8. data/lib/openai/models/beta/agents/session_update_params.rb +1 -33
  9. data/lib/openai/models/beta/session_turn_error.rb +0 -3
  10. data/lib/openai/models/csam_moderation.rb +131 -0
  11. data/lib/openai/models/csam_moderation_response.rb +27 -0
  12. data/lib/openai/models/live/mcp_require_approval_filter.rb +28 -0
  13. data/lib/openai/models/live/mcp_tool.rb +181 -0
  14. data/lib/openai/models/live/mcp_tool_filter.rb +28 -0
  15. data/lib/openai/models/live/responses_delegation_config.rb +7 -14
  16. data/lib/openai/models/live/responses_delegation_update_config.rb +7 -14
  17. data/lib/openai/models.rb +4 -0
  18. data/lib/openai/resources/beta/agents/sessions.rb +3 -15
  19. data/lib/openai/version.rb +1 -1
  20. data/lib/openai.rb +5 -0
  21. data/rbi/openai/models/beta/agent_session.rbi +1 -64
  22. data/rbi/openai/models/beta/agents/session_create_params.rbi +0 -56
  23. data/rbi/openai/models/beta/agents/session_update_params.rbi +0 -56
  24. data/rbi/openai/models/beta/session_turn_error.rbi +0 -3
  25. data/rbi/openai/models/csam_moderation.rbi +248 -0
  26. data/rbi/openai/models/csam_moderation_response.rbi +56 -0
  27. data/rbi/openai/models/live/mcp_require_approval_filter.rbi +64 -0
  28. data/rbi/openai/models/live/mcp_tool.rbi +253 -0
  29. data/rbi/openai/models/live/mcp_tool_filter.rbi +58 -0
  30. data/rbi/openai/models/live/responses_delegation_config.rbi +7 -39
  31. data/rbi/openai/models/live/responses_delegation_update_config.rbi +7 -39
  32. data/rbi/openai/models.rbi +4 -0
  33. data/rbi/openai/resources/beta/agents/sessions.rbi +0 -12
  34. data/sig/openai/models/beta/agent_session.rbs +2 -36
  35. data/sig/openai/models/beta/agents/session_create_params.rbs +0 -23
  36. data/sig/openai/models/beta/agents/session_update_params.rbs +0 -23
  37. data/sig/openai/models/beta/session_turn_error.rbs +0 -4
  38. data/sig/openai/models/csam_moderation.rbs +113 -0
  39. data/sig/openai/models/csam_moderation_response.rbs +30 -0
  40. data/sig/openai/models/live/mcp_require_approval_filter.rbs +33 -0
  41. data/sig/openai/models/live/mcp_tool.rbs +159 -0
  42. data/sig/openai/models/live/mcp_tool_filter.rbs +27 -0
  43. data/sig/openai/models/live/responses_delegation_config.rbs +5 -11
  44. data/sig/openai/models/live/responses_delegation_update_config.rbs +5 -11
  45. data/sig/openai/models.rbs +4 -0
  46. data/sig/openai/resources/beta/agents/sessions.rbs +0 -3
  47. metadata +16 -1
@@ -0,0 +1,248 @@
1
+ # typed: strong
2
+
3
+ module OpenAI
4
+ module Models
5
+
6
+ class CsamModeration < OpenAI::Internal::Type::BaseModel
7
+
8
+ OrHash = T.type_alias do
9
+ T.any(
10
+ OpenAI::CsamModeration,
11
+ OpenAI::Internal::AnyHash
12
+ )
13
+ end
14
+
15
+ # Whether the image was flagged in each category.
16
+ sig { returns(OpenAI::CsamModeration::Categories) }
17
+ attr_reader :categories
18
+
19
+ sig { params(categories: OpenAI::CsamModeration::Categories::OrHash).void }
20
+ attr_writer :categories
21
+
22
+ # The input types evaluated for each category.
23
+ sig { returns(OpenAI::CsamModeration::CategoryAppliedInputTypes) }
24
+ attr_reader :category_applied_input_types
25
+
26
+ sig { params(category_applied_input_types: OpenAI::CsamModeration::CategoryAppliedInputTypes::OrHash).void }
27
+ attr_writer :category_applied_input_types
28
+
29
+ # The classifier score for each category.
30
+ sig { returns(OpenAI::CsamModeration::CategoryScores) }
31
+ attr_reader :category_scores
32
+
33
+ sig { params(category_scores: OpenAI::CsamModeration::CategoryScores::OrHash).void }
34
+ attr_writer :category_scores
35
+
36
+ # Whether either CSAM category was flagged.
37
+ sig { returns(T::Boolean) }
38
+ attr_accessor :flagged
39
+
40
+ sig do
41
+ params(
42
+
43
+ categories: OpenAI::CsamModeration::Categories::OrHash,
44
+
45
+ category_applied_input_types: OpenAI::CsamModeration::CategoryAppliedInputTypes::OrHash,
46
+
47
+ category_scores: OpenAI::CsamModeration::CategoryScores::OrHash,
48
+
49
+ flagged: T::Boolean
50
+ )
51
+ .returns(T.attached_class)
52
+ end
53
+ def self.new(
54
+
55
+ # Whether the image was flagged in each category.
56
+ categories:,
57
+
58
+ # The input types evaluated for each category.
59
+ category_applied_input_types:,
60
+
61
+ # The classifier score for each category.
62
+ category_scores:,
63
+
64
+ # Whether either CSAM category was flagged.
65
+
66
+ flagged:
67
+ )
68
+ end
69
+
70
+ sig do
71
+ override.returns(
72
+ {
73
+ categories: OpenAI::CsamModeration::Categories,
74
+ category_applied_input_types: OpenAI::CsamModeration::CategoryAppliedInputTypes,
75
+ category_scores: OpenAI::CsamModeration::CategoryScores,
76
+ flagged: T::Boolean
77
+ }
78
+ )
79
+ end
80
+ def to_hash
81
+ end
82
+
83
+ class Categories < OpenAI::Internal::Type::BaseModel
84
+ OrHash = T.type_alias do
85
+ T.any(
86
+ OpenAI::CsamModeration::Categories,
87
+ OpenAI::Internal::AnyHash
88
+ )
89
+ end
90
+
91
+ sig { returns(T::Boolean) }
92
+ attr_accessor :likely_csam
93
+
94
+ sig { returns(T::Boolean) }
95
+ attr_accessor :likely_csam_gen_ai
96
+
97
+ # Whether the image was flagged in each category.
98
+ sig do
99
+ params(
100
+
101
+ likely_csam: T::Boolean,
102
+
103
+ likely_csam_gen_ai: T::Boolean
104
+ )
105
+ .returns(T.attached_class)
106
+ end
107
+ def self.new(
108
+
109
+ likely_csam:,
110
+
111
+ likely_csam_gen_ai:
112
+ )
113
+ end
114
+
115
+ sig do
116
+ override.returns(
117
+ {likely_csam: T::Boolean, likely_csam_gen_ai: T::Boolean}
118
+ )
119
+ end
120
+ def to_hash
121
+ end
122
+
123
+ end
124
+
125
+ class CategoryAppliedInputTypes < OpenAI::Internal::Type::BaseModel
126
+ OrHash = T.type_alias do
127
+ T.any(
128
+ OpenAI::CsamModeration::CategoryAppliedInputTypes,
129
+ OpenAI::Internal::AnyHash
130
+ )
131
+ end
132
+
133
+ sig { returns(T::Array[OpenAI::CsamModeration::CategoryAppliedInputTypes::LikelyCsam::TaggedSymbol]) }
134
+ attr_accessor :likely_csam
135
+
136
+ sig { returns(T::Array[OpenAI::CsamModeration::CategoryAppliedInputTypes::LikelyCsamGenAi::TaggedSymbol]) }
137
+ attr_accessor :likely_csam_gen_ai
138
+
139
+ # The input types evaluated for each category.
140
+ sig do
141
+ params(
142
+
143
+ likely_csam: T::Array[OpenAI::CsamModeration::CategoryAppliedInputTypes::LikelyCsam::OrSymbol],
144
+
145
+ likely_csam_gen_ai: T::Array[OpenAI::CsamModeration::CategoryAppliedInputTypes::LikelyCsamGenAi::OrSymbol]
146
+ )
147
+ .returns(T.attached_class)
148
+ end
149
+ def self.new(
150
+
151
+ likely_csam:,
152
+
153
+ likely_csam_gen_ai:
154
+ )
155
+ end
156
+
157
+ sig do
158
+ override.returns(
159
+ {
160
+ likely_csam: T::Array[OpenAI::CsamModeration::CategoryAppliedInputTypes::LikelyCsam::TaggedSymbol],
161
+ likely_csam_gen_ai: T::Array[
162
+ OpenAI::CsamModeration::CategoryAppliedInputTypes::LikelyCsamGenAi::TaggedSymbol
163
+ ]
164
+ }
165
+ )
166
+ end
167
+ def to_hash
168
+ end
169
+
170
+ module LikelyCsam
171
+ extend OpenAI::Internal::Type::Enum
172
+
173
+ TaggedSymbol = T.type_alias { T.all(Symbol, OpenAI::CsamModeration::CategoryAppliedInputTypes::LikelyCsam) }
174
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
175
+
176
+ IMAGE = T.let(:image, OpenAI::CsamModeration::CategoryAppliedInputTypes::LikelyCsam::TaggedSymbol)
177
+
178
+ sig {
179
+ override.returns(T::Array[OpenAI::CsamModeration::CategoryAppliedInputTypes::LikelyCsam::TaggedSymbol])
180
+ }
181
+ def self.values
182
+ end
183
+ end
184
+
185
+ module LikelyCsamGenAi
186
+ extend OpenAI::Internal::Type::Enum
187
+
188
+ TaggedSymbol = T.type_alias {
189
+ T.all(Symbol, OpenAI::CsamModeration::CategoryAppliedInputTypes::LikelyCsamGenAi)
190
+ }
191
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
192
+
193
+ IMAGE = T.let(:image, OpenAI::CsamModeration::CategoryAppliedInputTypes::LikelyCsamGenAi::TaggedSymbol)
194
+
195
+ sig {
196
+ override.returns(T::Array[OpenAI::CsamModeration::CategoryAppliedInputTypes::LikelyCsamGenAi::TaggedSymbol])
197
+ }
198
+ def self.values
199
+ end
200
+ end
201
+ end
202
+
203
+ class CategoryScores < OpenAI::Internal::Type::BaseModel
204
+ OrHash = T.type_alias do
205
+ T.any(
206
+ OpenAI::CsamModeration::CategoryScores,
207
+ OpenAI::Internal::AnyHash
208
+ )
209
+ end
210
+
211
+ sig { returns(Float) }
212
+ attr_accessor :likely_csam
213
+
214
+ sig { returns(Float) }
215
+ attr_accessor :likely_csam_gen_ai
216
+
217
+ # The classifier score for each category.
218
+ sig do
219
+ params(
220
+
221
+ likely_csam: Float,
222
+
223
+ likely_csam_gen_ai: Float
224
+ )
225
+ .returns(T.attached_class)
226
+ end
227
+ def self.new(
228
+
229
+ likely_csam:,
230
+
231
+ likely_csam_gen_ai:
232
+ )
233
+ end
234
+
235
+ sig do
236
+ override.returns(
237
+ {likely_csam: Float, likely_csam_gen_ai: Float}
238
+ )
239
+ end
240
+ def to_hash
241
+ end
242
+
243
+ end
244
+
245
+ end
246
+
247
+ end
248
+ end
@@ -0,0 +1,56 @@
1
+ # typed: strong
2
+
3
+ module OpenAI
4
+ module Models
5
+
6
+ class CsamModerationResponse < OpenAI::Internal::Type::BaseModel
7
+
8
+ OrHash = T.type_alias do
9
+ T.any(
10
+ OpenAI::CsamModerationResponse,
11
+ OpenAI::Internal::AnyHash
12
+ )
13
+ end
14
+
15
+ sig { returns(String) }
16
+ attr_accessor :id
17
+
18
+ sig { returns(Symbol) }
19
+ attr_accessor :model
20
+
21
+ sig { returns(T::Array[OpenAI::CsamModeration]) }
22
+ attr_accessor :results
23
+
24
+ sig do
25
+ params(
26
+
27
+ id: String,
28
+
29
+ results: T::Array[OpenAI::CsamModeration::OrHash],
30
+
31
+ model: Symbol
32
+ )
33
+ .returns(T.attached_class)
34
+ end
35
+ def self.new(
36
+
37
+ id:,
38
+
39
+ results:,
40
+
41
+ model: :"omni-moderation-csam-latest"
42
+ )
43
+ end
44
+
45
+ sig do
46
+ override.returns(
47
+ {id: String, model: Symbol, results: T::Array[OpenAI::CsamModeration]}
48
+ )
49
+ end
50
+ def to_hash
51
+ end
52
+
53
+ end
54
+
55
+ end
56
+ end
@@ -0,0 +1,64 @@
1
+ # typed: strong
2
+
3
+ module OpenAI
4
+ module Models
5
+
6
+ module Live
7
+
8
+ class McpRequireApprovalFilter < OpenAI::Internal::Type::BaseModel
9
+
10
+ OrHash = T.type_alias do
11
+ T.any(
12
+ OpenAI::Live::McpRequireApprovalFilter,
13
+ OpenAI::Internal::AnyHash
14
+ )
15
+ end
16
+
17
+ # A filter that forces approval for matching tools.
18
+ sig { returns(T.nilable(OpenAI::Live::McpToolFilter)) }
19
+ attr_reader :always
20
+
21
+ sig { params(always: T.nilable(OpenAI::Live::McpToolFilter::OrHash)).void }
22
+ attr_writer :always
23
+
24
+ # A filter that skips approval for matching tools.
25
+ sig { returns(T.nilable(OpenAI::Live::McpToolFilter)) }
26
+ attr_reader :never
27
+
28
+ sig { params(never: T.nilable(OpenAI::Live::McpToolFilter::OrHash)).void }
29
+ attr_writer :never
30
+
31
+ sig do
32
+ params(
33
+
34
+ always: T.nilable(OpenAI::Live::McpToolFilter::OrHash),
35
+
36
+ never: T.nilable(OpenAI::Live::McpToolFilter::OrHash)
37
+ )
38
+ .returns(T.attached_class)
39
+ end
40
+ def self.new(
41
+
42
+ # A filter that forces approval for matching tools.
43
+ always: nil,
44
+
45
+ # A filter that skips approval for matching tools.
46
+
47
+ never: nil
48
+ )
49
+ end
50
+
51
+ sig do
52
+ override.returns(
53
+ {always: T.nilable(OpenAI::Live::McpToolFilter), never: T.nilable(OpenAI::Live::McpToolFilter)}
54
+ )
55
+ end
56
+ def to_hash
57
+ end
58
+
59
+ end
60
+
61
+ end
62
+
63
+ end
64
+ end
@@ -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