@@ -1270,12 +1270,7 @@ async def _get_event_iterator(self) -> AsyncIterator[ModelResponseStreamEvent]:
1270
1270
tool_call_id = chunk .item .call_id ,
1271
1271
)
1272
1272
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
1279
1274
elif isinstance (chunk .item , responses .ResponseOutputMessage ):
1280
1275
pass
1281
1276
elif isinstance (chunk .item , responses .ResponseFunctionWebSearch ):
@@ -1291,7 +1286,11 @@ async def _get_event_iterator(self) -> AsyncIterator[ModelResponseStreamEvent]:
1291
1286
pass
1292
1287
1293
1288
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
+ )
1295
1294
1296
1295
elif isinstance (chunk , responses .ResponseReasoningSummaryPartDoneEvent ):
1297
1296
pass # there's nothing we need to do here
@@ -1301,19 +1300,17 @@ async def _get_event_iterator(self) -> AsyncIterator[ModelResponseStreamEvent]:
1301
1300
1302
1301
elif isinstance (chunk , responses .ResponseReasoningSummaryTextDeltaEvent ):
1303
1302
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 } ' ,
1305
1304
content = chunk .delta ,
1306
- signature = chunk .item_id ,
1305
+ id = chunk .item_id ,
1307
1306
)
1308
1307
1309
1308
# TODO(Marcelo): We should support annotations in the future.
1310
1309
elif isinstance (chunk , responses .ResponseOutputTextAnnotationAddedEvent ):
1311
1310
pass # there's nothing we need to do here
1312
1311
1313
1312
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 )
1317
1314
if maybe_event is not None : # pragma: no branch
1318
1315
yield maybe_event
1319
1316
0 commit comments