openai 0.66.0 → 0.67.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 (43) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +19 -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/reasoning.rb +27 -1
  12. data/lib/openai/models/responses/input_token_count_params.rb +4 -0
  13. data/lib/openai/models/responses/response_create_params.rb +4 -0
  14. data/lib/openai/models/responses/responses_client_event.rb +4 -0
  15. data/lib/openai/resources/admin/organization/admin_api_keys.rb +7 -1
  16. data/lib/openai/resources/admin/organization/audit_logs.rb +3 -1
  17. data/lib/openai/resources/admin/organization/projects/spend_alerts.rb +28 -0
  18. data/lib/openai/resources/admin/organization/spend_alerts.rb +21 -0
  19. data/lib/openai/version.rb +1 -1
  20. data/lib/openai.rb +2 -0
  21. data/rbi/openai/models/admin/organization/admin_api_key.rbi +8 -0
  22. data/rbi/openai/models/admin/organization/admin_api_key_create_params.rbi +21 -2
  23. data/rbi/openai/models/admin/organization/audit_log_list_params.rbi +31 -2
  24. data/rbi/openai/models/admin/organization/audit_log_list_response.rbi +468 -0
  25. data/rbi/openai/models/admin/organization/projects/spend_alert_retrieve_params.rbi +52 -0
  26. data/rbi/openai/models/admin/organization/spend_alert_retrieve_params.rbi +42 -0
  27. data/rbi/openai/models/reasoning.rbi +34 -0
  28. data/rbi/openai/resources/admin/organization/admin_api_keys.rbi +8 -1
  29. data/rbi/openai/resources/admin/organization/audit_logs.rbi +8 -1
  30. data/rbi/openai/resources/admin/organization/projects/spend_alerts.rbi +19 -0
  31. data/rbi/openai/resources/admin/organization/spend_alerts.rbi +14 -0
  32. data/sig/openai/models/admin/organization/admin_api_key.rbs +5 -0
  33. data/sig/openai/models/admin/organization/admin_api_key_create_params.rbs +8 -1
  34. data/sig/openai/models/admin/organization/audit_log_list_params.rbs +12 -1
  35. data/sig/openai/models/admin/organization/audit_log_list_response.rbs +228 -0
  36. data/sig/openai/models/admin/organization/projects/spend_alert_retrieve_params.rbs +34 -0
  37. data/sig/openai/models/admin/organization/spend_alert_retrieve_params.rbs +27 -0
  38. data/sig/openai/models/reasoning.rbs +17 -0
  39. data/sig/openai/resources/admin/organization/admin_api_keys.rbs +1 -0
  40. data/sig/openai/resources/admin/organization/audit_logs.rbs +1 -0
  41. data/sig/openai/resources/admin/organization/projects/spend_alerts.rbs +6 -0
  42. data/sig/openai/resources/admin/organization/spend_alerts.rbs +5 -0
  43. metadata +9 -3
@@ -696,6 +696,24 @@ module OpenAI
696
696
  end
697
697
  attr_writer :role_assignment_deleted
698
698
 
699
+ # The details for events with this `type`.
700
+ sig do
701
+ returns(
702
+ T.nilable(
703
+ OpenAI::Models::Admin::Organization::AuditLogListResponse::RoleBoundToResource
704
+ )
705
+ )
706
+ end
707
+ attr_reader :role_bound_to_resource
708
+
709
+ sig do
710
+ params(
711
+ role_bound_to_resource:
712
+ OpenAI::Models::Admin::Organization::AuditLogListResponse::RoleBoundToResource::OrHash
713
+ ).void
714
+ end
715
+ attr_writer :role_bound_to_resource
716
+
699
717
  # The details for events with this `type`.
700
718
  sig do
701
719
  returns(
@@ -732,6 +750,24 @@ module OpenAI
732
750
  end
733
751
  attr_writer :role_deleted
734
752
 
753
+ # The details for events with this `type`.
754
+ sig do
755
+ returns(
756
+ T.nilable(
757
+ OpenAI::Models::Admin::Organization::AuditLogListResponse::RoleUnboundFromResource
758
+ )
759
+ )
760
+ end
761
+ attr_reader :role_unbound_from_resource
762
+
763
+ sig do
764
+ params(
765
+ role_unbound_from_resource:
766
+ OpenAI::Models::Admin::Organization::AuditLogListResponse::RoleUnboundFromResource::OrHash
767
+ ).void
768
+ end
769
+ attr_writer :role_unbound_from_resource
770
+
735
771
  # The details for events with this `type`.
736
772
  sig do
737
773
  returns(
@@ -1085,10 +1121,14 @@ module OpenAI
1085
1121
  OpenAI::Models::Admin::Organization::AuditLogListResponse::RoleAssignmentCreated::OrHash,
1086
1122
  role_assignment_deleted:
1087
1123
  OpenAI::Models::Admin::Organization::AuditLogListResponse::RoleAssignmentDeleted::OrHash,
1124
+ role_bound_to_resource:
1125
+ OpenAI::Models::Admin::Organization::AuditLogListResponse::RoleBoundToResource::OrHash,
1088
1126
  role_created:
1089
1127
  OpenAI::Models::Admin::Organization::AuditLogListResponse::RoleCreated::OrHash,
1090
1128
  role_deleted:
1091
1129
  OpenAI::Models::Admin::Organization::AuditLogListResponse::RoleDeleted::OrHash,
1130
+ role_unbound_from_resource:
1131
+ OpenAI::Models::Admin::Organization::AuditLogListResponse::RoleUnboundFromResource::OrHash,
1092
1132
  role_updated:
1093
1133
  OpenAI::Models::Admin::Organization::AuditLogListResponse::RoleUpdated::OrHash,
1094
1134
  scim_disabled:
@@ -1208,10 +1248,14 @@ module OpenAI
1208
1248
  # The details for events with this `type`.
1209
1249
  role_assignment_deleted: nil,
1210
1250
  # The details for events with this `type`.
1251
+ role_bound_to_resource: nil,
1252
+ # The details for events with this `type`.
1211
1253
  role_created: nil,
1212
1254
  # The details for events with this `type`.
1213
1255
  role_deleted: nil,
1214
1256
  # The details for events with this `type`.
1257
+ role_unbound_from_resource: nil,
1258
+ # The details for events with this `type`.
1215
1259
  role_updated: nil,
1216
1260
  # The details for events with this `type`.
1217
1261
  scim_disabled: nil,
@@ -1327,10 +1371,14 @@ module OpenAI
1327
1371
  OpenAI::Models::Admin::Organization::AuditLogListResponse::RoleAssignmentCreated,
1328
1372
  role_assignment_deleted:
1329
1373
  OpenAI::Models::Admin::Organization::AuditLogListResponse::RoleAssignmentDeleted,
1374
+ role_bound_to_resource:
1375
+ OpenAI::Models::Admin::Organization::AuditLogListResponse::RoleBoundToResource,
1330
1376
  role_created:
1331
1377
  OpenAI::Models::Admin::Organization::AuditLogListResponse::RoleCreated,
1332
1378
  role_deleted:
1333
1379
  OpenAI::Models::Admin::Organization::AuditLogListResponse::RoleDeleted,
1380
+ role_unbound_from_resource:
1381
+ OpenAI::Models::Admin::Organization::AuditLogListResponse::RoleUnboundFromResource,
1334
1382
  role_updated:
1335
1383
  OpenAI::Models::Admin::Organization::AuditLogListResponse::RoleUpdated,
1336
1384
  scim_disabled:
@@ -1625,6 +1673,16 @@ module OpenAI
1625
1673
  :"role.assignment.deleted",
1626
1674
  OpenAI::Models::Admin::Organization::AuditLogListResponse::Type::TaggedSymbol
1627
1675
  )
1676
+ ROLE_BOUND_TO_RESOURCE =
1677
+ T.let(
1678
+ :"role.bound_to_resource",
1679
+ OpenAI::Models::Admin::Organization::AuditLogListResponse::Type::TaggedSymbol
1680
+ )
1681
+ ROLE_UNBOUND_FROM_RESOURCE =
1682
+ T.let(
1683
+ :"role.unbound_from_resource",
1684
+ OpenAI::Models::Admin::Organization::AuditLogListResponse::Type::TaggedSymbol
1685
+ )
1628
1686
  SCIM_ENABLED =
1629
1687
  T.let(
1630
1688
  :"scim.enabled",
@@ -4506,6 +4564,211 @@ module OpenAI
4506
4564
  end
4507
4565
  end
4508
4566
 
4567
+ class RoleBoundToResource < OpenAI::Internal::Type::BaseModel
4568
+ OrHash =
4569
+ T.type_alias do
4570
+ T.any(
4571
+ OpenAI::Models::Admin::Organization::AuditLogListResponse::RoleBoundToResource,
4572
+ OpenAI::Internal::AnyHash
4573
+ )
4574
+ end
4575
+
4576
+ # The ID of the resource the role was bound to. ChatGPT workspace connector
4577
+ # resources use `<workspace_id>__<connector_id>`.
4578
+ sig { returns(T.nilable(String)) }
4579
+ attr_reader :id
4580
+
4581
+ sig { params(id: String).void }
4582
+ attr_writer :id
4583
+
4584
+ # The connector ID for a ChatGPT workspace connector resource.
4585
+ sig { returns(T.nilable(String)) }
4586
+ attr_reader :connector_id
4587
+
4588
+ sig { params(connector_id: String).void }
4589
+ attr_writer :connector_id
4590
+
4591
+ # The connector display name for a ChatGPT workspace connector resource, or the
4592
+ # connector ID when the display name could not be resolved.
4593
+ sig { returns(T.nilable(String)) }
4594
+ attr_reader :connector_name
4595
+
4596
+ sig { params(connector_name: String).void }
4597
+ attr_writer :connector_name
4598
+
4599
+ # Whether the connector is enabled for the role.
4600
+ sig { returns(T.nilable(T::Boolean)) }
4601
+ attr_reader :enabled
4602
+
4603
+ sig { params(enabled: T::Boolean).void }
4604
+ attr_writer :enabled
4605
+
4606
+ # The permissions granted to the role for the resource.
4607
+ sig { returns(T.nilable(T::Array[String])) }
4608
+ attr_reader :permissions
4609
+
4610
+ sig { params(permissions: T::Array[String]).void }
4611
+ attr_writer :permissions
4612
+
4613
+ # The ID of the resource the role was bound to.
4614
+ sig { returns(T.nilable(String)) }
4615
+ attr_reader :resource_id
4616
+
4617
+ sig { params(resource_id: String).void }
4618
+ attr_writer :resource_id
4619
+
4620
+ # The type of resource the role was bound to.
4621
+ sig { returns(T.nilable(String)) }
4622
+ attr_reader :resource_type
4623
+
4624
+ sig { params(resource_type: String).void }
4625
+ attr_writer :resource_type
4626
+
4627
+ # The ID of the role that was bound to the resource.
4628
+ sig { returns(T.nilable(String)) }
4629
+ attr_reader :role_id
4630
+
4631
+ sig { params(role_id: String).void }
4632
+ attr_writer :role_id
4633
+
4634
+ # The connector role mutation path that produced the event.
4635
+ sig do
4636
+ returns(
4637
+ T.nilable(
4638
+ OpenAI::Models::Admin::Organization::AuditLogListResponse::RoleBoundToResource::Source::TaggedSymbol
4639
+ )
4640
+ )
4641
+ end
4642
+ attr_reader :source
4643
+
4644
+ sig do
4645
+ params(
4646
+ source:
4647
+ OpenAI::Models::Admin::Organization::AuditLogListResponse::RoleBoundToResource::Source::OrSymbol
4648
+ ).void
4649
+ end
4650
+ attr_writer :source
4651
+
4652
+ # The workspace ID for a ChatGPT workspace connector resource.
4653
+ sig { returns(T.nilable(String)) }
4654
+ attr_reader :workspace_id
4655
+
4656
+ sig { params(workspace_id: String).void }
4657
+ attr_writer :workspace_id
4658
+
4659
+ # The details for events with this `type`.
4660
+ sig do
4661
+ params(
4662
+ id: String,
4663
+ connector_id: String,
4664
+ connector_name: String,
4665
+ enabled: T::Boolean,
4666
+ permissions: T::Array[String],
4667
+ resource_id: String,
4668
+ resource_type: String,
4669
+ role_id: String,
4670
+ source:
4671
+ OpenAI::Models::Admin::Organization::AuditLogListResponse::RoleBoundToResource::Source::OrSymbol,
4672
+ workspace_id: String
4673
+ ).returns(T.attached_class)
4674
+ end
4675
+ def self.new(
4676
+ # The ID of the resource the role was bound to. ChatGPT workspace connector
4677
+ # resources use `<workspace_id>__<connector_id>`.
4678
+ id: nil,
4679
+ # The connector ID for a ChatGPT workspace connector resource.
4680
+ connector_id: nil,
4681
+ # The connector display name for a ChatGPT workspace connector resource, or the
4682
+ # connector ID when the display name could not be resolved.
4683
+ connector_name: nil,
4684
+ # Whether the connector is enabled for the role.
4685
+ enabled: nil,
4686
+ # The permissions granted to the role for the resource.
4687
+ permissions: nil,
4688
+ # The ID of the resource the role was bound to.
4689
+ resource_id: nil,
4690
+ # The type of resource the role was bound to.
4691
+ resource_type: nil,
4692
+ # The ID of the role that was bound to the resource.
4693
+ role_id: nil,
4694
+ # The connector role mutation path that produced the event.
4695
+ source: nil,
4696
+ # The workspace ID for a ChatGPT workspace connector resource.
4697
+ workspace_id: nil
4698
+ )
4699
+ end
4700
+
4701
+ sig do
4702
+ override.returns(
4703
+ {
4704
+ id: String,
4705
+ connector_id: String,
4706
+ connector_name: String,
4707
+ enabled: T::Boolean,
4708
+ permissions: T::Array[String],
4709
+ resource_id: String,
4710
+ resource_type: String,
4711
+ role_id: String,
4712
+ source:
4713
+ OpenAI::Models::Admin::Organization::AuditLogListResponse::RoleBoundToResource::Source::TaggedSymbol,
4714
+ workspace_id: String
4715
+ }
4716
+ )
4717
+ end
4718
+ def to_hash
4719
+ end
4720
+
4721
+ # The connector role mutation path that produced the event.
4722
+ module Source
4723
+ extend OpenAI::Internal::Type::Enum
4724
+
4725
+ TaggedSymbol =
4726
+ T.type_alias do
4727
+ T.all(
4728
+ Symbol,
4729
+ OpenAI::Models::Admin::Organization::AuditLogListResponse::RoleBoundToResource::Source
4730
+ )
4731
+ end
4732
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
4733
+
4734
+ ROLE_TOGGLE =
4735
+ T.let(
4736
+ :role_toggle,
4737
+ OpenAI::Models::Admin::Organization::AuditLogListResponse::RoleBoundToResource::Source::TaggedSymbol
4738
+ )
4739
+ ROLE_CONNECTOR_UPDATE =
4740
+ T.let(
4741
+ :role_connector_update,
4742
+ OpenAI::Models::Admin::Organization::AuditLogListResponse::RoleBoundToResource::Source::TaggedSymbol
4743
+ )
4744
+ ROLE_DELETE =
4745
+ T.let(
4746
+ :role_delete,
4747
+ OpenAI::Models::Admin::Organization::AuditLogListResponse::RoleBoundToResource::Source::TaggedSymbol
4748
+ )
4749
+ WORKSPACE_PERMISSIONS =
4750
+ T.let(
4751
+ :workspace_permissions,
4752
+ OpenAI::Models::Admin::Organization::AuditLogListResponse::RoleBoundToResource::Source::TaggedSymbol
4753
+ )
4754
+ CONNECTOR_PUBLISH =
4755
+ T.let(
4756
+ :connector_publish,
4757
+ OpenAI::Models::Admin::Organization::AuditLogListResponse::RoleBoundToResource::Source::TaggedSymbol
4758
+ )
4759
+
4760
+ sig do
4761
+ override.returns(
4762
+ T::Array[
4763
+ OpenAI::Models::Admin::Organization::AuditLogListResponse::RoleBoundToResource::Source::TaggedSymbol
4764
+ ]
4765
+ )
4766
+ end
4767
+ def self.values
4768
+ end
4769
+ end
4770
+ end
4771
+
4509
4772
  class RoleCreated < OpenAI::Internal::Type::BaseModel
4510
4773
  OrHash =
4511
4774
  T.type_alias do
@@ -4618,6 +4881,211 @@ module OpenAI
4618
4881
  end
4619
4882
  end
4620
4883
 
4884
+ class RoleUnboundFromResource < OpenAI::Internal::Type::BaseModel
4885
+ OrHash =
4886
+ T.type_alias do
4887
+ T.any(
4888
+ OpenAI::Models::Admin::Organization::AuditLogListResponse::RoleUnboundFromResource,
4889
+ OpenAI::Internal::AnyHash
4890
+ )
4891
+ end
4892
+
4893
+ # The ID of the resource the role was unbound from. ChatGPT workspace connector
4894
+ # resources use `<workspace_id>__<connector_id>`.
4895
+ sig { returns(T.nilable(String)) }
4896
+ attr_reader :id
4897
+
4898
+ sig { params(id: String).void }
4899
+ attr_writer :id
4900
+
4901
+ # The connector ID for a ChatGPT workspace connector resource.
4902
+ sig { returns(T.nilable(String)) }
4903
+ attr_reader :connector_id
4904
+
4905
+ sig { params(connector_id: String).void }
4906
+ attr_writer :connector_id
4907
+
4908
+ # The connector display name for a ChatGPT workspace connector resource, or the
4909
+ # connector ID when the display name could not be resolved.
4910
+ sig { returns(T.nilable(String)) }
4911
+ attr_reader :connector_name
4912
+
4913
+ sig { params(connector_name: String).void }
4914
+ attr_writer :connector_name
4915
+
4916
+ # Whether the connector is enabled for the role.
4917
+ sig { returns(T.nilable(T::Boolean)) }
4918
+ attr_reader :enabled
4919
+
4920
+ sig { params(enabled: T::Boolean).void }
4921
+ attr_writer :enabled
4922
+
4923
+ # The permissions remaining for the role after the change.
4924
+ sig { returns(T.nilable(T::Array[String])) }
4925
+ attr_reader :permissions
4926
+
4927
+ sig { params(permissions: T::Array[String]).void }
4928
+ attr_writer :permissions
4929
+
4930
+ # The ID of the resource the role was unbound from.
4931
+ sig { returns(T.nilable(String)) }
4932
+ attr_reader :resource_id
4933
+
4934
+ sig { params(resource_id: String).void }
4935
+ attr_writer :resource_id
4936
+
4937
+ # The type of resource the role was unbound from.
4938
+ sig { returns(T.nilable(String)) }
4939
+ attr_reader :resource_type
4940
+
4941
+ sig { params(resource_type: String).void }
4942
+ attr_writer :resource_type
4943
+
4944
+ # The ID of the role that was unbound from the resource.
4945
+ sig { returns(T.nilable(String)) }
4946
+ attr_reader :role_id
4947
+
4948
+ sig { params(role_id: String).void }
4949
+ attr_writer :role_id
4950
+
4951
+ # The connector role mutation path that produced the event.
4952
+ sig do
4953
+ returns(
4954
+ T.nilable(
4955
+ OpenAI::Models::Admin::Organization::AuditLogListResponse::RoleUnboundFromResource::Source::TaggedSymbol
4956
+ )
4957
+ )
4958
+ end
4959
+ attr_reader :source
4960
+
4961
+ sig do
4962
+ params(
4963
+ source:
4964
+ OpenAI::Models::Admin::Organization::AuditLogListResponse::RoleUnboundFromResource::Source::OrSymbol
4965
+ ).void
4966
+ end
4967
+ attr_writer :source
4968
+
4969
+ # The workspace ID for a ChatGPT workspace connector resource.
4970
+ sig { returns(T.nilable(String)) }
4971
+ attr_reader :workspace_id
4972
+
4973
+ sig { params(workspace_id: String).void }
4974
+ attr_writer :workspace_id
4975
+
4976
+ # The details for events with this `type`.
4977
+ sig do
4978
+ params(
4979
+ id: String,
4980
+ connector_id: String,
4981
+ connector_name: String,
4982
+ enabled: T::Boolean,
4983
+ permissions: T::Array[String],
4984
+ resource_id: String,
4985
+ resource_type: String,
4986
+ role_id: String,
4987
+ source:
4988
+ OpenAI::Models::Admin::Organization::AuditLogListResponse::RoleUnboundFromResource::Source::OrSymbol,
4989
+ workspace_id: String
4990
+ ).returns(T.attached_class)
4991
+ end
4992
+ def self.new(
4993
+ # The ID of the resource the role was unbound from. ChatGPT workspace connector
4994
+ # resources use `<workspace_id>__<connector_id>`.
4995
+ id: nil,
4996
+ # The connector ID for a ChatGPT workspace connector resource.
4997
+ connector_id: nil,
4998
+ # The connector display name for a ChatGPT workspace connector resource, or the
4999
+ # connector ID when the display name could not be resolved.
5000
+ connector_name: nil,
5001
+ # Whether the connector is enabled for the role.
5002
+ enabled: nil,
5003
+ # The permissions remaining for the role after the change.
5004
+ permissions: nil,
5005
+ # The ID of the resource the role was unbound from.
5006
+ resource_id: nil,
5007
+ # The type of resource the role was unbound from.
5008
+ resource_type: nil,
5009
+ # The ID of the role that was unbound from the resource.
5010
+ role_id: nil,
5011
+ # The connector role mutation path that produced the event.
5012
+ source: nil,
5013
+ # The workspace ID for a ChatGPT workspace connector resource.
5014
+ workspace_id: nil
5015
+ )
5016
+ end
5017
+
5018
+ sig do
5019
+ override.returns(
5020
+ {
5021
+ id: String,
5022
+ connector_id: String,
5023
+ connector_name: String,
5024
+ enabled: T::Boolean,
5025
+ permissions: T::Array[String],
5026
+ resource_id: String,
5027
+ resource_type: String,
5028
+ role_id: String,
5029
+ source:
5030
+ OpenAI::Models::Admin::Organization::AuditLogListResponse::RoleUnboundFromResource::Source::TaggedSymbol,
5031
+ workspace_id: String
5032
+ }
5033
+ )
5034
+ end
5035
+ def to_hash
5036
+ end
5037
+
5038
+ # The connector role mutation path that produced the event.
5039
+ module Source
5040
+ extend OpenAI::Internal::Type::Enum
5041
+
5042
+ TaggedSymbol =
5043
+ T.type_alias do
5044
+ T.all(
5045
+ Symbol,
5046
+ OpenAI::Models::Admin::Organization::AuditLogListResponse::RoleUnboundFromResource::Source
5047
+ )
5048
+ end
5049
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
5050
+
5051
+ ROLE_TOGGLE =
5052
+ T.let(
5053
+ :role_toggle,
5054
+ OpenAI::Models::Admin::Organization::AuditLogListResponse::RoleUnboundFromResource::Source::TaggedSymbol
5055
+ )
5056
+ ROLE_CONNECTOR_UPDATE =
5057
+ T.let(
5058
+ :role_connector_update,
5059
+ OpenAI::Models::Admin::Organization::AuditLogListResponse::RoleUnboundFromResource::Source::TaggedSymbol
5060
+ )
5061
+ ROLE_DELETE =
5062
+ T.let(
5063
+ :role_delete,
5064
+ OpenAI::Models::Admin::Organization::AuditLogListResponse::RoleUnboundFromResource::Source::TaggedSymbol
5065
+ )
5066
+ WORKSPACE_PERMISSIONS =
5067
+ T.let(
5068
+ :workspace_permissions,
5069
+ OpenAI::Models::Admin::Organization::AuditLogListResponse::RoleUnboundFromResource::Source::TaggedSymbol
5070
+ )
5071
+ CONNECTOR_PUBLISH =
5072
+ T.let(
5073
+ :connector_publish,
5074
+ OpenAI::Models::Admin::Organization::AuditLogListResponse::RoleUnboundFromResource::Source::TaggedSymbol
5075
+ )
5076
+
5077
+ sig do
5078
+ override.returns(
5079
+ T::Array[
5080
+ OpenAI::Models::Admin::Organization::AuditLogListResponse::RoleUnboundFromResource::Source::TaggedSymbol
5081
+ ]
5082
+ )
5083
+ end
5084
+ def self.values
5085
+ end
5086
+ end
5087
+ end
5088
+
4621
5089
  class RoleUpdated < OpenAI::Internal::Type::BaseModel
4622
5090
  OrHash =
4623
5091
  T.type_alias do
@@ -0,0 +1,52 @@
1
+ # typed: strong
2
+
3
+ module OpenAI
4
+ module Models
5
+ module Admin
6
+ module Organization
7
+ module Projects
8
+ class SpendAlertRetrieveParams < OpenAI::Internal::Type::BaseModel
9
+ extend OpenAI::Internal::Type::RequestParameters::Converter
10
+ include OpenAI::Internal::Type::RequestParameters
11
+
12
+ OrHash =
13
+ T.type_alias do
14
+ T.any(
15
+ OpenAI::Admin::Organization::Projects::SpendAlertRetrieveParams,
16
+ OpenAI::Internal::AnyHash
17
+ )
18
+ end
19
+
20
+ sig { returns(String) }
21
+ attr_accessor :project_id
22
+
23
+ sig { returns(String) }
24
+ attr_accessor :alert_id
25
+
26
+ sig do
27
+ params(
28
+ project_id: String,
29
+ alert_id: String,
30
+ request_options: OpenAI::RequestOptions::OrHash
31
+ ).returns(T.attached_class)
32
+ end
33
+ def self.new(project_id:, alert_id:, request_options: {})
34
+ end
35
+
36
+ sig do
37
+ override.returns(
38
+ {
39
+ project_id: String,
40
+ alert_id: String,
41
+ request_options: OpenAI::RequestOptions
42
+ }
43
+ )
44
+ end
45
+ def to_hash
46
+ end
47
+ end
48
+ end
49
+ end
50
+ end
51
+ end
52
+ end
@@ -0,0 +1,42 @@
1
+ # typed: strong
2
+
3
+ module OpenAI
4
+ module Models
5
+ module Admin
6
+ module Organization
7
+ class SpendAlertRetrieveParams < OpenAI::Internal::Type::BaseModel
8
+ extend OpenAI::Internal::Type::RequestParameters::Converter
9
+ include OpenAI::Internal::Type::RequestParameters
10
+
11
+ OrHash =
12
+ T.type_alias do
13
+ T.any(
14
+ OpenAI::Admin::Organization::SpendAlertRetrieveParams,
15
+ OpenAI::Internal::AnyHash
16
+ )
17
+ end
18
+
19
+ sig { returns(String) }
20
+ attr_accessor :alert_id
21
+
22
+ sig do
23
+ params(
24
+ alert_id: String,
25
+ request_options: OpenAI::RequestOptions::OrHash
26
+ ).returns(T.attached_class)
27
+ end
28
+ def self.new(alert_id:, request_options: {})
29
+ end
30
+
31
+ sig do
32
+ override.returns(
33
+ { alert_id: String, request_options: OpenAI::RequestOptions }
34
+ )
35
+ end
36
+ def to_hash
37
+ end
38
+ end
39
+ end
40
+ end
41
+ end
42
+ end
@@ -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