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 72f9a66 commit c44e8a8Copy full SHA for c44e8a8
pydantic_ai_slim/pydantic_ai/agent/abstract.py
@@ -493,7 +493,7 @@ async def stream_to_final(
493
raise exceptions.AgentRunError('Agent run produced final results') # pragma: no cover
494
yielded = True
495
496
- messages = graph_ctx.state.message_history
+ messages = graph_ctx.state.message_history.copy()
497
498
async def on_complete() -> None:
499
"""Called when the stream has completed.
0 commit comments