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.108.1"
".": "1.108.2"
}
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-ea23db36b0899cc715f56d0098956069b2d92880f448adff3a4ac1bb53cb2cec.yml
openapi_spec_hash: 36f76ea31297c9593bcfae453f6255cc
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-937fcfac8cbab692796cd9822b37e48a311e2220a8b103106ded0ee92a0b9484.yml
openapi_spec_hash: 74a0c58b5b8c4e06792d79b685e02a01
config_hash: 666d6bb4b564f0d9d431124b5d1a0665
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
# Changelog

## 1.108.2 (2025-09-22)

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

### Bug Fixes

* **api:** fix mcp tool name ([fd1c673](https://github.com/openai/openai-python/commit/fd1c673fa8d5581b38c69c37aa4fd1fd251259a2))


### Chores

* **api:** openapi updates for conversations ([3224f6f](https://github.com/openai/openai-python/commit/3224f6f9b4221b954a8f63de66bcaab389164ee5))
* do not install brew dependencies in ./scripts/bootstrap by default ([6764b00](https://github.com/openai/openai-python/commit/6764b00bcb8aeab41e73d2fcaf6c7a18ea9f7909))
* improve example values ([20b58e1](https://github.com/openai/openai-python/commit/20b58e164f9f28b9fc562968263fa3eacc6f5c7c))

## 1.108.1 (2025-09-19)

Full Changelog: [v1.108.0...v1.108.1](https://github.com/openai/openai-python/compare/v1.108.0...v1.108.1)
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.108.1"
version = "1.108.2"
description = "The official Python library for the openai API"
dynamic = ["readme"]
license = "Apache-2.0"
Expand Down
14 changes: 11 additions & 3 deletions scripts/bootstrap
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,18 @@ set -e

cd "$(dirname "$0")/.."

if ! command -v rye >/dev/null 2>&1 && [ -f "Brewfile" ] && [ "$(uname -s)" = "Darwin" ]; then
if [ -f "Brewfile" ] && [ "$(uname -s)" = "Darwin" ] && [ "$SKIP_BREW" != "1" ] && [ -t 0 ]; then
brew bundle check >/dev/null 2>&1 || {
echo "==> Installing Homebrew dependencies…"
brew bundle
echo -n "==> Install Homebrew dependencies? (y/N): "
read -r response
case "$response" in
[yY][eE][sS]|[yY])
brew bundle
;;
*)
;;
esac
echo
}
fi

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.108.1" # x-release-please-version
__version__ = "1.108.2" # x-release-please-version
38 changes: 21 additions & 17 deletions src/openai/resources/conversations/conversations.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from __future__ import annotations

from typing import Dict, Iterable, Optional
from typing import Iterable, Optional

import httpx

Expand Down Expand Up @@ -115,7 +115,7 @@ def retrieve(
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Conversation:
"""
Get a conversation with the given ID.
Get a conversation

Args:
extra_headers: Send extra headers
Expand All @@ -140,7 +140,7 @@ def update(
self,
conversation_id: str,
*,
metadata: Dict[str, str],
metadata: Optional[Metadata],
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
Expand All @@ -149,14 +149,15 @@ def update(
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Conversation:
"""
Update a conversation's metadata with the given ID.
Update a conversation

Args:
metadata: Set of 16 key-value pairs that can be attached to an object. This can be useful
for storing additional information about the object in a structured format, and
querying for objects via API or the dashboard. Keys are strings with a maximum
length of 64 characters. Values are strings with a maximum length of 512
characters.
querying for objects via API or the dashboard.

Keys are strings with a maximum length of 64 characters. Values are strings with
a maximum length of 512 characters.

extra_headers: Send extra headers

Expand Down Expand Up @@ -188,8 +189,9 @@ def delete(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> ConversationDeletedResource:
"""
Delete a conversation with the given ID.
"""Delete a conversation.

Items in the conversation will not be deleted.

Args:
extra_headers: Send extra headers
Expand Down Expand Up @@ -296,7 +298,7 @@ async def retrieve(
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Conversation:
"""
Get a conversation with the given ID.
Get a conversation

Args:
extra_headers: Send extra headers
Expand All @@ -321,7 +323,7 @@ async def update(
self,
conversation_id: str,
*,
metadata: Dict[str, str],
metadata: Optional[Metadata],
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
Expand All @@ -330,14 +332,15 @@ async def update(
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Conversation:
"""
Update a conversation's metadata with the given ID.
Update a conversation

Args:
metadata: Set of 16 key-value pairs that can be attached to an object. This can be useful
for storing additional information about the object in a structured format, and
querying for objects via API or the dashboard. Keys are strings with a maximum
length of 64 characters. Values are strings with a maximum length of 512
characters.
querying for objects via API or the dashboard.

Keys are strings with a maximum length of 64 characters. Values are strings with
a maximum length of 512 characters.

extra_headers: Send extra headers

Expand Down Expand Up @@ -371,8 +374,9 @@ async def delete(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> ConversationDeletedResource:
"""
Delete a conversation with the given ID.
"""Delete a conversation.

Items in the conversation will not be deleted.

Args:
extra_headers: Send extra headers
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@

class ConversationCreateParams(TypedDict, total=False):
items: Optional[Iterable[ResponseInputItemParam]]
"""
Initial items to include in the conversation context. You may add up to 20 items
at a time.
"""Initial items to include in the conversation context.

You may add up to 20 items at a time.
"""

metadata: Optional[Metadata]
Expand Down
13 changes: 8 additions & 5 deletions src/openai/types/conversations/conversation_update_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,21 @@

from __future__ import annotations

from typing import Dict
from typing import Optional
from typing_extensions import Required, TypedDict

from ..shared_params.metadata import Metadata

__all__ = ["ConversationUpdateParams"]


class ConversationUpdateParams(TypedDict, total=False):
metadata: Required[Dict[str, str]]
metadata: Required[Optional[Metadata]]
"""Set of 16 key-value pairs that can be attached to an object.

This can be useful for storing additional information about the object in a
structured format, and querying for objects via API or the dashboard. Keys are
strings with a maximum length of 64 characters. Values are strings with a
maximum length of 512 characters.
structured format, and querying for objects via API or the dashboard.

Keys are strings with a maximum length of 64 characters. Values are strings with
a maximum length of 512 characters.
"""
4 changes: 2 additions & 2 deletions src/openai/types/realtime/realtime_mcp_tool_call.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ class RealtimeMcpToolCall(BaseModel):
server_label: str
"""The label of the MCP server running the tool."""

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

approval_request_id: Optional[str] = None
"""The ID of an associated approval request, if any."""
Expand Down
4 changes: 2 additions & 2 deletions src/openai/types/realtime/realtime_mcp_tool_call_param.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ class RealtimeMcpToolCallParam(TypedDict, total=False):
server_label: Required[str]
"""The label of the MCP server running the tool."""

type: Required[Literal["mcp_tool_call"]]
"""The type of the item. Always `mcp_tool_call`."""
type: Required[Literal["mcp_call"]]
"""The type of the item. Always `mcp_call`."""

approval_request_id: Optional[str]
"""The ID of an associated approval request, if any."""
Expand Down
8 changes: 8 additions & 0 deletions tests/api_resources/conversations/test_items.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ def test_method_create(self, client: OpenAI) -> None:
{
"content": "string",
"role": "user",
"type": "message",
}
],
)
Expand Down Expand Up @@ -58,6 +59,7 @@ def test_raw_response_create(self, client: OpenAI) -> None:
{
"content": "string",
"role": "user",
"type": "message",
}
],
)
Expand All @@ -75,6 +77,7 @@ def test_streaming_response_create(self, client: OpenAI) -> None:
{
"content": "string",
"role": "user",
"type": "message",
}
],
) as response:
Expand All @@ -95,6 +98,7 @@ def test_path_params_create(self, client: OpenAI) -> None:
{
"content": "string",
"role": "user",
"type": "message",
}
],
)
Expand Down Expand Up @@ -267,6 +271,7 @@ async def test_method_create(self, async_client: AsyncOpenAI) -> None:
{
"content": "string",
"role": "user",
"type": "message",
}
],
)
Expand Down Expand Up @@ -295,6 +300,7 @@ async def test_raw_response_create(self, async_client: AsyncOpenAI) -> None:
{
"content": "string",
"role": "user",
"type": "message",
}
],
)
Expand All @@ -312,6 +318,7 @@ async def test_streaming_response_create(self, async_client: AsyncOpenAI) -> Non
{
"content": "string",
"role": "user",
"type": "message",
}
],
) as response:
Expand All @@ -332,6 +339,7 @@ async def test_path_params_create(self, async_client: AsyncOpenAI) -> None:
{
"content": "string",
"role": "user",
"type": "message",
}
],
)
Expand Down