fix: don't count unknown tool calls toward tool_call_count

This commit is contained in:
ymq 2026-08-10 17:58:42 +08:00
parent 91dabd7b4c
commit 92af7603e0

View File

@ -185,6 +185,7 @@ class AgentExecutor:
}, ensure_ascii=False) + "\n" }, ensure_ascii=False) + "\n"
result = await self._execute_tool(tool_name, tool_params) result = await self._execute_tool(tool_name, tool_params)
if not result.startswith("未知工具"):
self._tool_call_count += 1 self._tool_call_count += 1
yield json.dumps({ yield json.dumps({