From 8fd21e76f217d3c9896ae9b7c86357959ce513e8 Mon Sep 17 00:00:00 2001 From: Dong_master <2213070223@qq.com> Date: Wed, 13 Aug 2025 00:00:10 +0800 Subject: [PATCH] fix: Only when messagechunk is present, will msg_sequence be assigned to the subsequent tool calls. --- pkg/provider/runners/localagent.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/provider/runners/localagent.py b/pkg/provider/runners/localagent.py index f7f17dae..b61b02e4 100644 --- a/pkg/provider/runners/localagent.py +++ b/pkg/provider/runners/localagent.py @@ -171,7 +171,9 @@ class LocalAgentRunner(runner.RequestRunner): pending_tool_calls = final_msg.tool_calls first_content = final_msg.content - first_end_sequence = final_msg.msg_sequence + if isinstance(final_msg, llm_entities.MessageChunk): + + first_end_sequence = final_msg.msg_sequence req_messages.append(final_msg)