openai 0.66.1 → 0.68.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 +23 -0
- data/README.md +1 -1
- data/lib/openai/internal/transport/base_client.rb +4 -1
- data/lib/openai/models/admin/organization/admin_api_key.rb +9 -1
- data/lib/openai/models/admin/organization/admin_api_key_create_params.rb +14 -1
- data/lib/openai/models/admin/organization/audit_log_list_params.rb +16 -2
- data/lib/openai/models/admin/organization/audit_log_list_response.rb +241 -1
- data/lib/openai/models/admin/organization/projects/spend_alert_retrieve_params.rb +32 -0
- data/lib/openai/models/admin/organization/spend_alert_retrieve_params.rb +24 -0
- data/lib/openai/models/realtime/realtime_response_create_mcp_tool.rb +17 -8
- data/lib/openai/models/realtime/realtime_session_create_response.rb +17 -8
- data/lib/openai/models/realtime/realtime_tools_config_union.rb +17 -8
- data/lib/openai/models/reasoning.rb +27 -1
- data/lib/openai/models/responses/input_token_count_params.rb +4 -0
- data/lib/openai/models/responses/response_create_params.rb +4 -0
- data/lib/openai/models/responses/responses_client_event.rb +4 -0
- data/lib/openai/models/responses/tool.rb +17 -8
- data/lib/openai/models/video_create_params.rb +1 -0
- data/lib/openai/models/video_edit_params.rb +2 -2
- data/lib/openai/resources/admin/organization/admin_api_keys.rb +7 -1
- data/lib/openai/resources/admin/organization/audit_logs.rb +3 -1
- data/lib/openai/resources/admin/organization/projects/spend_alerts.rb +28 -0
- data/lib/openai/resources/admin/organization/spend_alerts.rb +21 -0
- data/lib/openai/version.rb +1 -1
- data/lib/openai.rb +2 -0
- data/rbi/openai/models/admin/organization/admin_api_key.rbi +8 -0
- data/rbi/openai/models/admin/organization/admin_api_key_create_params.rbi +21 -2
- data/rbi/openai/models/admin/organization/audit_log_list_params.rbi +31 -2
- data/rbi/openai/models/admin/organization/audit_log_list_response.rbi +468 -0
- data/rbi/openai/models/admin/organization/projects/spend_alert_retrieve_params.rbi +52 -0
- data/rbi/openai/models/admin/organization/spend_alert_retrieve_params.rbi +42 -0
- data/rbi/openai/models/realtime/realtime_response_create_mcp_tool.rbi +24 -11
- data/rbi/openai/models/realtime/realtime_session_create_response.rbi +24 -11
- data/rbi/openai/models/realtime/realtime_tools_config_union.rbi +24 -11
- data/rbi/openai/models/reasoning.rbi +34 -0
- data/rbi/openai/models/responses/tool.rbi +24 -11
- data/rbi/openai/models/video_edit_params.rbi +1 -1
- data/rbi/openai/resources/admin/organization/admin_api_keys.rbi +8 -1
- data/rbi/openai/resources/admin/organization/audit_logs.rbi +8 -1
- data/rbi/openai/resources/admin/organization/projects/spend_alerts.rbi +19 -0
- data/rbi/openai/resources/admin/organization/spend_alerts.rbi +14 -0
- data/sig/openai/models/admin/organization/admin_api_key.rbs +5 -0
- data/sig/openai/models/admin/organization/admin_api_key_create_params.rbs +8 -1
- data/sig/openai/models/admin/organization/audit_log_list_params.rbs +12 -1
- data/sig/openai/models/admin/organization/audit_log_list_response.rbs +228 -0
- data/sig/openai/models/admin/organization/projects/spend_alert_retrieve_params.rbs +34 -0
- data/sig/openai/models/admin/organization/spend_alert_retrieve_params.rbs +27 -0
- data/sig/openai/models/realtime/realtime_response_create_mcp_tool.rbs +9 -2
- data/sig/openai/models/realtime/realtime_session_create_response.rbs +9 -2
- data/sig/openai/models/realtime/realtime_tools_config_union.rbs +9 -2
- data/sig/openai/models/reasoning.rbs +17 -0
- data/sig/openai/models/responses/tool.rbs +9 -2
- data/sig/openai/resources/admin/organization/admin_api_keys.rbs +1 -0
- data/sig/openai/resources/admin/organization/audit_logs.rbs +1 -0
- data/sig/openai/resources/admin/organization/projects/spend_alerts.rbs +6 -0
- data/sig/openai/resources/admin/organization/spend_alerts.rbs +5 -0
- metadata +8 -2
|
@@ -43,8 +43,8 @@ module OpenAI
|
|
|
43
43
|
attr_writer :authorization
|
|
44
44
|
|
|
45
45
|
# Identifier for service connectors, like those available in ChatGPT. One of
|
|
46
|
-
# `server_url` or `
|
|
47
|
-
# connectors
|
|
46
|
+
# `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more about
|
|
47
|
+
# service connectors
|
|
48
48
|
# [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors).
|
|
49
49
|
#
|
|
50
50
|
# Currently supported `connector_id` values are:
|
|
@@ -106,14 +106,22 @@ module OpenAI
|
|
|
106
106
|
sig { params(server_description: String).void }
|
|
107
107
|
attr_writer :server_description
|
|
108
108
|
|
|
109
|
-
# The URL for the MCP server. One of `server_url` or `
|
|
110
|
-
# provided.
|
|
109
|
+
# The URL for the MCP server. One of `server_url`, `connector_id`, or `tunnel_id`
|
|
110
|
+
# must be provided.
|
|
111
111
|
sig { returns(T.nilable(String)) }
|
|
112
112
|
attr_reader :server_url
|
|
113
113
|
|
|
114
114
|
sig { params(server_url: String).void }
|
|
115
115
|
attr_writer :server_url
|
|
116
116
|
|
|
117
|
+
# The Secure MCP Tunnel ID to use instead of a direct server URL. One of
|
|
118
|
+
# `server_url`, `connector_id`, or `tunnel_id` must be provided.
|
|
119
|
+
sig { returns(T.nilable(String)) }
|
|
120
|
+
attr_reader :tunnel_id
|
|
121
|
+
|
|
122
|
+
sig { params(tunnel_id: String).void }
|
|
123
|
+
attr_writer :tunnel_id
|
|
124
|
+
|
|
117
125
|
# Give the model access to additional tools via remote Model Context Protocol
|
|
118
126
|
# (MCP) servers.
|
|
119
127
|
# [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp).
|
|
@@ -141,6 +149,7 @@ module OpenAI
|
|
|
141
149
|
),
|
|
142
150
|
server_description: String,
|
|
143
151
|
server_url: String,
|
|
152
|
+
tunnel_id: String,
|
|
144
153
|
type: Symbol
|
|
145
154
|
).returns(T.attached_class)
|
|
146
155
|
end
|
|
@@ -154,8 +163,8 @@ module OpenAI
|
|
|
154
163
|
# OAuth authorization flow and provide the token here.
|
|
155
164
|
authorization: nil,
|
|
156
165
|
# Identifier for service connectors, like those available in ChatGPT. One of
|
|
157
|
-
# `server_url` or `
|
|
158
|
-
# connectors
|
|
166
|
+
# `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more about
|
|
167
|
+
# service connectors
|
|
159
168
|
# [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors).
|
|
160
169
|
#
|
|
161
170
|
# Currently supported `connector_id` values are:
|
|
@@ -178,9 +187,12 @@ module OpenAI
|
|
|
178
187
|
require_approval: nil,
|
|
179
188
|
# Optional description of the MCP server, used to provide more context.
|
|
180
189
|
server_description: nil,
|
|
181
|
-
# The URL for the MCP server. One of `server_url` or `
|
|
182
|
-
# provided.
|
|
190
|
+
# The URL for the MCP server. One of `server_url`, `connector_id`, or `tunnel_id`
|
|
191
|
+
# must be provided.
|
|
183
192
|
server_url: nil,
|
|
193
|
+
# The Secure MCP Tunnel ID to use instead of a direct server URL. One of
|
|
194
|
+
# `server_url`, `connector_id`, or `tunnel_id` must be provided.
|
|
195
|
+
tunnel_id: nil,
|
|
184
196
|
# The type of the MCP tool. Always `mcp`.
|
|
185
197
|
type: :mcp
|
|
186
198
|
)
|
|
@@ -211,7 +223,8 @@ module OpenAI
|
|
|
211
223
|
)
|
|
212
224
|
),
|
|
213
225
|
server_description: String,
|
|
214
|
-
server_url: String
|
|
226
|
+
server_url: String,
|
|
227
|
+
tunnel_id: String
|
|
215
228
|
}
|
|
216
229
|
)
|
|
217
230
|
end
|
|
@@ -301,8 +314,8 @@ module OpenAI
|
|
|
301
314
|
end
|
|
302
315
|
|
|
303
316
|
# Identifier for service connectors, like those available in ChatGPT. One of
|
|
304
|
-
# `server_url` or `
|
|
305
|
-
# connectors
|
|
317
|
+
# `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more about
|
|
318
|
+
# service connectors
|
|
306
319
|
# [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors).
|
|
307
320
|
#
|
|
308
321
|
# Currently supported `connector_id` values are:
|
|
@@ -1531,8 +1531,8 @@ module OpenAI
|
|
|
1531
1531
|
attr_writer :authorization
|
|
1532
1532
|
|
|
1533
1533
|
# Identifier for service connectors, like those available in ChatGPT. One of
|
|
1534
|
-
# `server_url` or `
|
|
1535
|
-
# connectors
|
|
1534
|
+
# `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more about
|
|
1535
|
+
# service connectors
|
|
1536
1536
|
# [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors).
|
|
1537
1537
|
#
|
|
1538
1538
|
# Currently supported `connector_id` values are:
|
|
@@ -1591,14 +1591,22 @@ module OpenAI
|
|
|
1591
1591
|
sig { params(server_description: String).void }
|
|
1592
1592
|
attr_writer :server_description
|
|
1593
1593
|
|
|
1594
|
-
# The URL for the MCP server. One of `server_url` or `
|
|
1595
|
-
# provided.
|
|
1594
|
+
# The URL for the MCP server. One of `server_url`, `connector_id`, or `tunnel_id`
|
|
1595
|
+
# must be provided.
|
|
1596
1596
|
sig { returns(T.nilable(String)) }
|
|
1597
1597
|
attr_reader :server_url
|
|
1598
1598
|
|
|
1599
1599
|
sig { params(server_url: String).void }
|
|
1600
1600
|
attr_writer :server_url
|
|
1601
1601
|
|
|
1602
|
+
# The Secure MCP Tunnel ID to use instead of a direct server URL. One of
|
|
1603
|
+
# `server_url`, `connector_id`, or `tunnel_id` must be provided.
|
|
1604
|
+
sig { returns(T.nilable(String)) }
|
|
1605
|
+
attr_reader :tunnel_id
|
|
1606
|
+
|
|
1607
|
+
sig { params(tunnel_id: String).void }
|
|
1608
|
+
attr_writer :tunnel_id
|
|
1609
|
+
|
|
1602
1610
|
# Give the model access to additional tools via remote Model Context Protocol
|
|
1603
1611
|
# (MCP) servers.
|
|
1604
1612
|
# [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp).
|
|
@@ -1626,6 +1634,7 @@ module OpenAI
|
|
|
1626
1634
|
),
|
|
1627
1635
|
server_description: String,
|
|
1628
1636
|
server_url: String,
|
|
1637
|
+
tunnel_id: String,
|
|
1629
1638
|
type: Symbol
|
|
1630
1639
|
).returns(T.attached_class)
|
|
1631
1640
|
end
|
|
@@ -1639,8 +1648,8 @@ module OpenAI
|
|
|
1639
1648
|
# OAuth authorization flow and provide the token here.
|
|
1640
1649
|
authorization: nil,
|
|
1641
1650
|
# Identifier for service connectors, like those available in ChatGPT. One of
|
|
1642
|
-
# `server_url` or `
|
|
1643
|
-
# connectors
|
|
1651
|
+
# `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more about
|
|
1652
|
+
# service connectors
|
|
1644
1653
|
# [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors).
|
|
1645
1654
|
#
|
|
1646
1655
|
# Currently supported `connector_id` values are:
|
|
@@ -1663,9 +1672,12 @@ module OpenAI
|
|
|
1663
1672
|
require_approval: nil,
|
|
1664
1673
|
# Optional description of the MCP server, used to provide more context.
|
|
1665
1674
|
server_description: nil,
|
|
1666
|
-
# The URL for the MCP server. One of `server_url` or `
|
|
1667
|
-
# provided.
|
|
1675
|
+
# The URL for the MCP server. One of `server_url`, `connector_id`, or `tunnel_id`
|
|
1676
|
+
# must be provided.
|
|
1668
1677
|
server_url: nil,
|
|
1678
|
+
# The Secure MCP Tunnel ID to use instead of a direct server URL. One of
|
|
1679
|
+
# `server_url`, `connector_id`, or `tunnel_id` must be provided.
|
|
1680
|
+
tunnel_id: nil,
|
|
1669
1681
|
# The type of the MCP tool. Always `mcp`.
|
|
1670
1682
|
type: :mcp
|
|
1671
1683
|
)
|
|
@@ -1690,7 +1702,8 @@ module OpenAI
|
|
|
1690
1702
|
OpenAI::Realtime::RealtimeSessionCreateResponse::Tool::McpTool::RequireApproval::Variants
|
|
1691
1703
|
),
|
|
1692
1704
|
server_description: String,
|
|
1693
|
-
server_url: String
|
|
1705
|
+
server_url: String,
|
|
1706
|
+
tunnel_id: String
|
|
1694
1707
|
}
|
|
1695
1708
|
)
|
|
1696
1709
|
end
|
|
@@ -1780,8 +1793,8 @@ module OpenAI
|
|
|
1780
1793
|
end
|
|
1781
1794
|
|
|
1782
1795
|
# Identifier for service connectors, like those available in ChatGPT. One of
|
|
1783
|
-
# `server_url` or `
|
|
1784
|
-
# connectors
|
|
1796
|
+
# `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more about
|
|
1797
|
+
# service connectors
|
|
1785
1798
|
# [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors).
|
|
1786
1799
|
#
|
|
1787
1800
|
# Currently supported `connector_id` values are:
|
|
@@ -57,8 +57,8 @@ module OpenAI
|
|
|
57
57
|
attr_writer :authorization
|
|
58
58
|
|
|
59
59
|
# Identifier for service connectors, like those available in ChatGPT. One of
|
|
60
|
-
# `server_url` or `
|
|
61
|
-
# connectors
|
|
60
|
+
# `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more about
|
|
61
|
+
# service connectors
|
|
62
62
|
# [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors).
|
|
63
63
|
#
|
|
64
64
|
# Currently supported `connector_id` values are:
|
|
@@ -120,14 +120,22 @@ module OpenAI
|
|
|
120
120
|
sig { params(server_description: String).void }
|
|
121
121
|
attr_writer :server_description
|
|
122
122
|
|
|
123
|
-
# The URL for the MCP server. One of `server_url` or `
|
|
124
|
-
# provided.
|
|
123
|
+
# The URL for the MCP server. One of `server_url`, `connector_id`, or `tunnel_id`
|
|
124
|
+
# must be provided.
|
|
125
125
|
sig { returns(T.nilable(String)) }
|
|
126
126
|
attr_reader :server_url
|
|
127
127
|
|
|
128
128
|
sig { params(server_url: String).void }
|
|
129
129
|
attr_writer :server_url
|
|
130
130
|
|
|
131
|
+
# The Secure MCP Tunnel ID to use instead of a direct server URL. One of
|
|
132
|
+
# `server_url`, `connector_id`, or `tunnel_id` must be provided.
|
|
133
|
+
sig { returns(T.nilable(String)) }
|
|
134
|
+
attr_reader :tunnel_id
|
|
135
|
+
|
|
136
|
+
sig { params(tunnel_id: String).void }
|
|
137
|
+
attr_writer :tunnel_id
|
|
138
|
+
|
|
131
139
|
# Give the model access to additional tools via remote Model Context Protocol
|
|
132
140
|
# (MCP) servers.
|
|
133
141
|
# [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp).
|
|
@@ -155,6 +163,7 @@ module OpenAI
|
|
|
155
163
|
),
|
|
156
164
|
server_description: String,
|
|
157
165
|
server_url: String,
|
|
166
|
+
tunnel_id: String,
|
|
158
167
|
type: Symbol
|
|
159
168
|
).returns(T.attached_class)
|
|
160
169
|
end
|
|
@@ -168,8 +177,8 @@ module OpenAI
|
|
|
168
177
|
# OAuth authorization flow and provide the token here.
|
|
169
178
|
authorization: nil,
|
|
170
179
|
# Identifier for service connectors, like those available in ChatGPT. One of
|
|
171
|
-
# `server_url` or `
|
|
172
|
-
# connectors
|
|
180
|
+
# `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more about
|
|
181
|
+
# service connectors
|
|
173
182
|
# [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors).
|
|
174
183
|
#
|
|
175
184
|
# Currently supported `connector_id` values are:
|
|
@@ -192,9 +201,12 @@ module OpenAI
|
|
|
192
201
|
require_approval: nil,
|
|
193
202
|
# Optional description of the MCP server, used to provide more context.
|
|
194
203
|
server_description: nil,
|
|
195
|
-
# The URL for the MCP server. One of `server_url` or `
|
|
196
|
-
# provided.
|
|
204
|
+
# The URL for the MCP server. One of `server_url`, `connector_id`, or `tunnel_id`
|
|
205
|
+
# must be provided.
|
|
197
206
|
server_url: nil,
|
|
207
|
+
# The Secure MCP Tunnel ID to use instead of a direct server URL. One of
|
|
208
|
+
# `server_url`, `connector_id`, or `tunnel_id` must be provided.
|
|
209
|
+
tunnel_id: nil,
|
|
198
210
|
# The type of the MCP tool. Always `mcp`.
|
|
199
211
|
type: :mcp
|
|
200
212
|
)
|
|
@@ -225,7 +237,8 @@ module OpenAI
|
|
|
225
237
|
)
|
|
226
238
|
),
|
|
227
239
|
server_description: String,
|
|
228
|
-
server_url: String
|
|
240
|
+
server_url: String,
|
|
241
|
+
tunnel_id: String
|
|
229
242
|
}
|
|
230
243
|
)
|
|
231
244
|
end
|
|
@@ -315,8 +328,8 @@ module OpenAI
|
|
|
315
328
|
end
|
|
316
329
|
|
|
317
330
|
# Identifier for service connectors, like those available in ChatGPT. One of
|
|
318
|
-
# `server_url` or `
|
|
319
|
-
# connectors
|
|
331
|
+
# `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more about
|
|
332
|
+
# service connectors
|
|
320
333
|
# [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors).
|
|
321
334
|
#
|
|
322
335
|
# Currently supported `connector_id` values are:
|
|
@@ -6,6 +6,12 @@ module OpenAI
|
|
|
6
6
|
OrHash =
|
|
7
7
|
T.type_alias { T.any(OpenAI::Reasoning, OpenAI::Internal::AnyHash) }
|
|
8
8
|
|
|
9
|
+
# Controls which reasoning items are rendered back to the model on later turns.
|
|
10
|
+
# When returned on a response, this is the effective reasoning context mode used
|
|
11
|
+
# for the response.
|
|
12
|
+
sig { returns(T.nilable(OpenAI::Reasoning::Context::OrSymbol)) }
|
|
13
|
+
attr_accessor :context
|
|
14
|
+
|
|
9
15
|
# Constrains effort on reasoning for
|
|
10
16
|
# [reasoning models](https://platform.openai.com/docs/guides/reasoning). Currently
|
|
11
17
|
# supported values are `none`, `minimal`, `low`, `medium`, `high`, and `xhigh`.
|
|
@@ -45,6 +51,7 @@ module OpenAI
|
|
|
45
51
|
# [reasoning models](https://platform.openai.com/docs/guides/reasoning).
|
|
46
52
|
sig do
|
|
47
53
|
params(
|
|
54
|
+
context: T.nilable(OpenAI::Reasoning::Context::OrSymbol),
|
|
48
55
|
effort: T.nilable(OpenAI::ReasoningEffort::OrSymbol),
|
|
49
56
|
generate_summary:
|
|
50
57
|
T.nilable(OpenAI::Reasoning::GenerateSummary::OrSymbol),
|
|
@@ -52,6 +59,10 @@ module OpenAI
|
|
|
52
59
|
).returns(T.attached_class)
|
|
53
60
|
end
|
|
54
61
|
def self.new(
|
|
62
|
+
# Controls which reasoning items are rendered back to the model on later turns.
|
|
63
|
+
# When returned on a response, this is the effective reasoning context mode used
|
|
64
|
+
# for the response.
|
|
65
|
+
context: nil,
|
|
55
66
|
# Constrains effort on reasoning for
|
|
56
67
|
# [reasoning models](https://platform.openai.com/docs/guides/reasoning). Currently
|
|
57
68
|
# supported values are `none`, `minimal`, `low`, `medium`, `high`, and `xhigh`.
|
|
@@ -85,6 +96,7 @@ module OpenAI
|
|
|
85
96
|
sig do
|
|
86
97
|
override.returns(
|
|
87
98
|
{
|
|
99
|
+
context: T.nilable(OpenAI::Reasoning::Context::OrSymbol),
|
|
88
100
|
effort: T.nilable(OpenAI::ReasoningEffort::OrSymbol),
|
|
89
101
|
generate_summary:
|
|
90
102
|
T.nilable(OpenAI::Reasoning::GenerateSummary::OrSymbol),
|
|
@@ -95,6 +107,28 @@ module OpenAI
|
|
|
95
107
|
def to_hash
|
|
96
108
|
end
|
|
97
109
|
|
|
110
|
+
# Controls which reasoning items are rendered back to the model on later turns.
|
|
111
|
+
# When returned on a response, this is the effective reasoning context mode used
|
|
112
|
+
# for the response.
|
|
113
|
+
module Context
|
|
114
|
+
extend OpenAI::Internal::Type::Enum
|
|
115
|
+
|
|
116
|
+
TaggedSymbol =
|
|
117
|
+
T.type_alias { T.all(Symbol, OpenAI::Reasoning::Context) }
|
|
118
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
119
|
+
|
|
120
|
+
AUTO = T.let(:auto, OpenAI::Reasoning::Context::TaggedSymbol)
|
|
121
|
+
CURRENT_TURN =
|
|
122
|
+
T.let(:current_turn, OpenAI::Reasoning::Context::TaggedSymbol)
|
|
123
|
+
ALL_TURNS = T.let(:all_turns, OpenAI::Reasoning::Context::TaggedSymbol)
|
|
124
|
+
|
|
125
|
+
sig do
|
|
126
|
+
override.returns(T::Array[OpenAI::Reasoning::Context::TaggedSymbol])
|
|
127
|
+
end
|
|
128
|
+
def self.values
|
|
129
|
+
end
|
|
130
|
+
end
|
|
131
|
+
|
|
98
132
|
# **Deprecated:** use `summary` instead.
|
|
99
133
|
#
|
|
100
134
|
# A summary of the reasoning performed by the model. This can be useful for
|
|
@@ -65,8 +65,8 @@ module OpenAI
|
|
|
65
65
|
attr_writer :authorization
|
|
66
66
|
|
|
67
67
|
# Identifier for service connectors, like those available in ChatGPT. One of
|
|
68
|
-
# `server_url` or `
|
|
69
|
-
# connectors
|
|
68
|
+
# `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more about
|
|
69
|
+
# service connectors
|
|
70
70
|
# [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors).
|
|
71
71
|
#
|
|
72
72
|
# Currently supported `connector_id` values are:
|
|
@@ -125,14 +125,22 @@ module OpenAI
|
|
|
125
125
|
sig { params(server_description: String).void }
|
|
126
126
|
attr_writer :server_description
|
|
127
127
|
|
|
128
|
-
# The URL for the MCP server. One of `server_url` or `
|
|
129
|
-
# provided.
|
|
128
|
+
# The URL for the MCP server. One of `server_url`, `connector_id`, or `tunnel_id`
|
|
129
|
+
# must be provided.
|
|
130
130
|
sig { returns(T.nilable(String)) }
|
|
131
131
|
attr_reader :server_url
|
|
132
132
|
|
|
133
133
|
sig { params(server_url: String).void }
|
|
134
134
|
attr_writer :server_url
|
|
135
135
|
|
|
136
|
+
# The Secure MCP Tunnel ID to use instead of a direct server URL. One of
|
|
137
|
+
# `server_url`, `connector_id`, or `tunnel_id` must be provided.
|
|
138
|
+
sig { returns(T.nilable(String)) }
|
|
139
|
+
attr_reader :tunnel_id
|
|
140
|
+
|
|
141
|
+
sig { params(tunnel_id: String).void }
|
|
142
|
+
attr_writer :tunnel_id
|
|
143
|
+
|
|
136
144
|
# Give the model access to additional tools via remote Model Context Protocol
|
|
137
145
|
# (MCP) servers.
|
|
138
146
|
# [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp).
|
|
@@ -159,6 +167,7 @@ module OpenAI
|
|
|
159
167
|
),
|
|
160
168
|
server_description: String,
|
|
161
169
|
server_url: String,
|
|
170
|
+
tunnel_id: String,
|
|
162
171
|
type: Symbol
|
|
163
172
|
).returns(T.attached_class)
|
|
164
173
|
end
|
|
@@ -172,8 +181,8 @@ module OpenAI
|
|
|
172
181
|
# OAuth authorization flow and provide the token here.
|
|
173
182
|
authorization: nil,
|
|
174
183
|
# Identifier for service connectors, like those available in ChatGPT. One of
|
|
175
|
-
# `server_url` or `
|
|
176
|
-
# connectors
|
|
184
|
+
# `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more about
|
|
185
|
+
# service connectors
|
|
177
186
|
# [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors).
|
|
178
187
|
#
|
|
179
188
|
# Currently supported `connector_id` values are:
|
|
@@ -196,9 +205,12 @@ module OpenAI
|
|
|
196
205
|
require_approval: nil,
|
|
197
206
|
# Optional description of the MCP server, used to provide more context.
|
|
198
207
|
server_description: nil,
|
|
199
|
-
# The URL for the MCP server. One of `server_url` or `
|
|
200
|
-
# provided.
|
|
208
|
+
# The URL for the MCP server. One of `server_url`, `connector_id`, or `tunnel_id`
|
|
209
|
+
# must be provided.
|
|
201
210
|
server_url: nil,
|
|
211
|
+
# The Secure MCP Tunnel ID to use instead of a direct server URL. One of
|
|
212
|
+
# `server_url`, `connector_id`, or `tunnel_id` must be provided.
|
|
213
|
+
tunnel_id: nil,
|
|
202
214
|
# The type of the MCP tool. Always `mcp`.
|
|
203
215
|
type: :mcp
|
|
204
216
|
)
|
|
@@ -229,7 +241,8 @@ module OpenAI
|
|
|
229
241
|
)
|
|
230
242
|
),
|
|
231
243
|
server_description: String,
|
|
232
|
-
server_url: String
|
|
244
|
+
server_url: String,
|
|
245
|
+
tunnel_id: String
|
|
233
246
|
}
|
|
234
247
|
)
|
|
235
248
|
end
|
|
@@ -317,8 +330,8 @@ module OpenAI
|
|
|
317
330
|
end
|
|
318
331
|
|
|
319
332
|
# Identifier for service connectors, like those available in ChatGPT. One of
|
|
320
|
-
# `server_url` or `
|
|
321
|
-
# connectors
|
|
333
|
+
# `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more about
|
|
334
|
+
# service connectors
|
|
322
335
|
# [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors).
|
|
323
336
|
#
|
|
324
337
|
# Currently supported `connector_id` values are:
|
|
@@ -87,7 +87,7 @@ module OpenAI
|
|
|
87
87
|
sig { returns(String) }
|
|
88
88
|
attr_accessor :id
|
|
89
89
|
|
|
90
|
-
# Reference to the completed video.
|
|
90
|
+
# Reference to the completed video to edit.
|
|
91
91
|
sig { params(id: String).returns(T.attached_class) }
|
|
92
92
|
def self.new(
|
|
93
93
|
# The identifier of the completed video.
|
|
@@ -9,12 +9,19 @@ module OpenAI
|
|
|
9
9
|
sig do
|
|
10
10
|
params(
|
|
11
11
|
name: String,
|
|
12
|
+
expires_in_seconds: Integer,
|
|
12
13
|
request_options: OpenAI::RequestOptions::OrHash
|
|
13
14
|
).returns(
|
|
14
15
|
OpenAI::Models::Admin::Organization::AdminAPIKeyCreateResponse
|
|
15
16
|
)
|
|
16
17
|
end
|
|
17
|
-
def create(
|
|
18
|
+
def create(
|
|
19
|
+
name:,
|
|
20
|
+
# The number of seconds until the API key expires. Omit this field for a key that
|
|
21
|
+
# does not expire.
|
|
22
|
+
expires_in_seconds: nil,
|
|
23
|
+
request_options: {}
|
|
24
|
+
)
|
|
18
25
|
end
|
|
19
26
|
|
|
20
27
|
# Retrieve a single organization API key
|
|
@@ -22,6 +22,7 @@ module OpenAI
|
|
|
22
22
|
limit: Integer,
|
|
23
23
|
project_ids: T::Array[String],
|
|
24
24
|
resource_ids: T::Array[String],
|
|
25
|
+
tenant_only: T::Boolean,
|
|
25
26
|
request_options: OpenAI::RequestOptions::OrHash
|
|
26
27
|
).returns(
|
|
27
28
|
OpenAI::Internal::ConversationCursorPage[
|
|
@@ -57,8 +58,14 @@ module OpenAI
|
|
|
57
58
|
# Return only events for these projects.
|
|
58
59
|
project_ids: nil,
|
|
59
60
|
# Return only events performed on these targets. For example, a project ID
|
|
60
|
-
# updated.
|
|
61
|
+
# updated. For ChatGPT connector role events, use the workspace connector resource
|
|
62
|
+
# ID shown in `details.id`, such as `<workspace_id>__<connector_id>`.
|
|
61
63
|
resource_ids: nil,
|
|
64
|
+
# Return only tenant-scoped events associated with this organization. Required for
|
|
65
|
+
# tenant-scoped events such as `role.bound_to_resource` and
|
|
66
|
+
# `role.unbound_from_resource`. When `true`, all supplied event types must be
|
|
67
|
+
# tenant-scoped.
|
|
68
|
+
tenant_only: nil,
|
|
62
69
|
request_options: {}
|
|
63
70
|
)
|
|
64
71
|
end
|
|
@@ -37,6 +37,25 @@ module OpenAI
|
|
|
37
37
|
)
|
|
38
38
|
end
|
|
39
39
|
|
|
40
|
+
# Retrieves a project spend alert.
|
|
41
|
+
sig do
|
|
42
|
+
params(
|
|
43
|
+
alert_id: String,
|
|
44
|
+
project_id: String,
|
|
45
|
+
request_options: OpenAI::RequestOptions::OrHash
|
|
46
|
+
).returns(
|
|
47
|
+
OpenAI::Admin::Organization::Projects::ProjectSpendAlert
|
|
48
|
+
)
|
|
49
|
+
end
|
|
50
|
+
def retrieve(
|
|
51
|
+
# The ID of the spend alert to retrieve.
|
|
52
|
+
alert_id,
|
|
53
|
+
# The ID of the project.
|
|
54
|
+
project_id:,
|
|
55
|
+
request_options: {}
|
|
56
|
+
)
|
|
57
|
+
end
|
|
58
|
+
|
|
40
59
|
# Updates a project spend alert.
|
|
41
60
|
sig do
|
|
42
61
|
params(
|
|
@@ -31,6 +31,20 @@ module OpenAI
|
|
|
31
31
|
)
|
|
32
32
|
end
|
|
33
33
|
|
|
34
|
+
# Retrieves an organization spend alert.
|
|
35
|
+
sig do
|
|
36
|
+
params(
|
|
37
|
+
alert_id: String,
|
|
38
|
+
request_options: OpenAI::RequestOptions::OrHash
|
|
39
|
+
).returns(OpenAI::Admin::Organization::OrganizationSpendAlert)
|
|
40
|
+
end
|
|
41
|
+
def retrieve(
|
|
42
|
+
# The ID of the spend alert to retrieve.
|
|
43
|
+
alert_id,
|
|
44
|
+
request_options: {}
|
|
45
|
+
)
|
|
46
|
+
end
|
|
47
|
+
|
|
34
48
|
# Updates an organization spend alert.
|
|
35
49
|
sig do
|
|
36
50
|
params(
|
|
@@ -6,6 +6,7 @@ module OpenAI
|
|
|
6
6
|
{
|
|
7
7
|
id: String,
|
|
8
8
|
created_at: Integer,
|
|
9
|
+
expires_at: Integer?,
|
|
9
10
|
object: :"organization.admin_api_key",
|
|
10
11
|
owner: OpenAI::Admin::Organization::AdminAPIKey::Owner,
|
|
11
12
|
redacted_value: String,
|
|
@@ -18,6 +19,8 @@ module OpenAI
|
|
|
18
19
|
|
|
19
20
|
attr_accessor created_at: Integer
|
|
20
21
|
|
|
22
|
+
attr_accessor expires_at: Integer?
|
|
23
|
+
|
|
21
24
|
attr_accessor object: :"organization.admin_api_key"
|
|
22
25
|
|
|
23
26
|
attr_accessor owner: OpenAI::Admin::Organization::AdminAPIKey::Owner
|
|
@@ -31,6 +34,7 @@ module OpenAI
|
|
|
31
34
|
def initialize: (
|
|
32
35
|
id: String,
|
|
33
36
|
created_at: Integer,
|
|
37
|
+
expires_at: Integer?,
|
|
34
38
|
owner: OpenAI::Admin::Organization::AdminAPIKey::Owner,
|
|
35
39
|
redacted_value: String,
|
|
36
40
|
?last_used_at: Integer?,
|
|
@@ -41,6 +45,7 @@ module OpenAI
|
|
|
41
45
|
def to_hash: -> {
|
|
42
46
|
id: String,
|
|
43
47
|
created_at: Integer,
|
|
48
|
+
expires_at: Integer?,
|
|
44
49
|
object: :"organization.admin_api_key",
|
|
45
50
|
owner: OpenAI::Admin::Organization::AdminAPIKey::Owner,
|
|
46
51
|
redacted_value: String,
|
|
@@ -3,7 +3,8 @@ module OpenAI
|
|
|
3
3
|
module Admin
|
|
4
4
|
module Organization
|
|
5
5
|
type admin_api_key_create_params =
|
|
6
|
-
{ name: String
|
|
6
|
+
{ name: String, expires_in_seconds: Integer }
|
|
7
|
+
& OpenAI::Internal::Type::request_parameters
|
|
7
8
|
|
|
8
9
|
class AdminAPIKeyCreateParams < OpenAI::Internal::Type::BaseModel
|
|
9
10
|
extend OpenAI::Internal::Type::RequestParameters::Converter
|
|
@@ -11,13 +12,19 @@ module OpenAI
|
|
|
11
12
|
|
|
12
13
|
attr_accessor name: String
|
|
13
14
|
|
|
15
|
+
attr_reader expires_in_seconds: Integer?
|
|
16
|
+
|
|
17
|
+
def expires_in_seconds=: (Integer) -> Integer
|
|
18
|
+
|
|
14
19
|
def initialize: (
|
|
15
20
|
name: String,
|
|
21
|
+
?expires_in_seconds: Integer,
|
|
16
22
|
?request_options: OpenAI::request_opts
|
|
17
23
|
) -> void
|
|
18
24
|
|
|
19
25
|
def to_hash: -> {
|
|
20
26
|
name: String,
|
|
27
|
+
expires_in_seconds: Integer,
|
|
21
28
|
request_options: OpenAI::RequestOptions
|
|
22
29
|
}
|
|
23
30
|
end
|
|
@@ -12,7 +12,8 @@ module OpenAI
|
|
|
12
12
|
event_types: ::Array[OpenAI::Models::Admin::Organization::AuditLogListParams::event_type],
|
|
13
13
|
limit: Integer,
|
|
14
14
|
project_ids: ::Array[String],
|
|
15
|
-
resource_ids: ::Array[String]
|
|
15
|
+
resource_ids: ::Array[String],
|
|
16
|
+
tenant_only: bool
|
|
16
17
|
}
|
|
17
18
|
& OpenAI::Internal::Type::request_parameters
|
|
18
19
|
|
|
@@ -60,6 +61,10 @@ module OpenAI
|
|
|
60
61
|
|
|
61
62
|
def resource_ids=: (::Array[String]) -> ::Array[String]
|
|
62
63
|
|
|
64
|
+
attr_reader tenant_only: bool?
|
|
65
|
+
|
|
66
|
+
def tenant_only=: (bool) -> bool
|
|
67
|
+
|
|
63
68
|
def initialize: (
|
|
64
69
|
?actor_emails: ::Array[String],
|
|
65
70
|
?actor_ids: ::Array[String],
|
|
@@ -70,6 +75,7 @@ module OpenAI
|
|
|
70
75
|
?limit: Integer,
|
|
71
76
|
?project_ids: ::Array[String],
|
|
72
77
|
?resource_ids: ::Array[String],
|
|
78
|
+
?tenant_only: bool,
|
|
73
79
|
?request_options: OpenAI::request_opts
|
|
74
80
|
) -> void
|
|
75
81
|
|
|
@@ -83,6 +89,7 @@ module OpenAI
|
|
|
83
89
|
limit: Integer,
|
|
84
90
|
project_ids: ::Array[String],
|
|
85
91
|
resource_ids: ::Array[String],
|
|
92
|
+
tenant_only: bool,
|
|
86
93
|
request_options: OpenAI::RequestOptions
|
|
87
94
|
}
|
|
88
95
|
|
|
@@ -171,6 +178,8 @@ module OpenAI
|
|
|
171
178
|
| :"role.deleted"
|
|
172
179
|
| :"role.assignment.created"
|
|
173
180
|
| :"role.assignment.deleted"
|
|
181
|
+
| :"role.bound_to_resource"
|
|
182
|
+
| :"role.unbound_from_resource"
|
|
174
183
|
| :"scim.enabled"
|
|
175
184
|
| :"scim.disabled"
|
|
176
185
|
| :"service_account.created"
|
|
@@ -232,6 +241,8 @@ module OpenAI
|
|
|
232
241
|
ROLE_DELETED: :"role.deleted"
|
|
233
242
|
ROLE_ASSIGNMENT_CREATED: :"role.assignment.created"
|
|
234
243
|
ROLE_ASSIGNMENT_DELETED: :"role.assignment.deleted"
|
|
244
|
+
ROLE_BOUND_TO_RESOURCE: :"role.bound_to_resource"
|
|
245
|
+
ROLE_UNBOUND_FROM_RESOURCE: :"role.unbound_from_resource"
|
|
235
246
|
SCIM_ENABLED: :"scim.enabled"
|
|
236
247
|
SCIM_DISABLED: :"scim.disabled"
|
|
237
248
|
SERVICE_ACCOUNT_CREATED: :"service_account.created"
|