Skip to content
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.104.0"
".": "1.104.1"
}
4 changes: 2 additions & 2 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 118
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-356b4364203ff36d7724074cd04f6e684253bfcc3c9d969122d730aa7bc51b46.yml
openapi_spec_hash: 4ab8e96f52699bc3d2b0c4432aa92af8
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-f312a661d9dd6b5d6d676e449c357f6414afd1fdaaf4d982d44ad86cba5c5f6e.yml
openapi_spec_hash: b62fd3d3fb98e37b1da0a2e22af51d40
config_hash: b854932c0ea24b400bdd64e4376936bd
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 1.104.1 (2025-09-02)

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

### Chores

* **api:** manual updates for ResponseInputAudio ([0db5061](https://github.com/openai/openai-python/commit/0db50619663656ba97bba30ab640bbb33683d196))

## 1.104.0 (2025-09-02)

Full Changelog: [v1.103.0...v1.104.0](https://github.com/openai/openai-python/compare/v1.103.0...v1.104.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.104.0"
version = "1.104.1"
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.104.0" # x-release-please-version
__version__ = "1.104.1" # x-release-please-version
12 changes: 6 additions & 6 deletions src/openai/resources/responses/responses.py
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ def create(
Learn more about
[built-in tools](https://platform.openai.com/docs/guides/tools).
- **MCP Tools**: Integrations with third-party systems via custom MCP servers or
predefined connectors such as Google Drive and Notion. Learn more about
predefined connectors such as Google Drive and SharePoint. Learn more about
[MCP Tools](https://platform.openai.com/docs/guides/tools-connectors-mcp).
- **Function calls (custom tools)**: Functions that are defined by you, enabling
the model to call your own code with strongly typed arguments and outputs.
Expand Down Expand Up @@ -508,7 +508,7 @@ def create(
Learn more about
[built-in tools](https://platform.openai.com/docs/guides/tools).
- **MCP Tools**: Integrations with third-party systems via custom MCP servers or
predefined connectors such as Google Drive and Notion. Learn more about
predefined connectors such as Google Drive and SharePoint. Learn more about
[MCP Tools](https://platform.openai.com/docs/guides/tools-connectors-mcp).
- **Function calls (custom tools)**: Functions that are defined by you, enabling
the model to call your own code with strongly typed arguments and outputs.
Expand Down Expand Up @@ -747,7 +747,7 @@ def create(
Learn more about
[built-in tools](https://platform.openai.com/docs/guides/tools).
- **MCP Tools**: Integrations with third-party systems via custom MCP servers or
predefined connectors such as Google Drive and Notion. Learn more about
predefined connectors such as Google Drive and SharePoint. Learn more about
[MCP Tools](https://platform.openai.com/docs/guides/tools-connectors-mcp).
- **Function calls (custom tools)**: Functions that are defined by you, enabling
the model to call your own code with strongly typed arguments and outputs.
Expand Down Expand Up @@ -1700,7 +1700,7 @@ async def create(
Learn more about
[built-in tools](https://platform.openai.com/docs/guides/tools).
- **MCP Tools**: Integrations with third-party systems via custom MCP servers or
predefined connectors such as Google Drive and Notion. Learn more about
predefined connectors such as Google Drive and SharePoint. Learn more about
[MCP Tools](https://platform.openai.com/docs/guides/tools-connectors-mcp).
- **Function calls (custom tools)**: Functions that are defined by you, enabling
the model to call your own code with strongly typed arguments and outputs.
Expand Down Expand Up @@ -1939,7 +1939,7 @@ async def create(
Learn more about
[built-in tools](https://platform.openai.com/docs/guides/tools).
- **MCP Tools**: Integrations with third-party systems via custom MCP servers or
predefined connectors such as Google Drive and Notion. Learn more about
predefined connectors such as Google Drive and SharePoint. Learn more about
[MCP Tools](https://platform.openai.com/docs/guides/tools-connectors-mcp).
- **Function calls (custom tools)**: Functions that are defined by you, enabling
the model to call your own code with strongly typed arguments and outputs.
Expand Down Expand Up @@ -2178,7 +2178,7 @@ async def create(
Learn more about
[built-in tools](https://platform.openai.com/docs/guides/tools).
- **MCP Tools**: Integrations with third-party systems via custom MCP servers or
predefined connectors such as Google Drive and Notion. Learn more about
predefined connectors such as Google Drive and SharePoint. Learn more about
[MCP Tools](https://platform.openai.com/docs/guides/tools-connectors-mcp).
- **Function calls (custom tools)**: Functions that are defined by you, enabling
the model to call your own code with strongly typed arguments and outputs.
Expand Down
2 changes: 2 additions & 0 deletions src/openai/types/eval_create_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
from .graders.string_check_grader_param import StringCheckGraderParam
from .responses.response_input_text_param import ResponseInputTextParam
from .graders.text_similarity_grader_param import TextSimilarityGraderParam
from .responses.response_input_audio_param import ResponseInputAudioParam

__all__ = [
"EvalCreateParams",
Expand Down Expand Up @@ -130,6 +131,7 @@ class TestingCriterionLabelModelInputEvalItemContentInputImage(TypedDict, total=
ResponseInputTextParam,
TestingCriterionLabelModelInputEvalItemContentOutputText,
TestingCriterionLabelModelInputEvalItemContentInputImage,
ResponseInputAudioParam,
Iterable[object],
]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
from ..shared.response_format_text import ResponseFormatText
from ..responses.easy_input_message import EasyInputMessage
from ..responses.response_input_text import ResponseInputText
from ..responses.response_input_audio import ResponseInputAudio
from ..chat.chat_completion_function_tool import ChatCompletionFunctionTool
from ..shared.response_format_json_object import ResponseFormatJSONObject
from ..shared.response_format_json_schema import ResponseFormatJSONSchema
Expand Down Expand Up @@ -114,6 +115,7 @@ class InputMessagesTemplateTemplateEvalItemContentInputImage(BaseModel):
ResponseInputText,
InputMessagesTemplateTemplateEvalItemContentOutputText,
InputMessagesTemplateTemplateEvalItemContentInputImage,
ResponseInputAudio,
List[object],
]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
from ..responses.easy_input_message_param import EasyInputMessageParam
from ..shared_params.response_format_text import ResponseFormatText
from ..responses.response_input_text_param import ResponseInputTextParam
from ..responses.response_input_audio_param import ResponseInputAudioParam
from ..chat.chat_completion_function_tool_param import ChatCompletionFunctionToolParam
from ..shared_params.response_format_json_object import ResponseFormatJSONObject
from ..shared_params.response_format_json_schema import ResponseFormatJSONSchema
Expand Down Expand Up @@ -112,6 +113,7 @@ class InputMessagesTemplateTemplateEvalItemContentInputImage(TypedDict, total=Fa
ResponseInputTextParam,
InputMessagesTemplateTemplateEvalItemContentOutputText,
InputMessagesTemplateTemplateEvalItemContentInputImage,
ResponseInputAudioParam,
Iterable[object],
]

Expand Down
2 changes: 2 additions & 0 deletions src/openai/types/evals/run_cancel_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
from ..shared.metadata import Metadata
from ..shared.reasoning_effort import ReasoningEffort
from ..responses.response_input_text import ResponseInputText
from ..responses.response_input_audio import ResponseInputAudio
from .create_eval_jsonl_run_data_source import CreateEvalJSONLRunDataSource
from ..responses.response_format_text_config import ResponseFormatTextConfig
from .create_eval_completions_run_data_source import CreateEvalCompletionsRunDataSource
Expand Down Expand Up @@ -158,6 +159,7 @@ class DataSourceResponsesInputMessagesTemplateTemplateEvalItemContentInputImage(
ResponseInputText,
DataSourceResponsesInputMessagesTemplateTemplateEvalItemContentOutputText,
DataSourceResponsesInputMessagesTemplateTemplateEvalItemContentInputImage,
ResponseInputAudio,
List[object],
]

Expand Down
2 changes: 2 additions & 0 deletions src/openai/types/evals/run_create_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
from ..shared_params.metadata import Metadata
from ..shared.reasoning_effort import ReasoningEffort
from ..responses.response_input_text_param import ResponseInputTextParam
from ..responses.response_input_audio_param import ResponseInputAudioParam
from .create_eval_jsonl_run_data_source_param import CreateEvalJSONLRunDataSourceParam
from ..responses.response_format_text_config_param import ResponseFormatTextConfigParam
from .create_eval_completions_run_data_source_param import CreateEvalCompletionsRunDataSourceParam
Expand Down Expand Up @@ -176,6 +177,7 @@ class DataSourceCreateEvalResponsesRunDataSourceInputMessagesTemplateTemplateEva
ResponseInputTextParam,
DataSourceCreateEvalResponsesRunDataSourceInputMessagesTemplateTemplateEvalItemContentOutputText,
DataSourceCreateEvalResponsesRunDataSourceInputMessagesTemplateTemplateEvalItemContentInputImage,
ResponseInputAudioParam,
Iterable[object],
]

Expand Down
2 changes: 2 additions & 0 deletions src/openai/types/evals/run_create_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
from ..shared.metadata import Metadata
from ..shared.reasoning_effort import ReasoningEffort
from ..responses.response_input_text import ResponseInputText
from ..responses.response_input_audio import ResponseInputAudio
from .create_eval_jsonl_run_data_source import CreateEvalJSONLRunDataSource
from ..responses.response_format_text_config import ResponseFormatTextConfig
from .create_eval_completions_run_data_source import CreateEvalCompletionsRunDataSource
Expand Down Expand Up @@ -158,6 +159,7 @@ class DataSourceResponsesInputMessagesTemplateTemplateEvalItemContentInputImage(
ResponseInputText,
DataSourceResponsesInputMessagesTemplateTemplateEvalItemContentOutputText,
DataSourceResponsesInputMessagesTemplateTemplateEvalItemContentInputImage,
ResponseInputAudio,
List[object],
]

Expand Down
2 changes: 2 additions & 0 deletions src/openai/types/evals/run_list_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
from ..shared.metadata import Metadata
from ..shared.reasoning_effort import ReasoningEffort
from ..responses.response_input_text import ResponseInputText
from ..responses.response_input_audio import ResponseInputAudio
from .create_eval_jsonl_run_data_source import CreateEvalJSONLRunDataSource
from ..responses.response_format_text_config import ResponseFormatTextConfig
from .create_eval_completions_run_data_source import CreateEvalCompletionsRunDataSource
Expand Down Expand Up @@ -158,6 +159,7 @@ class DataSourceResponsesInputMessagesTemplateTemplateEvalItemContentInputImage(
ResponseInputText,
DataSourceResponsesInputMessagesTemplateTemplateEvalItemContentOutputText,
DataSourceResponsesInputMessagesTemplateTemplateEvalItemContentInputImage,
ResponseInputAudio,
List[object],
]

Expand Down
2 changes: 2 additions & 0 deletions src/openai/types/evals/run_retrieve_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
from ..shared.metadata import Metadata
from ..shared.reasoning_effort import ReasoningEffort
from ..responses.response_input_text import ResponseInputText
from ..responses.response_input_audio import ResponseInputAudio
from .create_eval_jsonl_run_data_source import CreateEvalJSONLRunDataSource
from ..responses.response_format_text_config import ResponseFormatTextConfig
from .create_eval_completions_run_data_source import CreateEvalCompletionsRunDataSource
Expand Down Expand Up @@ -158,6 +159,7 @@ class DataSourceResponsesInputMessagesTemplateTemplateEvalItemContentInputImage(
ResponseInputText,
DataSourceResponsesInputMessagesTemplateTemplateEvalItemContentOutputText,
DataSourceResponsesInputMessagesTemplateTemplateEvalItemContentInputImage,
ResponseInputAudio,
List[object],
]

Expand Down
5 changes: 4 additions & 1 deletion src/openai/types/graders/label_model_grader.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

from ..._models import BaseModel
from ..responses.response_input_text import ResponseInputText
from ..responses.response_input_audio import ResponseInputAudio

__all__ = ["LabelModelGrader", "Input", "InputContent", "InputContentOutputText", "InputContentInputImage"]

Expand All @@ -31,7 +32,9 @@ class InputContentInputImage(BaseModel):
"""


InputContent: TypeAlias = Union[str, ResponseInputText, InputContentOutputText, InputContentInputImage, List[object]]
InputContent: TypeAlias = Union[
str, ResponseInputText, InputContentOutputText, InputContentInputImage, ResponseInputAudio, List[object]
]


class Input(BaseModel):
Expand Down
8 changes: 7 additions & 1 deletion src/openai/types/graders/label_model_grader_param.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

from ..._types import SequenceNotStr
from ..responses.response_input_text_param import ResponseInputTextParam
from ..responses.response_input_audio_param import ResponseInputAudioParam

__all__ = ["LabelModelGraderParam", "Input", "InputContent", "InputContentOutputText", "InputContentInputImage"]

Expand Down Expand Up @@ -34,7 +35,12 @@ class InputContentInputImage(TypedDict, total=False):


InputContent: TypeAlias = Union[
str, ResponseInputTextParam, InputContentOutputText, InputContentInputImage, Iterable[object]
str,
ResponseInputTextParam,
InputContentOutputText,
InputContentInputImage,
ResponseInputAudioParam,
Iterable[object],
]


Expand Down
5 changes: 4 additions & 1 deletion src/openai/types/graders/score_model_grader.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

from ..._models import BaseModel
from ..responses.response_input_text import ResponseInputText
from ..responses.response_input_audio import ResponseInputAudio

__all__ = ["ScoreModelGrader", "Input", "InputContent", "InputContentOutputText", "InputContentInputImage"]

Expand All @@ -31,7 +32,9 @@ class InputContentInputImage(BaseModel):
"""


InputContent: TypeAlias = Union[str, ResponseInputText, InputContentOutputText, InputContentInputImage, List[object]]
InputContent: TypeAlias = Union[
str, ResponseInputText, InputContentOutputText, InputContentInputImage, ResponseInputAudio, List[object]
]


class Input(BaseModel):
Expand Down
8 changes: 7 additions & 1 deletion src/openai/types/graders/score_model_grader_param.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from typing_extensions import Literal, Required, TypeAlias, TypedDict

from ..responses.response_input_text_param import ResponseInputTextParam
from ..responses.response_input_audio_param import ResponseInputAudioParam

__all__ = ["ScoreModelGraderParam", "Input", "InputContent", "InputContentOutputText", "InputContentInputImage"]

Expand Down Expand Up @@ -33,7 +34,12 @@ class InputContentInputImage(TypedDict, total=False):


InputContent: TypeAlias = Union[
str, ResponseInputTextParam, InputContentOutputText, InputContentInputImage, Iterable[object]
str,
ResponseInputTextParam,
InputContentOutputText,
InputContentInputImage,
ResponseInputAudioParam,
Iterable[object],
]


Expand Down
2 changes: 2 additions & 0 deletions src/openai/types/responses/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
from .tool_choice_allowed import ToolChoiceAllowed as ToolChoiceAllowed
from .tool_choice_options import ToolChoiceOptions as ToolChoiceOptions
from .response_error_event import ResponseErrorEvent as ResponseErrorEvent
from .response_input_audio import ResponseInputAudio as ResponseInputAudio
from .response_input_image import ResponseInputImage as ResponseInputImage
from .response_input_param import ResponseInputParam as ResponseInputParam
from .response_output_item import ResponseOutputItem as ResponseOutputItem
Expand Down Expand Up @@ -75,6 +76,7 @@
from .tool_choice_allowed_param import ToolChoiceAllowedParam as ToolChoiceAllowedParam
from .response_audio_delta_event import ResponseAudioDeltaEvent as ResponseAudioDeltaEvent
from .response_in_progress_event import ResponseInProgressEvent as ResponseInProgressEvent
from .response_input_audio_param import ResponseInputAudioParam as ResponseInputAudioParam
from .response_input_image_param import ResponseInputImageParam as ResponseInputImageParam
from .response_output_text_param import ResponseOutputTextParam as ResponseOutputTextParam
from .response_text_config_param import ResponseTextConfigParam as ResponseTextConfigParam
Expand Down
2 changes: 1 addition & 1 deletion src/openai/types/responses/response.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ class Response(BaseModel):
Learn more about
[built-in tools](https://platform.openai.com/docs/guides/tools).
- **MCP Tools**: Integrations with third-party systems via custom MCP servers or
predefined connectors such as Google Drive and Notion. Learn more about
predefined connectors such as Google Drive and SharePoint. Learn more about
[MCP Tools](https://platform.openai.com/docs/guides/tools-connectors-mcp).
- **Function calls (custom tools)**: Functions that are defined by you, enabling
the model to call your own code with strongly typed arguments and outputs.
Expand Down
2 changes: 1 addition & 1 deletion src/openai/types/responses/response_create_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ class ResponseCreateParamsBase(TypedDict, total=False):
Learn more about
[built-in tools](https://platform.openai.com/docs/guides/tools).
- **MCP Tools**: Integrations with third-party systems via custom MCP servers or
predefined connectors such as Google Drive and Notion. Learn more about
predefined connectors such as Google Drive and SharePoint. Learn more about
[MCP Tools](https://platform.openai.com/docs/guides/tools-connectors-mcp).
- **Function calls (custom tools)**: Functions that are defined by you, enabling
the model to call your own code with strongly typed arguments and outputs.
Expand Down
22 changes: 22 additions & 0 deletions src/openai/types/responses/response_input_audio.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from typing_extensions import Literal

from ..._models import BaseModel

__all__ = ["ResponseInputAudio", "InputAudio"]


class InputAudio(BaseModel):
data: str
"""Base64-encoded audio data."""

format: Literal["mp3", "wav"]
"""The format of the audio data. Currently supported formats are `mp3` and `wav`."""


class ResponseInputAudio(BaseModel):
input_audio: InputAudio

type: Literal["input_audio"]
"""The type of the input item. Always `input_audio`."""
22 changes: 22 additions & 0 deletions src/openai/types/responses/response_input_audio_param.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from __future__ import annotations

from typing_extensions import Literal, Required, TypedDict

__all__ = ["ResponseInputAudioParam", "InputAudio"]


class InputAudio(TypedDict, total=False):
data: Required[str]
"""Base64-encoded audio data."""

format: Required[Literal["mp3", "wav"]]
"""The format of the audio data. Currently supported formats are `mp3` and `wav`."""


class ResponseInputAudioParam(TypedDict, total=False):
input_audio: Required[InputAudio]

type: Required[Literal["input_audio"]]
"""The type of the input item. Always `input_audio`."""
4 changes: 3 additions & 1 deletion src/openai/types/responses/response_input_content.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,12 @@
from ..._utils import PropertyInfo
from .response_input_file import ResponseInputFile
from .response_input_text import ResponseInputText
from .response_input_audio import ResponseInputAudio
from .response_input_image import ResponseInputImage

__all__ = ["ResponseInputContent"]

ResponseInputContent: TypeAlias = Annotated[
Union[ResponseInputText, ResponseInputImage, ResponseInputFile], PropertyInfo(discriminator="type")
Union[ResponseInputText, ResponseInputImage, ResponseInputFile, ResponseInputAudio],
PropertyInfo(discriminator="type"),
]
Loading