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.
Files changed (58) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +23 -0
  3. data/README.md +1 -1
  4. data/lib/openai/internal/transport/base_client.rb +4 -1
  5. data/lib/openai/models/admin/organization/admin_api_key.rb +9 -1
  6. data/lib/openai/models/admin/organization/admin_api_key_create_params.rb +14 -1
  7. data/lib/openai/models/admin/organization/audit_log_list_params.rb +16 -2
  8. data/lib/openai/models/admin/organization/audit_log_list_response.rb +241 -1
  9. data/lib/openai/models/admin/organization/projects/spend_alert_retrieve_params.rb +32 -0
  10. data/lib/openai/models/admin/organization/spend_alert_retrieve_params.rb +24 -0
  11. data/lib/openai/models/realtime/realtime_response_create_mcp_tool.rb +17 -8
  12. data/lib/openai/models/realtime/realtime_session_create_response.rb +17 -8
  13. data/lib/openai/models/realtime/realtime_tools_config_union.rb +17 -8
  14. data/lib/openai/models/reasoning.rb +27 -1
  15. data/lib/openai/models/responses/input_token_count_params.rb +4 -0
  16. data/lib/openai/models/responses/response_create_params.rb +4 -0
  17. data/lib/openai/models/responses/responses_client_event.rb +4 -0
  18. data/lib/openai/models/responses/tool.rb +17 -8
  19. data/lib/openai/models/video_create_params.rb +1 -0
  20. data/lib/openai/models/video_edit_params.rb +2 -2
  21. data/lib/openai/resources/admin/organization/admin_api_keys.rb +7 -1
  22. data/lib/openai/resources/admin/organization/audit_logs.rb +3 -1
  23. data/lib/openai/resources/admin/organization/projects/spend_alerts.rb +28 -0
  24. data/lib/openai/resources/admin/organization/spend_alerts.rb +21 -0
  25. data/lib/openai/version.rb +1 -1
  26. data/lib/openai.rb +2 -0
  27. data/rbi/openai/models/admin/organization/admin_api_key.rbi +8 -0
  28. data/rbi/openai/models/admin/organization/admin_api_key_create_params.rbi +21 -2
  29. data/rbi/openai/models/admin/organization/audit_log_list_params.rbi +31 -2
  30. data/rbi/openai/models/admin/organization/audit_log_list_response.rbi +468 -0
  31. data/rbi/openai/models/admin/organization/projects/spend_alert_retrieve_params.rbi +52 -0
  32. data/rbi/openai/models/admin/organization/spend_alert_retrieve_params.rbi +42 -0
  33. data/rbi/openai/models/realtime/realtime_response_create_mcp_tool.rbi +24 -11
  34. data/rbi/openai/models/realtime/realtime_session_create_response.rbi +24 -11
  35. data/rbi/openai/models/realtime/realtime_tools_config_union.rbi +24 -11
  36. data/rbi/openai/models/reasoning.rbi +34 -0
  37. data/rbi/openai/models/responses/tool.rbi +24 -11
  38. data/rbi/openai/models/video_edit_params.rbi +1 -1
  39. data/rbi/openai/resources/admin/organization/admin_api_keys.rbi +8 -1
  40. data/rbi/openai/resources/admin/organization/audit_logs.rbi +8 -1
  41. data/rbi/openai/resources/admin/organization/projects/spend_alerts.rbi +19 -0
  42. data/rbi/openai/resources/admin/organization/spend_alerts.rbi +14 -0
  43. data/sig/openai/models/admin/organization/admin_api_key.rbs +5 -0
  44. data/sig/openai/models/admin/organization/admin_api_key_create_params.rbs +8 -1
  45. data/sig/openai/models/admin/organization/audit_log_list_params.rbs +12 -1
  46. data/sig/openai/models/admin/organization/audit_log_list_response.rbs +228 -0
  47. data/sig/openai/models/admin/organization/projects/spend_alert_retrieve_params.rbs +34 -0
  48. data/sig/openai/models/admin/organization/spend_alert_retrieve_params.rbs +27 -0
  49. data/sig/openai/models/realtime/realtime_response_create_mcp_tool.rbs +9 -2
  50. data/sig/openai/models/realtime/realtime_session_create_response.rbs +9 -2
  51. data/sig/openai/models/realtime/realtime_tools_config_union.rbs +9 -2
  52. data/sig/openai/models/reasoning.rbs +17 -0
  53. data/sig/openai/models/responses/tool.rbs +9 -2
  54. data/sig/openai/resources/admin/organization/admin_api_keys.rbs +1 -0
  55. data/sig/openai/resources/admin/organization/audit_logs.rbs +1 -0
  56. data/sig/openai/resources/admin/organization/projects/spend_alerts.rbs +6 -0
  57. data/sig/openai/resources/admin/organization/spend_alerts.rbs +5 -0
  58. metadata +8 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8dadb6d8bc182a69d1e621c6575f13f294872febc4ba4e2e0c1eae05ae507aaa
4
- data.tar.gz: 748e97455f721791bf3d21dc930b36a4261ccc3d9ca853b466dc1bde77b0a960
3
+ metadata.gz: d5ff11b5e599c4ebd4c202e215b46f943356f3fc91dcf1ce7e3210b647bc3676
4
+ data.tar.gz: 3359efbf0d523d7e31f2153b012b993c30e8ed3617ff07e00ca5580bbc414c0c
5
5
  SHA512:
6
- metadata.gz: 22ff74b2bf0e6be602dd727970cf9b9c79780a0e189530e2010c961b98e868cb76d2eef993200e13cc79e3066d9201da7a2579f4dc3a47e7125b0b351b63f498
7
- data.tar.gz: 4d46160a1f2e54fd1e572197f78151cb6325031e1ebc9c3c0e7040a5c107ae5721acd8fcf44bde857359c3a019f57d2ab25c246c44bed722be80b5ced4a274e7
6
+ metadata.gz: db46f5c0c9f949924bdc8d39f53e0419bcf05c4fbd6ba60cd0b5619d692c25698a3b4611c0dd5058c8e96e270bf0c6a05806cd2ff6b0010dc494a6891588083b
7
+ data.tar.gz: 1323527f82c69f1f84a6143cd5af7514bbf4ed5626dfaedc8eae2a75107a60b19d0218da149d598a31eb6a3e9e5a9d3e6c9497f05e1c758d3513d8421de4852b
data/CHANGELOG.md CHANGED
@@ -1,5 +1,28 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.68.0 (2026-06-17)
4
+
5
+ Full Changelog: [v0.67.0...v0.68.0](https://github.com/openai/openai-ruby/compare/v0.67.0...v0.68.0)
6
+
7
+ ### Features
8
+
9
+ * **api:** update OpenAPI spec or Stainless config ([e127868](https://github.com/openai/openai-ruby/commit/e1278686c33b1981c7f4db0eb3c27f2cf2b155ac))
10
+
11
+ ## 0.67.0 (2026-06-16)
12
+
13
+ Full Changelog: [v0.66.1...v0.67.0](https://github.com/openai/openai-ruby/compare/v0.66.1...v0.67.0)
14
+
15
+ ### Features
16
+
17
+ * **api:** admin spend_alerts ([7bc8139](https://github.com/openai/openai-ruby/commit/7bc8139c6e7d4c9624b96d81aca14db2c8fd5a8b))
18
+ * **api:** manual updates ([d7a432a](https://github.com/openai/openai-ruby/commit/d7a432a466a3e833b874240ddd8847e3e92d53c3))
19
+ * **api:** update OpenAPI spec or Stainless config ([5f3ae65](https://github.com/openai/openai-ruby/commit/5f3ae65830ce5a2af1ac9eedd91c35f5a3159b6d))
20
+
21
+
22
+ ### Bug Fixes
23
+
24
+ * **client:** send content-type header for requests with an omitted optional body ([156b511](https://github.com/openai/openai-ruby/commit/156b511934314f694c7a2cede3dcc53c268547db))
25
+
3
26
  ## 0.66.1 (2026-06-04)
4
27
 
5
28
  Full Changelog: [v0.66.0...v0.66.1](https://github.com/openai/openai-ruby/compare/v0.66.0...v0.66.1)
data/README.md CHANGED
@@ -15,7 +15,7 @@ To use this gem, install via Bundler by adding the following to your application
15
15
  <!-- x-release-please-start-version -->
16
16
 
17
17
  ```ruby
18
- gem "openai", "~> 0.66.1"
18
+ gem "openai", "~> 0.68.0"
19
19
  ```
20
20
 
21
21
  <!-- x-release-please-end -->
@@ -325,7 +325,10 @@ module OpenAI
325
325
  OpenAI::Internal::Util.deep_merge(*[req[:body], opts[:extra_body]].compact)
326
326
  end
327
327
 
328
- headers.delete("content-type") if body.nil?
328
+ # Generated methods always pass `req[:body]` for operations that define a
329
+ # request body, so only elide the content-type header when the operation
330
+ # has no body at all, not when an optional body param was omitted.
331
+ headers.delete("content-type") if body.nil? && !req.key?(:body)
329
332
 
330
333
  url = OpenAI::Internal::Util.join_parsed_uri(
331
334
  @base_url_components,
@@ -18,6 +18,12 @@ module OpenAI
18
18
  # @return [Integer]
19
19
  required :created_at, Integer
20
20
 
21
+ # @!attribute expires_at
22
+ # The Unix timestamp (in seconds) of when the API key expires
23
+ #
24
+ # @return [Integer, nil]
25
+ required :expires_at, Integer, nil?: true
26
+
21
27
  # @!attribute object
22
28
  # The object type, which is always `organization.admin_api_key`
23
29
  #
@@ -47,13 +53,15 @@ module OpenAI
47
53
  # @return [String, nil]
48
54
  optional :name, String, nil?: true
49
55
 
50
- # @!method initialize(id:, created_at:, owner:, redacted_value:, last_used_at: nil, name: nil, object: :"organization.admin_api_key")
56
+ # @!method initialize(id:, created_at:, expires_at:, owner:, redacted_value:, last_used_at: nil, name: nil, object: :"organization.admin_api_key")
51
57
  # Represents an individual Admin API key in an org.
52
58
  #
53
59
  # @param id [String] The identifier, which can be referenced in API endpoints
54
60
  #
55
61
  # @param created_at [Integer] The Unix timestamp (in seconds) of when the API key was created
56
62
  #
63
+ # @param expires_at [Integer, nil] The Unix timestamp (in seconds) of when the API key expires
64
+ #
57
65
  # @param owner [OpenAI::Models::Admin::Organization::AdminAPIKey::Owner]
58
66
  #
59
67
  # @param redacted_value [String] The redacted value of the API key
@@ -14,8 +14,21 @@ module OpenAI
14
14
  # @return [String]
15
15
  required :name, String
16
16
 
17
- # @!method initialize(name:, request_options: {})
17
+ # @!attribute expires_in_seconds
18
+ # The number of seconds until the API key expires. Omit this field for a key that
19
+ # does not expire.
20
+ #
21
+ # @return [Integer, nil]
22
+ optional :expires_in_seconds, Integer
23
+
24
+ # @!method initialize(name:, expires_in_seconds: nil, request_options: {})
25
+ # Some parameter documentations has been truncated, see
26
+ # {OpenAI::Models::Admin::Organization::AdminAPIKeyCreateParams} for more details.
27
+ #
18
28
  # @param name [String]
29
+ #
30
+ # @param expires_in_seconds [Integer] The number of seconds until the API key expires. Omit this field for a key that
31
+ #
19
32
  # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}]
20
33
  end
21
34
  end
@@ -70,12 +70,22 @@ module OpenAI
70
70
 
71
71
  # @!attribute resource_ids
72
72
  # Return only events performed on these targets. For example, a project ID
73
- # updated.
73
+ # updated. For ChatGPT connector role events, use the workspace connector resource
74
+ # ID shown in `details.id`, such as `<workspace_id>__<connector_id>`.
74
75
  #
75
76
  # @return [Array<String>, nil]
76
77
  optional :resource_ids, OpenAI::Internal::Type::ArrayOf[String]
77
78
 
78
- # @!method initialize(actor_emails: nil, actor_ids: nil, after: nil, before: nil, effective_at: nil, event_types: nil, limit: nil, project_ids: nil, resource_ids: nil, request_options: {})
79
+ # @!attribute tenant_only
80
+ # Return only tenant-scoped events associated with this organization. Required for
81
+ # tenant-scoped events such as `role.bound_to_resource` and
82
+ # `role.unbound_from_resource`. When `true`, all supplied event types must be
83
+ # tenant-scoped.
84
+ #
85
+ # @return [Boolean, nil]
86
+ optional :tenant_only, OpenAI::Internal::Type::Boolean
87
+
88
+ # @!method initialize(actor_emails: nil, actor_ids: nil, after: nil, before: nil, effective_at: nil, event_types: nil, limit: nil, project_ids: nil, resource_ids: nil, tenant_only: nil, request_options: {})
79
89
  # Some parameter documentations has been truncated, see
80
90
  # {OpenAI::Models::Admin::Organization::AuditLogListParams} for more details.
81
91
  #
@@ -97,6 +107,8 @@ module OpenAI
97
107
  #
98
108
  # @param resource_ids [Array<String>] Return only events performed on these targets. For example, a project ID updated
99
109
  #
110
+ # @param tenant_only [Boolean] Return only tenant-scoped events associated with this organization. Required for
111
+ #
100
112
  # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}]
101
113
 
102
114
  class EffectiveAt < OpenAI::Internal::Type::BaseModel
@@ -196,6 +208,8 @@ module OpenAI
196
208
  ROLE_DELETED = :"role.deleted"
197
209
  ROLE_ASSIGNMENT_CREATED = :"role.assignment.created"
198
210
  ROLE_ASSIGNMENT_DELETED = :"role.assignment.deleted"
211
+ ROLE_BOUND_TO_RESOURCE = :"role.bound_to_resource"
212
+ ROLE_UNBOUND_FROM_RESOURCE = :"role.unbound_from_resource"
199
213
  SCIM_ENABLED = :"scim.enabled"
200
214
  SCIM_DISABLED = :"scim.disabled"
201
215
  SERVICE_ACCOUNT_CREATED = :"service_account.created"
@@ -323,6 +323,14 @@ module OpenAI
323
323
  -> { OpenAI::Models::Admin::Organization::AuditLogListResponse::RoleAssignmentDeleted },
324
324
  api_name: :"role.assignment.deleted"
325
325
 
326
+ # @!attribute role_bound_to_resource
327
+ # The details for events with this `type`.
328
+ #
329
+ # @return [OpenAI::Models::Admin::Organization::AuditLogListResponse::RoleBoundToResource, nil]
330
+ optional :role_bound_to_resource,
331
+ -> { OpenAI::Models::Admin::Organization::AuditLogListResponse::RoleBoundToResource },
332
+ api_name: :"role.bound_to_resource"
333
+
326
334
  # @!attribute role_created
327
335
  # The details for events with this `type`.
328
336
  #
@@ -339,6 +347,14 @@ module OpenAI
339
347
  -> { OpenAI::Models::Admin::Organization::AuditLogListResponse::RoleDeleted },
340
348
  api_name: :"role.deleted"
341
349
 
350
+ # @!attribute role_unbound_from_resource
351
+ # The details for events with this `type`.
352
+ #
353
+ # @return [OpenAI::Models::Admin::Organization::AuditLogListResponse::RoleUnboundFromResource, nil]
354
+ optional :role_unbound_from_resource,
355
+ -> { OpenAI::Models::Admin::Organization::AuditLogListResponse::RoleUnboundFromResource },
356
+ api_name: :"role.unbound_from_resource"
357
+
342
358
  # @!attribute role_updated
343
359
  # The details for events with this `type`.
344
360
  #
@@ -459,7 +475,7 @@ module OpenAI
459
475
  -> { OpenAI::Models::Admin::Organization::AuditLogListResponse::WorkloadIdentityProviderUpdated },
460
476
  api_name: :"workload_identity_provider.updated"
461
477
 
462
- # @!method initialize(id:, effective_at:, type:, actor: nil, api_key_created: nil, api_key_deleted: nil, api_key_updated: nil, certificate_created: nil, certificate_deleted: nil, certificate_updated: nil, certificates_activated: nil, certificates_deactivated: nil, checkpoint_permission_created: nil, checkpoint_permission_deleted: nil, external_key_registered: nil, external_key_removed: nil, group_created: nil, group_deleted: nil, group_updated: nil, invite_accepted: nil, invite_deleted: nil, invite_sent: nil, ip_allowlist_config_activated: nil, ip_allowlist_config_deactivated: nil, ip_allowlist_created: nil, ip_allowlist_deleted: nil, ip_allowlist_updated: nil, login_failed: nil, login_succeeded: nil, logout_failed: nil, logout_succeeded: nil, organization_updated: nil, project: nil, project_archived: nil, project_created: nil, project_deleted: nil, project_updated: nil, rate_limit_deleted: nil, rate_limit_updated: nil, role_assignment_created: nil, role_assignment_deleted: nil, role_created: nil, role_deleted: nil, role_updated: nil, scim_disabled: nil, scim_enabled: nil, service_account_created: nil, service_account_deleted: nil, service_account_updated: nil, user_added: nil, user_deleted: nil, user_updated: nil, workload_identity_provider_mapping_created: nil, workload_identity_provider_mapping_deleted: nil, workload_identity_provider_mapping_updated: nil, workload_identity_provider_created: nil, workload_identity_provider_deleted: nil, workload_identity_provider_updated: nil)
478
+ # @!method initialize(id:, effective_at:, type:, actor: nil, api_key_created: nil, api_key_deleted: nil, api_key_updated: nil, certificate_created: nil, certificate_deleted: nil, certificate_updated: nil, certificates_activated: nil, certificates_deactivated: nil, checkpoint_permission_created: nil, checkpoint_permission_deleted: nil, external_key_registered: nil, external_key_removed: nil, group_created: nil, group_deleted: nil, group_updated: nil, invite_accepted: nil, invite_deleted: nil, invite_sent: nil, ip_allowlist_config_activated: nil, ip_allowlist_config_deactivated: nil, ip_allowlist_created: nil, ip_allowlist_deleted: nil, ip_allowlist_updated: nil, login_failed: nil, login_succeeded: nil, logout_failed: nil, logout_succeeded: nil, organization_updated: nil, project: nil, project_archived: nil, project_created: nil, project_deleted: nil, project_updated: nil, rate_limit_deleted: nil, rate_limit_updated: nil, role_assignment_created: nil, role_assignment_deleted: nil, role_bound_to_resource: nil, role_created: nil, role_deleted: nil, role_unbound_from_resource: nil, role_updated: nil, scim_disabled: nil, scim_enabled: nil, service_account_created: nil, service_account_deleted: nil, service_account_updated: nil, user_added: nil, user_deleted: nil, user_updated: nil, workload_identity_provider_mapping_created: nil, workload_identity_provider_mapping_deleted: nil, workload_identity_provider_mapping_updated: nil, workload_identity_provider_created: nil, workload_identity_provider_deleted: nil, workload_identity_provider_updated: nil)
463
479
  # Some parameter documentations has been truncated, see
464
480
  # {OpenAI::Models::Admin::Organization::AuditLogListResponse} for more details.
465
481
  #
@@ -547,10 +563,14 @@ module OpenAI
547
563
  #
548
564
  # @param role_assignment_deleted [OpenAI::Models::Admin::Organization::AuditLogListResponse::RoleAssignmentDeleted] The details for events with this `type`.
549
565
  #
566
+ # @param role_bound_to_resource [OpenAI::Models::Admin::Organization::AuditLogListResponse::RoleBoundToResource] The details for events with this `type`.
567
+ #
550
568
  # @param role_created [OpenAI::Models::Admin::Organization::AuditLogListResponse::RoleCreated] The details for events with this `type`.
551
569
  #
552
570
  # @param role_deleted [OpenAI::Models::Admin::Organization::AuditLogListResponse::RoleDeleted] The details for events with this `type`.
553
571
  #
572
+ # @param role_unbound_from_resource [OpenAI::Models::Admin::Organization::AuditLogListResponse::RoleUnboundFromResource] The details for events with this `type`.
573
+ #
554
574
  # @param role_updated [OpenAI::Models::Admin::Organization::AuditLogListResponse::RoleUpdated] The details for events with this `type`.
555
575
  #
556
576
  # @param scim_disabled [OpenAI::Models::Admin::Organization::AuditLogListResponse::ScimDisabled] The details for events with this `type`.
@@ -636,6 +656,8 @@ module OpenAI
636
656
  ROLE_DELETED = :"role.deleted"
637
657
  ROLE_ASSIGNMENT_CREATED = :"role.assignment.created"
638
658
  ROLE_ASSIGNMENT_DELETED = :"role.assignment.deleted"
659
+ ROLE_BOUND_TO_RESOURCE = :"role.bound_to_resource"
660
+ ROLE_UNBOUND_FROM_RESOURCE = :"role.unbound_from_resource"
639
661
  SCIM_ENABLED = :"scim.enabled"
640
662
  SCIM_DISABLED = :"scim.disabled"
641
663
  SERVICE_ACCOUNT_CREATED = :"service_account.created"
@@ -1911,6 +1933,115 @@ module OpenAI
1911
1933
  # @param resource_type [String] The type of resource the role assignment was scoped to.
1912
1934
  end
1913
1935
 
1936
+ # @see OpenAI::Models::Admin::Organization::AuditLogListResponse#role_bound_to_resource
1937
+ class RoleBoundToResource < OpenAI::Internal::Type::BaseModel
1938
+ # @!attribute id
1939
+ # The ID of the resource the role was bound to. ChatGPT workspace connector
1940
+ # resources use `<workspace_id>__<connector_id>`.
1941
+ #
1942
+ # @return [String, nil]
1943
+ optional :id, String
1944
+
1945
+ # @!attribute connector_id
1946
+ # The connector ID for a ChatGPT workspace connector resource.
1947
+ #
1948
+ # @return [String, nil]
1949
+ optional :connector_id, String
1950
+
1951
+ # @!attribute connector_name
1952
+ # The connector display name for a ChatGPT workspace connector resource, or the
1953
+ # connector ID when the display name could not be resolved.
1954
+ #
1955
+ # @return [String, nil]
1956
+ optional :connector_name, String
1957
+
1958
+ # @!attribute enabled
1959
+ # Whether the connector is enabled for the role.
1960
+ #
1961
+ # @return [Boolean, nil]
1962
+ optional :enabled, OpenAI::Internal::Type::Boolean
1963
+
1964
+ # @!attribute permissions
1965
+ # The permissions granted to the role for the resource.
1966
+ #
1967
+ # @return [Array<String>, nil]
1968
+ optional :permissions, OpenAI::Internal::Type::ArrayOf[String]
1969
+
1970
+ # @!attribute resource_id
1971
+ # The ID of the resource the role was bound to.
1972
+ #
1973
+ # @return [String, nil]
1974
+ optional :resource_id, String
1975
+
1976
+ # @!attribute resource_type
1977
+ # The type of resource the role was bound to.
1978
+ #
1979
+ # @return [String, nil]
1980
+ optional :resource_type, String
1981
+
1982
+ # @!attribute role_id
1983
+ # The ID of the role that was bound to the resource.
1984
+ #
1985
+ # @return [String, nil]
1986
+ optional :role_id, String
1987
+
1988
+ # @!attribute source
1989
+ # The connector role mutation path that produced the event.
1990
+ #
1991
+ # @return [Symbol, OpenAI::Models::Admin::Organization::AuditLogListResponse::RoleBoundToResource::Source, nil]
1992
+ optional :source,
1993
+ enum: -> { OpenAI::Models::Admin::Organization::AuditLogListResponse::RoleBoundToResource::Source }
1994
+
1995
+ # @!attribute workspace_id
1996
+ # The workspace ID for a ChatGPT workspace connector resource.
1997
+ #
1998
+ # @return [String, nil]
1999
+ optional :workspace_id, String
2000
+
2001
+ # @!method initialize(id: nil, connector_id: nil, connector_name: nil, enabled: nil, permissions: nil, resource_id: nil, resource_type: nil, role_id: nil, source: nil, workspace_id: nil)
2002
+ # Some parameter documentations has been truncated, see
2003
+ # {OpenAI::Models::Admin::Organization::AuditLogListResponse::RoleBoundToResource}
2004
+ # for more details.
2005
+ #
2006
+ # The details for events with this `type`.
2007
+ #
2008
+ # @param id [String] The ID of the resource the role was bound to. ChatGPT workspace connector resour
2009
+ #
2010
+ # @param connector_id [String] The connector ID for a ChatGPT workspace connector resource.
2011
+ #
2012
+ # @param connector_name [String] The connector display name for a ChatGPT workspace connector resource, or the co
2013
+ #
2014
+ # @param enabled [Boolean] Whether the connector is enabled for the role.
2015
+ #
2016
+ # @param permissions [Array<String>] The permissions granted to the role for the resource.
2017
+ #
2018
+ # @param resource_id [String] The ID of the resource the role was bound to.
2019
+ #
2020
+ # @param resource_type [String] The type of resource the role was bound to.
2021
+ #
2022
+ # @param role_id [String] The ID of the role that was bound to the resource.
2023
+ #
2024
+ # @param source [Symbol, OpenAI::Models::Admin::Organization::AuditLogListResponse::RoleBoundToResource::Source] The connector role mutation path that produced the event.
2025
+ #
2026
+ # @param workspace_id [String] The workspace ID for a ChatGPT workspace connector resource.
2027
+
2028
+ # The connector role mutation path that produced the event.
2029
+ #
2030
+ # @see OpenAI::Models::Admin::Organization::AuditLogListResponse::RoleBoundToResource#source
2031
+ module Source
2032
+ extend OpenAI::Internal::Type::Enum
2033
+
2034
+ ROLE_TOGGLE = :role_toggle
2035
+ ROLE_CONNECTOR_UPDATE = :role_connector_update
2036
+ ROLE_DELETE = :role_delete
2037
+ WORKSPACE_PERMISSIONS = :workspace_permissions
2038
+ CONNECTOR_PUBLISH = :connector_publish
2039
+
2040
+ # @!method self.values
2041
+ # @return [Array<Symbol>]
2042
+ end
2043
+ end
2044
+
1914
2045
  # @see OpenAI::Models::Admin::Organization::AuditLogListResponse#role_created
1915
2046
  class RoleCreated < OpenAI::Internal::Type::BaseModel
1916
2047
  # @!attribute id
@@ -1971,6 +2102,115 @@ module OpenAI
1971
2102
  # @param id [String] The role ID.
1972
2103
  end
1973
2104
 
2105
+ # @see OpenAI::Models::Admin::Organization::AuditLogListResponse#role_unbound_from_resource
2106
+ class RoleUnboundFromResource < OpenAI::Internal::Type::BaseModel
2107
+ # @!attribute id
2108
+ # The ID of the resource the role was unbound from. ChatGPT workspace connector
2109
+ # resources use `<workspace_id>__<connector_id>`.
2110
+ #
2111
+ # @return [String, nil]
2112
+ optional :id, String
2113
+
2114
+ # @!attribute connector_id
2115
+ # The connector ID for a ChatGPT workspace connector resource.
2116
+ #
2117
+ # @return [String, nil]
2118
+ optional :connector_id, String
2119
+
2120
+ # @!attribute connector_name
2121
+ # The connector display name for a ChatGPT workspace connector resource, or the
2122
+ # connector ID when the display name could not be resolved.
2123
+ #
2124
+ # @return [String, nil]
2125
+ optional :connector_name, String
2126
+
2127
+ # @!attribute enabled
2128
+ # Whether the connector is enabled for the role.
2129
+ #
2130
+ # @return [Boolean, nil]
2131
+ optional :enabled, OpenAI::Internal::Type::Boolean
2132
+
2133
+ # @!attribute permissions
2134
+ # The permissions remaining for the role after the change.
2135
+ #
2136
+ # @return [Array<String>, nil]
2137
+ optional :permissions, OpenAI::Internal::Type::ArrayOf[String]
2138
+
2139
+ # @!attribute resource_id
2140
+ # The ID of the resource the role was unbound from.
2141
+ #
2142
+ # @return [String, nil]
2143
+ optional :resource_id, String
2144
+
2145
+ # @!attribute resource_type
2146
+ # The type of resource the role was unbound from.
2147
+ #
2148
+ # @return [String, nil]
2149
+ optional :resource_type, String
2150
+
2151
+ # @!attribute role_id
2152
+ # The ID of the role that was unbound from the resource.
2153
+ #
2154
+ # @return [String, nil]
2155
+ optional :role_id, String
2156
+
2157
+ # @!attribute source
2158
+ # The connector role mutation path that produced the event.
2159
+ #
2160
+ # @return [Symbol, OpenAI::Models::Admin::Organization::AuditLogListResponse::RoleUnboundFromResource::Source, nil]
2161
+ optional :source,
2162
+ enum: -> { OpenAI::Models::Admin::Organization::AuditLogListResponse::RoleUnboundFromResource::Source }
2163
+
2164
+ # @!attribute workspace_id
2165
+ # The workspace ID for a ChatGPT workspace connector resource.
2166
+ #
2167
+ # @return [String, nil]
2168
+ optional :workspace_id, String
2169
+
2170
+ # @!method initialize(id: nil, connector_id: nil, connector_name: nil, enabled: nil, permissions: nil, resource_id: nil, resource_type: nil, role_id: nil, source: nil, workspace_id: nil)
2171
+ # Some parameter documentations has been truncated, see
2172
+ # {OpenAI::Models::Admin::Organization::AuditLogListResponse::RoleUnboundFromResource}
2173
+ # for more details.
2174
+ #
2175
+ # The details for events with this `type`.
2176
+ #
2177
+ # @param id [String] The ID of the resource the role was unbound from. ChatGPT workspace connector re
2178
+ #
2179
+ # @param connector_id [String] The connector ID for a ChatGPT workspace connector resource.
2180
+ #
2181
+ # @param connector_name [String] The connector display name for a ChatGPT workspace connector resource, or the co
2182
+ #
2183
+ # @param enabled [Boolean] Whether the connector is enabled for the role.
2184
+ #
2185
+ # @param permissions [Array<String>] The permissions remaining for the role after the change.
2186
+ #
2187
+ # @param resource_id [String] The ID of the resource the role was unbound from.
2188
+ #
2189
+ # @param resource_type [String] The type of resource the role was unbound from.
2190
+ #
2191
+ # @param role_id [String] The ID of the role that was unbound from the resource.
2192
+ #
2193
+ # @param source [Symbol, OpenAI::Models::Admin::Organization::AuditLogListResponse::RoleUnboundFromResource::Source] The connector role mutation path that produced the event.
2194
+ #
2195
+ # @param workspace_id [String] The workspace ID for a ChatGPT workspace connector resource.
2196
+
2197
+ # The connector role mutation path that produced the event.
2198
+ #
2199
+ # @see OpenAI::Models::Admin::Organization::AuditLogListResponse::RoleUnboundFromResource#source
2200
+ module Source
2201
+ extend OpenAI::Internal::Type::Enum
2202
+
2203
+ ROLE_TOGGLE = :role_toggle
2204
+ ROLE_CONNECTOR_UPDATE = :role_connector_update
2205
+ ROLE_DELETE = :role_delete
2206
+ WORKSPACE_PERMISSIONS = :workspace_permissions
2207
+ CONNECTOR_PUBLISH = :connector_publish
2208
+
2209
+ # @!method self.values
2210
+ # @return [Array<Symbol>]
2211
+ end
2212
+ end
2213
+
1974
2214
  # @see OpenAI::Models::Admin::Organization::AuditLogListResponse#role_updated
1975
2215
  class RoleUpdated < OpenAI::Internal::Type::BaseModel
1976
2216
  # @!attribute id
@@ -0,0 +1,32 @@
1
+ # frozen_string_literal: true
2
+
3
+ module OpenAI
4
+ module Models
5
+ module Admin
6
+ module Organization
7
+ module Projects
8
+ # @see OpenAI::Resources::Admin::Organization::Projects::SpendAlerts#retrieve
9
+ class SpendAlertRetrieveParams < OpenAI::Internal::Type::BaseModel
10
+ extend OpenAI::Internal::Type::RequestParameters::Converter
11
+ include OpenAI::Internal::Type::RequestParameters
12
+
13
+ # @!attribute project_id
14
+ #
15
+ # @return [String]
16
+ required :project_id, String
17
+
18
+ # @!attribute alert_id
19
+ #
20
+ # @return [String]
21
+ required :alert_id, String
22
+
23
+ # @!method initialize(project_id:, alert_id:, request_options: {})
24
+ # @param project_id [String]
25
+ # @param alert_id [String]
26
+ # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}]
27
+ end
28
+ end
29
+ end
30
+ end
31
+ end
32
+ end
@@ -0,0 +1,24 @@
1
+ # frozen_string_literal: true
2
+
3
+ module OpenAI
4
+ module Models
5
+ module Admin
6
+ module Organization
7
+ # @see OpenAI::Resources::Admin::Organization::SpendAlerts#retrieve
8
+ class SpendAlertRetrieveParams < OpenAI::Internal::Type::BaseModel
9
+ extend OpenAI::Internal::Type::RequestParameters::Converter
10
+ include OpenAI::Internal::Type::RequestParameters
11
+
12
+ # @!attribute alert_id
13
+ #
14
+ # @return [String]
15
+ required :alert_id, String
16
+
17
+ # @!method initialize(alert_id:, request_options: {})
18
+ # @param alert_id [String]
19
+ # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}]
20
+ end
21
+ end
22
+ end
23
+ end
24
+ end
@@ -34,8 +34,8 @@ module OpenAI
34
34
 
35
35
  # @!attribute connector_id
36
36
  # Identifier for service connectors, like those available in ChatGPT. One of
37
- # `server_url` or `connector_id` must be provided. Learn more about service
38
- # connectors
37
+ # `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more about
38
+ # service connectors
39
39
  # [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors).
40
40
  #
41
41
  # Currently supported `connector_id` values are:
@@ -80,13 +80,20 @@ module OpenAI
80
80
  optional :server_description, String
81
81
 
82
82
  # @!attribute server_url
83
- # The URL for the MCP server. One of `server_url` or `connector_id` must be
84
- # provided.
83
+ # The URL for the MCP server. One of `server_url`, `connector_id`, or `tunnel_id`
84
+ # must be provided.
85
85
  #
86
86
  # @return [String, nil]
87
87
  optional :server_url, String
88
88
 
89
- # @!method initialize(server_label:, allowed_tools: nil, authorization: nil, connector_id: nil, defer_loading: nil, headers: nil, require_approval: nil, server_description: nil, server_url: nil, type: :mcp)
89
+ # @!attribute tunnel_id
90
+ # The Secure MCP Tunnel ID to use instead of a direct server URL. One of
91
+ # `server_url`, `connector_id`, or `tunnel_id` must be provided.
92
+ #
93
+ # @return [String, nil]
94
+ optional :tunnel_id, String
95
+
96
+ # @!method initialize(server_label:, allowed_tools: nil, authorization: nil, connector_id: nil, defer_loading: nil, headers: nil, require_approval: nil, server_description: nil, server_url: nil, tunnel_id: nil, type: :mcp)
90
97
  # Some parameter documentations has been truncated, see
91
98
  # {OpenAI::Models::Realtime::RealtimeResponseCreateMcpTool} for more details.
92
99
  #
@@ -110,7 +117,9 @@ module OpenAI
110
117
  #
111
118
  # @param server_description [String] Optional description of the MCP server, used to provide more context.
112
119
  #
113
- # @param server_url [String] The URL for the MCP server. One of `server_url` or `connector_id` must be
120
+ # @param server_url [String] The URL for the MCP server. One of `server_url`, `connector_id`, or
121
+ #
122
+ # @param tunnel_id [String] The Secure MCP Tunnel ID to use instead of a direct server URL. One of
114
123
  #
115
124
  # @param type [Symbol, :mcp] The type of the MCP tool. Always `mcp`.
116
125
 
@@ -162,8 +171,8 @@ module OpenAI
162
171
  end
163
172
 
164
173
  # Identifier for service connectors, like those available in ChatGPT. One of
165
- # `server_url` or `connector_id` must be provided. Learn more about service
166
- # connectors
174
+ # `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more about
175
+ # service connectors
167
176
  # [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors).
168
177
  #
169
178
  # Currently supported `connector_id` values are:
@@ -760,8 +760,8 @@ module OpenAI
760
760
 
761
761
  # @!attribute connector_id
762
762
  # Identifier for service connectors, like those available in ChatGPT. One of
763
- # `server_url` or `connector_id` must be provided. Learn more about service
764
- # connectors
763
+ # `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more about
764
+ # service connectors
765
765
  # [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors).
766
766
  #
767
767
  # Currently supported `connector_id` values are:
@@ -809,13 +809,20 @@ module OpenAI
809
809
  optional :server_description, String
810
810
 
811
811
  # @!attribute server_url
812
- # The URL for the MCP server. One of `server_url` or `connector_id` must be
813
- # provided.
812
+ # The URL for the MCP server. One of `server_url`, `connector_id`, or `tunnel_id`
813
+ # must be provided.
814
814
  #
815
815
  # @return [String, nil]
816
816
  optional :server_url, String
817
817
 
818
- # @!method initialize(server_label:, allowed_tools: nil, authorization: nil, connector_id: nil, defer_loading: nil, headers: nil, require_approval: nil, server_description: nil, server_url: nil, type: :mcp)
818
+ # @!attribute tunnel_id
819
+ # The Secure MCP Tunnel ID to use instead of a direct server URL. One of
820
+ # `server_url`, `connector_id`, or `tunnel_id` must be provided.
821
+ #
822
+ # @return [String, nil]
823
+ optional :tunnel_id, String
824
+
825
+ # @!method initialize(server_label:, allowed_tools: nil, authorization: nil, connector_id: nil, defer_loading: nil, headers: nil, require_approval: nil, server_description: nil, server_url: nil, tunnel_id: nil, type: :mcp)
819
826
  # Some parameter documentations has been truncated, see
820
827
  # {OpenAI::Models::Realtime::RealtimeSessionCreateResponse::Tool::McpTool} for
821
828
  # more details.
@@ -840,7 +847,9 @@ module OpenAI
840
847
  #
841
848
  # @param server_description [String] Optional description of the MCP server, used to provide more context.
842
849
  #
843
- # @param server_url [String] The URL for the MCP server. One of `server_url` or `connector_id` must be
850
+ # @param server_url [String] The URL for the MCP server. One of `server_url`, `connector_id`, or
851
+ #
852
+ # @param tunnel_id [String] The Secure MCP Tunnel ID to use instead of a direct server URL. One of
844
853
  #
845
854
  # @param type [Symbol, :mcp] The type of the MCP tool. Always `mcp`.
846
855
 
@@ -892,8 +901,8 @@ module OpenAI
892
901
  end
893
902
 
894
903
  # Identifier for service connectors, like those available in ChatGPT. One of
895
- # `server_url` or `connector_id` must be provided. Learn more about service
896
- # connectors
904
+ # `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more about
905
+ # service connectors
897
906
  # [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors).
898
907
  #
899
908
  # Currently supported `connector_id` values are: