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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +17 -0
- data/README.md +1 -1
- data/lib/openai/helpers/agents/session_stream.rb +8 -3
- data/lib/openai/helpers/beta/agents/result.rb +12 -4
- data/lib/openai/models/beta/agent_session.rb +1 -43
- data/lib/openai/models/beta/agent_session_event.rb +1 -4
- data/lib/openai/models/beta/agents/session_create_params.rb +1 -33
- data/lib/openai/models/beta/agents/session_update_params.rb +1 -33
- data/lib/openai/models/beta/session_turn_error.rb +0 -3
- data/lib/openai/models/csam_moderation.rb +131 -0
- data/lib/openai/models/csam_moderation_response.rb +27 -0
- data/lib/openai/models/live/mcp_require_approval_filter.rb +28 -0
- data/lib/openai/models/live/mcp_tool.rb +181 -0
- data/lib/openai/models/live/mcp_tool_filter.rb +28 -0
- data/lib/openai/models/live/responses_delegation_config.rb +7 -14
- data/lib/openai/models/live/responses_delegation_update_config.rb +7 -14
- data/lib/openai/models.rb +4 -0
- data/lib/openai/resources/beta/agents/sessions/events.rb +1 -1
- data/lib/openai/resources/beta/agents/sessions.rb +3 -15
- data/lib/openai/version.rb +1 -1
- data/lib/openai.rb +5 -1
- data/rbi/openai/models/beta/agent_session.rbi +1 -70
- data/rbi/openai/models/beta/agent_session_event.rbi +0 -1
- data/rbi/openai/models/beta/agents/session_create_params.rbi +0 -56
- data/rbi/openai/models/beta/agents/session_update_params.rbi +0 -56
- data/rbi/openai/models/beta/session_turn_error.rbi +0 -3
- data/rbi/openai/models/csam_moderation.rbi +248 -0
- data/rbi/openai/models/csam_moderation_response.rbi +56 -0
- data/rbi/openai/models/live/mcp_require_approval_filter.rbi +64 -0
- data/rbi/openai/models/live/mcp_tool.rbi +253 -0
- data/rbi/openai/models/live/mcp_tool_filter.rbi +58 -0
- data/rbi/openai/models/live/responses_delegation_config.rbi +7 -39
- data/rbi/openai/models/live/responses_delegation_update_config.rbi +7 -39
- data/rbi/openai/models.rbi +4 -0
- data/rbi/openai/resources/beta/agents/sessions.rbi +0 -12
- data/sig/openai/models/beta/agent_session.rbs +3 -44
- data/sig/openai/models/beta/agent_session_event.rbs +0 -1
- data/sig/openai/models/beta/agents/session_create_params.rbs +0 -23
- data/sig/openai/models/beta/agents/session_update_params.rbs +0 -23
- data/sig/openai/models/beta/session_turn_error.rbs +0 -4
- data/sig/openai/models/csam_moderation.rbs +113 -0
- data/sig/openai/models/csam_moderation_response.rbs +30 -0
- data/sig/openai/models/live/mcp_require_approval_filter.rbs +33 -0
- data/sig/openai/models/live/mcp_tool.rbs +159 -0
- data/sig/openai/models/live/mcp_tool_filter.rbs +27 -0
- data/sig/openai/models/live/responses_delegation_config.rbs +5 -11
- data/sig/openai/models/live/responses_delegation_update_config.rbs +5 -11
- data/sig/openai/models.rbs +4 -0
- data/sig/openai/resources/beta/agents/sessions.rbs +0 -3
- metadata +16 -4
- data/lib/openai/models/beta/agent_session_budget_reached_event.rb +0 -48
- data/rbi/openai/models/beta/agent_session_budget_reached_event.rbi +0 -83
- data/sig/openai/models/beta/agent_session_budget_reached_event.rbs +0 -52
|
@@ -11,7 +11,6 @@ module OpenAI
|
|
|
11
11
|
?metadata: ::Hash[Symbol, String]?,
|
|
12
12
|
?prompt_cache_options: OpenAI::Beta::Agents::SessionCreateParams::PromptCacheOptions?,
|
|
13
13
|
?review: OpenAI::Models::Beta::Agents::SessionCreateParams::review,
|
|
14
|
-
?spend_control: OpenAI::Beta::Agents::SessionCreateParams::SpendControl?,
|
|
15
14
|
?stream_options: OpenAI::Beta::Agents::SessionCreateParams::StreamOptions,
|
|
16
15
|
?vault_ids: ::Array[String]?,
|
|
17
16
|
?request_options: OpenAI::request_opts
|
|
@@ -64,10 +63,6 @@ module OpenAI
|
|
|
64
63
|
OpenAI::Models::Beta::Agents::SessionCreateParams::review
|
|
65
64
|
) -> OpenAI::Models::Beta::Agents::SessionCreateParams::review
|
|
66
65
|
|
|
67
|
-
# Optional spending limit in USD cents. Omission or null creates an unlimited
|
|
68
|
-
# session.
|
|
69
|
-
attr_accessor spend_control: OpenAI::Beta::Agents::SessionCreateParams::SpendControl?
|
|
70
|
-
|
|
71
66
|
# Options for the event stream. Only allowed when `stream` is `true`.
|
|
72
67
|
attr_reader stream_options: OpenAI::Beta::Agents::SessionCreateParams::StreamOptions?
|
|
73
68
|
|
|
@@ -100,9 +95,6 @@ module OpenAI
|
|
|
100
95
|
# default.
|
|
101
96
|
# @param review
|
|
102
97
|
# Action review mode. Omit to use none.
|
|
103
|
-
# @param spend_control
|
|
104
|
-
# Optional spending limit in USD cents. Omission or null creates an unlimited
|
|
105
|
-
# session.
|
|
106
98
|
# @param stream_options
|
|
107
99
|
# Options for the event stream. Only allowed when `stream` is `true`.
|
|
108
100
|
# @param vault_ids
|
|
@@ -115,7 +107,6 @@ module OpenAI
|
|
|
115
107
|
?metadata: ::Hash[Symbol, String]?,
|
|
116
108
|
?prompt_cache_options: OpenAI::Beta::Agents::SessionCreateParams::PromptCacheOptions?,
|
|
117
109
|
?review: OpenAI::Models::Beta::Agents::SessionCreateParams::review,
|
|
118
|
-
?spend_control: OpenAI::Beta::Agents::SessionCreateParams::SpendControl?,
|
|
119
110
|
?stream_options: OpenAI::Beta::Agents::SessionCreateParams::StreamOptions,
|
|
120
111
|
?vault_ids: ::Array[String]?,
|
|
121
112
|
?request_options: OpenAI::request_opts
|
|
@@ -129,7 +120,6 @@ module OpenAI
|
|
|
129
120
|
?metadata: ::Hash[Symbol, String]?,
|
|
130
121
|
?prompt_cache_options: OpenAI::Beta::Agents::SessionCreateParams::PromptCacheOptions?,
|
|
131
122
|
?review: OpenAI::Models::Beta::Agents::SessionCreateParams::review,
|
|
132
|
-
?spend_control: OpenAI::Beta::Agents::SessionCreateParams::SpendControl?,
|
|
133
123
|
?stream_options: OpenAI::Beta::Agents::SessionCreateParams::StreamOptions,
|
|
134
124
|
?vault_ids: ::Array[String]?,
|
|
135
125
|
?request_options: OpenAI::RequestOptions
|
|
@@ -364,19 +354,6 @@ module OpenAI
|
|
|
364
354
|
def self?.values: -> ::Array[OpenAI::Models::Beta::Agents::SessionCreateParams::review]
|
|
365
355
|
end
|
|
366
356
|
|
|
367
|
-
type spend_control = { limit: Integer? }
|
|
368
|
-
|
|
369
|
-
class SpendControl < OpenAI::Internal::Type::BaseModel
|
|
370
|
-
# Positive USD cents, or null to remove the limit.
|
|
371
|
-
attr_accessor limit: Integer?
|
|
372
|
-
|
|
373
|
-
# @param limit
|
|
374
|
-
# Positive USD cents, or null to remove the limit.
|
|
375
|
-
def initialize: (limit: Integer?) -> void
|
|
376
|
-
|
|
377
|
-
def to_hash: -> { limit: Integer? }
|
|
378
|
-
end
|
|
379
|
-
|
|
380
357
|
type stream_options = { ?include_obfuscation: bool }
|
|
381
358
|
|
|
382
359
|
class StreamOptions < OpenAI::Internal::Type::BaseModel
|
|
@@ -9,7 +9,6 @@ module OpenAI
|
|
|
9
9
|
?metadata: ::Hash[Symbol, String]?,
|
|
10
10
|
?prompt_cache_options: OpenAI::Beta::Agents::SessionUpdateParams::PromptCacheOptions?,
|
|
11
11
|
?review: OpenAI::Models::Beta::Agents::SessionUpdateParams::review,
|
|
12
|
-
?spend_control: OpenAI::Beta::Agents::SessionUpdateParams::SpendControl?,
|
|
13
12
|
?request_options: OpenAI::request_opts
|
|
14
13
|
}
|
|
15
14
|
|
|
@@ -46,10 +45,6 @@ module OpenAI
|
|
|
46
45
|
OpenAI::Models::Beta::Agents::SessionUpdateParams::review
|
|
47
46
|
) -> OpenAI::Models::Beta::Agents::SessionUpdateParams::review
|
|
48
47
|
|
|
49
|
-
# Omit to retain the limit; null or a null limit removes it without resetting
|
|
50
|
-
# spend.
|
|
51
|
-
attr_accessor spend_control: OpenAI::Beta::Agents::SessionUpdateParams::SpendControl?
|
|
52
|
-
|
|
53
48
|
# @param agent
|
|
54
49
|
# Agent settings to update on this session. Omitted fields stay unchanged.
|
|
55
50
|
# @param metadata
|
|
@@ -62,16 +57,12 @@ module OpenAI
|
|
|
62
57
|
# @param review
|
|
63
58
|
# Default action review for new root turns. Existing turns and their subagents
|
|
64
59
|
# keep their review mode.
|
|
65
|
-
# @param spend_control
|
|
66
|
-
# Omit to retain the limit; null or a null limit removes it without resetting
|
|
67
|
-
# spend.
|
|
68
60
|
def initialize: (
|
|
69
61
|
session_id: String,
|
|
70
62
|
?agent: OpenAI::Beta::Agents::SessionUpdateParams::Agent,
|
|
71
63
|
?metadata: ::Hash[Symbol, String]?,
|
|
72
64
|
?prompt_cache_options: OpenAI::Beta::Agents::SessionUpdateParams::PromptCacheOptions?,
|
|
73
65
|
?review: OpenAI::Models::Beta::Agents::SessionUpdateParams::review,
|
|
74
|
-
?spend_control: OpenAI::Beta::Agents::SessionUpdateParams::SpendControl?,
|
|
75
66
|
?request_options: OpenAI::request_opts
|
|
76
67
|
) -> void
|
|
77
68
|
|
|
@@ -81,7 +72,6 @@ module OpenAI
|
|
|
81
72
|
?metadata: ::Hash[Symbol, String]?,
|
|
82
73
|
?prompt_cache_options: OpenAI::Beta::Agents::SessionUpdateParams::PromptCacheOptions?,
|
|
83
74
|
?review: OpenAI::Models::Beta::Agents::SessionUpdateParams::review,
|
|
84
|
-
?spend_control: OpenAI::Beta::Agents::SessionUpdateParams::SpendControl?,
|
|
85
75
|
?request_options: OpenAI::RequestOptions
|
|
86
76
|
}
|
|
87
77
|
|
|
@@ -254,19 +244,6 @@ module OpenAI
|
|
|
254
244
|
|
|
255
245
|
def self?.values: -> ::Array[OpenAI::Models::Beta::Agents::SessionUpdateParams::review]
|
|
256
246
|
end
|
|
257
|
-
|
|
258
|
-
type spend_control = { limit: Integer? }
|
|
259
|
-
|
|
260
|
-
class SpendControl < OpenAI::Internal::Type::BaseModel
|
|
261
|
-
# Positive USD cents, or null to remove the limit.
|
|
262
|
-
attr_accessor limit: Integer?
|
|
263
|
-
|
|
264
|
-
# @param limit
|
|
265
|
-
# Positive USD cents, or null to remove the limit.
|
|
266
|
-
def initialize: (limit: Integer?) -> void
|
|
267
|
-
|
|
268
|
-
def to_hash: -> { limit: Integer? }
|
|
269
|
-
end
|
|
270
247
|
end
|
|
271
248
|
end
|
|
272
249
|
end
|
|
@@ -28,7 +28,6 @@ module OpenAI
|
|
|
28
28
|
type code =
|
|
29
29
|
:context_length_exceeded
|
|
30
30
|
| :max_output_tokens
|
|
31
|
-
| :session_budget_exceeded
|
|
32
31
|
| :usage_limit_exceeded
|
|
33
32
|
| :project_spend_limit_exceeded
|
|
34
33
|
| :organization_spend_limit_exceeded
|
|
@@ -60,9 +59,6 @@ module OpenAI
|
|
|
60
59
|
# The model reached its output token limit before finishing the response.
|
|
61
60
|
MAX_OUTPUT_TOKENS: :max_output_tokens
|
|
62
61
|
|
|
63
|
-
# The session has reached its usage budget.
|
|
64
|
-
SESSION_BUDGET_EXCEEDED: :session_budget_exceeded
|
|
65
|
-
|
|
66
62
|
# The organization has reached a usage, plan, or billing limit.
|
|
67
63
|
USAGE_LIMIT_EXCEEDED: :usage_limit_exceeded
|
|
68
64
|
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
module OpenAI
|
|
2
|
+
module Models
|
|
3
|
+
type csam_moderation =
|
|
4
|
+
{
|
|
5
|
+
categories: OpenAI::CsamModeration::Categories,
|
|
6
|
+
category_applied_input_types: OpenAI::CsamModeration::CategoryAppliedInputTypes,
|
|
7
|
+
category_scores: OpenAI::CsamModeration::CategoryScores,
|
|
8
|
+
flagged: bool
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
class CsamModeration < OpenAI::Internal::Type::BaseModel
|
|
12
|
+
# Whether the image was flagged in each category.
|
|
13
|
+
attr_accessor categories: OpenAI::CsamModeration::Categories
|
|
14
|
+
|
|
15
|
+
# The input types evaluated for each category.
|
|
16
|
+
attr_accessor category_applied_input_types: OpenAI::CsamModeration::CategoryAppliedInputTypes
|
|
17
|
+
|
|
18
|
+
# The classifier score for each category.
|
|
19
|
+
attr_accessor category_scores: OpenAI::CsamModeration::CategoryScores
|
|
20
|
+
|
|
21
|
+
# Whether either CSAM category was flagged.
|
|
22
|
+
attr_accessor flagged: bool
|
|
23
|
+
|
|
24
|
+
# @param categories
|
|
25
|
+
# Whether the image was flagged in each category.
|
|
26
|
+
# @param category_applied_input_types
|
|
27
|
+
# The input types evaluated for each category.
|
|
28
|
+
# @param category_scores
|
|
29
|
+
# The classifier score for each category.
|
|
30
|
+
# @param flagged
|
|
31
|
+
# Whether either CSAM category was flagged.
|
|
32
|
+
def initialize: (
|
|
33
|
+
categories: OpenAI::CsamModeration::Categories,
|
|
34
|
+
category_applied_input_types: OpenAI::CsamModeration::CategoryAppliedInputTypes,
|
|
35
|
+
category_scores: OpenAI::CsamModeration::CategoryScores,
|
|
36
|
+
flagged: bool
|
|
37
|
+
) -> void
|
|
38
|
+
|
|
39
|
+
def to_hash: -> {
|
|
40
|
+
categories: OpenAI::CsamModeration::Categories,
|
|
41
|
+
category_applied_input_types: OpenAI::CsamModeration::CategoryAppliedInputTypes,
|
|
42
|
+
category_scores: OpenAI::CsamModeration::CategoryScores,
|
|
43
|
+
flagged: bool
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
type categories = { likely_csam: bool, likely_csam_gen_ai: bool }
|
|
47
|
+
|
|
48
|
+
class Categories < OpenAI::Internal::Type::BaseModel
|
|
49
|
+
attr_accessor likely_csam: bool
|
|
50
|
+
|
|
51
|
+
attr_accessor likely_csam_gen_ai: bool
|
|
52
|
+
|
|
53
|
+
def initialize: (likely_csam: bool, likely_csam_gen_ai: bool) -> void
|
|
54
|
+
|
|
55
|
+
def to_hash: -> { likely_csam: bool, likely_csam_gen_ai: bool }
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
type category_applied_input_types =
|
|
59
|
+
{
|
|
60
|
+
likely_csam: ::Array[OpenAI::Models::CsamModeration::CategoryAppliedInputTypes::likely_csam],
|
|
61
|
+
likely_csam_gen_ai: ::Array[OpenAI::Models::CsamModeration::CategoryAppliedInputTypes::likely_csam_gen_ai]
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
class CategoryAppliedInputTypes < OpenAI::Internal::Type::BaseModel
|
|
65
|
+
attr_accessor likely_csam: ::Array[OpenAI::Models::CsamModeration::CategoryAppliedInputTypes::likely_csam]
|
|
66
|
+
|
|
67
|
+
attr_accessor likely_csam_gen_ai: ::Array[OpenAI::Models::CsamModeration::CategoryAppliedInputTypes::likely_csam_gen_ai]
|
|
68
|
+
|
|
69
|
+
def initialize: (
|
|
70
|
+
likely_csam: ::Array[OpenAI::Models::CsamModeration::CategoryAppliedInputTypes::likely_csam],
|
|
71
|
+
likely_csam_gen_ai: ::Array[OpenAI::Models::CsamModeration::CategoryAppliedInputTypes::likely_csam_gen_ai]
|
|
72
|
+
) -> void
|
|
73
|
+
|
|
74
|
+
def to_hash: -> {
|
|
75
|
+
likely_csam: ::Array[OpenAI::Models::CsamModeration::CategoryAppliedInputTypes::likely_csam],
|
|
76
|
+
likely_csam_gen_ai: ::Array[OpenAI::Models::CsamModeration::CategoryAppliedInputTypes::likely_csam_gen_ai]
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
type likely_csam = :image
|
|
80
|
+
|
|
81
|
+
module LikelyCsam
|
|
82
|
+
extend OpenAI::Internal::Type::Enum
|
|
83
|
+
|
|
84
|
+
IMAGE: :image
|
|
85
|
+
|
|
86
|
+
def self?.values: -> ::Array[OpenAI::Models::CsamModeration::CategoryAppliedInputTypes::likely_csam]
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
type likely_csam_gen_ai = :image
|
|
90
|
+
|
|
91
|
+
module LikelyCsamGenAi
|
|
92
|
+
extend OpenAI::Internal::Type::Enum
|
|
93
|
+
|
|
94
|
+
IMAGE: :image
|
|
95
|
+
|
|
96
|
+
def self?.values: -> ::Array[OpenAI::Models::CsamModeration::CategoryAppliedInputTypes::likely_csam_gen_ai]
|
|
97
|
+
end
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
type category_scores = { likely_csam: Float, likely_csam_gen_ai: Float }
|
|
101
|
+
|
|
102
|
+
class CategoryScores < OpenAI::Internal::Type::BaseModel
|
|
103
|
+
attr_accessor likely_csam: Float
|
|
104
|
+
|
|
105
|
+
attr_accessor likely_csam_gen_ai: Float
|
|
106
|
+
|
|
107
|
+
def initialize: (likely_csam: Float, likely_csam_gen_ai: Float) -> void
|
|
108
|
+
|
|
109
|
+
def to_hash: -> { likely_csam: Float, likely_csam_gen_ai: Float }
|
|
110
|
+
end
|
|
111
|
+
end
|
|
112
|
+
end
|
|
113
|
+
end
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
module OpenAI
|
|
2
|
+
module Models
|
|
3
|
+
type csam_moderation_response =
|
|
4
|
+
{
|
|
5
|
+
id: String,
|
|
6
|
+
?model: :"omni-moderation-csam-latest",
|
|
7
|
+
results: ::Array[OpenAI::CsamModeration]
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
class CsamModerationResponse < OpenAI::Internal::Type::BaseModel
|
|
11
|
+
attr_accessor id: String
|
|
12
|
+
|
|
13
|
+
attr_accessor model: :"omni-moderation-csam-latest"
|
|
14
|
+
|
|
15
|
+
attr_accessor results: ::Array[OpenAI::CsamModeration]
|
|
16
|
+
|
|
17
|
+
def initialize: (
|
|
18
|
+
id: String,
|
|
19
|
+
results: ::Array[OpenAI::CsamModeration],
|
|
20
|
+
?model: :"omni-moderation-csam-latest"
|
|
21
|
+
) -> void
|
|
22
|
+
|
|
23
|
+
def to_hash: -> {
|
|
24
|
+
id: String,
|
|
25
|
+
?model: :"omni-moderation-csam-latest",
|
|
26
|
+
results: ::Array[OpenAI::CsamModeration]
|
|
27
|
+
}
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
end
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
module OpenAI
|
|
2
|
+
module Models
|
|
3
|
+
module Live
|
|
4
|
+
type mcp_require_approval_filter =
|
|
5
|
+
{
|
|
6
|
+
?always: OpenAI::Live::McpToolFilter?,
|
|
7
|
+
?never: OpenAI::Live::McpToolFilter?
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
class McpRequireApprovalFilter < OpenAI::Internal::Type::BaseModel
|
|
11
|
+
# A filter that forces approval for matching tools.
|
|
12
|
+
attr_accessor always: OpenAI::Live::McpToolFilter?
|
|
13
|
+
|
|
14
|
+
# A filter that skips approval for matching tools.
|
|
15
|
+
attr_accessor never: OpenAI::Live::McpToolFilter?
|
|
16
|
+
|
|
17
|
+
# @param always
|
|
18
|
+
# A filter that forces approval for matching tools.
|
|
19
|
+
# @param never
|
|
20
|
+
# A filter that skips approval for matching tools.
|
|
21
|
+
def initialize: (
|
|
22
|
+
?always: OpenAI::Live::McpToolFilter?,
|
|
23
|
+
?never: OpenAI::Live::McpToolFilter?
|
|
24
|
+
) -> void
|
|
25
|
+
|
|
26
|
+
def to_hash: -> {
|
|
27
|
+
?always: OpenAI::Live::McpToolFilter?,
|
|
28
|
+
?never: OpenAI::Live::McpToolFilter?
|
|
29
|
+
}
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
end
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
module OpenAI
|
|
2
|
+
module Models
|
|
3
|
+
module Live
|
|
4
|
+
type mcp_tool =
|
|
5
|
+
{
|
|
6
|
+
?type: :mcp,
|
|
7
|
+
?allowed_callers: ::Array[OpenAI::Models::Live::McpTool::allowed_caller]?,
|
|
8
|
+
?allowed_tools: OpenAI::Models::Live::McpTool::allowed_tools?,
|
|
9
|
+
?authorization: String?,
|
|
10
|
+
?connector_id: String?,
|
|
11
|
+
?defer_loading: bool?,
|
|
12
|
+
?headers: ::Hash[Symbol, String]?,
|
|
13
|
+
?require_approval: OpenAI::Models::Live::McpTool::require_approval?,
|
|
14
|
+
?server_description: String?,
|
|
15
|
+
?server_label: String,
|
|
16
|
+
?server_url: String?,
|
|
17
|
+
?tunnel_id: String?
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
class McpTool < OpenAI::Internal::Type::BaseModel
|
|
21
|
+
attr_accessor type: :mcp
|
|
22
|
+
|
|
23
|
+
# The tool invocation context(s).
|
|
24
|
+
attr_accessor allowed_callers: ::Array[OpenAI::Models::Live::McpTool::allowed_caller]?
|
|
25
|
+
|
|
26
|
+
# A list of MCP tool names that are allowed for this server.
|
|
27
|
+
attr_accessor allowed_tools: OpenAI::Models::Live::McpTool::allowed_tools?
|
|
28
|
+
|
|
29
|
+
# The ID of a built-in MCP connector. This field is deprecated for models released
|
|
30
|
+
# after September 1, 2026. Use `server_url` to connect to a remote MCP server, or
|
|
31
|
+
# `tunnel_id` to connect to a local MCP server.
|
|
32
|
+
attr_accessor connector_id: String?
|
|
33
|
+
|
|
34
|
+
# Whether this MCP tool should be deferred and discovered via tool search.
|
|
35
|
+
attr_accessor defer_loading: bool?
|
|
36
|
+
|
|
37
|
+
# Controls which MCP tools require explicit user approval before execution.
|
|
38
|
+
attr_accessor require_approval: OpenAI::Models::Live::McpTool::require_approval?
|
|
39
|
+
|
|
40
|
+
# An optional human-readable description of the MCP server.
|
|
41
|
+
attr_accessor server_description: String?
|
|
42
|
+
|
|
43
|
+
# A label used to identify the MCP server.
|
|
44
|
+
attr_reader server_label: String?
|
|
45
|
+
|
|
46
|
+
# A label used to identify the MCP server.
|
|
47
|
+
def server_label=: (String) -> String
|
|
48
|
+
|
|
49
|
+
# The URL of the MCP server to connect to.
|
|
50
|
+
attr_accessor server_url: String?
|
|
51
|
+
|
|
52
|
+
# The Secure MCP Tunnel ID to use instead of a direct server URL.
|
|
53
|
+
attr_accessor tunnel_id: String?
|
|
54
|
+
|
|
55
|
+
# This value is omitted from returned Live session data.
|
|
56
|
+
attr_accessor authorization: String?
|
|
57
|
+
|
|
58
|
+
# Optional HTTP headers to send when connecting to the MCP server.
|
|
59
|
+
attr_accessor headers: ::Hash[Symbol, String]?
|
|
60
|
+
|
|
61
|
+
# @param allowed_callers
|
|
62
|
+
# The tool invocation context(s).
|
|
63
|
+
# @param allowed_tools
|
|
64
|
+
# A list of MCP tool names that are allowed for this server.
|
|
65
|
+
# @param authorization
|
|
66
|
+
# This value is omitted from returned Live session data.
|
|
67
|
+
# @param connector_id
|
|
68
|
+
# The ID of a built-in MCP connector. This field is deprecated for models released
|
|
69
|
+
# after September 1, 2026. Use `server_url` to connect to a remote MCP server, or
|
|
70
|
+
# `tunnel_id` to connect to a local MCP server.
|
|
71
|
+
# @param defer_loading
|
|
72
|
+
# Whether this MCP tool should be deferred and discovered via tool search.
|
|
73
|
+
# @param headers
|
|
74
|
+
# Optional HTTP headers to send when connecting to the MCP server.
|
|
75
|
+
# @param require_approval
|
|
76
|
+
# Controls which MCP tools require explicit user approval before execution.
|
|
77
|
+
# @param server_description
|
|
78
|
+
# An optional human-readable description of the MCP server.
|
|
79
|
+
# @param server_label
|
|
80
|
+
# A label used to identify the MCP server.
|
|
81
|
+
# @param server_url
|
|
82
|
+
# The URL of the MCP server to connect to.
|
|
83
|
+
# @param tunnel_id
|
|
84
|
+
# The Secure MCP Tunnel ID to use instead of a direct server URL.
|
|
85
|
+
def initialize: (
|
|
86
|
+
?allowed_callers: ::Array[OpenAI::Models::Live::McpTool::allowed_caller]?,
|
|
87
|
+
?allowed_tools: OpenAI::Models::Live::McpTool::allowed_tools?,
|
|
88
|
+
?authorization: String?,
|
|
89
|
+
?connector_id: String?,
|
|
90
|
+
?defer_loading: bool?,
|
|
91
|
+
?headers: ::Hash[Symbol, String]?,
|
|
92
|
+
?require_approval: OpenAI::Models::Live::McpTool::require_approval?,
|
|
93
|
+
?server_description: String?,
|
|
94
|
+
?server_label: String,
|
|
95
|
+
?server_url: String?,
|
|
96
|
+
?tunnel_id: String?,
|
|
97
|
+
?type: :mcp
|
|
98
|
+
) -> void
|
|
99
|
+
|
|
100
|
+
def to_hash: -> {
|
|
101
|
+
?type: :mcp,
|
|
102
|
+
?allowed_callers: ::Array[OpenAI::Models::Live::McpTool::allowed_caller]?,
|
|
103
|
+
?allowed_tools: OpenAI::Models::Live::McpTool::allowed_tools?,
|
|
104
|
+
?authorization: String?,
|
|
105
|
+
?connector_id: String?,
|
|
106
|
+
?defer_loading: bool?,
|
|
107
|
+
?headers: ::Hash[Symbol, String]?,
|
|
108
|
+
?require_approval: OpenAI::Models::Live::McpTool::require_approval?,
|
|
109
|
+
?server_description: String?,
|
|
110
|
+
?server_label: String,
|
|
111
|
+
?server_url: String?,
|
|
112
|
+
?tunnel_id: String?
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
type allowed_caller = :direct | :programmatic
|
|
116
|
+
|
|
117
|
+
module AllowedCaller
|
|
118
|
+
extend OpenAI::Internal::Type::Enum
|
|
119
|
+
|
|
120
|
+
DIRECT: :direct
|
|
121
|
+
PROGRAMMATIC: :programmatic
|
|
122
|
+
|
|
123
|
+
def self?.values: -> ::Array[OpenAI::Models::Live::McpTool::allowed_caller]
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
type allowed_tools = ::Array[String] | OpenAI::Live::McpToolFilter
|
|
127
|
+
|
|
128
|
+
module AllowedTools
|
|
129
|
+
extend OpenAI::Internal::Type::Union
|
|
130
|
+
|
|
131
|
+
def self?.variants: -> ::Array[OpenAI::Models::Live::McpTool::allowed_tools]
|
|
132
|
+
|
|
133
|
+
StringArray: OpenAI::Internal::Type::Converter
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
type require_approval =
|
|
137
|
+
OpenAI::Live::McpRequireApprovalFilter
|
|
138
|
+
| OpenAI::Models::Live::McpTool::RequireApproval::live_mcp_require_approval_api_enum
|
|
139
|
+
|
|
140
|
+
module RequireApproval
|
|
141
|
+
extend OpenAI::Internal::Type::Union
|
|
142
|
+
|
|
143
|
+
type live_mcp_require_approval_api_enum = :always | :never
|
|
144
|
+
|
|
145
|
+
module LiveMCPRequireApprovalAPIEnum
|
|
146
|
+
extend OpenAI::Internal::Type::Enum
|
|
147
|
+
|
|
148
|
+
ALWAYS: :always
|
|
149
|
+
NEVER: :never
|
|
150
|
+
|
|
151
|
+
def self?.values: -> ::Array[OpenAI::Models::Live::McpTool::RequireApproval::live_mcp_require_approval_api_enum]
|
|
152
|
+
end
|
|
153
|
+
|
|
154
|
+
def self?.variants: -> ::Array[OpenAI::Models::Live::McpTool::require_approval]
|
|
155
|
+
end
|
|
156
|
+
end
|
|
157
|
+
end
|
|
158
|
+
end
|
|
159
|
+
end
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
module OpenAI
|
|
2
|
+
module Models
|
|
3
|
+
module Live
|
|
4
|
+
type mcp_tool_filter =
|
|
5
|
+
{ ?read_only: bool?, ?tool_names: ::Array[String]? }
|
|
6
|
+
|
|
7
|
+
class McpToolFilter < OpenAI::Internal::Type::BaseModel
|
|
8
|
+
# Whether to allow only read-only tools for matching entries.
|
|
9
|
+
attr_accessor read_only: bool?
|
|
10
|
+
|
|
11
|
+
# A list of tool names to match against.
|
|
12
|
+
attr_accessor tool_names: ::Array[String]?
|
|
13
|
+
|
|
14
|
+
# @param read_only
|
|
15
|
+
# Whether to allow only read-only tools for matching entries.
|
|
16
|
+
# @param tool_names
|
|
17
|
+
# A list of tool names to match against.
|
|
18
|
+
def initialize: (
|
|
19
|
+
?read_only: bool?,
|
|
20
|
+
?tool_names: ::Array[String]?
|
|
21
|
+
) -> void
|
|
22
|
+
|
|
23
|
+
def to_hash: -> { ?read_only: bool?, ?tool_names: ::Array[String]? }
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
|
@@ -666,7 +666,7 @@ module OpenAI
|
|
|
666
666
|
| OpenAI::Live::ResponsesDelegationConfig::Tool::CodeInterpreter
|
|
667
667
|
| OpenAI::Live::ResponsesDelegationConfig::Tool::Shell
|
|
668
668
|
| OpenAI::Live::ResponsesDelegationConfig::Tool::ImageGeneration
|
|
669
|
-
| OpenAI::Live::
|
|
669
|
+
| OpenAI::Live::McpTool
|
|
670
670
|
| OpenAI::Live::ResponsesDelegationConfig::Tool::Custom
|
|
671
671
|
| OpenAI::Live::ResponsesDelegationConfig::Tool::Namespace
|
|
672
672
|
| OpenAI::Live::ResponsesDelegationConfig::Tool::ToolSearch
|
|
@@ -677,6 +677,10 @@ module OpenAI
|
|
|
677
677
|
module Tool
|
|
678
678
|
extend OpenAI::Internal::Type::Union
|
|
679
679
|
|
|
680
|
+
type mcp = ::OpenAI::Models::Live::mcp_tool
|
|
681
|
+
|
|
682
|
+
class Mcp = ::OpenAI::Models::Live::McpTool
|
|
683
|
+
|
|
680
684
|
type web_search = { ?type: :web_search }
|
|
681
685
|
|
|
682
686
|
class WebSearch < OpenAI::Internal::Type::BaseModel
|
|
@@ -1076,16 +1080,6 @@ module OpenAI
|
|
|
1076
1080
|
def to_hash: -> { ?type: :image_generation }
|
|
1077
1081
|
end
|
|
1078
1082
|
|
|
1079
|
-
type mcp = { ?type: :mcp }
|
|
1080
|
-
|
|
1081
|
-
class Mcp < OpenAI::Internal::Type::BaseModel
|
|
1082
|
-
attr_accessor type: :mcp
|
|
1083
|
-
|
|
1084
|
-
def initialize: (?type: :mcp) -> void
|
|
1085
|
-
|
|
1086
|
-
def to_hash: -> { ?type: :mcp }
|
|
1087
|
-
end
|
|
1088
|
-
|
|
1089
1083
|
type custom = { ?type: :custom }
|
|
1090
1084
|
|
|
1091
1085
|
class Custom < OpenAI::Internal::Type::BaseModel
|
|
@@ -672,7 +672,7 @@ module OpenAI
|
|
|
672
672
|
| OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::CodeInterpreter
|
|
673
673
|
| OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::Shell
|
|
674
674
|
| OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::ImageGeneration
|
|
675
|
-
| OpenAI::Live::
|
|
675
|
+
| OpenAI::Live::McpTool
|
|
676
676
|
| OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::Custom
|
|
677
677
|
| OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::Namespace
|
|
678
678
|
| OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::ToolSearch
|
|
@@ -683,6 +683,10 @@ module OpenAI
|
|
|
683
683
|
module Tool
|
|
684
684
|
extend OpenAI::Internal::Type::Union
|
|
685
685
|
|
|
686
|
+
type mcp = ::OpenAI::Models::Live::mcp_tool
|
|
687
|
+
|
|
688
|
+
class Mcp = ::OpenAI::Models::Live::McpTool
|
|
689
|
+
|
|
686
690
|
type web_search = { ?type: :web_search }
|
|
687
691
|
|
|
688
692
|
class WebSearch < OpenAI::Internal::Type::BaseModel
|
|
@@ -1102,16 +1106,6 @@ module OpenAI
|
|
|
1102
1106
|
def to_hash: -> { ?type: :image_generation }
|
|
1103
1107
|
end
|
|
1104
1108
|
|
|
1105
|
-
type mcp = { ?type: :mcp }
|
|
1106
|
-
|
|
1107
|
-
class Mcp < OpenAI::Internal::Type::BaseModel
|
|
1108
|
-
attr_accessor type: :mcp
|
|
1109
|
-
|
|
1110
|
-
def initialize: (?type: :mcp) -> void
|
|
1111
|
-
|
|
1112
|
-
def to_hash: -> { ?type: :mcp }
|
|
1113
|
-
end
|
|
1114
|
-
|
|
1115
1109
|
type custom = { ?type: :custom }
|
|
1116
1110
|
|
|
1117
1111
|
class Custom < OpenAI::Internal::Type::BaseModel
|
data/sig/openai/models.rbs
CHANGED
|
@@ -63,6 +63,10 @@ module OpenAI
|
|
|
63
63
|
|
|
64
64
|
class CreateEmbeddingResponse = OpenAI::Models::CreateEmbeddingResponse
|
|
65
65
|
|
|
66
|
+
class CsamModeration = OpenAI::Models::CsamModeration
|
|
67
|
+
|
|
68
|
+
class CsamModerationResponse = OpenAI::Models::CsamModerationResponse
|
|
69
|
+
|
|
66
70
|
module CustomToolInputFormat = OpenAI::Models::CustomToolInputFormat
|
|
67
71
|
|
|
68
72
|
class Decision = OpenAI::Models::Decision
|
|
@@ -23,7 +23,6 @@ module OpenAI
|
|
|
23
23
|
?metadata: ::Hash[Symbol, String]?,
|
|
24
24
|
?prompt_cache_options: OpenAI::Beta::Agents::SessionCreateParams::PromptCacheOptions?,
|
|
25
25
|
?review: OpenAI::Models::Beta::Agents::SessionCreateParams::review,
|
|
26
|
-
?spend_control: OpenAI::Beta::Agents::SessionCreateParams::SpendControl?,
|
|
27
26
|
?stream_options: OpenAI::Beta::Agents::SessionCreateParams::StreamOptions,
|
|
28
27
|
?vault_ids: ::Array[String]?,
|
|
29
28
|
?request_options: OpenAI::request_opts
|
|
@@ -39,7 +38,6 @@ module OpenAI
|
|
|
39
38
|
?metadata: ::Hash[Symbol, String]?,
|
|
40
39
|
?prompt_cache_options: OpenAI::Beta::Agents::SessionCreateParams::PromptCacheOptions?,
|
|
41
40
|
?review: OpenAI::Models::Beta::Agents::SessionCreateParams::review,
|
|
42
|
-
?spend_control: OpenAI::Beta::Agents::SessionCreateParams::SpendControl?,
|
|
43
41
|
?stream_options: OpenAI::Beta::Agents::SessionCreateParams::StreamOptions,
|
|
44
42
|
?vault_ids: ::Array[String]?,
|
|
45
43
|
?request_options: OpenAI::request_opts
|
|
@@ -56,7 +54,6 @@ module OpenAI
|
|
|
56
54
|
?metadata: ::Hash[Symbol, String]?,
|
|
57
55
|
?prompt_cache_options: OpenAI::Beta::Agents::SessionUpdateParams::PromptCacheOptions?,
|
|
58
56
|
?review: OpenAI::Models::Beta::Agents::SessionUpdateParams::review,
|
|
59
|
-
?spend_control: OpenAI::Beta::Agents::SessionUpdateParams::SpendControl?,
|
|
60
57
|
?request_options: OpenAI::request_opts
|
|
61
58
|
) -> OpenAI::Beta::AgentSession
|
|
62
59
|
|