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.0.0"
".": "2.0.1"
}
6 changes: 3 additions & 3 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-49233088b5e73dbb96bf7af27be3d4547632e3db1c2b00f14184900613325bbc.yml
openapi_spec_hash: b34f14b141d5019244112901c5c7c2d8
config_hash: 94e9ba08201c3d1ca46e093e6a0138fa
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-e205b1f2da6a1f2caa229efa9ede63f2d3d2fedeeb2dd6ed3d880bafdcb0ab88.yml
openapi_spec_hash: c8aee2469a749f6a838b40c57e4b7b06
config_hash: 45dcba51451ba532959c020a0ddbf23c
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 2.0.1 (2025-10-01)

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

### Bug Fixes

* **api:** add status, approval_request_id to MCP tool call ([2a02255](https://github.com/openai/openai-python/commit/2a022553f83b636defcfda3b1c6f4b12d901357b))

## 2.0.0 (2025-09-30)

Full Changelog: [v1.109.1...v2.0.0](https://github.com/openai/openai-python/compare/v1.109.1...v2.0.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 = "2.0.0"
version = "2.0.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__ = "2.0.0" # x-release-please-version
__version__ = "2.0.1" # x-release-please-version
4 changes: 4 additions & 0 deletions src/openai/resources/beta/realtime/sessions.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ def create(
max_response_output_tokens: Union[int, Literal["inf"]] | NotGiven = NOT_GIVEN,
modalities: List[Literal["text", "audio"]] | NotGiven = NOT_GIVEN,
model: Literal[
"gpt-realtime",
"gpt-realtime-2025-08-28",
"gpt-4o-realtime-preview",
"gpt-4o-realtime-preview-2024-10-01",
"gpt-4o-realtime-preview-2024-12-17",
Expand Down Expand Up @@ -233,6 +235,8 @@ async def create(
max_response_output_tokens: Union[int, Literal["inf"]] | NotGiven = NOT_GIVEN,
modalities: List[Literal["text", "audio"]] | NotGiven = NOT_GIVEN,
model: Literal[
"gpt-realtime",
"gpt-realtime-2025-08-28",
"gpt-4o-realtime-preview",
"gpt-4o-realtime-preview-2024-10-01",
"gpt-4o-realtime-preview-2024-12-17",
Expand Down
2 changes: 2 additions & 0 deletions src/openai/types/beta/realtime/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,8 @@ class Session(BaseModel):

model: Optional[
Literal[
"gpt-realtime",
"gpt-realtime-2025-08-28",
"gpt-4o-realtime-preview",
"gpt-4o-realtime-preview-2024-10-01",
"gpt-4o-realtime-preview-2024-12-17",
Expand Down
2 changes: 2 additions & 0 deletions src/openai/types/beta/realtime/session_create_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ class SessionCreateParams(TypedDict, total=False):
"""

model: Literal[
"gpt-realtime",
"gpt-realtime-2025-08-28",
"gpt-4o-realtime-preview",
"gpt-4o-realtime-preview-2024-10-01",
"gpt-4o-realtime-preview-2024-12-17",
Expand Down
2 changes: 2 additions & 0 deletions src/openai/types/beta/realtime/session_update_event.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,8 @@ class Session(BaseModel):

model: Optional[
Literal[
"gpt-realtime",
"gpt-realtime-2025-08-28",
"gpt-4o-realtime-preview",
"gpt-4o-realtime-preview-2024-10-01",
"gpt-4o-realtime-preview-2024-12-17",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,8 @@ class Session(TypedDict, total=False):
"""

model: Literal[
"gpt-realtime",
"gpt-realtime-2025-08-28",
"gpt-4o-realtime-preview",
"gpt-4o-realtime-preview-2024-10-01",
"gpt-4o-realtime-preview-2024-12-17",
Expand Down
13 changes: 13 additions & 0 deletions src/openai/types/conversations/conversation_item.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,12 +177,25 @@ class McpCall(BaseModel):
type: Literal["mcp_call"]
"""The type of the item. Always `mcp_call`."""

approval_request_id: Optional[str] = None
"""
Unique identifier for the MCP tool call approval request. Include this value in
a subsequent `mcp_approval_response` input to approve or reject the
corresponding tool call.
"""

error: Optional[str] = None
"""The error from the tool call, if any."""

output: Optional[str] = None
"""The output from the tool call."""

status: Optional[Literal["in_progress", "completed", "incomplete", "calling", "failed"]] = None
"""The status of the tool call.

One of `in_progress`, `completed`, `incomplete`, `calling`, or `failed`.
"""


ConversationItem: TypeAlias = Annotated[
Union[
Expand Down
13 changes: 13 additions & 0 deletions src/openai/types/responses/response_input_item.py
Original file line number Diff line number Diff line change
Expand Up @@ -267,12 +267,25 @@ class McpCall(BaseModel):
type: Literal["mcp_call"]
"""The type of the item. Always `mcp_call`."""

approval_request_id: Optional[str] = None
"""
Unique identifier for the MCP tool call approval request. Include this value in
a subsequent `mcp_approval_response` input to approve or reject the
corresponding tool call.
"""

error: Optional[str] = None
"""The error from the tool call, if any."""

output: Optional[str] = None
"""The output from the tool call."""

status: Optional[Literal["in_progress", "completed", "incomplete", "calling", "failed"]] = None
"""The status of the tool call.

One of `in_progress`, `completed`, `incomplete`, `calling`, or `failed`.
"""


class ItemReference(BaseModel):
id: str
Expand Down
13 changes: 13 additions & 0 deletions src/openai/types/responses/response_input_item_param.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,12 +268,25 @@ class McpCall(TypedDict, total=False):
type: Required[Literal["mcp_call"]]
"""The type of the item. Always `mcp_call`."""

approval_request_id: Optional[str]
"""
Unique identifier for the MCP tool call approval request. Include this value in
a subsequent `mcp_approval_response` input to approve or reject the
corresponding tool call.
"""

error: Optional[str]
"""The error from the tool call, if any."""

output: Optional[str]
"""The output from the tool call."""

status: Literal["in_progress", "completed", "incomplete", "calling", "failed"]
"""The status of the tool call.

One of `in_progress`, `completed`, `incomplete`, `calling`, or `failed`.
"""


class ItemReference(TypedDict, total=False):
id: Required[str]
Expand Down
13 changes: 13 additions & 0 deletions src/openai/types/responses/response_input_param.py
Original file line number Diff line number Diff line change
Expand Up @@ -269,12 +269,25 @@ class McpCall(TypedDict, total=False):
type: Required[Literal["mcp_call"]]
"""The type of the item. Always `mcp_call`."""

approval_request_id: Optional[str]
"""
Unique identifier for the MCP tool call approval request. Include this value in
a subsequent `mcp_approval_response` input to approve or reject the
corresponding tool call.
"""

error: Optional[str]
"""The error from the tool call, if any."""

output: Optional[str]
"""The output from the tool call."""

status: Literal["in_progress", "completed", "incomplete", "calling", "failed"]
"""The status of the tool call.

One of `in_progress`, `completed`, `incomplete`, `calling`, or `failed`.
"""


class ItemReference(TypedDict, total=False):
id: Required[str]
Expand Down
13 changes: 13 additions & 0 deletions src/openai/types/responses/response_item.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,12 +175,25 @@ class McpCall(BaseModel):
type: Literal["mcp_call"]
"""The type of the item. Always `mcp_call`."""

approval_request_id: Optional[str] = None
"""
Unique identifier for the MCP tool call approval request. Include this value in
a subsequent `mcp_approval_response` input to approve or reject the
corresponding tool call.
"""

error: Optional[str] = None
"""The error from the tool call, if any."""

output: Optional[str] = None
"""The output from the tool call."""

status: Optional[Literal["in_progress", "completed", "incomplete", "calling", "failed"]] = None
"""The status of the tool call.

One of `in_progress`, `completed`, `incomplete`, `calling`, or `failed`.
"""


ResponseItem: TypeAlias = Annotated[
Union[
Expand Down
13 changes: 13 additions & 0 deletions src/openai/types/responses/response_output_item.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,12 +93,25 @@ class McpCall(BaseModel):
type: Literal["mcp_call"]
"""The type of the item. Always `mcp_call`."""

approval_request_id: Optional[str] = None
"""
Unique identifier for the MCP tool call approval request. Include this value in
a subsequent `mcp_approval_response` input to approve or reject the
corresponding tool call.
"""

error: Optional[str] = None
"""The error from the tool call, if any."""

output: Optional[str] = None
"""The output from the tool call."""

status: Optional[Literal["in_progress", "completed", "incomplete", "calling", "failed"]] = None
"""The status of the tool call.

One of `in_progress`, `completed`, `incomplete`, `calling`, or `failed`.
"""


class McpListToolsTool(BaseModel):
input_schema: object
Expand Down