Skip to content

Commit 250927b

Browse files
committed
fix
1 parent e3edda9 commit 250927b

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
@@ -521,7 +521,7 @@ async def on_complete() -> None:
521521
messages.append(_messages.ModelRequest(parts))
522522

523523
yield StreamedRunResult(
524-
list(messages),
524+
messages,
525525
graph_ctx.deps.new_message_index,
526526
stream,
527527
on_complete,
@@ -537,7 +537,7 @@ async def on_complete() -> None:
537537
# if a tool function raised CallDeferred or ApprovalRequired.
538538
# In this case there's no response to stream, but we still let the user access the output etc as normal.
539539
yield StreamedRunResult(
540-
graph_ctx.state.message_history,
540+
list(graph_ctx.state.message_history),
541541
graph_ctx.deps.new_message_index,
542542
run_result=agent_run.result,
543543
)

0 commit comments

Comments
 (0)