Implementation:Openai Openai python Response Reasoning Summary Part Done
| Knowledge Sources | |
|---|---|
| Domains | API_Types, Responses_API |
| Last Updated | 2026-02-15 00:00 GMT |
Overview
Concrete type for representing an event emitted when a reasoning summary part is completed during a streaming response, provided by the openai-python SDK.
Description
ResponseReasoningSummaryPartDoneEvent is a Pydantic model representing the response.reasoning_summary_part.done streaming event. It is emitted when a summary part within a reasoning item has been fully generated. The event carries a part object (containing the final text and type fields), item_id, output_index, summary_index, and sequence_number.
Usage
Import this type when handling streaming events and you need to capture the finalized text of a reasoning summary part.
Code Reference
Source Location
- Repository: openai-python
- File: src/openai/types/responses/response_reasoning_summary_part_done_event.py
Signature
class ResponseReasoningSummaryPartDoneEvent(BaseModel):
"""Emitted when a reasoning summary part is completed."""
item_id: str
output_index: int
part: Part
sequence_number: int
summary_index: int
type: Literal["response.reasoning_summary_part.done"]
Import
from openai.types.responses import ResponseReasoningSummaryPartDoneEvent
I/O Contract
Fields
| Name | Type | Required | Description |
|---|---|---|---|
| item_id | str | Yes | The ID of the item this summary part is associated with. |
| output_index | int | Yes | The index of the output item this summary part is associated with. |
| part | Part | Yes | The completed summary part. Contains text (str) and type (Literal["summary_text"]). |
| sequence_number | int | Yes | The sequence number of this event. |
| summary_index | int | Yes | The index of the summary part within the reasoning summary. |
| type | Literal["response.reasoning_summary_part.done"] | Yes | The type of the event. Always response.reasoning_summary_part.done.
|
Usage Examples
import openai
client = openai.OpenAI()
stream = client.responses.create(
model="o3-mini",
input="Derive the quadratic formula step by step.",
stream=True,
)
for event in stream:
if event.type == "response.reasoning_summary_part.done":
print(f"Completed summary part [{event.summary_index}]: {event.part.text}")