From 92af7603e0f37c00e636b3a230df323cce768d10 Mon Sep 17 00:00:00 2001 From: ymq Date: Mon, 10 Aug 2026 17:58:42 +0800 Subject: [PATCH] fix: don't count unknown tool calls toward tool_call_count --- pipeline_service/agent_loop_v2.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pipeline_service/agent_loop_v2.py b/pipeline_service/agent_loop_v2.py index 3bde1e9..be1a251 100644 --- a/pipeline_service/agent_loop_v2.py +++ b/pipeline_service/agent_loop_v2.py @@ -185,7 +185,8 @@ class AgentExecutor: }, ensure_ascii=False) + "\n" result = await self._execute_tool(tool_name, tool_params) - self._tool_call_count += 1 + if not result.startswith("未知工具"): + self._tool_call_count += 1 yield json.dumps({ "type": "tool_result", "tool": tool_name,