From d8bc29de29e3cb45c2e83a78abc36487fbb1232a Mon Sep 17 00:00:00 2001 From: ymq Date: Thu, 10 Sep 2026 17:27:06 +0800 Subject: [PATCH] =?UTF-8?q?fix(agent):=20=E6=92=A4=E9=94=80=E8=AF=AF?= =?UTF-8?q?=E5=B8=A6=E5=85=A5=E7=9A=84=20llm=5Fcall=20project=5Fid=20?= =?UTF-8?q?=E5=8F=82=E6=95=B0(=E5=B9=B6=E8=A1=8C=E4=BC=9A=E8=AF=9D?= =?UTF-8?q?=E6=9C=AA=E5=AE=8C=E6=88=90=E6=94=B9=E5=8A=A8)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 上个提交 git add agent_loop_v2.py 时连带提交了并行会话「按项目记账」的 3 处 llm_call_msgs/native(project_id=...) 调用,但配套的 llm_bridge.py 签名 改动仍在对方工作树 dirty、未提交未部署——已部署的 llm_bridge 不认 project_id → 通用会话 llm_call_msgs() got unexpected keyword project_id 崩溃。 修复原则:只回退我自己提交的文件到与已部署 llm_bridge 一致,不替对方合并 未完成的记账工作。撤销 _llm_select_skills / _call_llm(native+fallback) 三处 project_id 实参;保留本任务的记忆注入 build_prompt_block(project_id=...) 等。 --- pipeline_service/agent_loop_v2.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/pipeline_service/agent_loop_v2.py b/pipeline_service/agent_loop_v2.py index 28455a9..04f4ce0 100644 --- a/pipeline_service/agent_loop_v2.py +++ b/pipeline_service/agent_loop_v2.py @@ -554,7 +554,6 @@ class AgentExecutor: temperature=0, org_id=self.org_id, purpose='utility', - project_id=self.project_id or '', ) m = _re.search(r"\[[^\]]*\]", content or "") if m: @@ -669,7 +668,6 @@ class AgentExecutor: model=self.model_name, temperature=self.config.temperature, org_id=self.org_id, - project_id=self.project_id or '', ) except Exception as e: logger.error(f"native function calling failed, fallback to text: {e}") @@ -681,7 +679,6 @@ class AgentExecutor: model=self.model_name, temperature=self.config.temperature, org_id=self.org_id, - project_id=self.project_id or '', ) return {"content": content or "", "tool_calls": []}