Skip to content

Commit 1ef14c6

Browse files
authored
Merge branch 'openai:main' into main
2 parents 0b2320f + 4756247 commit 1ef14c6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+430
-589
lines changed

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "1.107.0"
2+
".": "1.107.2"
33
}

.stats.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 118
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-7807ec6037efcee1af7decbfd3974a42b761fb6c6a71b4050fe43484d7fcbac4.yml
3-
openapi_spec_hash: da6851e3891ad2659a50ed6a736fd32a
4-
config_hash: 74d955cdc2377213f5268ea309090f6c
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-94b1e3cb0bdc616ff0c2f267c33dadd95f133b1f64e647aab6c64afb292b2793.yml
3+
openapi_spec_hash: 2395319ac9befd59b6536ae7f9564a05
4+
config_hash: 930dac3aa861344867e4ac84f037b5df

CHANGELOG.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,22 @@
11
# Changelog
22

3+
## 1.107.2 (2025-09-12)
4+
5+
Full Changelog: [v1.107.1...v1.107.2](https://github.com/openai/openai-python/compare/v1.107.1...v1.107.2)
6+
7+
### Chores
8+
9+
* **api:** Minor docs and type updates for realtime ([ab6a10d](https://github.com/openai/openai-python/commit/ab6a10da4ed7e6386695b6f5f29149d4870f85c9))
10+
* **tests:** simplify `get_platform` test ([01f03e0](https://github.com/openai/openai-python/commit/01f03e0ad1f9ab3f2ed8b7c13d652263c6d06378))
11+
12+
## 1.107.1 (2025-09-10)
13+
14+
Full Changelog: [v1.107.0...v1.107.1](https://github.com/openai/openai-python/compare/v1.107.0...v1.107.1)
15+
16+
### Chores
17+
18+
* **api:** fix realtime GA types ([570fc5a](https://github.com/openai/openai-python/commit/570fc5a28ada665fd658b24675361680cfeb086f))
19+
320
## 1.107.0 (2025-09-08)
421

522
Full Changelog: [v1.106.1...v1.107.0](https://github.com/openai/openai-python/compare/v1.106.1...v1.107.0)

api.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -892,7 +892,6 @@ from openai.types.realtime import (
892892
McpListToolsCompleted,
893893
McpListToolsFailed,
894894
McpListToolsInProgress,
895-
Models,
896895
NoiseReductionType,
897896
OutputAudioBufferClearEvent,
898897
RateLimitsUpdatedEvent,
@@ -909,6 +908,7 @@ from openai.types.realtime import (
909908
RealtimeConversationItemUserMessage,
910909
RealtimeError,
911910
RealtimeErrorEvent,
911+
RealtimeFunctionTool,
912912
RealtimeMcpApprovalRequest,
913913
RealtimeMcpApprovalResponse,
914914
RealtimeMcpListTools,
@@ -961,7 +961,6 @@ from openai.types.realtime import (
961961
SessionCreatedEvent,
962962
SessionUpdateEvent,
963963
SessionUpdatedEvent,
964-
TranscriptionSessionCreated,
965964
TranscriptionSessionUpdate,
966965
TranscriptionSessionUpdatedEvent,
967966
)
@@ -975,9 +974,7 @@ Types:
975974
from openai.types.realtime import (
976975
RealtimeSessionClientSecret,
977976
RealtimeSessionCreateResponse,
978-
RealtimeTranscriptionSessionClientSecret,
979977
RealtimeTranscriptionSessionCreateResponse,
980-
RealtimeTranscriptionSessionInputAudioTranscription,
981978
RealtimeTranscriptionSessionTurnDetection,
982979
ClientSecretCreateResponse,
983980
)

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "openai"
3-
version = "1.107.0"
3+
version = "1.107.2"
44
description = "The official Python library for the openai API"
55
dynamic = ["readme"]
66
license = "Apache-2.0"

requirements-dev.lock

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ filelock==3.12.4
7070
frozenlist==1.7.0
7171
# via aiohttp
7272
# via aiosignal
73-
griffe==1.14.0
73+
griffe==1.13.0
7474
h11==0.16.0
7575
# via httpcore
7676
httpcore==1.0.9
@@ -108,7 +108,6 @@ multidict==6.5.0
108108
mypy==1.14.1
109109
mypy-extensions==1.0.0
110110
# via mypy
111-
nest-asyncio==1.6.0
112111
nodeenv==1.8.0
113112
# via pyright
114113
nox==2023.4.22

src/openai/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

33
__title__ = "openai"
4-
__version__ = "1.107.0" # x-release-please-version
4+
__version__ = "1.107.2" # x-release-please-version

src/openai/resources/realtime/realtime.py

Lines changed: 3 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
ClientSecretsWithStreamingResponse,
3333
AsyncClientSecretsWithStreamingResponse,
3434
)
35-
from ...types.realtime import session_update_event_param, transcription_session_update_param
35+
from ...types.realtime import session_update_event_param
3636
from ...types.websocket_connection_options import WebsocketConnectionOptions
3737
from ...types.realtime.realtime_client_event import RealtimeClientEvent
3838
from ...types.realtime.realtime_server_event import RealtimeServerEvent
@@ -199,7 +199,6 @@ class AsyncRealtimeConnection:
199199
input_audio_buffer: AsyncRealtimeInputAudioBufferResource
200200
conversation: AsyncRealtimeConversationResource
201201
output_audio_buffer: AsyncRealtimeOutputAudioBufferResource
202-
transcription_session: AsyncRealtimeTranscriptionSessionResource
203202

204203
_connection: AsyncWebsocketConnection
205204

@@ -211,7 +210,6 @@ def __init__(self, connection: AsyncWebsocketConnection) -> None:
211210
self.input_audio_buffer = AsyncRealtimeInputAudioBufferResource(self)
212211
self.conversation = AsyncRealtimeConversationResource(self)
213212
self.output_audio_buffer = AsyncRealtimeOutputAudioBufferResource(self)
214-
self.transcription_session = AsyncRealtimeTranscriptionSessionResource(self)
215213

216214
async def __aiter__(self) -> AsyncIterator[RealtimeServerEvent]:
217215
"""
@@ -381,7 +379,6 @@ class RealtimeConnection:
381379
input_audio_buffer: RealtimeInputAudioBufferResource
382380
conversation: RealtimeConversationResource
383381
output_audio_buffer: RealtimeOutputAudioBufferResource
384-
transcription_session: RealtimeTranscriptionSessionResource
385382

386383
_connection: WebsocketConnection
387384

@@ -393,7 +390,6 @@ def __init__(self, connection: WebsocketConnection) -> None:
393390
self.input_audio_buffer = RealtimeInputAudioBufferResource(self)
394391
self.conversation = RealtimeConversationResource(self)
395392
self.output_audio_buffer = RealtimeOutputAudioBufferResource(self)
396-
self.transcription_session = RealtimeTranscriptionSessionResource(self)
397393

398394
def __iter__(self) -> Iterator[RealtimeServerEvent]:
399395
"""
@@ -565,8 +561,7 @@ def update(self, *, session: session_update_event_param.Session, event_id: str |
565561
"""
566562
Send this event to update the session’s configuration.
567563
The client may send this event at any time to update any field
568-
except for `voice` and `model`. `voice` can be updated only if there have been no other
569-
audio outputs yet.
564+
except for `voice` and `model`. `voice` can be updated only if there have been no other audio outputs yet.
570565
571566
When the server receives a `session.update`, it will respond
572567
with a `session.updated` event showing the full, effective configuration.
@@ -800,19 +795,6 @@ def clear(self, *, event_id: str | NotGiven = NOT_GIVEN) -> None:
800795
)
801796

802797

803-
class RealtimeTranscriptionSessionResource(BaseRealtimeConnectionResource):
804-
def update(
805-
self, *, session: transcription_session_update_param.Session, event_id: str | NotGiven = NOT_GIVEN
806-
) -> None:
807-
"""Send this event to update a transcription session."""
808-
self._connection.send(
809-
cast(
810-
RealtimeClientEventParam,
811-
strip_not_given({"type": "transcription_session.update", "session": session, "event_id": event_id}),
812-
)
813-
)
814-
815-
816798
class BaseAsyncRealtimeConnectionResource:
817799
def __init__(self, connection: AsyncRealtimeConnection) -> None:
818800
self._connection = connection
@@ -825,8 +807,7 @@ async def update(
825807
"""
826808
Send this event to update the session’s configuration.
827809
The client may send this event at any time to update any field
828-
except for `voice` and `model`. `voice` can be updated only if there have been no other
829-
audio outputs yet.
810+
except for `voice` and `model`. `voice` can be updated only if there have been no other audio outputs yet.
830811
831812
When the server receives a `session.update`, it will respond
832813
with a `session.updated` event showing the full, effective configuration.
@@ -1058,16 +1039,3 @@ async def clear(self, *, event_id: str | NotGiven = NOT_GIVEN) -> None:
10581039
await self._connection.send(
10591040
cast(RealtimeClientEventParam, strip_not_given({"type": "output_audio_buffer.clear", "event_id": event_id}))
10601041
)
1061-
1062-
1063-
class AsyncRealtimeTranscriptionSessionResource(BaseAsyncRealtimeConnectionResource):
1064-
async def update(
1065-
self, *, session: transcription_session_update_param.Session, event_id: str | NotGiven = NOT_GIVEN
1066-
) -> None:
1067-
"""Send this event to update a transcription session."""
1068-
await self._connection.send(
1069-
cast(
1070-
RealtimeClientEventParam,
1071-
strip_not_given({"type": "transcription_session.update", "session": session, "event_id": event_id}),
1072-
)
1073-
)

src/openai/resources/responses/responses.py

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -288,10 +288,10 @@ def create(
288288
289289
truncation: The truncation strategy to use for the model response.
290290
291-
- `auto`: If the context of this response and previous ones exceeds the model's
292-
context window size, the model will truncate the response to fit the context
293-
window by dropping input items in the middle of the conversation.
294-
- `disabled` (default): If a model response will exceed the context window size
291+
- `auto`: If the input to this Response exceeds the model's context window size,
292+
the model will truncate the response to fit the context window by dropping
293+
items from the beginning of the conversation.
294+
- `disabled` (default): If the input size will exceed the context window size
295295
for a model, the request will fail with a 400 error.
296296
297297
user: This field is being replaced by `safety_identifier` and `prompt_cache_key`. Use
@@ -527,10 +527,10 @@ def create(
527527
528528
truncation: The truncation strategy to use for the model response.
529529
530-
- `auto`: If the context of this response and previous ones exceeds the model's
531-
context window size, the model will truncate the response to fit the context
532-
window by dropping input items in the middle of the conversation.
533-
- `disabled` (default): If a model response will exceed the context window size
530+
- `auto`: If the input to this Response exceeds the model's context window size,
531+
the model will truncate the response to fit the context window by dropping
532+
items from the beginning of the conversation.
533+
- `disabled` (default): If the input size will exceed the context window size
534534
for a model, the request will fail with a 400 error.
535535
536536
user: This field is being replaced by `safety_identifier` and `prompt_cache_key`. Use
@@ -766,10 +766,10 @@ def create(
766766
767767
truncation: The truncation strategy to use for the model response.
768768
769-
- `auto`: If the context of this response and previous ones exceeds the model's
770-
context window size, the model will truncate the response to fit the context
771-
window by dropping input items in the middle of the conversation.
772-
- `disabled` (default): If a model response will exceed the context window size
769+
- `auto`: If the input to this Response exceeds the model's context window size,
770+
the model will truncate the response to fit the context window by dropping
771+
items from the beginning of the conversation.
772+
- `disabled` (default): If the input size will exceed the context window size
773773
for a model, the request will fail with a 400 error.
774774
775775
user: This field is being replaced by `safety_identifier` and `prompt_cache_key`. Use
@@ -1719,10 +1719,10 @@ async def create(
17191719
17201720
truncation: The truncation strategy to use for the model response.
17211721
1722-
- `auto`: If the context of this response and previous ones exceeds the model's
1723-
context window size, the model will truncate the response to fit the context
1724-
window by dropping input items in the middle of the conversation.
1725-
- `disabled` (default): If a model response will exceed the context window size
1722+
- `auto`: If the input to this Response exceeds the model's context window size,
1723+
the model will truncate the response to fit the context window by dropping
1724+
items from the beginning of the conversation.
1725+
- `disabled` (default): If the input size will exceed the context window size
17261726
for a model, the request will fail with a 400 error.
17271727
17281728
user: This field is being replaced by `safety_identifier` and `prompt_cache_key`. Use
@@ -1958,10 +1958,10 @@ async def create(
19581958
19591959
truncation: The truncation strategy to use for the model response.
19601960
1961-
- `auto`: If the context of this response and previous ones exceeds the model's
1962-
context window size, the model will truncate the response to fit the context
1963-
window by dropping input items in the middle of the conversation.
1964-
- `disabled` (default): If a model response will exceed the context window size
1961+
- `auto`: If the input to this Response exceeds the model's context window size,
1962+
the model will truncate the response to fit the context window by dropping
1963+
items from the beginning of the conversation.
1964+
- `disabled` (default): If the input size will exceed the context window size
19651965
for a model, the request will fail with a 400 error.
19661966
19671967
user: This field is being replaced by `safety_identifier` and `prompt_cache_key`. Use
@@ -2197,10 +2197,10 @@ async def create(
21972197
21982198
truncation: The truncation strategy to use for the model response.
21992199
2200-
- `auto`: If the context of this response and previous ones exceeds the model's
2201-
context window size, the model will truncate the response to fit the context
2202-
window by dropping input items in the middle of the conversation.
2203-
- `disabled` (default): If a model response will exceed the context window size
2200+
- `auto`: If the input to this Response exceeds the model's context window size,
2201+
the model will truncate the response to fit the context window by dropping
2202+
items from the beginning of the conversation.
2203+
- `disabled` (default): If the input size will exceed the context window size
22042204
for a model, the request will fail with a 400 error.
22052205
22062206
user: This field is being replaced by `safety_identifier` and `prompt_cache_key`. Use

src/openai/types/realtime/__init__.py

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22

33
from __future__ import annotations
44

5-
from .models import Models as Models
6-
from .models_param import ModelsParam as ModelsParam
75
from .realtime_error import RealtimeError as RealtimeError
86
from .conversation_item import ConversationItem as ConversationItem
97
from .realtime_response import RealtimeResponse as RealtimeResponse
@@ -25,6 +23,7 @@
2523
from .session_updated_event import SessionUpdatedEvent as SessionUpdatedEvent
2624
from .conversation_item_done import ConversationItemDone as ConversationItemDone
2725
from .realtime_audio_formats import RealtimeAudioFormats as RealtimeAudioFormats
26+
from .realtime_function_tool import RealtimeFunctionTool as RealtimeFunctionTool
2827
from .realtime_mcp_tool_call import RealtimeMcpToolCall as RealtimeMcpToolCall
2928
from .realtime_mcphttp_error import RealtimeMcphttpError as RealtimeMcphttpError
3029
from .response_created_event import ResponseCreatedEvent as ResponseCreatedEvent
@@ -60,15 +59,14 @@
6059
from .response_mcp_call_completed import ResponseMcpCallCompleted as ResponseMcpCallCompleted
6160
from .realtime_audio_config_output import RealtimeAudioConfigOutput as RealtimeAudioConfigOutput
6261
from .realtime_audio_formats_param import RealtimeAudioFormatsParam as RealtimeAudioFormatsParam
62+
from .realtime_function_tool_param import RealtimeFunctionToolParam as RealtimeFunctionToolParam
6363
from .realtime_mcp_tool_call_param import RealtimeMcpToolCallParam as RealtimeMcpToolCallParam
6464
from .realtime_mcphttp_error_param import RealtimeMcphttpErrorParam as RealtimeMcphttpErrorParam
65-
from .transcription_session_update import TranscriptionSessionUpdate as TranscriptionSessionUpdate
6665
from .client_secret_create_response import ClientSecretCreateResponse as ClientSecretCreateResponse
6766
from .realtime_mcp_approval_request import RealtimeMcpApprovalRequest as RealtimeMcpApprovalRequest
6867
from .realtime_mcp_list_tools_param import RealtimeMcpListToolsParam as RealtimeMcpListToolsParam
6968
from .realtime_tracing_config_param import RealtimeTracingConfigParam as RealtimeTracingConfigParam
7069
from .response_mcp_call_in_progress import ResponseMcpCallInProgress as ResponseMcpCallInProgress
71-
from .transcription_session_created import TranscriptionSessionCreated as TranscriptionSessionCreated
7270
from .conversation_item_create_event import ConversationItemCreateEvent as ConversationItemCreateEvent
7371
from .conversation_item_delete_event import ConversationItemDeleteEvent as ConversationItemDeleteEvent
7472
from .input_audio_buffer_clear_event import InputAudioBufferClearEvent as InputAudioBufferClearEvent
@@ -100,11 +98,9 @@
10098
from .response_mcp_call_arguments_delta import ResponseMcpCallArgumentsDelta as ResponseMcpCallArgumentsDelta
10199
from .input_audio_buffer_committed_event import InputAudioBufferCommittedEvent as InputAudioBufferCommittedEvent
102100
from .realtime_audio_config_output_param import RealtimeAudioConfigOutputParam as RealtimeAudioConfigOutputParam
103-
from .transcription_session_update_param import TranscriptionSessionUpdateParam as TranscriptionSessionUpdateParam
104101
from .realtime_audio_input_turn_detection import RealtimeAudioInputTurnDetection as RealtimeAudioInputTurnDetection
105102
from .realtime_mcp_approval_request_param import RealtimeMcpApprovalRequestParam as RealtimeMcpApprovalRequestParam
106103
from .realtime_truncation_retention_ratio import RealtimeTruncationRetentionRatio as RealtimeTruncationRetentionRatio
107-
from .transcription_session_updated_event import TranscriptionSessionUpdatedEvent as TranscriptionSessionUpdatedEvent
108104
from .conversation_item_create_event_param import ConversationItemCreateEventParam as ConversationItemCreateEventParam
109105
from .conversation_item_delete_event_param import ConversationItemDeleteEventParam as ConversationItemDeleteEventParam
110106
from .input_audio_buffer_clear_event_param import InputAudioBufferClearEventParam as InputAudioBufferClearEventParam
@@ -181,9 +177,6 @@
181177
from .realtime_response_usage_output_token_details import (
182178
RealtimeResponseUsageOutputTokenDetails as RealtimeResponseUsageOutputTokenDetails,
183179
)
184-
from .realtime_transcription_session_client_secret import (
185-
RealtimeTranscriptionSessionClientSecret as RealtimeTranscriptionSessionClientSecret,
186-
)
187180
from .response_function_call_arguments_delta_event import (
188181
ResponseFunctionCallArgumentsDeltaEvent as ResponseFunctionCallArgumentsDeltaEvent,
189182
)
@@ -229,9 +222,6 @@
229222
from .conversation_item_input_audio_transcription_failed_event import (
230223
ConversationItemInputAudioTranscriptionFailedEvent as ConversationItemInputAudioTranscriptionFailedEvent,
231224
)
232-
from .realtime_transcription_session_input_audio_transcription import (
233-
RealtimeTranscriptionSessionInputAudioTranscription as RealtimeTranscriptionSessionInputAudioTranscription,
234-
)
235225
from .realtime_transcription_session_audio_input_turn_detection import (
236226
RealtimeTranscriptionSessionAudioInputTurnDetection as RealtimeTranscriptionSessionAudioInputTurnDetection,
237227
)

0 commit comments

Comments
 (0)