fix(agent): 撤销误带入的 llm_call project_id 参数(并行会话未完成改动)

上个提交 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=...) 等。
This commit is contained in:
ymq 2026-09-10 17:27:06 +08:00
parent 1c04efe1be
commit d8bc29de29

View File

@ -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": []}