Commit 2026d533
Changed files (12)
src
openai
tests
api_resources
src/openai/types/responses/__init__.py
@@ -94,24 +94,20 @@ from .response_format_text_config_param import ResponseFormatTextConfigParam as
from .response_function_tool_call_param import ResponseFunctionToolCallParam as ResponseFunctionToolCallParam
from .response_mcp_call_completed_event import ResponseMcpCallCompletedEvent as ResponseMcpCallCompletedEvent
from .response_function_web_search_param import ResponseFunctionWebSearchParam as ResponseFunctionWebSearchParam
+from .response_reasoning_text_done_event import ResponseReasoningTextDoneEvent as ResponseReasoningTextDoneEvent
from .response_code_interpreter_tool_call import ResponseCodeInterpreterToolCall as ResponseCodeInterpreterToolCall
from .response_input_message_content_list import ResponseInputMessageContentList as ResponseInputMessageContentList
from .response_mcp_call_in_progress_event import ResponseMcpCallInProgressEvent as ResponseMcpCallInProgressEvent
+from .response_reasoning_text_delta_event import ResponseReasoningTextDeltaEvent as ResponseReasoningTextDeltaEvent
from .response_audio_transcript_done_event import ResponseAudioTranscriptDoneEvent as ResponseAudioTranscriptDoneEvent
from .response_file_search_tool_call_param import ResponseFileSearchToolCallParam as ResponseFileSearchToolCallParam
from .response_mcp_list_tools_failed_event import ResponseMcpListToolsFailedEvent as ResponseMcpListToolsFailedEvent
from .response_audio_transcript_delta_event import (
ResponseAudioTranscriptDeltaEvent as ResponseAudioTranscriptDeltaEvent,
)
-from .response_reasoning_summary_done_event import (
- ResponseReasoningSummaryDoneEvent as ResponseReasoningSummaryDoneEvent,
-)
from .response_mcp_call_arguments_done_event import (
ResponseMcpCallArgumentsDoneEvent as ResponseMcpCallArgumentsDoneEvent,
)
-from .response_reasoning_summary_delta_event import (
- ResponseReasoningSummaryDeltaEvent as ResponseReasoningSummaryDeltaEvent,
-)
from .response_computer_tool_call_output_item import (
ResponseComputerToolCallOutputItem as ResponseComputerToolCallOutputItem,
)
src/openai/types/responses/response_reasoning_item.py
@@ -5,29 +5,38 @@ from typing_extensions import Literal
from ..._models import BaseModel
-__all__ = ["ResponseReasoningItem", "Summary"]
+__all__ = ["ResponseReasoningItem", "Summary", "Content"]
class Summary(BaseModel):
text: str
- """
- A short summary of the reasoning used by the model when generating the response.
- """
+ """A summary of the reasoning output from the model so far."""
type: Literal["summary_text"]
"""The type of the object. Always `summary_text`."""
+class Content(BaseModel):
+ text: str
+ """Reasoning text output from the model."""
+
+ type: Literal["reasoning_text"]
+ """The type of the object. Always `reasoning_text`."""
+
+
class ResponseReasoningItem(BaseModel):
id: str
"""The unique identifier of the reasoning content."""
summary: List[Summary]
- """Reasoning text contents."""
+ """Reasoning summary content."""
type: Literal["reasoning"]
"""The type of the object. Always `reasoning`."""
+ content: Optional[List[Content]] = None
+ """Reasoning text content."""
+
encrypted_content: Optional[str] = None
"""
The encrypted content of the reasoning item - populated when a response is
src/openai/types/responses/response_reasoning_item_param.py
@@ -5,29 +5,38 @@ from __future__ import annotations
from typing import Iterable, Optional
from typing_extensions import Literal, Required, TypedDict
-__all__ = ["ResponseReasoningItemParam", "Summary"]
+__all__ = ["ResponseReasoningItemParam", "Summary", "Content"]
class Summary(TypedDict, total=False):
text: Required[str]
- """
- A short summary of the reasoning used by the model when generating the response.
- """
+ """A summary of the reasoning output from the model so far."""
type: Required[Literal["summary_text"]]
"""The type of the object. Always `summary_text`."""
+class Content(TypedDict, total=False):
+ text: Required[str]
+ """Reasoning text output from the model."""
+
+ type: Required[Literal["reasoning_text"]]
+ """The type of the object. Always `reasoning_text`."""
+
+
class ResponseReasoningItemParam(TypedDict, total=False):
id: Required[str]
"""The unique identifier of the reasoning content."""
summary: Required[Iterable[Summary]]
- """Reasoning text contents."""
+ """Reasoning summary content."""
type: Required[Literal["reasoning"]]
"""The type of the object. Always `reasoning`."""
+ content: Iterable[Content]
+ """Reasoning text content."""
+
encrypted_content: Optional[str]
"""
The encrypted content of the reasoning item - populated when a response is
src/openai/types/responses/response_reasoning_summary_delta_event.py
@@ -1,30 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from typing_extensions import Literal
-
-from ..._models import BaseModel
-
-__all__ = ["ResponseReasoningSummaryDeltaEvent"]
-
-
-class ResponseReasoningSummaryDeltaEvent(BaseModel):
- delta: object
- """The partial update to the reasoning summary content."""
-
- item_id: str
- """
- The unique identifier of the item for which the reasoning summary is being
- updated.
- """
-
- output_index: int
- """The index of the output item in the response's output array."""
-
- sequence_number: int
- """The sequence number of this event."""
-
- summary_index: int
- """The index of the summary part within the output item."""
-
- type: Literal["response.reasoning_summary.delta"]
- """The type of the event. Always 'response.reasoning_summary.delta'."""
src/openai/types/responses/response_reasoning_summary_done_event.py
@@ -1,27 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from typing_extensions import Literal
-
-from ..._models import BaseModel
-
-__all__ = ["ResponseReasoningSummaryDoneEvent"]
-
-
-class ResponseReasoningSummaryDoneEvent(BaseModel):
- item_id: str
- """The unique identifier of the item for which the reasoning summary is finalized."""
-
- output_index: int
- """The index of the output item in the response's output array."""
-
- sequence_number: int
- """The sequence number of this event."""
-
- summary_index: int
- """The index of the summary part within the output item."""
-
- text: str
- """The finalized reasoning summary text."""
-
- type: Literal["response.reasoning_summary.done"]
- """The type of the event. Always 'response.reasoning_summary.done'."""
src/openai/types/responses/response_reasoning_text_delta_event.py
@@ -0,0 +1,27 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing_extensions import Literal
+
+from ..._models import BaseModel
+
+__all__ = ["ResponseReasoningTextDeltaEvent"]
+
+
+class ResponseReasoningTextDeltaEvent(BaseModel):
+ content_index: int
+ """The index of the reasoning content part this delta is associated with."""
+
+ delta: str
+ """The text delta that was added to the reasoning content."""
+
+ item_id: str
+ """The ID of the item this reasoning text delta is associated with."""
+
+ output_index: int
+ """The index of the output item this reasoning text delta is associated with."""
+
+ sequence_number: int
+ """The sequence number of this event."""
+
+ type: Literal["response.reasoning_text.delta"]
+ """The type of the event. Always `response.reasoning_text.delta`."""
src/openai/types/responses/response_reasoning_text_done_event.py
@@ -0,0 +1,27 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing_extensions import Literal
+
+from ..._models import BaseModel
+
+__all__ = ["ResponseReasoningTextDoneEvent"]
+
+
+class ResponseReasoningTextDoneEvent(BaseModel):
+ content_index: int
+ """The index of the reasoning content part."""
+
+ item_id: str
+ """The ID of the item this reasoning text is associated with."""
+
+ output_index: int
+ """The index of the output item this reasoning text is associated with."""
+
+ sequence_number: int
+ """The sequence number of this event."""
+
+ text: str
+ """The full text of the completed reasoning content."""
+
+ type: Literal["response.reasoning_text.done"]
+ """The type of the event. Always `response.reasoning_text.done`."""
src/openai/types/responses/response_stream_event.py
@@ -23,13 +23,13 @@ from .response_content_part_done_event import ResponseContentPartDoneEvent
from .response_output_item_added_event import ResponseOutputItemAddedEvent
from .response_content_part_added_event import ResponseContentPartAddedEvent
from .response_mcp_call_completed_event import ResponseMcpCallCompletedEvent
+from .response_reasoning_text_done_event import ResponseReasoningTextDoneEvent
from .response_mcp_call_in_progress_event import ResponseMcpCallInProgressEvent
+from .response_reasoning_text_delta_event import ResponseReasoningTextDeltaEvent
from .response_audio_transcript_done_event import ResponseAudioTranscriptDoneEvent
from .response_mcp_list_tools_failed_event import ResponseMcpListToolsFailedEvent
from .response_audio_transcript_delta_event import ResponseAudioTranscriptDeltaEvent
-from .response_reasoning_summary_done_event import ResponseReasoningSummaryDoneEvent
from .response_mcp_call_arguments_done_event import ResponseMcpCallArgumentsDoneEvent
-from .response_reasoning_summary_delta_event import ResponseReasoningSummaryDeltaEvent
from .response_image_gen_call_completed_event import ResponseImageGenCallCompletedEvent
from .response_mcp_call_arguments_delta_event import ResponseMcpCallArgumentsDeltaEvent
from .response_mcp_list_tools_completed_event import ResponseMcpListToolsCompletedEvent
@@ -88,6 +88,8 @@ ResponseStreamEvent: TypeAlias = Annotated[
ResponseReasoningSummaryPartDoneEvent,
ResponseReasoningSummaryTextDeltaEvent,
ResponseReasoningSummaryTextDoneEvent,
+ ResponseReasoningTextDeltaEvent,
+ ResponseReasoningTextDoneEvent,
ResponseRefusalDeltaEvent,
ResponseRefusalDoneEvent,
ResponseTextDeltaEvent,
@@ -109,8 +111,6 @@ ResponseStreamEvent: TypeAlias = Annotated[
ResponseMcpListToolsInProgressEvent,
ResponseOutputTextAnnotationAddedEvent,
ResponseQueuedEvent,
- ResponseReasoningSummaryDeltaEvent,
- ResponseReasoningSummaryDoneEvent,
],
PropertyInfo(discriminator="type"),
]
src/openai/types/vector_store_search_params.py
@@ -35,6 +35,7 @@ Filters: TypeAlias = Union[ComparisonFilter, CompoundFilter]
class RankingOptions(TypedDict, total=False):
- ranker: Literal["auto", "default-2024-11-15"]
+ ranker: Literal["none", "auto", "default-2024-11-15"]
+ """Enable re-ranking; set to `none` to disable, which can help reduce latency."""
score_threshold: float
tests/api_resources/test_vector_stores.py
@@ -243,7 +243,7 @@ class TestVectorStores:
},
max_num_results=1,
ranking_options={
- "ranker": "auto",
+ "ranker": "none",
"score_threshold": 0,
},
rewrite_query=True,
@@ -511,7 +511,7 @@ class TestAsyncVectorStores:
},
max_num_results=1,
ranking_options={
- "ranker": "auto",
+ "ranker": "none",
"score_threshold": 0,
},
rewrite_query=True,
.stats.yml
@@ -1,4 +1,4 @@
configured_endpoints: 111
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-721e6ccaa72205ee14c71f8163129920464fb814b95d3df9567a9476bbd9b7fb.yml
-openapi_spec_hash: 2115413a21df8b5bf9e4552a74df4312
-config_hash: 9606bb315a193bfd8da0459040143242
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-d6a16b25b969c3e5382e7d413de15bf83d5f7534d5c3ecce64d3a7e847418f9e.yml
+openapi_spec_hash: 0c0bcf4aee9ca2a948dd14b890dfe728
+config_hash: aeff9289bd7f8c8482e4d738c3c2fde1
api.md
@@ -792,12 +792,12 @@ from openai.types.responses import (
ResponsePrompt,
ResponseQueuedEvent,
ResponseReasoningItem,
- ResponseReasoningSummaryDeltaEvent,
- ResponseReasoningSummaryDoneEvent,
ResponseReasoningSummaryPartAddedEvent,
ResponseReasoningSummaryPartDoneEvent,
ResponseReasoningSummaryTextDeltaEvent,
ResponseReasoningSummaryTextDoneEvent,
+ ResponseReasoningTextDeltaEvent,
+ ResponseReasoningTextDoneEvent,
ResponseRefusalDeltaEvent,
ResponseRefusalDoneEvent,
ResponseStatus,