Skip to content

Commit 9291117

Browse files
committed
fix
1 parent 3089982 commit 9291117

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pydantic_ai_slim/pydantic_ai/agent/abstract.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -512,7 +512,7 @@ async def on_complete() -> None:
512512
messages.append(_messages.ModelRequest(parts))
513513

514514
yield StreamedRunResult(
515-
list(messages),
515+
messages,
516516
graph_ctx.deps.new_message_index,
517517
stream,
518518
on_complete,
@@ -528,7 +528,7 @@ async def on_complete() -> None:
528528
# if a tool function raised CallDeferred or ApprovalRequired.
529529
# In this case there's no response to stream, but we still let the user access the output etc as normal.
530530
yield StreamedRunResult(
531-
graph_ctx.state.message_history,
531+
list(graph_ctx.state.message_history),
532532
graph_ctx.deps.new_message_index,
533533
run_result=agent_run.result,
534534
)

0 commit comments

Comments
 (0)