Merge pull request #3182 from xinnan-tech/perf-tool-add-online-search

fix:修复deepseek模型下工具名重复导致错误问题
This commit is contained in:
wengzh
2026-05-20 15:03:26 +08:00
committed by GitHub
+1 -1
View File
@@ -952,7 +952,7 @@ class ConnectionHandler:
and hasattr(self, "func_handler")
and not force_final_answer
):
functions = self.func_handler.get_functions()
functions = list(self.func_handler.get_functions())
# 仅在第一层调用时注入 direct_answer 虚拟工具
# 递归调用(depth>0)不注入,避免模型在生成文本回复时再次调 direct_answer 导致循环
if functions is not None and depth == 0: