Skip to content

release: 1.84.0 #2395

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "1.83.0"
".": "1.84.0"
}
4 changes: 2 additions & 2 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 111
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-2bcc845d8635bf93ddcf9ee723af4d7928248412a417bee5fc10d863a1e13867.yml
openapi_spec_hash: 865230cb3abeb01bd85de05891af23c4
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-0205acb1015d29b2312a48526734c0399f93026d4fe2dff5c7768f566e333fd2.yml
openapi_spec_hash: 1772cc9056c2f6dfb2a4e9cb77ee6343
config_hash: ed1e6b3c5f93d12b80d31167f55c557c
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# Changelog

## 1.84.0 (2025-06-03)

Full Changelog: [v1.83.0...v1.84.0](https://github.com/openai/openai-python/compare/v1.83.0...v1.84.0)

### Features

* **api:** add new realtime and audio models, realtime session options ([0acd0da](https://github.com/openai/openai-python/commit/0acd0da6bc0468c6c857711bc5e77d0bc6d31be6))


### Chores

* **api:** update type names ([1924559](https://github.com/openai/openai-python/commit/192455913b38bf0323ddd0e2b1499b114e2111a1))

## 1.83.0 (2025-06-02)

Full Changelog: [v1.82.1...v1.83.0](https://github.com/openai/openai-python/compare/v1.82.1...v1.83.0)
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "openai"
version = "1.83.0"
version = "1.84.0"
description = "The official Python library for the openai API"
dynamic = ["readme"]
license = "Apache-2.0"
Expand Down
2 changes: 1 addition & 1 deletion src/openai/_version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

__title__ = "openai"
__version__ = "1.83.0" # x-release-please-version
__version__ = "1.84.0" # x-release-please-version
30 changes: 30 additions & 0 deletions src/openai/resources/beta/realtime/sessions.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,17 @@ def create(
"gpt-4o-realtime-preview",
"gpt-4o-realtime-preview-2024-10-01",
"gpt-4o-realtime-preview-2024-12-17",
"gpt-4o-realtime-preview-2025-06-03",
"gpt-4o-mini-realtime-preview",
"gpt-4o-mini-realtime-preview-2024-12-17",
]
| NotGiven = NOT_GIVEN,
output_audio_format: Literal["pcm16", "g711_ulaw", "g711_alaw"] | NotGiven = NOT_GIVEN,
speed: float | NotGiven = NOT_GIVEN,
temperature: float | NotGiven = NOT_GIVEN,
tool_choice: str | NotGiven = NOT_GIVEN,
tools: Iterable[session_create_params.Tool] | NotGiven = NOT_GIVEN,
tracing: session_create_params.Tracing | NotGiven = NOT_GIVEN,
turn_detection: session_create_params.TurnDetection | NotGiven = NOT_GIVEN,
voice: Union[
str, Literal["alloy", "ash", "ballad", "coral", "echo", "fable", "onyx", "nova", "sage", "shimmer", "verse"]
Expand Down Expand Up @@ -129,6 +132,10 @@ def create(
output_audio_format: The format of output audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.
For `pcm16`, output audio is sampled at a rate of 24kHz.
speed: The speed of the model's spoken response. 1.0 is the default speed. 0.25 is the
minimum speed. 1.5 is the maximum speed. This value can only be changed in
between model turns, not while a response is in progress.
temperature: Sampling temperature for the model, limited to [0.6, 1.2]. For audio models a
temperature of 0.8 is highly recommended for best performance.
Expand All @@ -137,6 +144,12 @@ def create(
tools: Tools (functions) available to the model.
tracing: Configuration options for tracing. Set to null to disable tracing. Once tracing
is enabled for a session, the configuration cannot be modified.
`auto` will create a trace for the session with default values for the workflow
name, group id, and metadata.
turn_detection: Configuration for turn detection, ether Server VAD or Semantic VAD. This can be
set to `null` to turn off, in which case the client must manually trigger model
response. Server VAD means that the model will detect the start and end of
Expand Down Expand Up @@ -175,9 +188,11 @@ def create(
"modalities": modalities,
"model": model,
"output_audio_format": output_audio_format,
"speed": speed,
"temperature": temperature,
"tool_choice": tool_choice,
"tools": tools,
"tracing": tracing,
"turn_detection": turn_detection,
"voice": voice,
},
Expand Down Expand Up @@ -224,14 +239,17 @@ async def create(
"gpt-4o-realtime-preview",
"gpt-4o-realtime-preview-2024-10-01",
"gpt-4o-realtime-preview-2024-12-17",
"gpt-4o-realtime-preview-2025-06-03",
"gpt-4o-mini-realtime-preview",
"gpt-4o-mini-realtime-preview-2024-12-17",
]
| NotGiven = NOT_GIVEN,
output_audio_format: Literal["pcm16", "g711_ulaw", "g711_alaw"] | NotGiven = NOT_GIVEN,
speed: float | NotGiven = NOT_GIVEN,
temperature: float | NotGiven = NOT_GIVEN,
tool_choice: str | NotGiven = NOT_GIVEN,
tools: Iterable[session_create_params.Tool] | NotGiven = NOT_GIVEN,
tracing: session_create_params.Tracing | NotGiven = NOT_GIVEN,
turn_detection: session_create_params.TurnDetection | NotGiven = NOT_GIVEN,
voice: Union[
str, Literal["alloy", "ash", "ballad", "coral", "echo", "fable", "onyx", "nova", "sage", "shimmer", "verse"]
Expand Down Expand Up @@ -299,6 +317,10 @@ async def create(
output_audio_format: The format of output audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.
For `pcm16`, output audio is sampled at a rate of 24kHz.
speed: The speed of the model's spoken response. 1.0 is the default speed. 0.25 is the
minimum speed. 1.5 is the maximum speed. This value can only be changed in
between model turns, not while a response is in progress.
temperature: Sampling temperature for the model, limited to [0.6, 1.2]. For audio models a
temperature of 0.8 is highly recommended for best performance.
Expand All @@ -307,6 +329,12 @@ async def create(
tools: Tools (functions) available to the model.
tracing: Configuration options for tracing. Set to null to disable tracing. Once tracing
is enabled for a session, the configuration cannot be modified.
`auto` will create a trace for the session with default values for the workflow
name, group id, and metadata.
turn_detection: Configuration for turn detection, ether Server VAD or Semantic VAD. This can be
set to `null` to turn off, in which case the client must manually trigger model
response. Server VAD means that the model will detect the start and end of
Expand Down Expand Up @@ -345,9 +373,11 @@ async def create(
"modalities": modalities,
"model": model,
"output_audio_format": output_audio_format,
"speed": speed,
"temperature": temperature,
"tool_choice": tool_choice,
"tools": tools,
"tracing": tracing,
"turn_detection": turn_detection,
"voice": voice,
},
Expand Down
56 changes: 53 additions & 3 deletions src/openai/types/beta/realtime/session.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,19 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from typing import List, Union, Optional
from typing_extensions import Literal
from typing_extensions import Literal, TypeAlias

from ...._models import BaseModel

__all__ = ["Session", "InputAudioNoiseReduction", "InputAudioTranscription", "Tool", "TurnDetection"]
__all__ = [
"Session",
"InputAudioNoiseReduction",
"InputAudioTranscription",
"Tool",
"Tracing",
"TracingTracingConfiguration",
"TurnDetection",
]


class InputAudioNoiseReduction(BaseModel):
Expand Down Expand Up @@ -59,6 +67,29 @@ class Tool(BaseModel):
"""The type of the tool, i.e. `function`."""


class TracingTracingConfiguration(BaseModel):
group_id: Optional[str] = None
"""
The group id to attach to this trace to enable filtering and grouping in the
traces dashboard.
"""

metadata: Optional[object] = None
"""
The arbitrary metadata to attach to this trace to enable filtering in the traces
dashboard.
"""

workflow_name: Optional[str] = None
"""The name of the workflow to attach to this trace.
This is used to name the trace in the traces dashboard.
"""


Tracing: TypeAlias = Union[Literal["auto"], TracingTracingConfiguration]


class TurnDetection(BaseModel):
create_response: Optional[bool] = None
"""
Expand Down Expand Up @@ -175,6 +206,7 @@ class Session(BaseModel):
"gpt-4o-realtime-preview",
"gpt-4o-realtime-preview-2024-10-01",
"gpt-4o-realtime-preview-2024-12-17",
"gpt-4o-realtime-preview-2025-06-03",
"gpt-4o-mini-realtime-preview",
"gpt-4o-mini-realtime-preview-2024-12-17",
]
Expand All @@ -188,6 +220,14 @@ class Session(BaseModel):
sampled at a rate of 24kHz.
"""

speed: Optional[float] = None
"""The speed of the model's spoken response.
1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed.
This value can only be changed in between model turns, not while a response is
in progress.
"""

temperature: Optional[float] = None
"""Sampling temperature for the model, limited to [0.6, 1.2].
Expand All @@ -204,6 +244,16 @@ class Session(BaseModel):
tools: Optional[List[Tool]] = None
"""Tools (functions) available to the model."""

tracing: Optional[Tracing] = None
"""Configuration options for tracing.
Set to null to disable tracing. Once tracing is enabled for a session, the
configuration cannot be modified.
`auto` will create a trace for the session with default values for the workflow
name, group id, and metadata.
"""

turn_detection: Optional[TurnDetection] = None
"""Configuration for turn detection, ether Server VAD or Semantic VAD.
Expand All @@ -227,5 +277,5 @@ class Session(BaseModel):
Voice cannot be changed during the session once the model has responded with
audio at least once. Current voice options are `alloy`, `ash`, `ballad`,
`coral`, `echo` `sage`, `shimmer` and `verse`.
`coral`, `echo`, `fable`, `onyx`, `nova`, `sage`, `shimmer`, and `verse`.
"""
46 changes: 45 additions & 1 deletion src/openai/types/beta/realtime/session_create_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from __future__ import annotations

from typing import List, Union, Iterable
from typing_extensions import Literal, TypedDict
from typing_extensions import Literal, TypeAlias, TypedDict

__all__ = [
"SessionCreateParams",
Expand All @@ -12,6 +12,8 @@
"InputAudioNoiseReduction",
"InputAudioTranscription",
"Tool",
"Tracing",
"TracingTracingConfiguration",
"TurnDetection",
]

Expand Down Expand Up @@ -82,6 +84,7 @@ class SessionCreateParams(TypedDict, total=False):
"gpt-4o-realtime-preview",
"gpt-4o-realtime-preview-2024-10-01",
"gpt-4o-realtime-preview-2024-12-17",
"gpt-4o-realtime-preview-2025-06-03",
"gpt-4o-mini-realtime-preview",
"gpt-4o-mini-realtime-preview-2024-12-17",
]
Expand All @@ -94,6 +97,14 @@ class SessionCreateParams(TypedDict, total=False):
sampled at a rate of 24kHz.
"""

speed: float
"""The speed of the model's spoken response.
1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed.
This value can only be changed in between model turns, not while a response is
in progress.
"""

temperature: float
"""Sampling temperature for the model, limited to [0.6, 1.2].
Expand All @@ -110,6 +121,16 @@ class SessionCreateParams(TypedDict, total=False):
tools: Iterable[Tool]
"""Tools (functions) available to the model."""

tracing: Tracing
"""Configuration options for tracing.
Set to null to disable tracing. Once tracing is enabled for a session, the
configuration cannot be modified.
`auto` will create a trace for the session with default values for the workflow
name, group id, and metadata.
"""

turn_detection: TurnDetection
"""Configuration for turn detection, ether Server VAD or Semantic VAD.
Expand Down Expand Up @@ -205,6 +226,29 @@ class Tool(TypedDict, total=False):
"""The type of the tool, i.e. `function`."""


class TracingTracingConfiguration(TypedDict, total=False):
group_id: str
"""
The group id to attach to this trace to enable filtering and grouping in the
traces dashboard.
"""

metadata: object
"""
The arbitrary metadata to attach to this trace to enable filtering in the traces
dashboard.
"""

workflow_name: str
"""The name of the workflow to attach to this trace.
This is used to name the trace in the traces dashboard.
"""


Tracing: TypeAlias = Union[Literal["auto"], TracingTracingConfiguration]


class TurnDetection(TypedDict, total=False):
create_response: bool
"""
Expand Down
Loading