@@ -1270,12 +1270,7 @@ async def _get_event_iterator(self) -> AsyncIterator[ModelResponseStreamEvent]:
12701270 tool_call_id = chunk .item .call_id ,
12711271 )
12721272 elif isinstance (chunk .item , responses .ResponseReasoningItem ):
1273- content = chunk .item .summary [0 ].text if chunk .item .summary else ''
1274- yield self ._parts_manager .handle_thinking_delta (
1275- vendor_part_id = chunk .item .id ,
1276- content = content ,
1277- signature = chunk .item .id ,
1278- )
1273+ pass
12791274 elif isinstance (chunk .item , responses .ResponseOutputMessage ):
12801275 pass
12811276 elif isinstance (chunk .item , responses .ResponseFunctionWebSearch ):
@@ -1291,7 +1286,11 @@ async def _get_event_iterator(self) -> AsyncIterator[ModelResponseStreamEvent]:
12911286 pass
12921287
12931288 elif isinstance (chunk , responses .ResponseReasoningSummaryPartAddedEvent ):
1294- pass # there's nothing we need to do here
1289+ yield self ._parts_manager .handle_thinking_delta (
1290+ vendor_part_id = f'{ chunk .item_id } -{ chunk .summary_index } ' ,
1291+ content = chunk .part .text ,
1292+ id = chunk .item_id ,
1293+ )
12951294
12961295 elif isinstance (chunk , responses .ResponseReasoningSummaryPartDoneEvent ):
12971296 pass # there's nothing we need to do here
@@ -1301,19 +1300,17 @@ async def _get_event_iterator(self) -> AsyncIterator[ModelResponseStreamEvent]:
13011300
13021301 elif isinstance (chunk , responses .ResponseReasoningSummaryTextDeltaEvent ):
13031302 yield self ._parts_manager .handle_thinking_delta (
1304- vendor_part_id = chunk .item_id ,
1303+ vendor_part_id = f' { chunk .item_id } - { chunk . summary_index } ' ,
13051304 content = chunk .delta ,
1306- signature = chunk .item_id ,
1305+ id = chunk .item_id ,
13071306 )
13081307
13091308 # TODO(Marcelo): We should support annotations in the future.
13101309 elif isinstance (chunk , responses .ResponseOutputTextAnnotationAddedEvent ):
13111310 pass # there's nothing we need to do here
13121311
13131312 elif isinstance (chunk , responses .ResponseTextDeltaEvent ):
1314- maybe_event = self ._parts_manager .handle_text_delta (
1315- vendor_part_id = chunk .content_index , content = chunk .delta
1316- )
1313+ maybe_event = self ._parts_manager .handle_text_delta (vendor_part_id = chunk .item_id , content = chunk .delta )
13171314 if maybe_event is not None : # pragma: no branch
13181315 yield maybe_event
13191316
0 commit comments