Skip to content

release: 1.66.2 #2182

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 2 commits into from
Mar 11, 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.66.1"
".": "1.66.2"
}
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
configured_endpoints: 81
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai-9ce5257763fb30c6e0e1ee2bef7e13baf661511e09572207e528d643da8e16b3.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai-c8579861bc21d4d2155a5b9e8e7d54faee8083730673c4d32cbbe573d7fb4116.yml
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 1.66.2 (2025-03-11)

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

### Bug Fixes

* **responses:** correct reasoning output type ([#2181](https://github.com/openai/openai-python/issues/2181)) ([8cb1129](https://github.com/openai/openai-python/commit/8cb11299acc40c80061af275691cd09a2bf30c65))

## 1.66.1 (2025-03-11)

Full Changelog: [v1.66.0...v1.66.1](https://github.com/openai/openai-python/compare/v1.66.0...v1.66.1)
Expand Down
1 change: 1 addition & 0 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -640,6 +640,7 @@ from openai.types.responses import (
ResponseOutputMessage,
ResponseOutputRefusal,
ResponseOutputText,
ResponseReasoningItem,
ResponseRefusalDeltaEvent,
ResponseRefusalDoneEvent,
ResponseStatus,
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.66.1"
version = "1.66.2"
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.66.1" # x-release-please-version
__version__ = "1.66.2" # x-release-please-version
2 changes: 2 additions & 0 deletions src/openai/types/responses/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
from .response_input_content import ResponseInputContent as ResponseInputContent
from .response_output_message import ResponseOutputMessage as ResponseOutputMessage
from .response_output_refusal import ResponseOutputRefusal as ResponseOutputRefusal
from .response_reasoning_item import ResponseReasoningItem as ResponseReasoningItem
from .tool_choice_types_param import ToolChoiceTypesParam as ToolChoiceTypesParam
from .easy_input_message_param import EasyInputMessageParam as EasyInputMessageParam
from .response_completed_event import ResponseCompletedEvent as ResponseCompletedEvent
Expand All @@ -71,6 +72,7 @@
from .response_refusal_delta_event import ResponseRefusalDeltaEvent as ResponseRefusalDeltaEvent
from .response_output_message_param import ResponseOutputMessageParam as ResponseOutputMessageParam
from .response_output_refusal_param import ResponseOutputRefusalParam as ResponseOutputRefusalParam
from .response_reasoning_item_param import ResponseReasoningItemParam as ResponseReasoningItemParam
from .response_file_search_tool_call import ResponseFileSearchToolCall as ResponseFileSearchToolCall
from .response_output_item_done_event import ResponseOutputItemDoneEvent as ResponseOutputItemDoneEvent
from .response_content_part_done_event import ResponseContentPartDoneEvent as ResponseContentPartDoneEvent
Expand Down
4 changes: 2 additions & 2 deletions src/openai/types/responses/parsed_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
from .response import Response
from ..._models import GenericModel
from ..._utils._transform import PropertyInfo
from .response_output_item import Reasoning
from .response_output_text import ResponseOutputText
from .response_output_message import ResponseOutputMessage
from .response_output_refusal import ResponseOutputRefusal
from .response_reasoning_item import ResponseReasoningItem
from .response_computer_tool_call import ResponseComputerToolCall
from .response_function_tool_call import ResponseFunctionToolCall
from .response_function_web_search import ResponseFunctionWebSearch
Expand Down Expand Up @@ -54,7 +54,7 @@ class ParsedResponseFunctionToolCall(ResponseFunctionToolCall):
ResponseFileSearchToolCall,
ResponseFunctionWebSearch,
ResponseComputerToolCall,
Reasoning,
ResponseReasoningItem,
],
PropertyInfo(discriminator="type"),
]
Expand Down
33 changes: 2 additions & 31 deletions src/openai/types/responses/response_input_item_param.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

from .easy_input_message_param import EasyInputMessageParam
from .response_output_message_param import ResponseOutputMessageParam
from .response_reasoning_item_param import ResponseReasoningItemParam
from .response_computer_tool_call_param import ResponseComputerToolCallParam
from .response_function_tool_call_param import ResponseFunctionToolCallParam
from .response_function_web_search_param import ResponseFunctionWebSearchParam
Expand All @@ -20,8 +21,6 @@
"ComputerCallOutputOutput",
"ComputerCallOutputAcknowledgedSafetyCheck",
"FunctionCallOutput",
"Reasoning",
"ReasoningContent",
"ItemReference",
]

Expand Down Expand Up @@ -123,34 +122,6 @@ class FunctionCallOutput(TypedDict, total=False):
"""


class ReasoningContent(TypedDict, total=False):
text: Required[str]
"""
A short summary of the reasoning used by the model when generating the response.
"""

type: Required[Literal["reasoning_summary"]]
"""The type of the object. Always `text`."""


class Reasoning(TypedDict, total=False):
id: Required[str]
"""The unique identifier of the reasoning content."""

content: Required[Iterable[ReasoningContent]]
"""Reasoning text contents."""

type: Required[Literal["reasoning"]]
"""The type of the object. Always `reasoning`."""

status: Literal["in_progress", "completed", "incomplete"]
"""The status of the item.

One of `in_progress`, `completed`, or `incomplete`. Populated when items are
returned via API.
"""


class ItemReference(TypedDict, total=False):
id: Required[str]
"""The ID of the item to reference."""
Expand All @@ -169,6 +140,6 @@ class ItemReference(TypedDict, total=False):
ResponseFunctionWebSearchParam,
ResponseFunctionToolCallParam,
FunctionCallOutput,
Reasoning,
ResponseReasoningItemParam,
ItemReference,
]
33 changes: 2 additions & 31 deletions src/openai/types/responses/response_input_param.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

from .easy_input_message_param import EasyInputMessageParam
from .response_output_message_param import ResponseOutputMessageParam
from .response_reasoning_item_param import ResponseReasoningItemParam
from .response_computer_tool_call_param import ResponseComputerToolCallParam
from .response_function_tool_call_param import ResponseFunctionToolCallParam
from .response_function_web_search_param import ResponseFunctionWebSearchParam
Expand All @@ -21,8 +22,6 @@
"ComputerCallOutputOutput",
"ComputerCallOutputAcknowledgedSafetyCheck",
"FunctionCallOutput",
"Reasoning",
"ReasoningContent",
"ItemReference",
]

Expand Down Expand Up @@ -124,34 +123,6 @@ class FunctionCallOutput(TypedDict, total=False):
"""


class ReasoningContent(TypedDict, total=False):
text: Required[str]
"""
A short summary of the reasoning used by the model when generating the response.
"""

type: Required[Literal["reasoning_summary"]]
"""The type of the object. Always `text`."""


class Reasoning(TypedDict, total=False):
id: Required[str]
"""The unique identifier of the reasoning content."""

content: Required[Iterable[ReasoningContent]]
"""Reasoning text contents."""

type: Required[Literal["reasoning"]]
"""The type of the object. Always `reasoning`."""

status: Literal["in_progress", "completed", "incomplete"]
"""The status of the item.

One of `in_progress`, `completed`, or `incomplete`. Populated when items are
returned via API.
"""


class ItemReference(TypedDict, total=False):
id: Required[str]
"""The ID of the item to reference."""
Expand All @@ -170,7 +141,7 @@ class ItemReference(TypedDict, total=False):
ResponseFunctionWebSearchParam,
ResponseFunctionToolCallParam,
FunctionCallOutput,
Reasoning,
ResponseReasoningItemParam,
ItemReference,
]

Expand Down
39 changes: 5 additions & 34 deletions src/openai/types/responses/response_output_item.py
Original file line number Diff line number Diff line change
@@ -1,46 +1,17 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from typing import List, Union, Optional
from typing_extensions import Literal, Annotated, TypeAlias
from typing import Union
from typing_extensions import Annotated, TypeAlias

from ..._utils import PropertyInfo
from ..._models import BaseModel
from .response_output_message import ResponseOutputMessage
from .response_reasoning_item import ResponseReasoningItem
from .response_computer_tool_call import ResponseComputerToolCall
from .response_function_tool_call import ResponseFunctionToolCall
from .response_function_web_search import ResponseFunctionWebSearch
from .response_file_search_tool_call import ResponseFileSearchToolCall

__all__ = ["ResponseOutputItem", "Reasoning", "ReasoningContent"]


class ReasoningContent(BaseModel):
text: str
"""
A short summary of the reasoning used by the model when generating the response.
"""

type: Literal["reasoning_summary"]
"""The type of the object. Always `text`."""


class Reasoning(BaseModel):
id: str
"""The unique identifier of the reasoning content."""

content: List[ReasoningContent]
"""Reasoning text contents."""

type: Literal["reasoning"]
"""The type of the object. Always `reasoning`."""

status: Optional[Literal["in_progress", "completed", "incomplete"]] = None
"""The status of the item.

One of `in_progress`, `completed`, or `incomplete`. Populated when items are
returned via API.
"""

__all__ = ["ResponseOutputItem"]

ResponseOutputItem: TypeAlias = Annotated[
Union[
Expand All @@ -49,7 +20,7 @@ class Reasoning(BaseModel):
ResponseFunctionToolCall,
ResponseFunctionWebSearch,
ResponseComputerToolCall,
Reasoning,
ResponseReasoningItem,
],
PropertyInfo(discriminator="type"),
]
36 changes: 36 additions & 0 deletions src/openai/types/responses/response_reasoning_item.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from typing import List, Optional
from typing_extensions import Literal

from ..._models import BaseModel

__all__ = ["ResponseReasoningItem", "Summary"]


class Summary(BaseModel):
text: str
"""
A short summary of the reasoning used by the model when generating the response.
"""

type: Literal["summary_text"]
"""The type of the object. Always `summary_text`."""


class ResponseReasoningItem(BaseModel):
id: str
"""The unique identifier of the reasoning content."""

summary: List[Summary]
"""Reasoning text contents."""

type: Literal["reasoning"]
"""The type of the object. Always `reasoning`."""

status: Optional[Literal["in_progress", "completed", "incomplete"]] = None
"""The status of the item.

One of `in_progress`, `completed`, or `incomplete`. Populated when items are
returned via API.
"""
36 changes: 36 additions & 0 deletions src/openai/types/responses/response_reasoning_item_param.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from __future__ import annotations

from typing import Iterable
from typing_extensions import Literal, Required, TypedDict

__all__ = ["ResponseReasoningItemParam", "Summary"]


class Summary(TypedDict, total=False):
text: Required[str]
"""
A short summary of the reasoning used by the model when generating the response.
"""

type: Required[Literal["summary_text"]]
"""The type of the object. Always `summary_text`."""


class ResponseReasoningItemParam(TypedDict, total=False):
id: Required[str]
"""The unique identifier of the reasoning content."""

summary: Required[Iterable[Summary]]
"""Reasoning text contents."""

type: Required[Literal["reasoning"]]
"""The type of the object. Always `reasoning`."""

status: Literal["in_progress", "completed", "incomplete"]
"""The status of the item.

One of `in_progress`, `completed`, or `incomplete`. Populated when items are
returned via API.
"""