Skip to content

Commit d12d60f

Browse files
feat(api): add GCP external storage support (openai#3943)
## Summary Add typed GCP provider support for organization external storage. Expose retry headers on video creation errors when available. ## Changes - Export the new GcpExternalStorageProvider response model with bucket, region, audience, workload identity, and provider type fields. - Allow GCP providers in external storage creation parameters, configurations, and audit log registration events. - Add optional headers to VideoCreateError as a string mapping for Retry-After and Retry-After-Ms values. Co-authored-by: jbeckwith-oai <269036200+jbeckwith-oai@users.noreply.github.com>
1 parent bac3545 commit d12d60f

10 files changed

Lines changed: 221 additions & 89 deletions

‎.castiron.stats.yml‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
schema_version: 1
2-
generation_id: c8c6bf6c-8bff-434a-b978-585a27465fa8
3-
openapi_spec_hash: 6a2e60e178aa24527fca9f135ac4496d
4-
openapi_transformed_spec_hash: effb859cf813a2e353712f1ecfc81c08
5-
config_hash: 18f602826c88bad76c6fdf08ab67247a
6-
codegen_sha: 14a34feb242913af4804472ab683ca8782bf39d7
7-
codegen_hash: e4941790e2be3ec721829183f7ae6daf6b05fedcdb00b37971d988ac4b671e4c
8-
public_codegen_sha: 19f5aa746f2bc5d9f5affdae7a05d8c92e0c4ab1
2+
generation_id: 85ad4660-a311-4438-9c8d-cdca0ec0f76a
3+
openapi_spec_hash: 6ffdf0b6c2bafb456b14fda3f7231658
4+
openapi_transformed_spec_hash: d6d1e240c0615a9349169c2f2d04c388
5+
config_hash: 84cdcc959ee7140cc9a65e9b642c097b
6+
codegen_sha: 2284ccaf093c393669ee50253d011bb2a12c9f69
7+
codegen_hash: 70eb364ca64eb34fc66bed39b8f693f90c75dcd0c307489373cf360dcf3a2269
8+
public_codegen_sha: 75504785271618f32f21c7948959b7a390faf4f5

‎api.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1510,6 +1510,7 @@ from openai.types.admin.organization import (
15101510
AzureExternalStorageProvider,
15111511
ExternalStorageConfiguration,
15121512
ExternalStorageDeleted,
1513+
GcpExternalStorageProvider,
15131514
)
15141515
```
15151516

‎api_reference/openapi.transformed.yml‎

Lines changed: 136 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -70944,12 +70944,42 @@ components:
7094470944
- account_name
7094570945
- container
7094670946
- region
70947+
GcpExternalStorageProviderResponse:
70948+
properties:
70949+
type:
70950+
type: string
70951+
enum:
70952+
- gcp
70953+
default: gcp
70954+
x-stainless-const: true
70955+
bucket:
70956+
type: string
70957+
workload_identity_project_number:
70958+
type: string
70959+
workload_identity_pool_id:
70960+
type: string
70961+
workload_identity_provider_id:
70962+
type: string
70963+
region:
70964+
type: string
70965+
audience:
70966+
type: string
70967+
type: object
70968+
required:
70969+
- type
70970+
- bucket
70971+
- workload_identity_project_number
70972+
- workload_identity_pool_id
70973+
- workload_identity_provider_id
70974+
- region
70975+
- audience
7094770976
provider:
7094870977
discriminator:
7094970978
propertyName: type
7095070979
anyOf:
7095170980
- $ref: '#/components/schemas/AwsExternalStorageProviderResponse'
7095270981
- $ref: '#/components/schemas/AzureExternalStorageProviderResponse'
70982+
- $ref: '#/components/schemas/GcpExternalStorageProviderResponse'
7095370983
PublicProjectResidency:
7095470984
type: string
7095570985
enum:
@@ -71571,6 +71601,7 @@ components:
7157171601
anyOf:
7157271602
- $ref: '#/components/schemas/AwsExternalStorageProviderResponse'
7157371603
- $ref: '#/components/schemas/AzureExternalStorageProviderResponse'
71604+
- $ref: '#/components/schemas/GcpExternalStorageProviderResponse'
7157471605
geography:
7157571606
type: string
7157671607
status:
@@ -71659,6 +71690,29 @@ components:
7165971690
- resource_group
7166071691
- account_name
7166171692
- container
71693+
GcpExternalStorageProviderParams:
71694+
properties:
71695+
type:
71696+
type: string
71697+
enum:
71698+
- gcp
71699+
default: gcp
71700+
x-stainless-const: true
71701+
bucket:
71702+
type: string
71703+
workload_identity_project_number:
71704+
type: string
71705+
workload_identity_pool_id:
71706+
type: string
71707+
workload_identity_provider_id:
71708+
type: string
71709+
type: object
71710+
required:
71711+
- type
71712+
- bucket
71713+
- workload_identity_project_number
71714+
- workload_identity_pool_id
71715+
- workload_identity_provider_id
7166271716
CreateExternalStorageBody:
7166371717
properties:
7166471718
project_id:
@@ -71670,6 +71724,7 @@ components:
7167071724
anyOf:
7167171725
- $ref: '#/components/schemas/AwsExternalStorageProviderParams'
7167271726
- $ref: '#/components/schemas/AzureExternalStorageProviderParams'
71727+
- $ref: '#/components/schemas/GcpExternalStorageProviderParams'
7167371728
type: object
7167471729
required:
7167571730
- project_id
@@ -72066,6 +72121,13 @@ components:
7206672121
message:
7206772122
type: string
7206872123
description: A human-readable description of the error that was returned.
72124+
headers:
72125+
additionalProperties:
72126+
type: string
72127+
description: The retry header value.
72128+
type: object
72129+
description: The Retry-After and Retry-After-Ms headers returned with the original error, if any.
72130+
x-oaiTypeLabel: map
7206972131
misalignment:
7207072132
$ref: '#/components/schemas/MisalignmentErrorDetailsResource'
7207172133
type: object
@@ -73947,42 +74009,7 @@ components:
7394774009
- ''
7394874010
- ''
7394974011
description: The public lifecycle status of an execution environment.
73950-
HostedEnvironmentFileResourceFileId:
73951-
type: object
73952-
properties:
73953-
type:
73954-
type: string
73955-
enum:
73956-
- file_id
73957-
default: file_id
73958-
x-stainless-const: true
73959-
description: The type of the object. Always `file_id`.
73960-
id:
73961-
type: string
73962-
minLength: 0
73963-
description: The session-scoped ID of the file in the execution environment.
73964-
file_id:
73965-
type: string
73966-
minLength: 0
73967-
description: The ID of the uploaded file.
73968-
path:
73969-
type: string
73970-
minLength: 0
73971-
description: The file's absolute path inside the environment.
73972-
size_bytes:
73973-
type: integer
73974-
format: int64
73975-
minimum: 0
73976-
description: The decoded file size in bytes.
73977-
required:
73978-
- type
73979-
- id
73980-
- file_id
73981-
- path
73982-
- size_bytes
73983-
additionalProperties: false
73984-
description: A file copied from the OpenAI Files API.
73985-
HostedEnvironmentFileResourceInline:
74012+
HostedPluginResourceInline:
7398674013
type: object
7398774014
properties:
7398874015
type:
@@ -73992,39 +74019,30 @@ components:
7399274019
default: inline
7399374020
x-stainless-const: true
7399474021
description: The type of the object. Always `inline`.
73995-
id:
74022+
name:
7399674023
type: string
7399774024
minLength: 0
73998-
description: The session-scoped ID of the file in the execution environment.
73999-
path:
74025+
description: The installed plugin name.
74026+
description:
7400074027
type: string
7400174028
minLength: 0
74002-
description: The file's absolute path inside the environment.
74003-
size_bytes:
74004-
type: integer
74005-
format: int64
74006-
minimum: 0
74007-
description: The decoded file size in bytes.
74029+
description: The installed plugin description.
7400874030
required:
7400974031
- type
74010-
- id
74011-
- path
74012-
- size_bytes
74032+
- name
74033+
- description
7401374034
additionalProperties: false
74014-
description: A file supplied inline when the session was created.
74015-
HostedEnvironmentFileResource:
74016-
description: Metadata for a file materialized in an OpenAI-hosted execution environment.
74035+
description: A plugin installed from an inline ZIP archive.
74036+
HostedPluginResource:
74037+
description: A plugin installed in an OpenAI-hosted environment.
7401774038
discriminator:
7401874039
propertyName: type
7401974040
mapping:
74020-
file_id: '#/components/schemas/HostedEnvironmentFileResourceFileId'
74021-
inline: '#/components/schemas/HostedEnvironmentFileResourceInline'
74041+
inline: '#/components/schemas/HostedPluginResourceInline'
7402274042
x-oai-discriminator-values:
74023-
- file_id
7402474043
- inline
7402574044
anyOf:
74026-
- $ref: '#/components/schemas/HostedEnvironmentFileResourceFileId'
74027-
- $ref: '#/components/schemas/HostedEnvironmentFileResourceInline'
74045+
- $ref: '#/components/schemas/HostedPluginResourceInline'
7402874046
HostedSkillResourceSkillReference:
7402974047
type: object
7403074048
properties:
@@ -74096,7 +74114,42 @@ components:
7409674114
anyOf:
7409774115
- $ref: '#/components/schemas/HostedSkillResourceSkillReference'
7409874116
- $ref: '#/components/schemas/HostedSkillResourceInline'
74099-
HostedPluginResourceInline:
74117+
HostedEnvironmentFileResourceFileId:
74118+
type: object
74119+
properties:
74120+
type:
74121+
type: string
74122+
enum:
74123+
- file_id
74124+
default: file_id
74125+
x-stainless-const: true
74126+
description: The type of the object. Always `file_id`.
74127+
id:
74128+
type: string
74129+
minLength: 0
74130+
description: The session-scoped ID of the file in the execution environment.
74131+
file_id:
74132+
type: string
74133+
minLength: 0
74134+
description: The ID of the uploaded file.
74135+
path:
74136+
type: string
74137+
minLength: 0
74138+
description: The file's absolute path inside the environment.
74139+
size_bytes:
74140+
type: integer
74141+
format: int64
74142+
minimum: 0
74143+
description: The decoded file size in bytes.
74144+
required:
74145+
- type
74146+
- id
74147+
- file_id
74148+
- path
74149+
- size_bytes
74150+
additionalProperties: false
74151+
description: A file copied from the OpenAI Files API.
74152+
HostedEnvironmentFileResourceInline:
7410074153
type: object
7410174154
properties:
7410274155
type:
@@ -74106,30 +74159,39 @@ components:
7410674159
default: inline
7410774160
x-stainless-const: true
7410874161
description: The type of the object. Always `inline`.
74109-
name:
74162+
id:
7411074163
type: string
7411174164
minLength: 0
74112-
description: The installed plugin name.
74113-
description:
74165+
description: The session-scoped ID of the file in the execution environment.
74166+
path:
7411474167
type: string
7411574168
minLength: 0
74116-
description: The installed plugin description.
74169+
description: The file's absolute path inside the environment.
74170+
size_bytes:
74171+
type: integer
74172+
format: int64
74173+
minimum: 0
74174+
description: The decoded file size in bytes.
7411774175
required:
7411874176
- type
74119-
- name
74120-
- description
74177+
- id
74178+
- path
74179+
- size_bytes
7412174180
additionalProperties: false
74122-
description: A plugin installed from an inline ZIP archive.
74123-
HostedPluginResource:
74124-
description: A plugin installed in an OpenAI-hosted environment.
74181+
description: A file supplied inline when the session was created.
74182+
HostedEnvironmentFileResource:
74183+
description: Metadata for a file materialized in an OpenAI-hosted execution environment.
7412574184
discriminator:
7412674185
propertyName: type
7412774186
mapping:
74128-
inline: '#/components/schemas/HostedPluginResourceInline'
74187+
file_id: '#/components/schemas/HostedEnvironmentFileResourceFileId'
74188+
inline: '#/components/schemas/HostedEnvironmentFileResourceInline'
7412974189
x-oai-discriminator-values:
74190+
- file_id
7413074191
- inline
7413174192
anyOf:
74132-
- $ref: '#/components/schemas/HostedPluginResourceInline'
74193+
- $ref: '#/components/schemas/HostedEnvironmentFileResourceFileId'
74194+
- $ref: '#/components/schemas/HostedEnvironmentFileResourceInline'
7413374195
PublicEnvironmentResource:
7413474196
type: object
7413574197
properties:
@@ -74150,27 +74212,27 @@ components:
7415074212
status:
7415174213
$ref: '#/components/schemas/EnvironmentStatusResource'
7415274214
description: The current environment connection status.
74153-
files:
74215+
plugins:
7415474216
type: array
7415574217
items:
74156-
$ref: '#/components/schemas/HostedEnvironmentFileResource'
74218+
$ref: '#/components/schemas/HostedPluginResource'
7415774219
minItems: 0
7415874220
maxItems: 2000
74159-
description: Files installed in the environment, without their contents.
74221+
description: Plugins installed in the environment, without their archive contents.
7416074222
skills:
7416174223
type: array
7416274224
items:
7416374225
$ref: '#/components/schemas/HostedSkillResource'
7416474226
minItems: 0
7416574227
maxItems: 2000
7416674228
description: Skills installed in the environment, without their archive contents.
74167-
plugins:
74229+
files:
7416874230
type: array
7416974231
items:
74170-
$ref: '#/components/schemas/HostedPluginResource'
74232+
$ref: '#/components/schemas/HostedEnvironmentFileResource'
7417174233
minItems: 0
7417274234
maxItems: 2000
74173-
description: Plugins installed in the environment, without their archive contents.
74235+
description: Files installed in the environment, without their contents.
7417474236
required:
7417574237
- id
7417674238
- object

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@
6868
from .aws_external_storage_provider import AwsExternalStorageProvider as AwsExternalStorageProvider
6969
from .certificate_activate_response import CertificateActivateResponse as CertificateActivateResponse
7070
from .certificate_deactivate_params import CertificateDeactivateParams as CertificateDeactivateParams
71+
from .gcp_external_storage_provider import GcpExternalStorageProvider as GcpExternalStorageProvider
7172
from .usage_audio_speeches_response import UsageAudioSpeechesResponse as UsageAudioSpeechesResponse
7273
from .usage_web_search_calls_params import UsageWebSearchCallsParams as UsageWebSearchCallsParams
7374
from .external_storage_configuration import ExternalStorageConfiguration as ExternalStorageConfiguration

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
from ...._utils import PropertyInfo
99
from ...._models import BaseModel
1010
from .aws_external_storage_provider import AwsExternalStorageProvider
11+
from .gcp_external_storage_provider import GcpExternalStorageProvider
1112
from .azure_external_storage_provider import AzureExternalStorageProvider
1213

1314
__all__ = [
@@ -313,7 +314,8 @@ class ExternalKeyRemoved(BaseModel):
313314

314315

315316
ExternalStorageRegisteredDataProvider: TypeAlias = Annotated[
316-
Union[AwsExternalStorageProvider, AzureExternalStorageProvider], PropertyInfo(discriminator="type")
317+
Union[AwsExternalStorageProvider, AzureExternalStorageProvider, GcpExternalStorageProvider],
318+
PropertyInfo(discriminator="type"),
317319
]
318320

319321

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,14 @@
66
from ...._utils import PropertyInfo
77
from ...._models import BaseModel
88
from .aws_external_storage_provider import AwsExternalStorageProvider
9+
from .gcp_external_storage_provider import GcpExternalStorageProvider
910
from .azure_external_storage_provider import AzureExternalStorageProvider
1011

1112
__all__ = ["ExternalStorageConfiguration", "Provider"]
1213

1314
Provider: TypeAlias = Annotated[
14-
Union[AwsExternalStorageProvider, AzureExternalStorageProvider], PropertyInfo(discriminator="type")
15+
Union[AwsExternalStorageProvider, AzureExternalStorageProvider, GcpExternalStorageProvider],
16+
PropertyInfo(discriminator="type"),
1517
]
1618

1719

0 commit comments

Comments
 (0)