Skip to content

release: 1.96.0 #2464

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 4 commits into from
Jul 15, 2025
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.95.1"
".": "1.96.0"
}
6 changes: 3 additions & 3 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-de3e91790d0b9f3ce26d679ac07079880ccc695bd8c878f961c4d577a5025a2e.yml
openapi_spec_hash: 4b44e3f287583d01fbe7b10cd943254a
config_hash: 06b9a88561844d60d8efa4eaabf5fa3c
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-82fd6fcb3eea81cbbe09a6f831c82219f1251e1b76474b4c41f424bf277e6a71.yml
openapi_spec_hash: c8d54bd1ae3d704f6b6f72ffd2f876d8
config_hash: 3315d58b60faf63b1bee251b81837cda
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# Changelog

## 1.96.0 (2025-07-15)

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

### Features

* clean up environment call outs ([87c2e97](https://github.com/openai/openai-python/commit/87c2e979e0ec37347b7f595c2696408acd25fe20))


### Chores

* **api:** update realtime specs, build config ([bf06d88](https://github.com/openai/openai-python/commit/bf06d88b33f9af82a51d9a8af5b7a38925906f7a))

## 1.95.1 (2025-07-11)

Full Changelog: [v1.95.0...v1.95.1](https://github.com/openai/openai-python/compare/v1.95.0...v1.95.1)
Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,15 +160,14 @@ pip install openai[aiohttp]
Then you can enable it by instantiating the client with `http_client=DefaultAioHttpClient()`:

```python
import os
import asyncio
from openai import DefaultAioHttpClient
from openai import AsyncOpenAI


async def main() -> None:
async with AsyncOpenAI(
api_key=os.environ.get("OPENAI_API_KEY"), # This is the default and can be omitted
api_key="My API Key",
http_client=DefaultAioHttpClient(),
) as client:
chat_completion = await client.chat.completions.create(
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.95.1"
version = "1.96.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.95.1" # x-release-please-version
__version__ = "1.96.0" # x-release-please-version
4 changes: 2 additions & 2 deletions src/openai/types/beta/realtime/conversation_item.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ class ConversationItem(BaseModel):
for `message` items.
"""

status: Optional[Literal["completed", "incomplete"]] = None
"""The status of the item (`completed`, `incomplete`).
status: Optional[Literal["completed", "incomplete", "in_progress"]] = None
"""The status of the item (`completed`, `incomplete`, `in_progress`).
These have no effect on the conversation, but are accepted for consistency with
the `conversation.item.created` event.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from typing import Optional
from typing_extensions import Literal

from ...._models import BaseModel
Expand All @@ -15,11 +16,12 @@ class ConversationItemCreatedEvent(BaseModel):
item: ConversationItem
"""The item to add to the conversation."""

previous_item_id: str
type: Literal["conversation.item.created"]
"""The event type, must be `conversation.item.created`."""

previous_item_id: Optional[str] = None
"""
The ID of the preceding item in the Conversation context, allows the client to
understand the order of the conversation.
understand the order of the conversation. Can be `null` if the item has no
predecessor.
"""

type: Literal["conversation.item.created"]
"""The event type, must be `conversation.item.created`."""
4 changes: 2 additions & 2 deletions src/openai/types/beta/realtime/conversation_item_param.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ class ConversationItemParam(TypedDict, total=False):
for `message` items.
"""

status: Literal["completed", "incomplete"]
"""The status of the item (`completed`, `incomplete`).
status: Literal["completed", "incomplete", "in_progress"]
"""The status of the item (`completed`, `incomplete`, `in_progress`).
These have no effect on the conversation, but are accepted for consistency with
the `conversation.item.created` event.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ class ConversationItemWithReference(BaseModel):
for `message` items.
"""

status: Optional[Literal["completed", "incomplete"]] = None
"""The status of the item (`completed`, `incomplete`).
status: Optional[Literal["completed", "incomplete", "in_progress"]] = None
"""The status of the item (`completed`, `incomplete`, `in_progress`).
These have no effect on the conversation, but are accepted for consistency with
the `conversation.item.created` event.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ class ConversationItemWithReferenceParam(TypedDict, total=False):
for `message` items.
"""

status: Literal["completed", "incomplete"]
"""The status of the item (`completed`, `incomplete`).
status: Literal["completed", "incomplete", "in_progress"]
"""The status of the item (`completed`, `incomplete`, `in_progress`).

These have no effect on the conversation, but are accepted for consistency with
the `conversation.item.created` event.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from typing import Optional
from typing_extensions import Literal

from ...._models import BaseModel
Expand All @@ -14,8 +15,11 @@ class InputAudioBufferCommittedEvent(BaseModel):
item_id: str
"""The ID of the user message item that will be created."""

previous_item_id: str
"""The ID of the preceding item after which the new item will be inserted."""

type: Literal["input_audio_buffer.committed"]
"""The event type, must be `input_audio_buffer.committed`."""

previous_item_id: Optional[str] = None
"""
The ID of the preceding item after which the new item will be inserted. Can be
`null` if the item has no predecessor.
"""
4 changes: 2 additions & 2 deletions src/openai/types/beta/realtime/realtime_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,10 @@ class RealtimeResponse(BaseModel):
output_audio_format: Optional[Literal["pcm16", "g711_ulaw", "g711_alaw"]] = None
"""The format of output audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`."""

status: Optional[Literal["completed", "cancelled", "failed", "incomplete"]] = None
status: Optional[Literal["completed", "cancelled", "failed", "incomplete", "in_progress"]] = None
"""
The final status of the response (`completed`, `cancelled`, `failed`, or
`incomplete`).
`incomplete`, `in_progress`).
"""

status_details: Optional[RealtimeResponseStatus] = None
Expand Down
23 changes: 21 additions & 2 deletions src/openai/types/eval_create_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"TestingCriterionLabelModelInputEvalItem",
"TestingCriterionLabelModelInputEvalItemContent",
"TestingCriterionLabelModelInputEvalItemContentOutputText",
"TestingCriterionLabelModelInputEvalItemContentInputImage",
"TestingCriterionTextSimilarity",
"TestingCriterionPython",
"TestingCriterionScoreModel",
Expand Down Expand Up @@ -109,14 +110,32 @@ class TestingCriterionLabelModelInputEvalItemContentOutputText(TypedDict, total=
"""The type of the output text. Always `output_text`."""


class TestingCriterionLabelModelInputEvalItemContentInputImage(TypedDict, total=False):
image_url: Required[str]
"""The URL of the image input."""

type: Required[Literal["input_image"]]
"""The type of the image input. Always `input_image`."""

detail: str
"""The detail level of the image to be sent to the model.

One of `high`, `low`, or `auto`. Defaults to `auto`.
"""


TestingCriterionLabelModelInputEvalItemContent: TypeAlias = Union[
str, ResponseInputTextParam, TestingCriterionLabelModelInputEvalItemContentOutputText
str,
ResponseInputTextParam,
TestingCriterionLabelModelInputEvalItemContentOutputText,
TestingCriterionLabelModelInputEvalItemContentInputImage,
Iterable[object],
]


class TestingCriterionLabelModelInputEvalItem(TypedDict, total=False):
content: Required[TestingCriterionLabelModelInputEvalItemContent]
"""Text inputs to the model - can contain template strings."""
"""Inputs to the model - can contain template strings."""

role: Required[Literal["user", "assistant", "system", "developer"]]
"""The role of the message input.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"InputMessagesTemplateTemplateMessage",
"InputMessagesTemplateTemplateMessageContent",
"InputMessagesTemplateTemplateMessageContentOutputText",
"InputMessagesTemplateTemplateMessageContentInputImage",
"InputMessagesItemReference",
"SamplingParams",
"SamplingParamsResponseFormat",
Expand Down Expand Up @@ -94,14 +95,32 @@ class InputMessagesTemplateTemplateMessageContentOutputText(BaseModel):
"""The type of the output text. Always `output_text`."""


class InputMessagesTemplateTemplateMessageContentInputImage(BaseModel):
image_url: str
"""The URL of the image input."""

type: Literal["input_image"]
"""The type of the image input. Always `input_image`."""

detail: Optional[str] = None
"""The detail level of the image to be sent to the model.

One of `high`, `low`, or `auto`. Defaults to `auto`.
"""


InputMessagesTemplateTemplateMessageContent: TypeAlias = Union[
str, ResponseInputText, InputMessagesTemplateTemplateMessageContentOutputText
str,
ResponseInputText,
InputMessagesTemplateTemplateMessageContentOutputText,
InputMessagesTemplateTemplateMessageContentInputImage,
List[object],
]


class InputMessagesTemplateTemplateMessage(BaseModel):
content: InputMessagesTemplateTemplateMessageContent
"""Text inputs to the model - can contain template strings."""
"""Inputs to the model - can contain template strings."""

role: Literal["user", "assistant", "system", "developer"]
"""The role of the message input.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"InputMessagesTemplateTemplateMessage",
"InputMessagesTemplateTemplateMessageContent",
"InputMessagesTemplateTemplateMessageContentOutputText",
"InputMessagesTemplateTemplateMessageContentInputImage",
"InputMessagesItemReference",
"SamplingParams",
"SamplingParamsResponseFormat",
Expand Down Expand Up @@ -92,14 +93,32 @@ class InputMessagesTemplateTemplateMessageContentOutputText(TypedDict, total=Fal
"""The type of the output text. Always `output_text`."""


class InputMessagesTemplateTemplateMessageContentInputImage(TypedDict, total=False):
image_url: Required[str]
"""The URL of the image input."""

type: Required[Literal["input_image"]]
"""The type of the image input. Always `input_image`."""

detail: str
"""The detail level of the image to be sent to the model.

One of `high`, `low`, or `auto`. Defaults to `auto`.
"""


InputMessagesTemplateTemplateMessageContent: TypeAlias = Union[
str, ResponseInputTextParam, InputMessagesTemplateTemplateMessageContentOutputText
str,
ResponseInputTextParam,
InputMessagesTemplateTemplateMessageContentOutputText,
InputMessagesTemplateTemplateMessageContentInputImage,
Iterable[object],
]


class InputMessagesTemplateTemplateMessage(TypedDict, total=False):
content: Required[InputMessagesTemplateTemplateMessageContent]
"""Text inputs to the model - can contain template strings."""
"""Inputs to the model - can contain template strings."""

role: Required[Literal["user", "assistant", "system", "developer"]]
"""The role of the message input.
Expand Down
23 changes: 21 additions & 2 deletions src/openai/types/evals/run_cancel_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
"DataSourceResponsesInputMessagesTemplateTemplateEvalItem",
"DataSourceResponsesInputMessagesTemplateTemplateEvalItemContent",
"DataSourceResponsesInputMessagesTemplateTemplateEvalItemContentOutputText",
"DataSourceResponsesInputMessagesTemplateTemplateEvalItemContentInputImage",
"DataSourceResponsesInputMessagesItemReference",
"DataSourceResponsesSamplingParams",
"DataSourceResponsesSamplingParamsText",
Expand Down Expand Up @@ -138,14 +139,32 @@ class DataSourceResponsesInputMessagesTemplateTemplateEvalItemContentOutputText(
"""The type of the output text. Always `output_text`."""


class DataSourceResponsesInputMessagesTemplateTemplateEvalItemContentInputImage(BaseModel):
image_url: str
"""The URL of the image input."""

type: Literal["input_image"]
"""The type of the image input. Always `input_image`."""

detail: Optional[str] = None
"""The detail level of the image to be sent to the model.

One of `high`, `low`, or `auto`. Defaults to `auto`.
"""


DataSourceResponsesInputMessagesTemplateTemplateEvalItemContent: TypeAlias = Union[
str, ResponseInputText, DataSourceResponsesInputMessagesTemplateTemplateEvalItemContentOutputText
str,
ResponseInputText,
DataSourceResponsesInputMessagesTemplateTemplateEvalItemContentOutputText,
DataSourceResponsesInputMessagesTemplateTemplateEvalItemContentInputImage,
List[object],
]


class DataSourceResponsesInputMessagesTemplateTemplateEvalItem(BaseModel):
content: DataSourceResponsesInputMessagesTemplateTemplateEvalItemContent
"""Text inputs to the model - can contain template strings."""
"""Inputs to the model - can contain template strings."""

role: Literal["user", "assistant", "system", "developer"]
"""The role of the message input.
Expand Down
21 changes: 20 additions & 1 deletion src/openai/types/evals/run_create_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"DataSourceCreateEvalResponsesRunDataSourceInputMessagesTemplateTemplateEvalItem",
"DataSourceCreateEvalResponsesRunDataSourceInputMessagesTemplateTemplateEvalItemContent",
"DataSourceCreateEvalResponsesRunDataSourceInputMessagesTemplateTemplateEvalItemContentOutputText",
"DataSourceCreateEvalResponsesRunDataSourceInputMessagesTemplateTemplateEvalItemContentInputImage",
"DataSourceCreateEvalResponsesRunDataSourceInputMessagesItemReference",
"DataSourceCreateEvalResponsesRunDataSourceSamplingParams",
"DataSourceCreateEvalResponsesRunDataSourceSamplingParamsText",
Expand Down Expand Up @@ -153,16 +154,34 @@ class DataSourceCreateEvalResponsesRunDataSourceInputMessagesTemplateTemplateEva
"""The type of the output text. Always `output_text`."""


class DataSourceCreateEvalResponsesRunDataSourceInputMessagesTemplateTemplateEvalItemContentInputImage(
TypedDict, total=False
):
image_url: Required[str]
"""The URL of the image input."""

type: Required[Literal["input_image"]]
"""The type of the image input. Always `input_image`."""

detail: str
"""The detail level of the image to be sent to the model.

One of `high`, `low`, or `auto`. Defaults to `auto`.
"""


DataSourceCreateEvalResponsesRunDataSourceInputMessagesTemplateTemplateEvalItemContent: TypeAlias = Union[
str,
ResponseInputTextParam,
DataSourceCreateEvalResponsesRunDataSourceInputMessagesTemplateTemplateEvalItemContentOutputText,
DataSourceCreateEvalResponsesRunDataSourceInputMessagesTemplateTemplateEvalItemContentInputImage,
Iterable[object],
]


class DataSourceCreateEvalResponsesRunDataSourceInputMessagesTemplateTemplateEvalItem(TypedDict, total=False):
content: Required[DataSourceCreateEvalResponsesRunDataSourceInputMessagesTemplateTemplateEvalItemContent]
"""Text inputs to the model - can contain template strings."""
"""Inputs to the model - can contain template strings."""

role: Required[Literal["user", "assistant", "system", "developer"]]
"""The role of the message input.
Expand Down
Loading