File tree Expand file tree Collapse file tree 2 files changed +6
-7
lines changed Expand file tree Collapse file tree 2 files changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -1462,18 +1462,19 @@ async def _run_single_turn_streamed(
14621462 # Filter out tool calls - they don't have outputs yet, so shouldn't be saved
14631463 # This prevents saving incomplete tool calls that violate API requirements
14641464 items_for_session = [
1465- item
1466- for item in items_to_save
1467- if not isinstance (item , ToolCallItem )
1465+ item for item in items_to_save if not isinstance (item , ToolCallItem )
14681466 ]
14691467 # Type ignore: intentionally filtering out ToolCallItem to avoid saving
14701468 # incomplete tool calls without corresponding outputs
14711469 await AgentRunner ._save_result_to_session (
1472- session , [], items_for_session # type: ignore[arg-type]
1470+ session ,
1471+ [],
1472+ items_for_session , # type: ignore[arg-type]
14731473 )
14741474
14751475 # Stream the items to the event queue
14761476 import dataclasses as _dc
1477+
14771478 RunImpl .stream_step_result_to_queue (
14781479 single_step_result , streamed_result ._event_queue
14791480 )
Original file line number Diff line number Diff line change @@ -94,9 +94,7 @@ async def test_soft_cancel_with_tool_calls():
9494 tool_output_seen = True
9595
9696 assert tool_call_seen , "Tool call should be seen"
97- assert tool_output_seen , (
98- "Tool output SHOULD be seen (tools execute before cancel is honored)"
99- )
97+ assert tool_output_seen , "Tool output SHOULD be seen (tools execute before cancel is honored)"
10098 assert result .is_complete , "Result should be marked complete"
10199
102100
You can’t perform that action at this time.
0 commit comments