Skip to content

Commit 7015158

Browse files
feat(api): update OpenAPI spec or Stainless config
1 parent d64d811 commit 7015158

15 files changed

Lines changed: 221 additions & 14 deletions

File tree

‎.stats.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 262
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai/openai-0161cb2a0faadedfc17ff59c7fcad9671962dbd170f83811003c23702148cf36.yml
3-
openapi_spec_hash: 1023c7442d0e2e7e213e8b3a253921c5
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai/openai-e00ba6273043ec67eab4c213e30df144731fc5ae51d7c820ea647990c552b60b.yml
3+
openapi_spec_hash: 9168743f8e60b63630e679583b29a840
44
config_hash: e02ca1082421dfe55b145c45e95d6126

‎src/openai/resources/admin/organization/admin_api_keys.py‎

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ def create(
4747
self,
4848
*,
4949
name: str,
50+
expires_in_seconds: int | Omit = omit,
5051
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
5152
# The extra values given here take precedence over values defined on the client or passed to this method.
5253
extra_headers: Headers | None = None,
@@ -58,6 +59,9 @@ def create(
5859
Create an organization admin API key
5960
6061
Args:
62+
expires_in_seconds: The number of seconds until the API key expires. Omit this field for a key that
63+
does not expire.
64+
6165
extra_headers: Send extra headers
6266
6367
extra_query: Add additional query parameters to the request
@@ -68,7 +72,13 @@ def create(
6872
"""
6973
return self._post(
7074
"/organization/admin_api_keys",
71-
body=maybe_transform({"name": name}, admin_api_key_create_params.AdminAPIKeyCreateParams),
75+
body=maybe_transform(
76+
{
77+
"name": name,
78+
"expires_in_seconds": expires_in_seconds,
79+
},
80+
admin_api_key_create_params.AdminAPIKeyCreateParams,
81+
),
7282
options=make_request_options(
7383
extra_headers=extra_headers,
7484
extra_query=extra_query,
@@ -234,6 +244,7 @@ async def create(
234244
self,
235245
*,
236246
name: str,
247+
expires_in_seconds: int | Omit = omit,
237248
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
238249
# The extra values given here take precedence over values defined on the client or passed to this method.
239250
extra_headers: Headers | None = None,
@@ -245,6 +256,9 @@ async def create(
245256
Create an organization admin API key
246257
247258
Args:
259+
expires_in_seconds: The number of seconds until the API key expires. Omit this field for a key that
260+
does not expire.
261+
248262
extra_headers: Send extra headers
249263
250264
extra_query: Add additional query parameters to the request
@@ -255,7 +269,13 @@ async def create(
255269
"""
256270
return await self._post(
257271
"/organization/admin_api_keys",
258-
body=await async_maybe_transform({"name": name}, admin_api_key_create_params.AdminAPIKeyCreateParams),
272+
body=await async_maybe_transform(
273+
{
274+
"name": name,
275+
"expires_in_seconds": expires_in_seconds,
276+
},
277+
admin_api_key_create_params.AdminAPIKeyCreateParams,
278+
),
259279
options=make_request_options(
260280
extra_headers=extra_headers,
261281
extra_query=extra_query,

‎src/openai/resources/admin/organization/audit_logs.py‎

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,8 @@ def list(
102102
"role.deleted",
103103
"role.assignment.created",
104104
"role.assignment.deleted",
105+
"role.bound_to_resource",
106+
"role.unbound_from_resource",
105107
"scim.enabled",
106108
"scim.disabled",
107109
"service_account.created",
@@ -116,6 +118,7 @@ def list(
116118
limit: int | Omit = omit,
117119
project_ids: SequenceNotStr[str] | Omit = omit,
118120
resource_ids: SequenceNotStr[str] | Omit = omit,
121+
tenant_only: bool | Omit = omit,
119122
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
120123
# The extra values given here take precedence over values defined on the client or passed to this method.
121124
extra_headers: Headers | None = None,
@@ -154,7 +157,13 @@ def list(
154157
project_ids: Return only events for these projects.
155158
156159
resource_ids: Return only events performed on these targets. For example, a project ID
157-
updated.
160+
updated. For ChatGPT connector role events, use the workspace connector resource
161+
ID shown in `details.id`, such as `<workspace_id>__<connector_id>`.
162+
163+
tenant_only: Return only tenant-scoped events associated with this organization. Required for
164+
tenant-scoped events such as `role.bound_to_resource` and
165+
`role.unbound_from_resource`. When `true`, all supplied event types must be
166+
tenant-scoped.
158167
159168
extra_headers: Send extra headers
160169
@@ -183,6 +192,7 @@ def list(
183192
"limit": limit,
184193
"project_ids": project_ids,
185194
"resource_ids": resource_ids,
195+
"tenant_only": tenant_only,
186196
},
187197
audit_log_list_params.AuditLogListParams,
188198
),
@@ -273,6 +283,8 @@ def list(
273283
"role.deleted",
274284
"role.assignment.created",
275285
"role.assignment.deleted",
286+
"role.bound_to_resource",
287+
"role.unbound_from_resource",
276288
"scim.enabled",
277289
"scim.disabled",
278290
"service_account.created",
@@ -287,6 +299,7 @@ def list(
287299
limit: int | Omit = omit,
288300
project_ids: SequenceNotStr[str] | Omit = omit,
289301
resource_ids: SequenceNotStr[str] | Omit = omit,
302+
tenant_only: bool | Omit = omit,
290303
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
291304
# The extra values given here take precedence over values defined on the client or passed to this method.
292305
extra_headers: Headers | None = None,
@@ -325,7 +338,13 @@ def list(
325338
project_ids: Return only events for these projects.
326339
327340
resource_ids: Return only events performed on these targets. For example, a project ID
328-
updated.
341+
updated. For ChatGPT connector role events, use the workspace connector resource
342+
ID shown in `details.id`, such as `<workspace_id>__<connector_id>`.
343+
344+
tenant_only: Return only tenant-scoped events associated with this organization. Required for
345+
tenant-scoped events such as `role.bound_to_resource` and
346+
`role.unbound_from_resource`. When `true`, all supplied event types must be
347+
tenant-scoped.
329348
330349
extra_headers: Send extra headers
331350
@@ -354,6 +373,7 @@ def list(
354373
"limit": limit,
355374
"project_ids": project_ids,
356375
"resource_ids": resource_ids,
376+
"tenant_only": tenant_only,
357377
},
358378
audit_log_list_params.AuditLogListParams,
359379
),

‎src/openai/types/admin/organization/admin_api_key.py‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ class AdminAPIKey(BaseModel):
3737
created_at: int
3838
"""The Unix timestamp (in seconds) of when the API key was created"""
3939

40+
expires_at: Optional[int] = None
41+
"""The Unix timestamp (in seconds) of when the API key expires"""
42+
4043
object: Literal["organization.admin_api_key"]
4144
"""The object type, which is always `organization.admin_api_key`"""
4245

‎src/openai/types/admin/organization/admin_api_key_create_params.py‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,9 @@
99

1010
class AdminAPIKeyCreateParams(TypedDict, total=False):
1111
name: Required[str]
12+
13+
expires_in_seconds: int
14+
"""The number of seconds until the API key expires.
15+
16+
Omit this field for a key that does not expire.
17+
"""

‎src/openai/types/admin/organization/audit_log_list_params.py‎

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,8 @@ class AuditLogListParams(TypedDict, total=False):
9292
"role.deleted",
9393
"role.assignment.created",
9494
"role.assignment.deleted",
95+
"role.bound_to_resource",
96+
"role.unbound_from_resource",
9597
"scim.enabled",
9698
"scim.disabled",
9799
"service_account.created",
@@ -120,7 +122,17 @@ class AuditLogListParams(TypedDict, total=False):
120122
resource_ids: SequenceNotStr[str]
121123
"""Return only events performed on these targets.
122124
123-
For example, a project ID updated.
125+
For example, a project ID updated. For ChatGPT connector role events, use the
126+
workspace connector resource ID shown in `details.id`, such as
127+
`<workspace_id>__<connector_id>`.
128+
"""
129+
130+
tenant_only: bool
131+
"""Return only tenant-scoped events associated with this organization.
132+
133+
Required for tenant-scoped events such as `role.bound_to_resource` and
134+
`role.unbound_from_resource`. When `true`, all supplied event types must be
135+
tenant-scoped.
124136
"""
125137

126138

‎src/openai/types/admin/organization/audit_log_list_response.py‎

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,10 @@
6464
"RateLimitUpdatedChangesRequested",
6565
"RoleAssignmentCreated",
6666
"RoleAssignmentDeleted",
67+
"RoleBoundToResource",
6768
"RoleCreated",
6869
"RoleDeleted",
70+
"RoleUnboundFromResource",
6971
"RoleUpdated",
7072
"RoleUpdatedChangesRequested",
7173
"ScimDisabled",
@@ -653,6 +655,48 @@ class RoleAssignmentDeleted(BaseModel):
653655
"""The type of resource the role assignment was scoped to."""
654656

655657

658+
class RoleBoundToResource(BaseModel):
659+
"""The details for events with this `type`."""
660+
661+
id: Optional[str] = None
662+
"""The ID of the resource the role was bound to.
663+
664+
ChatGPT workspace connector resources use `<workspace_id>__<connector_id>`.
665+
"""
666+
667+
connector_id: Optional[str] = None
668+
"""The connector ID for a ChatGPT workspace connector resource."""
669+
670+
connector_name: Optional[str] = None
671+
"""
672+
The connector display name for a ChatGPT workspace connector resource, or the
673+
connector ID when the display name could not be resolved.
674+
"""
675+
676+
enabled: Optional[bool] = None
677+
"""Whether the connector is enabled for the role."""
678+
679+
permissions: Optional[List[str]] = None
680+
"""The permissions granted to the role for the resource."""
681+
682+
resource_id: Optional[str] = None
683+
"""The ID of the resource the role was bound to."""
684+
685+
resource_type: Optional[str] = None
686+
"""The type of resource the role was bound to."""
687+
688+
role_id: Optional[str] = None
689+
"""The ID of the role that was bound to the resource."""
690+
691+
source: Optional[
692+
Literal["role_toggle", "role_connector_update", "role_delete", "workspace_permissions", "connector_publish"]
693+
] = None
694+
"""The connector role mutation path that produced the event."""
695+
696+
workspace_id: Optional[str] = None
697+
"""The workspace ID for a ChatGPT workspace connector resource."""
698+
699+
656700
class RoleCreated(BaseModel):
657701
"""The details for events with this `type`."""
658702

@@ -679,6 +723,48 @@ class RoleDeleted(BaseModel):
679723
"""The role ID."""
680724

681725

726+
class RoleUnboundFromResource(BaseModel):
727+
"""The details for events with this `type`."""
728+
729+
id: Optional[str] = None
730+
"""The ID of the resource the role was unbound from.
731+
732+
ChatGPT workspace connector resources use `<workspace_id>__<connector_id>`.
733+
"""
734+
735+
connector_id: Optional[str] = None
736+
"""The connector ID for a ChatGPT workspace connector resource."""
737+
738+
connector_name: Optional[str] = None
739+
"""
740+
The connector display name for a ChatGPT workspace connector resource, or the
741+
connector ID when the display name could not be resolved.
742+
"""
743+
744+
enabled: Optional[bool] = None
745+
"""Whether the connector is enabled for the role."""
746+
747+
permissions: Optional[List[str]] = None
748+
"""The permissions remaining for the role after the change."""
749+
750+
resource_id: Optional[str] = None
751+
"""The ID of the resource the role was unbound from."""
752+
753+
resource_type: Optional[str] = None
754+
"""The type of resource the role was unbound from."""
755+
756+
role_id: Optional[str] = None
757+
"""The ID of the role that was unbound from the resource."""
758+
759+
source: Optional[
760+
Literal["role_toggle", "role_connector_update", "role_delete", "workspace_permissions", "connector_publish"]
761+
] = None
762+
"""The connector role mutation path that produced the event."""
763+
764+
workspace_id: Optional[str] = None
765+
"""The workspace ID for a ChatGPT workspace connector resource."""
766+
767+
682768
class RoleUpdatedChangesRequested(BaseModel):
683769
"""The payload used to update the role."""
684770

@@ -941,6 +1027,8 @@ class AuditLogListResponse(BaseModel):
9411027
"role.deleted",
9421028
"role.assignment.created",
9431029
"role.assignment.deleted",
1030+
"role.bound_to_resource",
1031+
"role.unbound_from_resource",
9441032
"scim.enabled",
9451033
"scim.disabled",
9461034
"service_account.created",
@@ -1083,12 +1171,20 @@ class AuditLogListResponse(BaseModel):
10831171
role_assignment_deleted: Optional[RoleAssignmentDeleted] = FieldInfo(alias="role.assignment.deleted", default=None)
10841172
"""The details for events with this `type`."""
10851173

1174+
role_bound_to_resource: Optional[RoleBoundToResource] = FieldInfo(alias="role.bound_to_resource", default=None)
1175+
"""The details for events with this `type`."""
1176+
10861177
role_created: Optional[RoleCreated] = FieldInfo(alias="role.created", default=None)
10871178
"""The details for events with this `type`."""
10881179

10891180
role_deleted: Optional[RoleDeleted] = FieldInfo(alias="role.deleted", default=None)
10901181
"""The details for events with this `type`."""
10911182

1183+
role_unbound_from_resource: Optional[RoleUnboundFromResource] = FieldInfo(
1184+
alias="role.unbound_from_resource", default=None
1185+
)
1186+
"""The details for events with this `type`."""
1187+
10921188
role_updated: Optional[RoleUpdated] = FieldInfo(alias="role.updated", default=None)
10931189
"""The details for events with this `type`."""
10941190

‎src/openai/types/responses/response.py‎

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
from .response_status import ResponseStatus
1313
from .tool_choice_mcp import ToolChoiceMcp
1414
from ..shared.metadata import Metadata
15-
from ..shared.reasoning import Reasoning
1615
from .tool_choice_shell import ToolChoiceShell
1716
from .tool_choice_types import ToolChoiceTypes
1817
from .tool_choice_custom import ToolChoiceCustom
@@ -37,6 +36,7 @@
3736
"ModerationOutput",
3837
"ModerationOutputModerationResult",
3938
"ModerationOutputError",
39+
"Reasoning",
4040
]
4141

4242

@@ -173,6 +173,22 @@ class Moderation(BaseModel):
173173
"""Moderation for the response output."""
174174

175175

176+
class Reasoning(BaseModel):
177+
"""Reasoning configuration and metadata that were used for the response."""
178+
179+
context: Optional[Literal["current_turn", "all_turns"]] = None
180+
"""The effective reasoning context mode used for the response."""
181+
182+
effort: Optional[Literal["none", "minimal", "low", "medium", "high", "xhigh"]] = None
183+
"""The reasoning effort that was requested for the model, if specified."""
184+
185+
summary: Optional[Literal["concise", "detailed", "auto"]] = None
186+
"""A model-generated summary of its reasoning that was produced, if available."""
187+
188+
generate_summary: Optional[Literal["concise", "detailed", "auto"]] = None
189+
"""Deprecated. `summary` was used instead."""
190+
191+
176192
class Response(BaseModel):
177193
id: str
178194
"""Unique identifier for this Response."""
@@ -354,11 +370,7 @@ class Response(BaseModel):
354370
"""
355371

356372
reasoning: Optional[Reasoning] = None
357-
"""**gpt-5 and o-series models only**
358-
359-
Configuration options for
360-
[reasoning models](https://platform.openai.com/docs/guides/reasoning).
361-
"""
373+
"""Reasoning configuration and metadata that were used for the response."""
362374

363375
safety_identifier: Optional[str] = None
364376
"""

0 commit comments

Comments
 (0)