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 @@
{
".": "2.14.0"
".": "2.15.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: 137
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-75926226b642ebb2cb415694da9dff35e8ab40145ac1b791cefb82a83809db4d.yml
openapi_spec_hash: 6a0e391b0ba5747b6b4a3e5fe21de4da
config_hash: adcf23ecf5f84d3cadf1d71e82ec636a
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-9442fa9212dd61aac2bb0edd19744bee381e75888712f9098bc6ebb92c52b557.yml
openapi_spec_hash: f87823d164b7a8f72a42eba04e482a99
config_hash: ad7136f7366fddec432ec378939e58a7
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# Changelog

## 2.15.0 (2026-01-09)

Full Changelog: [v2.14.0...v2.15.0](https://github.com/openai/openai-python/compare/v2.14.0...v2.15.0)

### Features

* **api:** add new Response completed_at prop ([f077752](https://github.com/openai/openai-python/commit/f077752f4a8364a74f784f8fb1cbe31277e1762b))


### Chores

* **internal:** codegen related update ([e7daba6](https://github.com/openai/openai-python/commit/e7daba6662a3c30f73d991e96cb19d2b54d772e0))

## 2.14.0 (2025-12-19)

Full Changelog: [v2.13.0...v2.14.0](https://github.com/openai/openai-python/compare/v2.13.0...v2.14.0)
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright 2025 OpenAI
Copyright 2026 OpenAI

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
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 = "2.14.0"
version = "2.15.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__ = "2.14.0" # x-release-please-version
__version__ = "2.15.0" # x-release-please-version
14 changes: 8 additions & 6 deletions src/openai/resources/audio/speech.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,10 @@ def create(
One of the available [TTS models](https://platform.openai.com/docs/models#tts):
`tts-1`, `tts-1-hd`, `gpt-4o-mini-tts`, or `gpt-4o-mini-tts-2025-12-15`.

voice: The voice to use when generating the audio. Supported voices are `alloy`, `ash`,
`ballad`, `coral`, `echo`, `fable`, `onyx`, `nova`, `sage`, `shimmer`, and
`verse`. Previews of the voices are available in the
voice: The voice to use when generating the audio. Supported built-in voices are
`alloy`, `ash`, `ballad`, `coral`, `echo`, `fable`, `onyx`, `nova`, `sage`,
`shimmer`, `verse`, `marin`, and `cedar`. Previews of the voices are available
in the
[Text to speech guide](https://platform.openai.com/docs/guides/text-to-speech#voice-options).

instructions: Control the voice of your generated audio with additional instructions. Does not
Expand Down Expand Up @@ -170,9 +171,10 @@ async def create(
One of the available [TTS models](https://platform.openai.com/docs/models#tts):
`tts-1`, `tts-1-hd`, `gpt-4o-mini-tts`, or `gpt-4o-mini-tts-2025-12-15`.

voice: The voice to use when generating the audio. Supported voices are `alloy`, `ash`,
`ballad`, `coral`, `echo`, `fable`, `onyx`, `nova`, `sage`, `shimmer`, and
`verse`. Previews of the voices are available in the
voice: The voice to use when generating the audio. Supported built-in voices are
`alloy`, `ash`, `ballad`, `coral`, `echo`, `fable`, `onyx`, `nova`, `sage`,
`shimmer`, `verse`, `marin`, and `cedar`. Previews of the voices are available
in the
[Text to speech guide](https://platform.openai.com/docs/guides/text-to-speech#voice-options).

instructions: Control the voice of your generated audio with additional instructions. Does not
Expand Down
18 changes: 12 additions & 6 deletions src/openai/resources/images.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,8 @@ def edit(
"""Creates an edited or extended image given one or more source images and a
prompt.

This endpoint only supports `gpt-image-1` and `dall-e-2`.
This endpoint supports GPT Image models (`gpt-image-1.5`, `gpt-image-1`,
and `gpt-image-1-mini`) and `dall-e-2`.

Args:
image: The image(s) to edit. Must be a supported image file or an array of images.
Expand Down Expand Up @@ -260,7 +261,8 @@ def edit(
"""Creates an edited or extended image given one or more source images and a
prompt.

This endpoint only supports `gpt-image-1` and `dall-e-2`.
This endpoint supports GPT Image models (`gpt-image-1.5`, `gpt-image-1`,
and `gpt-image-1-mini`) and `dall-e-2`.

Args:
image: The image(s) to edit. Must be a supported image file or an array of images.
Expand Down Expand Up @@ -374,7 +376,8 @@ def edit(
"""Creates an edited or extended image given one or more source images and a
prompt.

This endpoint only supports `gpt-image-1` and `dall-e-2`.
This endpoint supports GPT Image models (`gpt-image-1.5`, `gpt-image-1`,
and `gpt-image-1-mini`) and `dall-e-2`.

Args:
image: The image(s) to edit. Must be a supported image file or an array of images.
Expand Down Expand Up @@ -1039,7 +1042,8 @@ async def edit(
"""Creates an edited or extended image given one or more source images and a
prompt.

This endpoint only supports `gpt-image-1` and `dall-e-2`.
This endpoint supports GPT Image models (`gpt-image-1.5`, `gpt-image-1`,
and `gpt-image-1-mini`) and `dall-e-2`.

Args:
image: The image(s) to edit. Must be a supported image file or an array of images.
Expand Down Expand Up @@ -1153,7 +1157,8 @@ async def edit(
"""Creates an edited or extended image given one or more source images and a
prompt.

This endpoint only supports `gpt-image-1` and `dall-e-2`.
This endpoint supports GPT Image models (`gpt-image-1.5`, `gpt-image-1`,
and `gpt-image-1-mini`) and `dall-e-2`.

Args:
image: The image(s) to edit. Must be a supported image file or an array of images.
Expand Down Expand Up @@ -1267,7 +1272,8 @@ async def edit(
"""Creates an edited or extended image given one or more source images and a
prompt.

This endpoint only supports `gpt-image-1` and `dall-e-2`.
This endpoint supports GPT Image models (`gpt-image-1.5`, `gpt-image-1`,
and `gpt-image-1-mini`) and `dall-e-2`.

Args:
image: The image(s) to edit. Must be a supported image file or an array of images.
Expand Down
8 changes: 2 additions & 6 deletions src/openai/resources/responses/input_tokens.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,7 @@ def count(
- [Text inputs and outputs](https://platform.openai.com/docs/guides/text)
- [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs)

tool_choice: How the model should select which tool (or tools) to use when generating a
response. See the `tools` parameter to see how to specify which tools the model
can call.
tool_choice: Controls which tool the model should use, if any.

tools: An array of tools the model may call while generating a response. You can
specify which tool to use by setting the `tool_choice` parameter.
Expand Down Expand Up @@ -227,9 +225,7 @@ async def count(
- [Text inputs and outputs](https://platform.openai.com/docs/guides/text)
- [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs)

tool_choice: How the model should select which tool (or tools) to use when generating a
response. See the `tools` parameter to see how to specify which tools the model
can call.
tool_choice: Controls which tool the model should use, if any.

tools: An array of tools the model may call while generating a response. You can
specify which tool to use by setting the `tool_choice` parameter.
Expand Down
6 changes: 3 additions & 3 deletions src/openai/types/audio/speech_create_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ class SpeechCreateParams(TypedDict, total=False):
]
"""The voice to use when generating the audio.

Supported voices are `alloy`, `ash`, `ballad`, `coral`, `echo`, `fable`, `onyx`,
`nova`, `sage`, `shimmer`, and `verse`. Previews of the voices are available in
the
Supported built-in voices are `alloy`, `ash`, `ballad`, `coral`, `echo`,
`fable`, `onyx`, `nova`, `sage`, `shimmer`, `verse`, `marin`, and `cedar`.
Previews of the voices are available in the
[Text to speech guide](https://platform.openai.com/docs/guides/text-to-speech#voice-options).
"""

Expand Down
4 changes: 2 additions & 2 deletions src/openai/types/chat/chat_completion_audio_param.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@ class ChatCompletionAudioParam(TypedDict, total=False):
]
"""The voice the model uses to respond.

Supported voices are `alloy`, `ash`, `ballad`, `coral`, `echo`, `fable`, `nova`,
`onyx`, `sage`, and `shimmer`.
Supported built-in voices are `alloy`, `ash`, `ballad`, `coral`, `echo`,
`fable`, `nova`, `onyx`, `sage`, `shimmer`, `marin`, and `cedar`.
"""
6 changes: 3 additions & 3 deletions src/openai/types/realtime/realtime_audio_config_output.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ class RealtimeAudioConfigOutput(BaseModel):
] = None
"""The voice the model uses to respond.

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`, `verse`, `marin`, and `cedar`. We recommend
Supported built-in voices are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,
`shimmer`, `verse`, `marin`, and `cedar`. Voice cannot be changed during the
session once the model has responded with audio at least once. We recommend
`marin` and `cedar` for best quality.
"""
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ class RealtimeAudioConfigOutputParam(TypedDict, total=False):
voice: Union[str, Literal["alloy", "ash", "ballad", "coral", "echo", "sage", "shimmer", "verse", "marin", "cedar"]]
"""The voice the model uses to respond.

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`, `verse`, `marin`, and `cedar`. We recommend
Supported built-in voices are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,
`shimmer`, `verse`, `marin`, and `cedar`. Voice cannot be changed during the
session once the model has responded with audio at least once. We recommend
`marin` and `cedar` for best quality.
"""
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,9 @@ class Output(BaseModel):
] = None
"""The voice the model uses to respond.

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`, `verse`, `marin`, and `cedar`. We recommend
`marin` and `cedar` for best quality.
Supported built-in voices are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,
`shimmer`, `verse`, `marin`, and `cedar`. Voice cannot be changed during the
session once the model has responded with audio at least once.
"""


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,9 @@ class Output(TypedDict, total=False):
voice: Union[str, Literal["alloy", "ash", "ballad", "coral", "echo", "sage", "shimmer", "verse", "marin", "cedar"]]
"""The voice the model uses to respond.

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`, `verse`, `marin`, and `cedar`. We recommend
`marin` and `cedar` for best quality.
Supported built-in voices are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,
`shimmer`, `verse`, `marin`, and `cedar`. Voice cannot be changed during the
session once the model has responded with audio at least once.
"""


Expand Down
6 changes: 1 addition & 5 deletions src/openai/types/responses/input_token_count_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,7 @@ class InputTokenCountParams(TypedDict, total=False):
"""

tool_choice: Optional[ToolChoice]
"""
How the model should select which tool (or tools) to use when generating a
response. See the `tools` parameter to see how to specify which tools the model
can call.
"""
"""Controls which tool the model should use, if any."""

tools: Optional[Iterable[ToolParam]]
"""An array of tools the model may call while generating a response.
Expand Down
16 changes: 11 additions & 5 deletions src/openai/types/responses/response.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,13 @@ class IncompleteDetails(BaseModel):


class Conversation(BaseModel):
"""The conversation that this response belongs to.
"""The conversation that this response belonged to.

Input items and output items from this response are automatically added to this conversation.
Input items and output items from this response were automatically added to this conversation.
"""

id: str
"""The unique ID of the conversation."""
"""The unique ID of the conversation that this response was associated with."""


class Response(BaseModel):
Expand Down Expand Up @@ -165,10 +165,16 @@ class Response(BaseModel):
[Learn more](https://platform.openai.com/docs/guides/background).
"""

completed_at: Optional[float] = None
"""
Unix timestamp (in seconds) of when this Response was completed. Only present
when the status is `completed`.
"""

conversation: Optional[Conversation] = None
"""The conversation that this response belongs to.
"""The conversation that this response belonged to.

Input items and output items from this response are automatically added to this
Input items and output items from this response were automatically added to this
conversation.
"""

Expand Down
2 changes: 2 additions & 0 deletions src/openai/types/responses/response_compaction_item.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,10 @@ class ResponseCompactionItem(BaseModel):
"""The unique ID of the compaction item."""

encrypted_content: str
"""The encrypted content that was produced by compaction."""

type: Literal["compaction"]
"""The type of the item. Always `compaction`."""

created_by: Optional[str] = None
"""The identifier of the actor that created the item."""
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ class ResponseCompactionItemParam(BaseModel):
"""

encrypted_content: str
"""The encrypted content of the compaction summary."""

type: Literal["compaction"]
"""The type of the item. Always `compaction`."""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ class ResponseCompactionItemParamParam(TypedDict, total=False):
"""

encrypted_content: Required[str]
"""The encrypted content of the compaction summary."""

type: Required[Literal["compaction"]]
"""The type of the item. Always `compaction`."""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class OutputOutcomeExit(BaseModel):


class Output(BaseModel):
"""The content of a shell call output."""
"""The content of a shell tool call output that was emitted."""

outcome: OutputOutcome
"""
Expand All @@ -45,14 +45,17 @@ class Output(BaseModel):
"""

stderr: str
"""The standard error output that was captured."""

stdout: str
"""The standard output that was captured."""

created_by: Optional[str] = None
"""The identifier of the actor that created the item."""


class ResponseFunctionShellToolCallOutput(BaseModel):
"""The output of a shell tool call."""
"""The output of a shell tool call that was emitted."""

id: str
"""The unique ID of the shell call output.
Expand All @@ -76,3 +79,4 @@ class ResponseFunctionShellToolCallOutput(BaseModel):
"""The type of the shell call output. Always `shell_call_output`."""

created_by: Optional[str] = None
"""The identifier of the actor that created the item."""
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,14 @@ class ActionSearch(BaseModel):
"""Action type "search" - Performs a web search query."""

query: str
"""The search query."""
"""[DEPRECATED] The search query."""

type: Literal["search"]
"""The action type."""

queries: Optional[List[str]] = None
"""The search queries."""

sources: Optional[List[ActionSearchSource]] = None
"""The sources used in the search."""

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
from typing import Union, Iterable
from typing_extensions import Literal, Required, TypeAlias, TypedDict

from ..._types import SequenceNotStr

__all__ = [
"ResponseFunctionWebSearchParam",
"Action",
Expand All @@ -29,11 +31,14 @@ class ActionSearch(TypedDict, total=False):
"""Action type "search" - Performs a web search query."""

query: Required[str]
"""The search query."""
"""[DEPRECATED] The search query."""

type: Required[Literal["search"]]
"""The action type."""

queries: SequenceNotStr[str]
"""The search queries."""

sources: Iterable[ActionSearchSource]
"""The sources used in the search."""

Expand Down
1 change: 1 addition & 0 deletions src/openai/types/responses/tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@ class CodeInterpreterContainerCodeInterpreterToolAuto(BaseModel):
"""An optional list of uploaded files to make available to your code."""

memory_limit: Optional[Literal["1g", "4g", "16g", "64g"]] = None
"""The memory limit for the code interpreter container."""


CodeInterpreterContainer: TypeAlias = Union[str, CodeInterpreterContainerCodeInterpreterToolAuto]
Expand Down
Loading