修复总控智能体共识后仍被错判为继续派活的死循环

_find_dispatch_message 原实现会一路向前翻历史,直到撞到任意一条带
tool_calls 的 AIMessage,导致本轮 LLM 即使共识(tool_calls=[]),也会
被上一轮的派活 AI 翻出来再用一次,前端因此把同样的 task 又发给子智能体,
形成"嘴上共识、手上派活"的死循环。

改成只看最新一条 AIMessage(跳过末尾 skill_stop / clarification ack
ToolMessage 即可),让 tool_calls 是否为空作为本轮的唯一权威信号。

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
hkdongandClaude Opus 4.7 committed 2026-05-27 18:07:30 +08:00
1 parent 621fdc9244
commit c769dd20f7
3 files changed
+30 -15

No files matched your search

+1 -1
View File
@@ -14,7 +14,7 @@ models:
display_name: DeepSeek Chat
use: langchain_openai:ChatOpenAI
model: deepseek-chat
api_key: sk-e1c22b7931dc446f8b67e57878edd105
api_key: sk-1520028668cb4cc388ed8315ff1e856e
base_url: https://api.deepseek.com
request_timeout: 600.0
max_retries: 2