Implementation:Openai Openai python Response Reasoning Summary Part Added
| 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 new reasoning summary part is added during a streaming response, provided by the openai-python SDK.
Description
ResponseReasoningSummaryPartAddedEvent is a Pydantic model representing the response.reasoning_summary_part.added streaming event. It is emitted when a new summary part begins within a reasoning item. The event carries a part object (containing text and type fields), the item_id linking it to the parent reasoning item, output_index and summary_index for positional tracking, and a sequence_number for stream ordering.
Usage
Import this type when handling streaming events from reasoning models and you need to detect the start of a new reasoning summary part.
Code Reference
Source Location
- Repository: openai-python
- File: src/openai/types/responses/response_reasoning_summary_part_added_event.py
Signature
class ResponseReasoningSummaryPartAddedEvent(BaseModel):
"""Emitted when a new reasoning summary part is added."""
item_id: str
output_index: int
part: Part
sequence_number: int
summary_index: int
type: Literal["response.reasoning_summary_part.added"]
Import
from openai.types.responses import ResponseReasoningSummaryPartAddedEvent
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 summary part that was added. 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.added"] | Yes | The type of the event. Always response.reasoning_summary_part.added.
|
Usage Examples
import openai
client = openai.OpenAI()
stream = client.responses.create(
model="o3-mini",
input="Explain quantum entanglement step by step.",
stream=True,
)
for event in stream:
if event.type == "response.reasoning_summary_part.added":
print(f"New summary part at index {event.summary_index}: {event.part.text}")