Commit e2d25ef2

stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com>
2025-11-04 14:02:50
fix(api): fix nullability of logprobs
Makes ResponseOutputText.logprobs nullable, matching with 2.6.1. While this is always present in the server response, this inadvertently affected params and some constructors
1 parent c82714c
Changed files (3)
src/openai/types/responses/response_output_text.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
@@ -108,10 +108,10 @@ class ResponseOutputText(BaseModel):
     annotations: List[Annotation]
     """The annotations of the text output."""
 
-    logprobs: List[Logprob]
-
     text: str
     """The text output from the model."""
 
     type: Literal["output_text"]
     """The type of the output text. Always `output_text`."""
+
+    logprobs: Optional[List[Logprob]] = None
src/openai/types/responses/response_output_text_param.py
@@ -106,10 +106,10 @@ class ResponseOutputTextParam(TypedDict, total=False):
     annotations: Required[Iterable[Annotation]]
     """The annotations of the text output."""
 
-    logprobs: Required[Iterable[Logprob]]
-
     text: Required[str]
     """The text output from the model."""
 
     type: Required[Literal["output_text"]]
     """The type of the output text. Always `output_text`."""
+
+    logprobs: Iterable[Logprob]
.stats.yml
@@ -1,4 +1,4 @@
 configured_endpoints: 136
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-3c5d1593d7c6f2b38a7d78d7906041465ee9d6e9022f0651e1da194654488108.yml
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-eeba8addf3a5f412e5ce8d22031e60c61650cee3f5d9e587a2533f6818a249ea.yml
 openapi_spec_hash: 0a4d8ad2469823ce24a3fd94f23f1c2b
-config_hash: 032995825500a503a76da119f5354905
+config_hash: 0bb1941a78ece0b610a2fbba7d74a84c