Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 64956f9

Browse files
stainless-app[bot]meorphis
authored and
meorphis
committedMar 27, 2025·
chore(api): updates to supported Voice IDs (#2261)
1 parent 515e1cd commit 64956f9

27 files changed

+158
-84
lines changed
 

‎.stats.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 82
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-5ad6884898c07591750dde560118baf7074a59aecd1f367f930c5e42b04e848a.yml
3-
openapi_spec_hash: 0c255269b89767eae26f4d4dc22d3cbd
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-6663c59193eb95b201e492de17dcbd5e126ba03d18ce66287a3e2c632ca56fe7.yml
3+
openapi_spec_hash: 7996d2c34cc44fe2ce9ffe93c0ab774e
44
config_hash: d36e491b0afc4f79e3afad4b3c9bec70

‎src/openai/resources/audio/speech.py

+10-6
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,9 @@ def create(
5353
*,
5454
input: str,
5555
model: Union[str, SpeechModel],
56-
voice: Literal["alloy", "ash", "coral", "echo", "fable", "onyx", "nova", "sage", "shimmer"],
56+
voice: Union[
57+
str, Literal["alloy", "ash", "ballad", "coral", "echo", "fable", "onyx", "nova", "sage", "shimmer", "verse"]
58+
],
5759
instructions: str | NotGiven = NOT_GIVEN,
5860
response_format: Literal["mp3", "opus", "aac", "flac", "wav", "pcm"] | NotGiven = NOT_GIVEN,
5961
speed: float | NotGiven = NOT_GIVEN,
@@ -75,8 +77,8 @@ def create(
7577
`tts-1`, `tts-1-hd` or `gpt-4o-mini-tts`.
7678
7779
voice: The voice to use when generating the audio. Supported voices are `alloy`, `ash`,
78-
`coral`, `echo`, `fable`, `onyx`, `nova`, `sage` and `shimmer`. Previews of the
79-
voices are available in the
80+
`ballad`, `coral`, `echo`, `fable`, `onyx`, `nova`, `sage`, `shimmer`, and
81+
`verse`. Previews of the voices are available in the
8082
[Text to speech guide](https://platform.openai.com/docs/guides/text-to-speech#voice-options).
8183
8284
instructions: Control the voice of your generated audio with additional instructions. Does not
@@ -142,7 +144,9 @@ async def create(
142144
*,
143145
input: str,
144146
model: Union[str, SpeechModel],
145-
voice: Literal["alloy", "ash", "coral", "echo", "fable", "onyx", "nova", "sage", "shimmer"],
147+
voice: Union[
148+
str, Literal["alloy", "ash", "ballad", "coral", "echo", "fable", "onyx", "nova", "sage", "shimmer", "verse"]
149+
],
146150
instructions: str | NotGiven = NOT_GIVEN,
147151
response_format: Literal["mp3", "opus", "aac", "flac", "wav", "pcm"] | NotGiven = NOT_GIVEN,
148152
speed: float | NotGiven = NOT_GIVEN,
@@ -164,8 +168,8 @@ async def create(
164168
`tts-1`, `tts-1-hd` or `gpt-4o-mini-tts`.
165169
166170
voice: The voice to use when generating the audio. Supported voices are `alloy`, `ash`,
167-
`coral`, `echo`, `fable`, `onyx`, `nova`, `sage` and `shimmer`. Previews of the
168-
voices are available in the
171+
`ballad`, `coral`, `echo`, `fable`, `onyx`, `nova`, `sage`, `shimmer`, and
172+
`verse`. Previews of the voices are available in the
169173
[Text to speech guide](https://platform.openai.com/docs/guides/text-to-speech#voice-options).
170174
171175
instructions: Control the voice of your generated audio with additional instructions. Does not

‎src/openai/resources/beta/realtime/sessions.py

+12-4
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,10 @@ def create(
6565
tool_choice: str | NotGiven = NOT_GIVEN,
6666
tools: Iterable[session_create_params.Tool] | NotGiven = NOT_GIVEN,
6767
turn_detection: session_create_params.TurnDetection | NotGiven = NOT_GIVEN,
68-
voice: Literal["alloy", "ash", "ballad", "coral", "echo", "sage", "shimmer", "verse"] | NotGiven = NOT_GIVEN,
68+
voice: Union[
69+
str, Literal["alloy", "ash", "ballad", "coral", "echo", "fable", "onyx", "nova", "sage", "shimmer", "verse"]
70+
]
71+
| NotGiven = NOT_GIVEN,
6972
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
7073
# The extra values given here take precedence over values defined on the client or passed to this method.
7174
extra_headers: Headers | None = None,
@@ -147,7 +150,8 @@ def create(
147150
148151
voice: The voice the model uses to respond. Voice cannot be changed during the session
149152
once the model has responded with audio at least once. Current voice options are
150-
`alloy`, `ash`, `ballad`, `coral`, `echo` `sage`, `shimmer` and `verse`.
153+
`alloy`, `ash`, `ballad`, `coral`, `echo`, `fable`, `onyx`, `nova`, `sage`,
154+
`shimmer`, and `verse`.
151155
152156
extra_headers: Send extra headers
153157
@@ -227,7 +231,10 @@ async def create(
227231
tool_choice: str | NotGiven = NOT_GIVEN,
228232
tools: Iterable[session_create_params.Tool] | NotGiven = NOT_GIVEN,
229233
turn_detection: session_create_params.TurnDetection | NotGiven = NOT_GIVEN,
230-
voice: Literal["alloy", "ash", "ballad", "coral", "echo", "sage", "shimmer", "verse"] | NotGiven = NOT_GIVEN,
234+
voice: Union[
235+
str, Literal["alloy", "ash", "ballad", "coral", "echo", "fable", "onyx", "nova", "sage", "shimmer", "verse"]
236+
]
237+
| NotGiven = NOT_GIVEN,
231238
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
232239
# The extra values given here take precedence over values defined on the client or passed to this method.
233240
extra_headers: Headers | None = None,
@@ -309,7 +316,8 @@ async def create(
309316
310317
voice: The voice the model uses to respond. Voice cannot be changed during the session
311318
once the model has responded with audio at least once. Current voice options are
312-
`alloy`, `ash`, `ballad`, `coral`, `echo` `sage`, `shimmer` and `verse`.
319+
`alloy`, `ash`, `ballad`, `coral`, `echo`, `fable`, `onyx`, `nova`, `sage`,
320+
`shimmer`, and `verse`.
313321
314322
extra_headers: Send extra headers
315323

‎src/openai/resources/responses/input_items.py

+12-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
from __future__ import annotations
44

5-
from typing import Any, cast
5+
from typing import Any, List, cast
66
from typing_extensions import Literal
77

88
import httpx
@@ -17,6 +17,7 @@
1717
from ..._base_client import AsyncPaginator, make_request_options
1818
from ...types.responses import input_item_list_params
1919
from ...types.responses.response_item import ResponseItem
20+
from ...types.responses.response_includable import ResponseIncludable
2021

2122
__all__ = ["InputItems", "AsyncInputItems"]
2223

@@ -47,6 +48,7 @@ def list(
4748
*,
4849
after: str | NotGiven = NOT_GIVEN,
4950
before: str | NotGiven = NOT_GIVEN,
51+
include: List[ResponseIncludable] | NotGiven = NOT_GIVEN,
5052
limit: int | NotGiven = NOT_GIVEN,
5153
order: Literal["asc", "desc"] | NotGiven = NOT_GIVEN,
5254
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -64,6 +66,9 @@ def list(
6466
6567
before: An item ID to list items before, used in pagination.
6668
69+
include: Additional fields to include in the response. See the `include` parameter for
70+
Response creation above for more information.
71+
6772
limit: A limit on the number of objects to be returned. Limit can range between 1 and
6873
100, and the default is 20.
6974
@@ -94,6 +99,7 @@ def list(
9499
{
95100
"after": after,
96101
"before": before,
102+
"include": include,
97103
"limit": limit,
98104
"order": order,
99105
},
@@ -130,6 +136,7 @@ def list(
130136
*,
131137
after: str | NotGiven = NOT_GIVEN,
132138
before: str | NotGiven = NOT_GIVEN,
139+
include: List[ResponseIncludable] | NotGiven = NOT_GIVEN,
133140
limit: int | NotGiven = NOT_GIVEN,
134141
order: Literal["asc", "desc"] | NotGiven = NOT_GIVEN,
135142
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -147,6 +154,9 @@ def list(
147154
148155
before: An item ID to list items before, used in pagination.
149156
157+
include: Additional fields to include in the response. See the `include` parameter for
158+
Response creation above for more information.
159+
150160
limit: A limit on the number of objects to be returned. Limit can range between 1 and
151161
100, and the default is 20.
152162
@@ -177,6 +187,7 @@ def list(
177187
{
178188
"after": after,
179189
"before": before,
190+
"include": include,
180191
"limit": limit,
181192
"order": order,
182193
},

‎src/openai/resources/responses/responses.py

+12-12
Original file line numberDiff line numberDiff line change
@@ -149,8 +149,8 @@ def create(
149149
context.
150150
151151
When using along with `previous_response_id`, the instructions from a previous
152-
response will be not be carried over to the next response. This makes it simple
153-
to swap out system (or developer) messages in new responses.
152+
response will not be carried over to the next response. This makes it simple to
153+
swap out system (or developer) messages in new responses.
154154
155155
max_output_tokens: An upper bound for the number of tokens that can be generated for a response,
156156
including visible output tokens and
@@ -321,8 +321,8 @@ def create(
321321
context.
322322
323323
When using along with `previous_response_id`, the instructions from a previous
324-
response will be not be carried over to the next response. This makes it simple
325-
to swap out system (or developer) messages in new responses.
324+
response will not be carried over to the next response. This makes it simple to
325+
swap out system (or developer) messages in new responses.
326326
327327
max_output_tokens: An upper bound for the number of tokens that can be generated for a response,
328328
including visible output tokens and
@@ -486,8 +486,8 @@ def create(
486486
context.
487487
488488
When using along with `previous_response_id`, the instructions from a previous
489-
response will be not be carried over to the next response. This makes it simple
490-
to swap out system (or developer) messages in new responses.
489+
response will not be carried over to the next response. This makes it simple to
490+
swap out system (or developer) messages in new responses.
491491
492492
max_output_tokens: An upper bound for the number of tokens that can be generated for a response,
493493
including visible output tokens and
@@ -961,8 +961,8 @@ async def create(
961961
context.
962962
963963
When using along with `previous_response_id`, the instructions from a previous
964-
response will be not be carried over to the next response. This makes it simple
965-
to swap out system (or developer) messages in new responses.
964+
response will not be carried over to the next response. This makes it simple to
965+
swap out system (or developer) messages in new responses.
966966
967967
max_output_tokens: An upper bound for the number of tokens that can be generated for a response,
968968
including visible output tokens and
@@ -1133,8 +1133,8 @@ async def create(
11331133
context.
11341134
11351135
When using along with `previous_response_id`, the instructions from a previous
1136-
response will be not be carried over to the next response. This makes it simple
1137-
to swap out system (or developer) messages in new responses.
1136+
response will not be carried over to the next response. This makes it simple to
1137+
swap out system (or developer) messages in new responses.
11381138
11391139
max_output_tokens: An upper bound for the number of tokens that can be generated for a response,
11401140
including visible output tokens and
@@ -1298,8 +1298,8 @@ async def create(
12981298
context.
12991299
13001300
When using along with `previous_response_id`, the instructions from a previous
1301-
response will be not be carried over to the next response. This makes it simple
1302-
to swap out system (or developer) messages in new responses.
1301+
response will not be carried over to the next response. This makes it simple to
1302+
swap out system (or developer) messages in new responses.
13031303
13041304
max_output_tokens: An upper bound for the number of tokens that can be generated for a response,
13051305
including visible output tokens and

‎src/openai/types/audio/speech_create_params.py

+8-3
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,16 @@ class SpeechCreateParams(TypedDict, total=False):
2020
`tts-1`, `tts-1-hd` or `gpt-4o-mini-tts`.
2121
"""
2222

23-
voice: Required[Literal["alloy", "ash", "coral", "echo", "fable", "onyx", "nova", "sage", "shimmer"]]
23+
voice: Required[
24+
Union[
25+
str, Literal["alloy", "ash", "ballad", "coral", "echo", "fable", "onyx", "nova", "sage", "shimmer", "verse"]
26+
]
27+
]
2428
"""The voice to use when generating the audio.
2529
26-
Supported voices are `alloy`, `ash`, `coral`, `echo`, `fable`, `onyx`, `nova`,
27-
`sage` and `shimmer`. Previews of the voices are available in the
30+
Supported voices are `alloy`, `ash`, `ballad`, `coral`, `echo`, `fable`, `onyx`,
31+
`nova`, `sage`, `shimmer`, and `verse`. Previews of the voices are available in
32+
the
2833
[Text to speech guide](https://platform.openai.com/docs/guides/text-to-speech#voice-options).
2934
"""
3035

‎src/openai/types/beta/realtime/realtime_response.py

+7-2
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,13 @@ class RealtimeResponse(BaseModel):
8080
will become the input for later turns.
8181
"""
8282

83-
voice: Optional[Literal["alloy", "ash", "ballad", "coral", "echo", "sage", "shimmer", "verse"]] = None
83+
voice: Union[
84+
str,
85+
Literal["alloy", "ash", "ballad", "coral", "echo", "fable", "onyx", "nova", "sage", "shimmer", "verse"],
86+
None,
87+
] = None
8488
"""
8589
The voice the model used to respond. Current voice options are `alloy`, `ash`,
86-
`ballad`, `coral`, `echo` `sage`, `shimmer` and `verse`.
90+
`ballad`, `coral`, `echo`, `fable`, `onyx`, `nova`, `sage`, `shimmer`, and
91+
`verse`.
8792
"""

‎src/openai/types/beta/realtime/response_create_event.py

+6-2
Original file line numberDiff line numberDiff line change
@@ -101,12 +101,16 @@ class Response(BaseModel):
101101
tools: Optional[List[ResponseTool]] = None
102102
"""Tools (functions) available to the model."""
103103

104-
voice: Optional[Literal["alloy", "ash", "ballad", "coral", "echo", "sage", "shimmer", "verse"]] = None
104+
voice: Union[
105+
str,
106+
Literal["alloy", "ash", "ballad", "coral", "echo", "fable", "onyx", "nova", "sage", "shimmer", "verse"],
107+
None,
108+
] = None
105109
"""The voice the model uses to respond.
106110
107111
Voice cannot be changed during the session once the model has responded with
108112
audio at least once. Current voice options are `alloy`, `ash`, `ballad`,
109-
`coral`, `echo` `sage`, `shimmer` and `verse`.
113+
`coral`, `echo`, `fable`, `onyx`, `nova`, `sage`, `shimmer`, and `verse`.
110114
"""
111115

112116

‎src/openai/types/beta/realtime/response_create_event_param.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -102,12 +102,14 @@ class Response(TypedDict, total=False):
102102
tools: Iterable[ResponseTool]
103103
"""Tools (functions) available to the model."""
104104

105-
voice: Literal["alloy", "ash", "ballad", "coral", "echo", "sage", "shimmer", "verse"]
105+
voice: Union[
106+
str, Literal["alloy", "ash", "ballad", "coral", "echo", "fable", "onyx", "nova", "sage", "shimmer", "verse"]
107+
]
106108
"""The voice the model uses to respond.
107109
108110
Voice cannot be changed during the session once the model has responded with
109111
audio at least once. Current voice options are `alloy`, `ash`, `ballad`,
110-
`coral`, `echo` `sage`, `shimmer` and `verse`.
112+
`coral`, `echo`, `fable`, `onyx`, `nova`, `sage`, `shimmer`, and `verse`.
111113
"""
112114

113115

‎src/openai/types/beta/realtime/session.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,11 @@ class Session(BaseModel):
218218
natural conversations, but may have a higher latency.
219219
"""
220220

221-
voice: Optional[Literal["alloy", "ash", "ballad", "coral", "echo", "sage", "shimmer", "verse"]] = None
221+
voice: Union[
222+
str,
223+
Literal["alloy", "ash", "ballad", "coral", "echo", "fable", "onyx", "nova", "sage", "shimmer", "verse"],
224+
None,
225+
] = None
222226
"""The voice the model uses to respond.
223227
224228
Voice cannot be changed during the session once the model has responded with

‎src/openai/types/beta/realtime/session_create_params.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -113,12 +113,14 @@ class SessionCreateParams(TypedDict, total=False):
113113
natural conversations, but may have a higher latency.
114114
"""
115115

116-
voice: Literal["alloy", "ash", "ballad", "coral", "echo", "sage", "shimmer", "verse"]
116+
voice: Union[
117+
str, Literal["alloy", "ash", "ballad", "coral", "echo", "fable", "onyx", "nova", "sage", "shimmer", "verse"]
118+
]
117119
"""The voice the model uses to respond.
118120
119121
Voice cannot be changed during the session once the model has responded with
120122
audio at least once. Current voice options are `alloy`, `ash`, `ballad`,
121-
`coral`, `echo` `sage`, `shimmer` and `verse`.
123+
`coral`, `echo`, `fable`, `onyx`, `nova`, `sage`, `shimmer`, and `verse`.
122124
"""
123125

124126

‎src/openai/types/beta/realtime/session_create_response.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,11 @@ class SessionCreateResponse(BaseModel):
141141
speech.
142142
"""
143143

144-
voice: Optional[Literal["alloy", "ash", "ballad", "coral", "echo", "sage", "shimmer", "verse"]] = None
144+
voice: Union[
145+
str,
146+
Literal["alloy", "ash", "ballad", "coral", "echo", "fable", "onyx", "nova", "sage", "shimmer", "verse"],
147+
None,
148+
] = None
145149
"""The voice the model uses to respond.
146150
147151
Voice cannot be changed during the session once the model has responded with

‎src/openai/types/beta/realtime/session_update_event.py

+6-2
Original file line numberDiff line numberDiff line change
@@ -222,12 +222,16 @@ class Session(BaseModel):
222222
natural conversations, but may have a higher latency.
223223
"""
224224

225-
voice: Optional[Literal["alloy", "ash", "ballad", "coral", "echo", "sage", "shimmer", "verse"]] = None
225+
voice: Union[
226+
str,
227+
Literal["alloy", "ash", "ballad", "coral", "echo", "fable", "onyx", "nova", "sage", "shimmer", "verse"],
228+
None,
229+
] = None
226230
"""The voice the model uses to respond.
227231
228232
Voice cannot be changed during the session once the model has responded with
229233
audio at least once. Current voice options are `alloy`, `ash`, `ballad`,
230-
`coral`, `echo` `sage`, `shimmer` and `verse`.
234+
`coral`, `echo`, `fable`, `onyx`, `nova`, `sage`, `shimmer`, and `verse`.
231235
"""
232236

233237

‎src/openai/types/beta/realtime/session_update_event_param.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -220,12 +220,14 @@ class Session(TypedDict, total=False):
220220
natural conversations, but may have a higher latency.
221221
"""
222222

223-
voice: Literal["alloy", "ash", "ballad", "coral", "echo", "sage", "shimmer", "verse"]
223+
voice: Union[
224+
str, Literal["alloy", "ash", "ballad", "coral", "echo", "fable", "onyx", "nova", "sage", "shimmer", "verse"]
225+
]
224226
"""The voice the model uses to respond.
225227
226228
Voice cannot be changed during the session once the model has responded with
227229
audio at least once. Current voice options are `alloy`, `ash`, `ballad`,
228-
`coral`, `echo` `sage`, `shimmer` and `verse`.
230+
`coral`, `echo`, `fable`, `onyx`, `nova`, `sage`, `shimmer`, and `verse`.
229231
"""
230232

231233

‎src/openai/types/beta/realtime/transcription_session_create_params.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,10 @@ class InputAudioTranscription(TypedDict, total=False):
9696

9797
class TurnDetection(TypedDict, total=False):
9898
create_response: bool
99-
"""
100-
Whether or not to automatically generate a response when a VAD stop event
99+
"""Whether or not to automatically generate a response when a VAD stop event
101100
occurs.
101+
102+
Not available for transcription sessions.
102103
"""
103104

104105
eagerness: Literal["low", "medium", "high", "auto"]
@@ -113,7 +114,7 @@ class TurnDetection(TypedDict, total=False):
113114
"""
114115
Whether or not to automatically interrupt any ongoing response with output to
115116
the default conversation (i.e. `conversation` of `auto`) when a VAD start event
116-
occurs.
117+
occurs. Not available for transcription sessions.
117118
"""
118119

119120
prefix_padding_ms: int

‎src/openai/types/beta/realtime/transcription_session_update.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,10 @@ class SessionInputAudioTranscription(BaseModel):
5050

5151
class SessionTurnDetection(BaseModel):
5252
create_response: Optional[bool] = None
53-
"""
54-
Whether or not to automatically generate a response when a VAD stop event
53+
"""Whether or not to automatically generate a response when a VAD stop event
5554
occurs.
55+
56+
Not available for transcription sessions.
5657
"""
5758

5859
eagerness: Optional[Literal["low", "medium", "high", "auto"]] = None
@@ -67,7 +68,7 @@ class SessionTurnDetection(BaseModel):
6768
"""
6869
Whether or not to automatically interrupt any ongoing response with output to
6970
the default conversation (i.e. `conversation` of `auto`) when a VAD start event
70-
occurs.
71+
occurs. Not available for transcription sessions.
7172
"""
7273

7374
prefix_padding_ms: Optional[int] = None

‎src/openai/types/beta/realtime/transcription_session_update_param.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,10 @@ class SessionInputAudioTranscription(TypedDict, total=False):
5050

5151
class SessionTurnDetection(TypedDict, total=False):
5252
create_response: bool
53-
"""
54-
Whether or not to automatically generate a response when a VAD stop event
53+
"""Whether or not to automatically generate a response when a VAD stop event
5554
occurs.
55+
56+
Not available for transcription sessions.
5657
"""
5758

5859
eagerness: Literal["low", "medium", "high", "auto"]
@@ -67,7 +68,7 @@ class SessionTurnDetection(TypedDict, total=False):
6768
"""
6869
Whether or not to automatically interrupt any ongoing response with output to
6970
the default conversation (i.e. `conversation` of `auto`) when a VAD start event
70-
occurs.
71+
occurs. Not available for transcription sessions.
7172
"""
7273

7374
prefix_padding_ms: int

‎src/openai/types/chat/chat_completion_audio_param.py

+6-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
from __future__ import annotations
44

5+
from typing import Union
56
from typing_extensions import Literal, Required, TypedDict
67

78
__all__ = ["ChatCompletionAudioParam"]
@@ -14,7 +15,11 @@ class ChatCompletionAudioParam(TypedDict, total=False):
1415
Must be one of `wav`, `mp3`, `flac`, `opus`, or `pcm16`.
1516
"""
1617

17-
voice: Required[Literal["alloy", "ash", "ballad", "coral", "echo", "sage", "shimmer", "verse"]]
18+
voice: Required[
19+
Union[
20+
str, Literal["alloy", "ash", "ballad", "coral", "echo", "fable", "onyx", "nova", "sage", "shimmer", "verse"]
21+
]
22+
]
1823
"""The voice the model uses to respond.
1924
2025
Supported voices are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`, and

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

+9
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,11 @@
22

33
from __future__ import annotations
44

5+
from typing import List
56
from typing_extensions import Literal, TypedDict
67

8+
from .response_includable import ResponseIncludable
9+
710
__all__ = ["InputItemListParams"]
811

912

@@ -14,6 +17,12 @@ class InputItemListParams(TypedDict, total=False):
1417
before: str
1518
"""An item ID to list items before, used in pagination."""
1619

20+
include: List[ResponseIncludable]
21+
"""Additional fields to include in the response.
22+
23+
See the `include` parameter for Response creation above for more information.
24+
"""
25+
1726
limit: int
1827
"""A limit on the number of objects to be returned.
1928

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ class Response(BaseModel):
4747
context.
4848
4949
When using along with `previous_response_id`, the instructions from a previous
50-
response will be not be carried over to the next response. This makes it simple
51-
to swap out system (or developer) messages in new responses.
50+
response will not be carried over to the next response. This makes it simple to
51+
swap out system (or developer) messages in new responses.
5252
"""
5353

5454
metadata: Optional[Metadata] = None

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ class ResponseCreateParamsBase(TypedDict, total=False):
6464
context.
6565
6666
When using along with `previous_response_id`, the instructions from a previous
67-
response will be not be carried over to the next response. This makes it simple
68-
to swap out system (or developer) messages in new responses.
67+
response will not be carried over to the next response. This makes it simple to
68+
swap out system (or developer) messages in new responses.
6969
"""
7070

7171
max_output_tokens: Optional[int]

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

+7-7
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,13 @@
1111

1212

1313
class ResponseFormatTextJSONSchemaConfig(BaseModel):
14+
name: str
15+
"""The name of the response format.
16+
17+
Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length
18+
of 64.
19+
"""
20+
1421
schema_: Dict[str, object] = FieldInfo(alias="schema")
1522
"""
1623
The schema for the response format, described as a JSON Schema object. Learn how
@@ -26,13 +33,6 @@ class ResponseFormatTextJSONSchemaConfig(BaseModel):
2633
how to respond in the format.
2734
"""
2835

29-
name: Optional[str] = None
30-
"""The name of the response format.
31-
32-
Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length
33-
of 64.
34-
"""
35-
3636
strict: Optional[bool] = None
3737
"""
3838
Whether to enable strict schema adherence when generating the output. If set to

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

+7-7
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,13 @@
99

1010

1111
class ResponseFormatTextJSONSchemaConfigParam(TypedDict, total=False):
12+
name: Required[str]
13+
"""The name of the response format.
14+
15+
Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length
16+
of 64.
17+
"""
18+
1219
schema: Required[Dict[str, object]]
1320
"""
1421
The schema for the response format, described as a JSON Schema object. Learn how
@@ -24,13 +31,6 @@ class ResponseFormatTextJSONSchemaConfigParam(TypedDict, total=False):
2431
how to respond in the format.
2532
"""
2633

27-
name: str
28-
"""The name of the response format.
29-
30-
Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length
31-
of 64.
32-
"""
33-
3434
strict: Optional[bool]
3535
"""
3636
Whether to enable strict schema adherence when generating the output. If set to

‎tests/api_resources/audio/test_speech.py

+8-8
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def test_method_create(self, client: OpenAI, respx_mock: MockRouter) -> None:
2828
speech = client.audio.speech.create(
2929
input="string",
3030
model="string",
31-
voice="alloy",
31+
voice="ash",
3232
)
3333
assert isinstance(speech, _legacy_response.HttpxBinaryResponseContent)
3434
assert speech.json() == {"foo": "bar"}
@@ -40,7 +40,7 @@ def test_method_create_with_all_params(self, client: OpenAI, respx_mock: MockRou
4040
speech = client.audio.speech.create(
4141
input="string",
4242
model="string",
43-
voice="alloy",
43+
voice="ash",
4444
instructions="instructions",
4545
response_format="mp3",
4646
speed=0.25,
@@ -56,7 +56,7 @@ def test_raw_response_create(self, client: OpenAI, respx_mock: MockRouter) -> No
5656
response = client.audio.speech.with_raw_response.create(
5757
input="string",
5858
model="string",
59-
voice="alloy",
59+
voice="ash",
6060
)
6161

6262
assert response.is_closed is True
@@ -71,7 +71,7 @@ def test_streaming_response_create(self, client: OpenAI, respx_mock: MockRouter)
7171
with client.audio.speech.with_streaming_response.create(
7272
input="string",
7373
model="string",
74-
voice="alloy",
74+
voice="ash",
7575
) as response:
7676
assert not response.is_closed
7777
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -92,7 +92,7 @@ async def test_method_create(self, async_client: AsyncOpenAI, respx_mock: MockRo
9292
speech = await async_client.audio.speech.create(
9393
input="string",
9494
model="string",
95-
voice="alloy",
95+
voice="ash",
9696
)
9797
assert isinstance(speech, _legacy_response.HttpxBinaryResponseContent)
9898
assert speech.json() == {"foo": "bar"}
@@ -104,7 +104,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncOpenAI, re
104104
speech = await async_client.audio.speech.create(
105105
input="string",
106106
model="string",
107-
voice="alloy",
107+
voice="ash",
108108
instructions="instructions",
109109
response_format="mp3",
110110
speed=0.25,
@@ -120,7 +120,7 @@ async def test_raw_response_create(self, async_client: AsyncOpenAI, respx_mock:
120120
response = await async_client.audio.speech.with_raw_response.create(
121121
input="string",
122122
model="string",
123-
voice="alloy",
123+
voice="ash",
124124
)
125125

126126
assert response.is_closed is True
@@ -135,7 +135,7 @@ async def test_streaming_response_create(self, async_client: AsyncOpenAI, respx_
135135
async with async_client.audio.speech.with_streaming_response.create(
136136
input="string",
137137
model="string",
138-
voice="alloy",
138+
voice="ash",
139139
) as response:
140140
assert not response.is_closed
141141
assert response.http_request.headers.get("X-Stainless-Lang") == "python"

‎tests/api_resources/beta/realtime/test_sessions.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def test_method_create_with_all_params(self, client: OpenAI) -> None:
5656
"threshold": 0,
5757
"type": "server_vad",
5858
},
59-
voice="alloy",
59+
voice="ash",
6060
)
6161
assert_matches_type(SessionCreateResponse, session, path=["response"])
6262

@@ -123,7 +123,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncOpenAI) ->
123123
"threshold": 0,
124124
"type": "server_vad",
125125
},
126-
voice="alloy",
126+
voice="ash",
127127
)
128128
assert_matches_type(SessionCreateResponse, session, path=["response"])
129129

‎tests/api_resources/chat/test_completions.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def test_method_create_with_all_params_overload_1(self, client: OpenAI) -> None:
4848
model="gpt-4o",
4949
audio={
5050
"format": "wav",
51-
"voice": "alloy",
51+
"voice": "ash",
5252
},
5353
frequency_penalty=-2,
5454
function_call="none",
@@ -175,7 +175,7 @@ def test_method_create_with_all_params_overload_2(self, client: OpenAI) -> None:
175175
stream=True,
176176
audio={
177177
"format": "wav",
178-
"voice": "alloy",
178+
"voice": "ash",
179179
},
180180
frequency_penalty=-2,
181181
function_call="none",
@@ -475,7 +475,7 @@ async def test_method_create_with_all_params_overload_1(self, async_client: Asyn
475475
model="gpt-4o",
476476
audio={
477477
"format": "wav",
478-
"voice": "alloy",
478+
"voice": "ash",
479479
},
480480
frequency_penalty=-2,
481481
function_call="none",
@@ -602,7 +602,7 @@ async def test_method_create_with_all_params_overload_2(self, async_client: Asyn
602602
stream=True,
603603
audio={
604604
"format": "wav",
605-
"voice": "alloy",
605+
"voice": "ash",
606606
},
607607
frequency_penalty=-2,
608608
function_call="none",

‎tests/api_resources/responses/test_input_items.py

+2
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ def test_method_list_with_all_params(self, client: OpenAI) -> None:
3131
response_id="response_id",
3232
after="after",
3333
before="before",
34+
include=["file_search_call.results"],
3435
limit=0,
3536
order="asc",
3637
)
@@ -84,6 +85,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncOpenAI) -> N
8485
response_id="response_id",
8586
after="after",
8687
before="before",
88+
include=["file_search_call.results"],
8789
limit=0,
8890
order="asc",
8991
)

0 commit comments

Comments
 (0)
Please sign in to comment.