From 44fb382698872d98d5f72c880b47846c7b594f4f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 24 Feb 2026 20:08:36 +0000 Subject: [PATCH 1/4] feat(api): remove prompt_cache_key param from responses, phase field from message types --- .stats.yml | 4 ++-- src/openai/resources/responses/responses.py | 8 -------- src/openai/types/responses/easy_input_message.py | 9 --------- .../types/responses/easy_input_message_param.py | 11 +---------- src/openai/types/responses/response_compact_params.py | 3 --- src/openai/types/responses/response_output_message.py | 11 +---------- .../types/responses/response_output_message_param.py | 11 +---------- tests/api_resources/conversations/test_items.py | 2 -- tests/api_resources/test_conversations.py | 2 -- tests/api_resources/test_responses.py | 2 -- 10 files changed, 5 insertions(+), 58 deletions(-) diff --git a/.stats.yml b/.stats.yml index 476a5b7658..6c9e230e9b 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 148 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-6bfe886b5ded0fe3bf37ca672698814e16e0836a093ceef65dac37ae44d1ad6b.yml -openapi_spec_hash: 6b1344a59044318e824c8d1af96033c7 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-a0aa54a302fbd7fff4ed7ad8a8547587d37b63324fc4af652bfa685ee9f8da44.yml +openapi_spec_hash: e45c5af19307cfc8b9baa4b8f8e865a0 config_hash: 7f49c38fa3abe9b7038ffe62262c4912 diff --git a/src/openai/resources/responses/responses.py b/src/openai/resources/responses/responses.py index c85a94495d..2ad1e6716c 100644 --- a/src/openai/resources/responses/responses.py +++ b/src/openai/resources/responses/responses.py @@ -1660,7 +1660,6 @@ def compact( input: Union[str, Iterable[ResponseInputItemParam], None] | Omit = omit, instructions: Optional[str] | Omit = omit, previous_response_id: Optional[str] | Omit = omit, - prompt_cache_key: Optional[str] | Omit = omit, # 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, @@ -1696,8 +1695,6 @@ def compact( [conversation state](https://platform.openai.com/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`. - prompt_cache_key: A key to use when reading from or writing to the prompt cache. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -1714,7 +1711,6 @@ def compact( "input": input, "instructions": instructions, "previous_response_id": previous_response_id, - "prompt_cache_key": prompt_cache_key, }, response_compact_params.ResponseCompactParams, ), @@ -3325,7 +3321,6 @@ async def compact( input: Union[str, Iterable[ResponseInputItemParam], None] | Omit = omit, instructions: Optional[str] | Omit = omit, previous_response_id: Optional[str] | Omit = omit, - prompt_cache_key: Optional[str] | Omit = omit, # 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, @@ -3361,8 +3356,6 @@ async def compact( [conversation state](https://platform.openai.com/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`. - prompt_cache_key: A key to use when reading from or writing to the prompt cache. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -3379,7 +3372,6 @@ async def compact( "input": input, "instructions": instructions, "previous_response_id": previous_response_id, - "prompt_cache_key": prompt_cache_key, }, response_compact_params.ResponseCompactParams, ), diff --git a/src/openai/types/responses/easy_input_message.py b/src/openai/types/responses/easy_input_message.py index 6f4d782734..9a36a6b084 100644 --- a/src/openai/types/responses/easy_input_message.py +++ b/src/openai/types/responses/easy_input_message.py @@ -30,14 +30,5 @@ class EasyInputMessage(BaseModel): One of `user`, `assistant`, `system`, or `developer`. """ - phase: Optional[Literal["commentary", "final_answer"]] = None - """The phase of an assistant message. - - Use `commentary` for an intermediate assistant message and `final_answer` for - the final assistant message. For follow-up requests with models like - `gpt-5.3-codex` and later, preserve and resend phase on all assistant messages. - Omitting it can degrade performance. Not used for user messages. - """ - type: Optional[Literal["message"]] = None """The type of the message input. Always `message`.""" diff --git a/src/openai/types/responses/easy_input_message_param.py b/src/openai/types/responses/easy_input_message_param.py index f7eb42ba71..0a382bddee 100644 --- a/src/openai/types/responses/easy_input_message_param.py +++ b/src/openai/types/responses/easy_input_message_param.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import Union, Optional +from typing import Union from typing_extensions import Literal, Required, TypedDict from .response_input_message_content_list_param import ResponseInputMessageContentListParam @@ -31,14 +31,5 @@ class EasyInputMessageParam(TypedDict, total=False): One of `user`, `assistant`, `system`, or `developer`. """ - phase: Optional[Literal["commentary", "final_answer"]] - """The phase of an assistant message. - - Use `commentary` for an intermediate assistant message and `final_answer` for - the final assistant message. For follow-up requests with models like - `gpt-5.3-codex` and later, preserve and resend phase on all assistant messages. - Omitting it can degrade performance. Not used for user messages. - """ - type: Literal["message"] """The type of the message input. Always `message`.""" diff --git a/src/openai/types/responses/response_compact_params.py b/src/openai/types/responses/response_compact_params.py index 4fb0e7ddc3..657c6a0764 100644 --- a/src/openai/types/responses/response_compact_params.py +++ b/src/openai/types/responses/response_compact_params.py @@ -131,6 +131,3 @@ class ResponseCompactParams(TypedDict, total=False): [conversation state](https://platform.openai.com/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`. """ - - prompt_cache_key: Optional[str] - """A key to use when reading from or writing to the prompt cache.""" diff --git a/src/openai/types/responses/response_output_message.py b/src/openai/types/responses/response_output_message.py index a8720e1c57..9c1d1f97fc 100644 --- a/src/openai/types/responses/response_output_message.py +++ b/src/openai/types/responses/response_output_message.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List, Union, Optional +from typing import List, Union from typing_extensions import Literal, Annotated, TypeAlias from ..._utils import PropertyInfo @@ -34,12 +34,3 @@ class ResponseOutputMessage(BaseModel): type: Literal["message"] """The type of the output message. Always `message`.""" - - phase: Optional[Literal["commentary", "final_answer"]] = None - """The phase of an assistant message. - - Use `commentary` for an intermediate assistant message and `final_answer` for - the final assistant message. For follow-up requests with models like - `gpt-5.3-codex` and later, preserve and resend phase on all assistant messages. - Omitting it can degrade performance. Not used for user messages. - """ diff --git a/src/openai/types/responses/response_output_message_param.py b/src/openai/types/responses/response_output_message_param.py index 5d488d8c6b..9c2f5246a1 100644 --- a/src/openai/types/responses/response_output_message_param.py +++ b/src/openai/types/responses/response_output_message_param.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import Union, Iterable, Optional +from typing import Union, Iterable from typing_extensions import Literal, Required, TypeAlias, TypedDict from .response_output_text_param import ResponseOutputTextParam @@ -34,12 +34,3 @@ class ResponseOutputMessageParam(TypedDict, total=False): type: Required[Literal["message"]] """The type of the output message. Always `message`.""" - - phase: Optional[Literal["commentary", "final_answer"]] - """The phase of an assistant message. - - Use `commentary` for an intermediate assistant message and `final_answer` for - the final assistant message. For follow-up requests with models like - `gpt-5.3-codex` and later, preserve and resend phase on all assistant messages. - Omitting it can degrade performance. Not used for user messages. - """ diff --git a/tests/api_resources/conversations/test_items.py b/tests/api_resources/conversations/test_items.py index aca9568410..0503301f16 100644 --- a/tests/api_resources/conversations/test_items.py +++ b/tests/api_resources/conversations/test_items.py @@ -44,7 +44,6 @@ def test_method_create_with_all_params(self, client: OpenAI) -> None: { "content": "string", "role": "user", - "phase": "commentary", "type": "message", } ], @@ -286,7 +285,6 @@ async def test_method_create_with_all_params(self, async_client: AsyncOpenAI) -> { "content": "string", "role": "user", - "phase": "commentary", "type": "message", } ], diff --git a/tests/api_resources/test_conversations.py b/tests/api_resources/test_conversations.py index a451d339e8..d21e685a04 100644 --- a/tests/api_resources/test_conversations.py +++ b/tests/api_resources/test_conversations.py @@ -32,7 +32,6 @@ def test_method_create_with_all_params(self, client: OpenAI) -> None: { "content": "string", "role": "user", - "phase": "commentary", "type": "message", } ], @@ -196,7 +195,6 @@ async def test_method_create_with_all_params(self, async_client: AsyncOpenAI) -> { "content": "string", "role": "user", - "phase": "commentary", "type": "message", } ], diff --git a/tests/api_resources/test_responses.py b/tests/api_resources/test_responses.py index 8f82f2046d..a644b2c6b9 100644 --- a/tests/api_resources/test_responses.py +++ b/tests/api_resources/test_responses.py @@ -385,7 +385,6 @@ def test_method_compact_with_all_params(self, client: OpenAI) -> None: input="string", instructions="instructions", previous_response_id="resp_123", - prompt_cache_key="prompt_cache_key", ) assert_matches_type(CompactedResponse, response, path=["response"]) @@ -794,7 +793,6 @@ async def test_method_compact_with_all_params(self, async_client: AsyncOpenAI) - input="string", instructions="instructions", previous_response_id="resp_123", - prompt_cache_key="prompt_cache_key", ) assert_matches_type(CompactedResponse, response, path=["response"]) From 1b27b5a834f5cb75f80c597259d0df0352ba83bd Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 24 Feb 2026 20:16:23 +0000 Subject: [PATCH 2/4] fix(api): readd phase --- .stats.yml | 4 ++-- src/openai/resources/responses/responses.py | 8 ++++++++ src/openai/types/responses/easy_input_message.py | 8 ++++++++ src/openai/types/responses/easy_input_message_param.py | 10 +++++++++- src/openai/types/responses/response_compact_params.py | 3 +++ src/openai/types/responses/response_output_message.py | 10 +++++++++- .../types/responses/response_output_message_param.py | 10 +++++++++- tests/api_resources/conversations/test_items.py | 2 ++ tests/api_resources/test_conversations.py | 2 ++ tests/api_resources/test_responses.py | 2 ++ 10 files changed, 54 insertions(+), 5 deletions(-) diff --git a/.stats.yml b/.stats.yml index 6c9e230e9b..785dbdba65 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 148 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-a0aa54a302fbd7fff4ed7ad8a8547587d37b63324fc4af652bfa685ee9f8da44.yml -openapi_spec_hash: e45c5af19307cfc8b9baa4b8f8e865a0 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-ca4985bc94b25eac84a5d7538d1bdf134c9b99dae9e95f1eae0aae90130c4bf8.yml +openapi_spec_hash: 855db4b2dbaf3f8f83afe0df66397c02 config_hash: 7f49c38fa3abe9b7038ffe62262c4912 diff --git a/src/openai/resources/responses/responses.py b/src/openai/resources/responses/responses.py index 2ad1e6716c..c85a94495d 100644 --- a/src/openai/resources/responses/responses.py +++ b/src/openai/resources/responses/responses.py @@ -1660,6 +1660,7 @@ def compact( input: Union[str, Iterable[ResponseInputItemParam], None] | Omit = omit, instructions: Optional[str] | Omit = omit, previous_response_id: Optional[str] | Omit = omit, + prompt_cache_key: Optional[str] | Omit = omit, # 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, @@ -1695,6 +1696,8 @@ def compact( [conversation state](https://platform.openai.com/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`. + prompt_cache_key: A key to use when reading from or writing to the prompt cache. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -1711,6 +1714,7 @@ def compact( "input": input, "instructions": instructions, "previous_response_id": previous_response_id, + "prompt_cache_key": prompt_cache_key, }, response_compact_params.ResponseCompactParams, ), @@ -3321,6 +3325,7 @@ async def compact( input: Union[str, Iterable[ResponseInputItemParam], None] | Omit = omit, instructions: Optional[str] | Omit = omit, previous_response_id: Optional[str] | Omit = omit, + prompt_cache_key: Optional[str] | Omit = omit, # 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, @@ -3356,6 +3361,8 @@ async def compact( [conversation state](https://platform.openai.com/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`. + prompt_cache_key: A key to use when reading from or writing to the prompt cache. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -3372,6 +3379,7 @@ async def compact( "input": input, "instructions": instructions, "previous_response_id": previous_response_id, + "prompt_cache_key": prompt_cache_key, }, response_compact_params.ResponseCompactParams, ), diff --git a/src/openai/types/responses/easy_input_message.py b/src/openai/types/responses/easy_input_message.py index 9a36a6b084..c3add7d195 100644 --- a/src/openai/types/responses/easy_input_message.py +++ b/src/openai/types/responses/easy_input_message.py @@ -30,5 +30,13 @@ class EasyInputMessage(BaseModel): One of `user`, `assistant`, `system`, or `developer`. """ + phase: Optional[Literal["commentary"]] = None + """ + Labels an `assistant` message as intermediate commentary (`commentary`) or the + final answer (`final_answer`). For models like `gpt-5.3-codex` and beyond, when + sending follow-up requests, preserve and resend phase on all assistant messages + — dropping it can degrade performance. Not used for user messages. + """ + type: Optional[Literal["message"]] = None """The type of the message input. Always `message`.""" diff --git a/src/openai/types/responses/easy_input_message_param.py b/src/openai/types/responses/easy_input_message_param.py index 0a382bddee..2b3f454756 100644 --- a/src/openai/types/responses/easy_input_message_param.py +++ b/src/openai/types/responses/easy_input_message_param.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import Union +from typing import Union, Optional from typing_extensions import Literal, Required, TypedDict from .response_input_message_content_list_param import ResponseInputMessageContentListParam @@ -31,5 +31,13 @@ class EasyInputMessageParam(TypedDict, total=False): One of `user`, `assistant`, `system`, or `developer`. """ + phase: Optional[Literal["commentary"]] + """ + Labels an `assistant` message as intermediate commentary (`commentary`) or the + final answer (`final_answer`). For models like `gpt-5.3-codex` and beyond, when + sending follow-up requests, preserve and resend phase on all assistant messages + — dropping it can degrade performance. Not used for user messages. + """ + type: Literal["message"] """The type of the message input. Always `message`.""" diff --git a/src/openai/types/responses/response_compact_params.py b/src/openai/types/responses/response_compact_params.py index 657c6a0764..4fb0e7ddc3 100644 --- a/src/openai/types/responses/response_compact_params.py +++ b/src/openai/types/responses/response_compact_params.py @@ -131,3 +131,6 @@ class ResponseCompactParams(TypedDict, total=False): [conversation state](https://platform.openai.com/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`. """ + + prompt_cache_key: Optional[str] + """A key to use when reading from or writing to the prompt cache.""" diff --git a/src/openai/types/responses/response_output_message.py b/src/openai/types/responses/response_output_message.py index 9c1d1f97fc..09a1f88170 100644 --- a/src/openai/types/responses/response_output_message.py +++ b/src/openai/types/responses/response_output_message.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List, Union +from typing import List, Union, Optional from typing_extensions import Literal, Annotated, TypeAlias from ..._utils import PropertyInfo @@ -34,3 +34,11 @@ class ResponseOutputMessage(BaseModel): type: Literal["message"] """The type of the output message. Always `message`.""" + + phase: Optional[Literal["commentary"]] = None + """ + Labels an `assistant` message as intermediate commentary (`commentary`) or the + final answer (`final_answer`). For models like `gpt-5.3-codex` and beyond, when + sending follow-up requests, preserve and resend phase on all assistant messages + — dropping it can degrade performance. Not used for user messages. + """ diff --git a/src/openai/types/responses/response_output_message_param.py b/src/openai/types/responses/response_output_message_param.py index 9c2f5246a1..3a054a5323 100644 --- a/src/openai/types/responses/response_output_message_param.py +++ b/src/openai/types/responses/response_output_message_param.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import Union, Iterable +from typing import Union, Iterable, Optional from typing_extensions import Literal, Required, TypeAlias, TypedDict from .response_output_text_param import ResponseOutputTextParam @@ -34,3 +34,11 @@ class ResponseOutputMessageParam(TypedDict, total=False): type: Required[Literal["message"]] """The type of the output message. Always `message`.""" + + phase: Optional[Literal["commentary"]] + """ + Labels an `assistant` message as intermediate commentary (`commentary`) or the + final answer (`final_answer`). For models like `gpt-5.3-codex` and beyond, when + sending follow-up requests, preserve and resend phase on all assistant messages + — dropping it can degrade performance. Not used for user messages. + """ diff --git a/tests/api_resources/conversations/test_items.py b/tests/api_resources/conversations/test_items.py index 0503301f16..aca9568410 100644 --- a/tests/api_resources/conversations/test_items.py +++ b/tests/api_resources/conversations/test_items.py @@ -44,6 +44,7 @@ def test_method_create_with_all_params(self, client: OpenAI) -> None: { "content": "string", "role": "user", + "phase": "commentary", "type": "message", } ], @@ -285,6 +286,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncOpenAI) -> { "content": "string", "role": "user", + "phase": "commentary", "type": "message", } ], diff --git a/tests/api_resources/test_conversations.py b/tests/api_resources/test_conversations.py index d21e685a04..a451d339e8 100644 --- a/tests/api_resources/test_conversations.py +++ b/tests/api_resources/test_conversations.py @@ -32,6 +32,7 @@ def test_method_create_with_all_params(self, client: OpenAI) -> None: { "content": "string", "role": "user", + "phase": "commentary", "type": "message", } ], @@ -195,6 +196,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncOpenAI) -> { "content": "string", "role": "user", + "phase": "commentary", "type": "message", } ], diff --git a/tests/api_resources/test_responses.py b/tests/api_resources/test_responses.py index a644b2c6b9..8f82f2046d 100644 --- a/tests/api_resources/test_responses.py +++ b/tests/api_resources/test_responses.py @@ -385,6 +385,7 @@ def test_method_compact_with_all_params(self, client: OpenAI) -> None: input="string", instructions="instructions", previous_response_id="resp_123", + prompt_cache_key="prompt_cache_key", ) assert_matches_type(CompactedResponse, response, path=["response"]) @@ -793,6 +794,7 @@ async def test_method_compact_with_all_params(self, async_client: AsyncOpenAI) - input="string", instructions="instructions", previous_response_id="resp_123", + prompt_cache_key="prompt_cache_key", ) assert_matches_type(CompactedResponse, response, path=["response"]) From 9fc323f4da6cfca9de194e12c1486a3cd1bfa4b5 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 24 Feb 2026 20:24:33 +0000 Subject: [PATCH 3/4] fix(api): manual updates --- .stats.yml | 4 ++-- src/openai/types/responses/easy_input_message.py | 5 +++++ src/openai/types/responses/easy_input_message_param.py | 5 +++++ src/openai/types/responses/response_output_message.py | 5 +++++ src/openai/types/responses/response_output_message_param.py | 5 +++++ 5 files changed, 22 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 785dbdba65..6e10d4a51f 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 148 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-ca4985bc94b25eac84a5d7538d1bdf134c9b99dae9e95f1eae0aae90130c4bf8.yml -openapi_spec_hash: 855db4b2dbaf3f8f83afe0df66397c02 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-4432c056f89389d4d43b695cbdf44f97df8169f63bbae2c15fc079a5766ced6e.yml +openapi_spec_hash: cbf649cc2c944fb3f77450ec752ab1e9 config_hash: 7f49c38fa3abe9b7038ffe62262c4912 diff --git a/src/openai/types/responses/easy_input_message.py b/src/openai/types/responses/easy_input_message.py index c3add7d195..0ac1fd2610 100644 --- a/src/openai/types/responses/easy_input_message.py +++ b/src/openai/types/responses/easy_input_message.py @@ -36,6 +36,11 @@ class EasyInputMessage(BaseModel): final answer (`final_answer`). For models like `gpt-5.3-codex` and beyond, when sending follow-up requests, preserve and resend phase on all assistant messages — dropping it can degrade performance. Not used for user messages. + + Use `commentary` for an intermediate assistant message and `final_answer` for + the final assistant message. For follow-up requests with models like + `gpt-5.3-codex` and later, preserve and resend phase on all assistant messages. + Omitting it can degrade performance. Not used for user messages. """ type: Optional[Literal["message"]] = None diff --git a/src/openai/types/responses/easy_input_message_param.py b/src/openai/types/responses/easy_input_message_param.py index 2b3f454756..b8affcbd5c 100644 --- a/src/openai/types/responses/easy_input_message_param.py +++ b/src/openai/types/responses/easy_input_message_param.py @@ -37,6 +37,11 @@ class EasyInputMessageParam(TypedDict, total=False): final answer (`final_answer`). For models like `gpt-5.3-codex` and beyond, when sending follow-up requests, preserve and resend phase on all assistant messages — dropping it can degrade performance. Not used for user messages. + + Use `commentary` for an intermediate assistant message and `final_answer` for + the final assistant message. For follow-up requests with models like + `gpt-5.3-codex` and later, preserve and resend phase on all assistant messages. + Omitting it can degrade performance. Not used for user messages. """ type: Literal["message"] diff --git a/src/openai/types/responses/response_output_message.py b/src/openai/types/responses/response_output_message.py index 09a1f88170..9cbb7fe5e6 100644 --- a/src/openai/types/responses/response_output_message.py +++ b/src/openai/types/responses/response_output_message.py @@ -41,4 +41,9 @@ class ResponseOutputMessage(BaseModel): final answer (`final_answer`). For models like `gpt-5.3-codex` and beyond, when sending follow-up requests, preserve and resend phase on all assistant messages — dropping it can degrade performance. Not used for user messages. + + Use `commentary` for an intermediate assistant message and `final_answer` for + the final assistant message. For follow-up requests with models like + `gpt-5.3-codex` and later, preserve and resend phase on all assistant messages. + Omitting it can degrade performance. Not used for user messages. """ diff --git a/src/openai/types/responses/response_output_message_param.py b/src/openai/types/responses/response_output_message_param.py index 3a054a5323..5284b4896f 100644 --- a/src/openai/types/responses/response_output_message_param.py +++ b/src/openai/types/responses/response_output_message_param.py @@ -41,4 +41,9 @@ class ResponseOutputMessageParam(TypedDict, total=False): final answer (`final_answer`). For models like `gpt-5.3-codex` and beyond, when sending follow-up requests, preserve and resend phase on all assistant messages — dropping it can degrade performance. Not used for user messages. + + Use `commentary` for an intermediate assistant message and `final_answer` for + the final assistant message. For follow-up requests with models like + `gpt-5.3-codex` and later, preserve and resend phase on all assistant messages. + Omitting it can degrade performance. Not used for user messages. """ From a3467a9e5aa28cfc2f3304153dec7c37814449bc Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 27 Feb 2026 05:24:05 +0000 Subject: [PATCH 4/4] release: 2.25.0 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 14 ++++++++++++++ pyproject.toml | 2 +- src/openai/_version.py | 2 +- 4 files changed, 17 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 288087c17b..c5fe8ab6d6 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "2.24.0" + ".": "2.25.0" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 91da3fc859..32434c5caf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,19 @@ # Changelog +## 2.25.0 (2026-02-27) + +Full Changelog: [v2.24.0...v2.25.0](https://github.com/openai/openai-python/compare/v2.24.0...v2.25.0) + +### Features + +* **api:** remove prompt_cache_key param from responses, phase field from message types ([44fb382](https://github.com/openai/openai-python/commit/44fb382698872d98d5f72c880b47846c7b594f4f)) + + +### Bug Fixes + +* **api:** manual updates ([9fc323f](https://github.com/openai/openai-python/commit/9fc323f4da6cfca9de194e12c1486a3cd1bfa4b5)) +* **api:** readd phase ([1b27b5a](https://github.com/openai/openai-python/commit/1b27b5a834f5cb75f80c597259d0df0352ba83bd)) + ## 2.24.0 (2026-02-24) Full Changelog: [v2.23.0...v2.24.0](https://github.com/openai/openai-python/compare/v2.23.0...v2.24.0) diff --git a/pyproject.toml b/pyproject.toml index 49ab3668e8..f7aae6cbdb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "openai" -version = "2.24.0" +version = "2.25.0" description = "The official Python library for the openai API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/openai/_version.py b/src/openai/_version.py index 08cf29390a..417b40c283 100644 --- a/src/openai/_version.py +++ b/src/openai/_version.py @@ -1,4 +1,4 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. __title__ = "openai" -__version__ = "2.24.0" # x-release-please-version +__version__ = "2.25.0" # x-release-please-version