Skip to content

release: 1.80.0 #2367

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
May 21, 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.79.0"
".": "1.80.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: 101
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-262e171d0a8150ea1192474d16ba3afdf9a054b399f1a49a9c9b697a3073c136.yml
openapi_spec_hash: 33e00a48df8f94c94f46290c489f132b
config_hash: d8d5fda350f6db77c784f35429741a2e
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-a5651cb97f86d1e2531af6aef8c5230f1ea350560fbae790ca2e481b30a6c217.yml
openapi_spec_hash: 66a5104fd3bb43383cf919225df7a6fd
config_hash: bb657c3fed232a56930035de3aaed936
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# Changelog

## 1.80.0 (2025-05-21)

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

### Features

* **api:** new API tools ([d36ae52](https://github.com/openai/openai-python/commit/d36ae528d55fe87067c4b8c6b2c947cbad5e5002))


### Chores

* **docs:** grammar improvements ([e746145](https://github.com/openai/openai-python/commit/e746145a12b5335d8841aff95c91bbbde8bae8e3))

## 1.79.0 (2025-05-16)

Full Changelog: [v1.78.1...v1.79.0](https://github.com/openai/openai-python/compare/v1.78.1...v1.79.0)
Expand Down
4 changes: 2 additions & 2 deletions SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ before making any information public.
## Reporting Non-SDK Related Security Issues

If you encounter security issues that are not directly related to SDKs but pertain to the services
or products provided by OpenAI please follow the respective company's security reporting guidelines.
or products provided by OpenAI, please follow the respective company's security reporting guidelines.

### OpenAI Terms and Policies

Our Security Policy can be found at [Security Policy URL](https://openai.com/policies/coordinated-vulnerability-disclosure-policy).

Please contact disclosure@openai.com for any questions or concerns regarding security of our services.
Please contact disclosure@openai.com for any questions or concerns regarding the security of our services.

---

Expand Down
18 changes: 18 additions & 0 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -717,6 +717,10 @@ from openai.types.responses import (
ResponseFunctionToolCallItem,
ResponseFunctionToolCallOutputItem,
ResponseFunctionWebSearch,
ResponseImageGenCallCompletedEvent,
ResponseImageGenCallGeneratingEvent,
ResponseImageGenCallInProgressEvent,
ResponseImageGenCallPartialImageEvent,
ResponseInProgressEvent,
ResponseIncludable,
ResponseIncompleteEvent,
Expand All @@ -730,14 +734,28 @@ from openai.types.responses import (
ResponseInputMessageItem,
ResponseInputText,
ResponseItem,
ResponseMcpCallArgumentsDeltaEvent,
ResponseMcpCallArgumentsDoneEvent,
ResponseMcpCallCompletedEvent,
ResponseMcpCallFailedEvent,
ResponseMcpCallInProgressEvent,
ResponseMcpListToolsCompletedEvent,
ResponseMcpListToolsFailedEvent,
ResponseMcpListToolsInProgressEvent,
ResponseOutputAudio,
ResponseOutputItem,
ResponseOutputItemAddedEvent,
ResponseOutputItemDoneEvent,
ResponseOutputMessage,
ResponseOutputRefusal,
ResponseOutputText,
ResponseOutputTextAnnotationAddedEvent,
ResponseQueuedEvent,
ResponseReasoningDeltaEvent,
ResponseReasoningDoneEvent,
ResponseReasoningItem,
ResponseReasoningSummaryDeltaEvent,
ResponseReasoningSummaryDoneEvent,
ResponseReasoningSummaryPartAddedEvent,
ResponseReasoningSummaryPartDoneEvent,
ResponseReasoningSummaryTextDeltaEvent,
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.79.0"
version = "1.80.0"
description = "The official Python library for the openai API"
dynamic = ["readme"]
license = "Apache-2.0"
Expand Down
4 changes: 2 additions & 2 deletions src/openai/_streaming.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def __stream__(self) -> Iterator[_T]:
if sse.data.startswith("[DONE]"):
break

if sse.event is None or sse.event.startswith("response.") or sse.event.startswith('transcript.'):
if sse.event is None or sse.event.startswith("response.") or sse.event.startswith("transcript."):
data = sse.json()
if is_mapping(data) and data.get("error"):
message = None
Expand Down Expand Up @@ -161,7 +161,7 @@ async def __stream__(self) -> AsyncIterator[_T]:
if sse.data.startswith("[DONE]"):
break

if sse.event is None or sse.event.startswith("response.") or sse.event.startswith('transcript.'):
if sse.event is None or sse.event.startswith("response.") or sse.event.startswith("transcript."):
data = sse.json()
if is_mapping(data) and data.get("error"):
message = None
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.79.0" # x-release-please-version
__version__ = "1.80.0" # x-release-please-version
2 changes: 1 addition & 1 deletion src/openai/helpers/local_audio_player.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ async def play(
if input.dtype == np.int16 and self.dtype == np.float32:
audio_content = (input.astype(np.float32) / 32767.0).reshape(-1, self.channels)
elif input.dtype == np.float32:
audio_content = cast('npt.NDArray[np.float32]', input)
audio_content = cast("npt.NDArray[np.float32]", input)
else:
raise ValueError(f"Unsupported dtype: {input.dtype}")
else:
Expand Down
7 changes: 7 additions & 0 deletions src/openai/lib/_parsing/_responses.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,13 @@ def parse_response(
or output.type == "file_search_call"
or output.type == "web_search_call"
or output.type == "reasoning"
or output.type == "mcp_call"
or output.type == "mcp_approval_request"
or output.type == "image_generation_call"
or output.type == "code_interpreter_call"
or output.type == "local_shell_call"
or output.type == "mcp_list_tools"
or output.type == 'exec'
):
output_list.append(output)
elif TYPE_CHECKING: # type: ignore
Expand Down
36 changes: 36 additions & 0 deletions src/openai/lib/streaming/responses/_events.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
ParsedResponse,
ResponseErrorEvent,
ResponseFailedEvent,
ResponseQueuedEvent,
ResponseCreatedEvent,
ResponseTextDoneEvent as RawResponseTextDoneEvent,
ResponseAudioDoneEvent,
Expand All @@ -19,22 +20,39 @@
ResponseInProgressEvent,
ResponseRefusalDoneEvent,
ResponseRefusalDeltaEvent,
ResponseMcpCallFailedEvent,
ResponseReasoningDoneEvent,
ResponseOutputItemDoneEvent,
ResponseReasoningDeltaEvent,
ResponseContentPartDoneEvent,
ResponseOutputItemAddedEvent,
ResponseContentPartAddedEvent,
ResponseMcpCallCompletedEvent,
ResponseMcpCallInProgressEvent,
ResponseMcpListToolsFailedEvent,
ResponseAudioTranscriptDoneEvent,
ResponseTextAnnotationDeltaEvent,
ResponseAudioTranscriptDeltaEvent,
ResponseMcpCallArgumentsDoneEvent,
ResponseReasoningSummaryDoneEvent,
ResponseImageGenCallCompletedEvent,
ResponseMcpCallArgumentsDeltaEvent,
ResponseMcpListToolsCompletedEvent,
ResponseReasoningSummaryDeltaEvent,
ResponseImageGenCallGeneratingEvent,
ResponseImageGenCallInProgressEvent,
ResponseMcpListToolsInProgressEvent,
ResponseWebSearchCallCompletedEvent,
ResponseWebSearchCallSearchingEvent,
ResponseFileSearchCallCompletedEvent,
ResponseFileSearchCallSearchingEvent,
ResponseWebSearchCallInProgressEvent,
ResponseFileSearchCallInProgressEvent,
ResponseImageGenCallPartialImageEvent,
ResponseReasoningSummaryPartDoneEvent,
ResponseReasoningSummaryTextDoneEvent,
ResponseFunctionCallArgumentsDoneEvent,
ResponseOutputTextAnnotationAddedEvent,
ResponseReasoningSummaryPartAddedEvent,
ResponseReasoningSummaryTextDeltaEvent,
ResponseFunctionCallArgumentsDeltaEvent as RawResponseFunctionCallArgumentsDeltaEvent,
Expand Down Expand Up @@ -109,6 +127,24 @@ class ResponseCompletedEvent(RawResponseCompletedEvent, GenericModel, Generic[Te
ResponseReasoningSummaryPartDoneEvent,
ResponseReasoningSummaryTextDeltaEvent,
ResponseReasoningSummaryTextDoneEvent,
ResponseImageGenCallCompletedEvent,
ResponseImageGenCallInProgressEvent,
ResponseImageGenCallGeneratingEvent,
ResponseImageGenCallPartialImageEvent,
ResponseMcpCallCompletedEvent,
ResponseMcpCallArgumentsDeltaEvent,
ResponseMcpCallArgumentsDoneEvent,
ResponseMcpCallFailedEvent,
ResponseMcpCallInProgressEvent,
ResponseMcpListToolsCompletedEvent,
ResponseMcpListToolsFailedEvent,
ResponseMcpListToolsInProgressEvent,
ResponseOutputTextAnnotationAddedEvent,
ResponseQueuedEvent,
ResponseReasoningDeltaEvent,
ResponseReasoningSummaryDeltaEvent,
ResponseReasoningSummaryDoneEvent,
ResponseReasoningDoneEvent,
],
PropertyInfo(discriminator="type"),
]
2 changes: 1 addition & 1 deletion src/openai/resources/audio/transcriptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@ async def create(
extra_headers: Send extra headers

extra_query: Add additional query parameters to the request
"""
"""

@overload
async def create(
Expand Down
28 changes: 28 additions & 0 deletions src/openai/resources/responses/responses.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ def create(
*,
input: Union[str, ResponseInputParam],
model: ResponsesModel,
background: Optional[bool] | NotGiven = NOT_GIVEN,
include: Optional[List[ResponseIncludable]] | NotGiven = NOT_GIVEN,
instructions: Optional[str] | NotGiven = NOT_GIVEN,
max_output_tokens: Optional[int] | NotGiven = NOT_GIVEN,
Expand Down Expand Up @@ -132,6 +133,9 @@ def create(
[model guide](https://platform.openai.com/docs/models) to browse and compare
available models.

background: Whether to run the model response in the background.
[Learn more](https://platform.openai.com/docs/guides/background).

include: Specify additional output data to include in the model response. Currently
supported values are:

Expand Down Expand Up @@ -267,6 +271,7 @@ def create(
input: Union[str, ResponseInputParam],
model: ResponsesModel,
stream: Literal[True],
background: Optional[bool] | NotGiven = NOT_GIVEN,
include: Optional[List[ResponseIncludable]] | NotGiven = NOT_GIVEN,
instructions: Optional[str] | NotGiven = NOT_GIVEN,
max_output_tokens: Optional[int] | NotGiven = NOT_GIVEN,
Expand Down Expand Up @@ -328,6 +333,9 @@ def create(
[Streaming section below](https://platform.openai.com/docs/api-reference/responses-streaming)
for more information.

background: Whether to run the model response in the background.
[Learn more](https://platform.openai.com/docs/guides/background).

include: Specify additional output data to include in the model response. Currently
supported values are:

Expand Down Expand Up @@ -456,6 +464,7 @@ def create(
input: Union[str, ResponseInputParam],
model: ResponsesModel,
stream: bool,
background: Optional[bool] | NotGiven = NOT_GIVEN,
include: Optional[List[ResponseIncludable]] | NotGiven = NOT_GIVEN,
instructions: Optional[str] | NotGiven = NOT_GIVEN,
max_output_tokens: Optional[int] | NotGiven = NOT_GIVEN,
Expand Down Expand Up @@ -517,6 +526,9 @@ def create(
[Streaming section below](https://platform.openai.com/docs/api-reference/responses-streaming)
for more information.

background: Whether to run the model response in the background.
[Learn more](https://platform.openai.com/docs/guides/background).

include: Specify additional output data to include in the model response. Currently
supported values are:

Expand Down Expand Up @@ -644,6 +656,7 @@ def create(
*,
input: Union[str, ResponseInputParam],
model: ResponsesModel,
background: Optional[bool] | NotGiven = NOT_GIVEN,
include: Optional[List[ResponseIncludable]] | NotGiven = NOT_GIVEN,
instructions: Optional[str] | NotGiven = NOT_GIVEN,
max_output_tokens: Optional[int] | NotGiven = NOT_GIVEN,
Expand Down Expand Up @@ -674,6 +687,7 @@ def create(
{
"input": input,
"model": model,
"background": background,
"include": include,
"instructions": instructions,
"max_output_tokens": max_output_tokens,
Expand Down Expand Up @@ -965,6 +979,7 @@ async def create(
*,
input: Union[str, ResponseInputParam],
model: ResponsesModel,
background: Optional[bool] | NotGiven = NOT_GIVEN,
include: Optional[List[ResponseIncludable]] | NotGiven = NOT_GIVEN,
instructions: Optional[str] | NotGiven = NOT_GIVEN,
max_output_tokens: Optional[int] | NotGiven = NOT_GIVEN,
Expand Down Expand Up @@ -1020,6 +1035,9 @@ async def create(
[model guide](https://platform.openai.com/docs/models) to browse and compare
available models.

background: Whether to run the model response in the background.
[Learn more](https://platform.openai.com/docs/guides/background).

include: Specify additional output data to include in the model response. Currently
supported values are:

Expand Down Expand Up @@ -1155,6 +1173,7 @@ async def create(
input: Union[str, ResponseInputParam],
model: ResponsesModel,
stream: Literal[True],
background: Optional[bool] | NotGiven = NOT_GIVEN,
include: Optional[List[ResponseIncludable]] | NotGiven = NOT_GIVEN,
instructions: Optional[str] | NotGiven = NOT_GIVEN,
max_output_tokens: Optional[int] | NotGiven = NOT_GIVEN,
Expand Down Expand Up @@ -1216,6 +1235,9 @@ async def create(
[Streaming section below](https://platform.openai.com/docs/api-reference/responses-streaming)
for more information.

background: Whether to run the model response in the background.
[Learn more](https://platform.openai.com/docs/guides/background).

include: Specify additional output data to include in the model response. Currently
supported values are:

Expand Down Expand Up @@ -1344,6 +1366,7 @@ async def create(
input: Union[str, ResponseInputParam],
model: ResponsesModel,
stream: bool,
background: Optional[bool] | NotGiven = NOT_GIVEN,
include: Optional[List[ResponseIncludable]] | NotGiven = NOT_GIVEN,
instructions: Optional[str] | NotGiven = NOT_GIVEN,
max_output_tokens: Optional[int] | NotGiven = NOT_GIVEN,
Expand Down Expand Up @@ -1405,6 +1428,9 @@ async def create(
[Streaming section below](https://platform.openai.com/docs/api-reference/responses-streaming)
for more information.

background: Whether to run the model response in the background.
[Learn more](https://platform.openai.com/docs/guides/background).

include: Specify additional output data to include in the model response. Currently
supported values are:

Expand Down Expand Up @@ -1532,6 +1558,7 @@ async def create(
*,
input: Union[str, ResponseInputParam],
model: ResponsesModel,
background: Optional[bool] | NotGiven = NOT_GIVEN,
include: Optional[List[ResponseIncludable]] | NotGiven = NOT_GIVEN,
instructions: Optional[str] | NotGiven = NOT_GIVEN,
max_output_tokens: Optional[int] | NotGiven = NOT_GIVEN,
Expand Down Expand Up @@ -1562,6 +1589,7 @@ async def create(
{
"input": input,
"model": model,
"background": background,
"include": include,
"instructions": instructions,
"max_output_tokens": max_output_tokens,
Expand Down
Loading