We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3089982 commit 9291117Copy full SHA for 9291117
pydantic_ai_slim/pydantic_ai/agent/abstract.py
@@ -512,7 +512,7 @@ async def on_complete() -> None:
512
messages.append(_messages.ModelRequest(parts))
513
514
yield StreamedRunResult(
515
- list(messages),
+ messages,
516
graph_ctx.deps.new_message_index,
517
stream,
518
on_complete,
@@ -528,7 +528,7 @@ async def on_complete() -> None:
528
# if a tool function raised CallDeferred or ApprovalRequired.
529
# In this case there's no response to stream, but we still let the user access the output etc as normal.
530
531
- graph_ctx.state.message_history,
+ list(graph_ctx.state.message_history),
532
533
run_result=agent_run.result,
534
)
0 commit comments