From 2fda12c8a4ebd70bdefcd8afd4d1ac768adf88b8 Mon Sep 17 00:00:00 2001 From: liyizhouAI Date: Fri, 17 Apr 2026 12:15:28 +0800 Subject: [PATCH] fix: report generation uses separate LLM (SiliconFlow) to avoid GLM 429 Report generation now supports REPORT_LLM_* env vars to route report LLM calls through a separate provider (SiliconFlow Qwen-32B) instead of sharing the GLM rate limit with simulation. Also passes the report LLM client to ZepToolsService so tool calls (PanoramaSearch, QuickSearch, InsightForge, InterviewAgents) use the same provider. --- backend/app/services/report_agent.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/backend/app/services/report_agent.py b/backend/app/services/report_agent.py index be9a01b7..28342128 100644 --- a/backend/app/services/report_agent.py +++ b/backend/app/services/report_agent.py @@ -903,8 +903,12 @@ class ReportAgent: self.simulation_id = simulation_id self.simulation_requirement = simulation_requirement - self.llm = llm_client or LLMClient() - self.zep_tools = zep_tools or ZepToolsService() + self.llm = llm_client or LLMClient( + api_key=os.environ.get("REPORT_LLM_API_KEY") or None, + base_url=os.environ.get("REPORT_LLM_BASE_URL") or None, + model=os.environ.get("REPORT_LLM_MODEL_NAME") or None, + ) + self.zep_tools = zep_tools or ZepToolsService(llm_client=self.llm) # 工具定义 self.tools = self._define_tools()