Skip to content

Commit 51c6885

Browse files
feat(api): slugs for new audio models; make all model params accept strings
1 parent 62699d9 commit 51c6885

22 files changed

+126
-68
lines changed

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 137
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-235aa1c75c6cc178b97d074a4671343469f458c4a306ef7beb4e45ab252aa589.yml
3-
openapi_spec_hash: 6e615d34cf8c6bc76e0c6933fc8569af
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-75926226b642ebb2cb415694da9dff35e8ab40145ac1b791cefb82a83809db4d.yml
3+
openapi_spec_hash: 6a0e391b0ba5747b6b4a3e5fe21de4da
44
config_hash: c028ce402ef5f71da947c3f15bf6046d

src/openai/resources/audio/speech.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ def create(
7272
7373
model:
7474
One of the available [TTS models](https://platform.openai.com/docs/models#tts):
75-
`tts-1`, `tts-1-hd` or `gpt-4o-mini-tts`.
75+
`tts-1`, `tts-1-hd`, `gpt-4o-mini-tts`, or `gpt-4o-mini-tts-2025-12-15`.
7676
7777
voice: The voice to use when generating the audio. Supported voices are `alloy`, `ash`,
7878
`ballad`, `coral`, `echo`, `fable`, `onyx`, `nova`, `sage`, `shimmer`, and
@@ -168,7 +168,7 @@ async def create(
168168
169169
model:
170170
One of the available [TTS models](https://platform.openai.com/docs/models#tts):
171-
`tts-1`, `tts-1-hd` or `gpt-4o-mini-tts`.
171+
`tts-1`, `tts-1-hd`, `gpt-4o-mini-tts`, or `gpt-4o-mini-tts-2025-12-15`.
172172
173173
voice: The voice to use when generating the audio. Supported voices are `alloy`, `ash`,
174174
`ballad`, `coral`, `echo`, `fable`, `onyx`, `nova`, `sage`, `shimmer`, and

src/openai/resources/audio/transcriptions.py

Lines changed: 36 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,9 @@ def create(
9191
flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm.
9292
9393
model: ID of the model to use. The options are `gpt-4o-transcribe`,
94-
`gpt-4o-mini-transcribe`, and `whisper-1` (which is powered by our open source
95-
Whisper V2 model).
94+
`gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `whisper-1`
95+
(which is powered by our open source Whisper V2 model), and
96+
`gpt-4o-transcribe-diarize`.
9697
9798
chunking_strategy: Controls how the audio is cut into chunks. When set to `"auto"`, the server
9899
first normalizes loudness and then uses voice activity detection (VAD) to choose
@@ -102,8 +103,9 @@ def create(
102103
include: Additional information to include in the transcription response. `logprobs` will
103104
return the log probabilities of the tokens in the response to understand the
104105
model's confidence in the transcription. `logprobs` only works with
105-
response_format set to `json` and only with the models `gpt-4o-transcribe` and
106-
`gpt-4o-mini-transcribe`.
106+
response_format set to `json` and only with the models `gpt-4o-transcribe`,
107+
`gpt-4o-mini-transcribe`, and `gpt-4o-mini-transcribe-2025-12-15`. This field is
108+
not supported when using `gpt-4o-transcribe-diarize`.
107109
108110
language: The language of the input audio. Supplying the input language in
109111
[ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) (e.g. `en`)
@@ -239,8 +241,9 @@ def create(
239241
flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm.
240242
241243
model: ID of the model to use. The options are `gpt-4o-transcribe`,
242-
`gpt-4o-mini-transcribe`, `whisper-1` (which is powered by our open source
243-
Whisper V2 model), and `gpt-4o-transcribe-diarize`.
244+
`gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `whisper-1`
245+
(which is powered by our open source Whisper V2 model), and
246+
`gpt-4o-transcribe-diarize`.
244247
245248
stream: If set to true, the model response data will be streamed to the client as it is
246249
generated using
@@ -261,9 +264,9 @@ def create(
261264
include: Additional information to include in the transcription response. `logprobs` will
262265
return the log probabilities of the tokens in the response to understand the
263266
model's confidence in the transcription. `logprobs` only works with
264-
response_format set to `json` and only with the models `gpt-4o-transcribe` and
265-
`gpt-4o-mini-transcribe`. This field is not supported when using
266-
`gpt-4o-transcribe-diarize`.
267+
response_format set to `json` and only with the models `gpt-4o-transcribe`,
268+
`gpt-4o-mini-transcribe`, and `gpt-4o-mini-transcribe-2025-12-15`. This field is
269+
not supported when using `gpt-4o-transcribe-diarize`.
267270
268271
known_speaker_names: Optional list of speaker names that correspond to the audio samples provided in
269272
`known_speaker_references[]`. Each entry should be a short identifier (for
@@ -346,8 +349,9 @@ def create(
346349
flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm.
347350
348351
model: ID of the model to use. The options are `gpt-4o-transcribe`,
349-
`gpt-4o-mini-transcribe`, `whisper-1` (which is powered by our open source
350-
Whisper V2 model), and `gpt-4o-transcribe-diarize`.
352+
`gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `whisper-1`
353+
(which is powered by our open source Whisper V2 model), and
354+
`gpt-4o-transcribe-diarize`.
351355
352356
stream: If set to true, the model response data will be streamed to the client as it is
353357
generated using
@@ -368,9 +372,9 @@ def create(
368372
include: Additional information to include in the transcription response. `logprobs` will
369373
return the log probabilities of the tokens in the response to understand the
370374
model's confidence in the transcription. `logprobs` only works with
371-
response_format set to `json` and only with the models `gpt-4o-transcribe` and
372-
`gpt-4o-mini-transcribe`. This field is not supported when using
373-
`gpt-4o-transcribe-diarize`.
375+
response_format set to `json` and only with the models `gpt-4o-transcribe`,
376+
`gpt-4o-mini-transcribe`, and `gpt-4o-mini-transcribe-2025-12-15`. This field is
377+
not supported when using `gpt-4o-transcribe-diarize`.
374378
375379
known_speaker_names: Optional list of speaker names that correspond to the audio samples provided in
376380
`known_speaker_references[]`. Each entry should be a short identifier (for
@@ -535,8 +539,9 @@ async def create(
535539
flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm.
536540
537541
model: ID of the model to use. The options are `gpt-4o-transcribe`,
538-
`gpt-4o-mini-transcribe`, `whisper-1` (which is powered by our open source
539-
Whisper V2 model), and `gpt-4o-transcribe-diarize`.
542+
`gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `whisper-1`
543+
(which is powered by our open source Whisper V2 model), and
544+
`gpt-4o-transcribe-diarize`.
540545
541546
chunking_strategy: Controls how the audio is cut into chunks. When set to `"auto"`, the server
542547
first normalizes loudness and then uses voice activity detection (VAD) to choose
@@ -548,9 +553,9 @@ async def create(
548553
include: Additional information to include in the transcription response. `logprobs` will
549554
return the log probabilities of the tokens in the response to understand the
550555
model's confidence in the transcription. `logprobs` only works with
551-
response_format set to `json` and only with the models `gpt-4o-transcribe` and
552-
`gpt-4o-mini-transcribe`. This field is not supported when using
553-
`gpt-4o-transcribe-diarize`.
556+
response_format set to `json` and only with the models `gpt-4o-transcribe`,
557+
`gpt-4o-mini-transcribe`, and `gpt-4o-mini-transcribe-2025-12-15`. This field is
558+
not supported when using `gpt-4o-transcribe-diarize`.
554559
555560
known_speaker_names: Optional list of speaker names that correspond to the audio samples provided in
556561
`known_speaker_references[]`. Each entry should be a short identifier (for
@@ -679,8 +684,9 @@ async def create(
679684
flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm.
680685
681686
model: ID of the model to use. The options are `gpt-4o-transcribe`,
682-
`gpt-4o-mini-transcribe`, `whisper-1` (which is powered by our open source
683-
Whisper V2 model), and `gpt-4o-transcribe-diarize`.
687+
`gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `whisper-1`
688+
(which is powered by our open source Whisper V2 model), and
689+
`gpt-4o-transcribe-diarize`.
684690
685691
stream: If set to true, the model response data will be streamed to the client as it is
686692
generated using
@@ -701,9 +707,9 @@ async def create(
701707
include: Additional information to include in the transcription response. `logprobs` will
702708
return the log probabilities of the tokens in the response to understand the
703709
model's confidence in the transcription. `logprobs` only works with
704-
response_format set to `json` and only with the models `gpt-4o-transcribe` and
705-
`gpt-4o-mini-transcribe`. This field is not supported when using
706-
`gpt-4o-transcribe-diarize`.
710+
response_format set to `json` and only with the models `gpt-4o-transcribe`,
711+
`gpt-4o-mini-transcribe`, and `gpt-4o-mini-transcribe-2025-12-15`. This field is
712+
not supported when using `gpt-4o-transcribe-diarize`.
707713
708714
known_speaker_names: Optional list of speaker names that correspond to the audio samples provided in
709715
`known_speaker_references[]`. Each entry should be a short identifier (for
@@ -786,8 +792,9 @@ async def create(
786792
flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm.
787793
788794
model: ID of the model to use. The options are `gpt-4o-transcribe`,
789-
`gpt-4o-mini-transcribe`, `whisper-1` (which is powered by our open source
790-
Whisper V2 model), and `gpt-4o-transcribe-diarize`.
795+
`gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `whisper-1`
796+
(which is powered by our open source Whisper V2 model), and
797+
`gpt-4o-transcribe-diarize`.
791798
792799
stream: If set to true, the model response data will be streamed to the client as it is
793800
generated using
@@ -808,9 +815,9 @@ async def create(
808815
include: Additional information to include in the transcription response. `logprobs` will
809816
return the log probabilities of the tokens in the response to understand the
810817
model's confidence in the transcription. `logprobs` only works with
811-
response_format set to `json` and only with the models `gpt-4o-transcribe` and
812-
`gpt-4o-mini-transcribe`. This field is not supported when using
813-
`gpt-4o-transcribe-diarize`.
818+
response_format set to `json` and only with the models `gpt-4o-transcribe`,
819+
`gpt-4o-mini-transcribe`, and `gpt-4o-mini-transcribe-2025-12-15`. This field is
820+
not supported when using `gpt-4o-transcribe-diarize`.
814821
815822
known_speaker_names: Optional list of speaker names that correspond to the audio samples provided in
816823
`known_speaker_references[]`. Each entry should be a short identifier (for

src/openai/resources/realtime/calls.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,10 @@ def accept(
125125
"gpt-4o-mini-realtime-preview-2024-12-17",
126126
"gpt-realtime-mini",
127127
"gpt-realtime-mini-2025-10-06",
128+
"gpt-realtime-mini-2025-12-15",
128129
"gpt-audio-mini",
129130
"gpt-audio-mini-2025-10-06",
131+
"gpt-audio-mini-2025-12-15",
130132
],
131133
]
132134
| Omit = omit,
@@ -450,8 +452,10 @@ async def accept(
450452
"gpt-4o-mini-realtime-preview-2024-12-17",
451453
"gpt-realtime-mini",
452454
"gpt-realtime-mini-2025-10-06",
455+
"gpt-realtime-mini-2025-12-15",
453456
"gpt-audio-mini",
454457
"gpt-audio-mini-2025-10-06",
458+
"gpt-audio-mini-2025-12-15",
455459
],
456460
]
457461
| Omit = omit,

src/openai/resources/videos.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
from .. import _legacy_response
1111
from ..types import (
1212
VideoSize,
13-
VideoModel,
1413
VideoSeconds,
1514
video_list_params,
1615
video_remix_params,
@@ -34,8 +33,8 @@
3433
from .._base_client import AsyncPaginator, make_request_options
3534
from .._utils._utils import is_given
3635
from ..types.video_size import VideoSize
37-
from ..types.video_model import VideoModel
3836
from ..types.video_seconds import VideoSeconds
37+
from ..types.video_model_param import VideoModelParam
3938
from ..types.video_delete_response import VideoDeleteResponse
4039

4140
__all__ = ["Videos", "AsyncVideos"]
@@ -66,7 +65,7 @@ def create(
6665
*,
6766
prompt: str,
6867
input_reference: FileTypes | Omit = omit,
69-
model: VideoModel | Omit = omit,
68+
model: VideoModelParam | Omit = omit,
7069
seconds: VideoSeconds | Omit = omit,
7170
size: VideoSize | Omit = omit,
7271
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -130,7 +129,7 @@ def create_and_poll(
130129
*,
131130
prompt: str,
132131
input_reference: FileTypes | Omit = omit,
133-
model: VideoModel | Omit = omit,
132+
model: VideoModelParam | Omit = omit,
134133
seconds: VideoSeconds | Omit = omit,
135134
size: VideoSize | Omit = omit,
136135
poll_interval_ms: int | Omit = omit,
@@ -421,7 +420,7 @@ async def create(
421420
*,
422421
prompt: str,
423422
input_reference: FileTypes | Omit = omit,
424-
model: VideoModel | Omit = omit,
423+
model: VideoModelParam | Omit = omit,
425424
seconds: VideoSeconds | Omit = omit,
426425
size: VideoSize | Omit = omit,
427426
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -485,7 +484,7 @@ async def create_and_poll(
485484
*,
486485
prompt: str,
487486
input_reference: FileTypes | Omit = omit,
488-
model: VideoModel | Omit = omit,
487+
model: VideoModelParam | Omit = omit,
489488
seconds: VideoSeconds | Omit = omit,
490489
size: VideoSize | Omit = omit,
491490
poll_interval_ms: int | Omit = omit,

src/openai/types/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@
5353
from .completion_choice import CompletionChoice as CompletionChoice
5454
from .image_edit_params import ImageEditParams as ImageEditParams
5555
from .video_list_params import VideoListParams as VideoListParams
56+
from .video_model_param import VideoModelParam as VideoModelParam
5657
from .eval_create_params import EvalCreateParams as EvalCreateParams
5758
from .eval_list_response import EvalListResponse as EvalListResponse
5859
from .eval_update_params import EvalUpdateParams as EvalUpdateParams

src/openai/types/audio/speech_create_params.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class SpeechCreateParams(TypedDict, total=False):
1717
model: Required[Union[str, SpeechModel]]
1818
"""
1919
One of the available [TTS models](https://platform.openai.com/docs/models#tts):
20-
`tts-1`, `tts-1-hd` or `gpt-4o-mini-tts`.
20+
`tts-1`, `tts-1-hd`, `gpt-4o-mini-tts`, or `gpt-4o-mini-tts-2025-12-15`.
2121
"""
2222

2323
voice: Required[

src/openai/types/audio/speech_model.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44

55
__all__ = ["SpeechModel"]
66

7-
SpeechModel: TypeAlias = Literal["tts-1", "tts-1-hd", "gpt-4o-mini-tts"]
7+
SpeechModel: TypeAlias = Literal["tts-1", "tts-1-hd", "gpt-4o-mini-tts", "gpt-4o-mini-tts-2025-12-15"]

src/openai/types/audio/transcription_create_params.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ class TranscriptionCreateParamsBase(TypedDict, total=False):
2929
model: Required[Union[str, AudioModel]]
3030
"""ID of the model to use.
3131
32-
The options are `gpt-4o-transcribe`, `gpt-4o-mini-transcribe`, `whisper-1`
33-
(which is powered by our open source Whisper V2 model), and
34-
`gpt-4o-transcribe-diarize`.
32+
The options are `gpt-4o-transcribe`, `gpt-4o-mini-transcribe`,
33+
`gpt-4o-mini-transcribe-2025-12-15`, `whisper-1` (which is powered by our open
34+
source Whisper V2 model), and `gpt-4o-transcribe-diarize`.
3535
"""
3636

3737
chunking_strategy: Optional[ChunkingStrategy]
@@ -49,9 +49,9 @@ class TranscriptionCreateParamsBase(TypedDict, total=False):
4949
Additional information to include in the transcription response. `logprobs` will
5050
return the log probabilities of the tokens in the response to understand the
5151
model's confidence in the transcription. `logprobs` only works with
52-
response_format set to `json` and only with the models `gpt-4o-transcribe` and
53-
`gpt-4o-mini-transcribe`. This field is not supported when using
54-
`gpt-4o-transcribe-diarize`.
52+
response_format set to `json` and only with the models `gpt-4o-transcribe`,
53+
`gpt-4o-mini-transcribe`, and `gpt-4o-mini-transcribe-2025-12-15`. This field is
54+
not supported when using `gpt-4o-transcribe-diarize`.
5555
"""
5656

5757
known_speaker_names: SequenceNotStr[str]

src/openai/types/audio_model.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,10 @@
44

55
__all__ = ["AudioModel"]
66

7-
AudioModel: TypeAlias = Literal["whisper-1", "gpt-4o-transcribe", "gpt-4o-mini-transcribe", "gpt-4o-transcribe-diarize"]
7+
AudioModel: TypeAlias = Literal[
8+
"whisper-1",
9+
"gpt-4o-transcribe",
10+
"gpt-4o-mini-transcribe",
11+
"gpt-4o-mini-transcribe-2025-12-15",
12+
"gpt-4o-transcribe-diarize",
13+
]

0 commit comments

Comments
 (0)