diff --git a/.release-please-manifest.json b/.release-please-manifest.json index cdb9c7d0d7..393c24840d 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "1.99.4" + ".": "1.99.5" } \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index 6a34d9da6e..1c85ee4a0c 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 111 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-56d3a72a5caa187aebcf9de169a6a28a9dc3f70a79d7467a03a9e22595936066.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-6a1bfd4738fff02ef5becc3fdb2bf0cd6c026f2c924d4147a2a515474477dd9a.yml openapi_spec_hash: 3eb8d86c06f0bb5e1190983e5acfc9ba -config_hash: 7e18239879286d68a48ac5487a649aa6 +config_hash: a67c5e195a59855fe8a5db0dc61a3e7f diff --git a/CHANGELOG.md b/CHANGELOG.md index f8fdb7a268..3d332955ef 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 1.99.5 (2025-08-08) + +Full Changelog: [v1.99.4...v1.99.5](https://github.com/openai/openai-python/compare/v1.99.4...v1.99.5) + +### Bug Fixes + +* **client:** fix verbosity parameter location in Responses ([2764ff4](https://github.com/openai/openai-python/commit/2764ff459eb8b309d25b39b40e363b16a5b95019)) + ## 1.99.4 (2025-08-08) Full Changelog: [v1.99.3...v1.99.4](https://github.com/openai/openai-python/compare/v1.99.3...v1.99.4) diff --git a/pyproject.toml b/pyproject.toml index b041682135..ca255c95bd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "openai" -version = "1.99.4" +version = "1.99.5" 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 04f835f838..12270a03d4 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__ = "1.99.4" # x-release-please-version +__version__ = "1.99.5" # x-release-please-version diff --git a/src/openai/resources/responses/responses.py b/src/openai/resources/responses/responses.py index 5ba22418ed..8983daf278 100644 --- a/src/openai/resources/responses/responses.py +++ b/src/openai/resources/responses/responses.py @@ -102,7 +102,6 @@ def create( top_p: Optional[float] | NotGiven = NOT_GIVEN, truncation: Optional[Literal["auto", "disabled"]] | NotGiven = NOT_GIVEN, user: str | NotGiven = NOT_GIVEN, - verbosity: Optional[Literal["low", "medium", "high"]] | NotGiven = NOT_GIVEN, # 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, @@ -291,10 +290,6 @@ def create( similar requests and to help OpenAI detect and prevent abuse. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). - verbosity: Constrains the verbosity of the model's response. Lower values will result in - more concise responses, while higher values will result in more verbose - responses. Currently supported values are `low`, `medium`, and `high`. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -335,7 +330,6 @@ def create( top_p: Optional[float] | NotGiven = NOT_GIVEN, truncation: Optional[Literal["auto", "disabled"]] | NotGiven = NOT_GIVEN, user: str | NotGiven = NOT_GIVEN, - verbosity: Optional[Literal["low", "medium", "high"]] | NotGiven = NOT_GIVEN, # 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, @@ -524,10 +518,6 @@ def create( similar requests and to help OpenAI detect and prevent abuse. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). - verbosity: Constrains the verbosity of the model's response. Lower values will result in - more concise responses, while higher values will result in more verbose - responses. Currently supported values are `low`, `medium`, and `high`. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -568,7 +558,6 @@ def create( top_p: Optional[float] | NotGiven = NOT_GIVEN, truncation: Optional[Literal["auto", "disabled"]] | NotGiven = NOT_GIVEN, user: str | NotGiven = NOT_GIVEN, - verbosity: Optional[Literal["low", "medium", "high"]] | NotGiven = NOT_GIVEN, # 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, @@ -757,10 +746,6 @@ def create( similar requests and to help OpenAI detect and prevent abuse. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). - verbosity: Constrains the verbosity of the model's response. Lower values will result in - more concise responses, while higher values will result in more verbose - responses. Currently supported values are `low`, `medium`, and `high`. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -800,7 +785,6 @@ def create( top_p: Optional[float] | NotGiven = NOT_GIVEN, truncation: Optional[Literal["auto", "disabled"]] | NotGiven = NOT_GIVEN, user: str | NotGiven = NOT_GIVEN, - verbosity: Optional[Literal["low", "medium", "high"]] | NotGiven = NOT_GIVEN, # 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, @@ -838,7 +822,6 @@ def create( "top_p": top_p, "truncation": truncation, "user": user, - "verbosity": verbosity, }, response_create_params.ResponseCreateParamsStreaming if stream @@ -1485,7 +1468,6 @@ async def create( top_p: Optional[float] | NotGiven = NOT_GIVEN, truncation: Optional[Literal["auto", "disabled"]] | NotGiven = NOT_GIVEN, user: str | NotGiven = NOT_GIVEN, - verbosity: Optional[Literal["low", "medium", "high"]] | NotGiven = NOT_GIVEN, # 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, @@ -1674,10 +1656,6 @@ async def create( similar requests and to help OpenAI detect and prevent abuse. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). - verbosity: Constrains the verbosity of the model's response. Lower values will result in - more concise responses, while higher values will result in more verbose - responses. Currently supported values are `low`, `medium`, and `high`. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -1718,7 +1696,6 @@ async def create( top_p: Optional[float] | NotGiven = NOT_GIVEN, truncation: Optional[Literal["auto", "disabled"]] | NotGiven = NOT_GIVEN, user: str | NotGiven = NOT_GIVEN, - verbosity: Optional[Literal["low", "medium", "high"]] | NotGiven = NOT_GIVEN, # 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, @@ -1907,10 +1884,6 @@ async def create( similar requests and to help OpenAI detect and prevent abuse. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). - verbosity: Constrains the verbosity of the model's response. Lower values will result in - more concise responses, while higher values will result in more verbose - responses. Currently supported values are `low`, `medium`, and `high`. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -1951,7 +1924,6 @@ async def create( top_p: Optional[float] | NotGiven = NOT_GIVEN, truncation: Optional[Literal["auto", "disabled"]] | NotGiven = NOT_GIVEN, user: str | NotGiven = NOT_GIVEN, - verbosity: Optional[Literal["low", "medium", "high"]] | NotGiven = NOT_GIVEN, # 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, @@ -2140,10 +2112,6 @@ async def create( similar requests and to help OpenAI detect and prevent abuse. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). - verbosity: Constrains the verbosity of the model's response. Lower values will result in - more concise responses, while higher values will result in more verbose - responses. Currently supported values are `low`, `medium`, and `high`. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -2183,7 +2151,6 @@ async def create( top_p: Optional[float] | NotGiven = NOT_GIVEN, truncation: Optional[Literal["auto", "disabled"]] | NotGiven = NOT_GIVEN, user: str | NotGiven = NOT_GIVEN, - verbosity: Optional[Literal["low", "medium", "high"]] | NotGiven = NOT_GIVEN, # 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, @@ -2221,7 +2188,6 @@ async def create( "top_p": top_p, "truncation": truncation, "user": user, - "verbosity": verbosity, }, response_create_params.ResponseCreateParamsStreaming if stream diff --git a/src/openai/types/responses/response_create_params.py b/src/openai/types/responses/response_create_params.py index 53af325328..ea91fa1265 100644 --- a/src/openai/types/responses/response_create_params.py +++ b/src/openai/types/responses/response_create_params.py @@ -253,14 +253,6 @@ class ResponseCreateParamsBase(TypedDict, total=False): [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). """ - verbosity: Optional[Literal["low", "medium", "high"]] - """Constrains the verbosity of the model's response. - - Lower values will result in more concise responses, while higher values will - result in more verbose responses. Currently supported values are `low`, - `medium`, and `high`. - """ - class StreamOptions(TypedDict, total=False): include_obfuscation: bool diff --git a/src/openai/types/responses/response_text_config.py b/src/openai/types/responses/response_text_config.py index a1894a9176..c53546da6d 100644 --- a/src/openai/types/responses/response_text_config.py +++ b/src/openai/types/responses/response_text_config.py @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. from typing import Optional +from typing_extensions import Literal from ..._models import BaseModel from .response_format_text_config import ResponseFormatTextConfig @@ -24,3 +25,11 @@ class ResponseTextConfig(BaseModel): ensures the message the model generates is valid JSON. Using `json_schema` is preferred for models that support it. """ + + verbosity: Optional[Literal["low", "medium", "high"]] = None + """Constrains the verbosity of the model's response. + + Lower values will result in more concise responses, while higher values will + result in more verbose responses. Currently supported values are `low`, + `medium`, and `high`. + """ diff --git a/src/openai/types/responses/response_text_config_param.py b/src/openai/types/responses/response_text_config_param.py index aec064bf89..1229fce35b 100644 --- a/src/openai/types/responses/response_text_config_param.py +++ b/src/openai/types/responses/response_text_config_param.py @@ -2,7 +2,8 @@ from __future__ import annotations -from typing_extensions import TypedDict +from typing import Optional +from typing_extensions import Literal, TypedDict from .response_format_text_config_param import ResponseFormatTextConfigParam @@ -25,3 +26,11 @@ class ResponseTextConfigParam(TypedDict, total=False): ensures the message the model generates is valid JSON. Using `json_schema` is preferred for models that support it. """ + + verbosity: Optional[Literal["low", "medium", "high"]] + """Constrains the verbosity of the model's response. + + Lower values will result in more concise responses, while higher values will + result in more verbose responses. Currently supported values are `low`, + `medium`, and `high`. + """ diff --git a/tests/api_resources/test_responses.py b/tests/api_resources/test_responses.py index 4f8c88fa27..310800b87e 100644 --- a/tests/api_resources/test_responses.py +++ b/tests/api_resources/test_responses.py @@ -55,7 +55,10 @@ def test_method_create_with_all_params_overload_1(self, client: OpenAI) -> None: stream=False, stream_options={"include_obfuscation": True}, temperature=1, - text={"format": {"type": "text"}}, + text={ + "format": {"type": "text"}, + "verbosity": "low", + }, tool_choice="none", tools=[ { @@ -70,7 +73,6 @@ def test_method_create_with_all_params_overload_1(self, client: OpenAI) -> None: top_p=1, truncation="auto", user="user-1234", - verbosity="low", ) assert_matches_type(Response, response, path=["response"]) @@ -131,7 +133,10 @@ def test_method_create_with_all_params_overload_2(self, client: OpenAI) -> None: store=True, stream_options={"include_obfuscation": True}, temperature=1, - text={"format": {"type": "text"}}, + text={ + "format": {"type": "text"}, + "verbosity": "low", + }, tool_choice="none", tools=[ { @@ -146,7 +151,6 @@ def test_method_create_with_all_params_overload_2(self, client: OpenAI) -> None: top_p=1, truncation="auto", user="user-1234", - verbosity="low", ) response_stream.response.close() @@ -402,7 +406,10 @@ async def test_method_create_with_all_params_overload_1(self, async_client: Asyn stream=False, stream_options={"include_obfuscation": True}, temperature=1, - text={"format": {"type": "text"}}, + text={ + "format": {"type": "text"}, + "verbosity": "low", + }, tool_choice="none", tools=[ { @@ -417,7 +424,6 @@ async def test_method_create_with_all_params_overload_1(self, async_client: Asyn top_p=1, truncation="auto", user="user-1234", - verbosity="low", ) assert_matches_type(Response, response, path=["response"]) @@ -478,7 +484,10 @@ async def test_method_create_with_all_params_overload_2(self, async_client: Asyn store=True, stream_options={"include_obfuscation": True}, temperature=1, - text={"format": {"type": "text"}}, + text={ + "format": {"type": "text"}, + "verbosity": "low", + }, tool_choice="none", tools=[ { @@ -493,7 +502,6 @@ async def test_method_create_with_all_params_overload_2(self, async_client: Asyn top_p=1, truncation="auto", user="user-1234", - verbosity="low", ) await response_stream.response.aclose()