From 65d8524a9d7fdbadc6c2b214d5dc609dd48cccc4 Mon Sep 17 00:00:00 2001 From: _Yusaki Date: Fri, 13 Mar 2026 20:16:27 +0700 Subject: [PATCH] Make simulation LLM concurrency configurable, default to 5 The hardcoded semaphore=30 caused Groq free tier to hang from too many concurrent requests. Now reads from config.concurrency with a safe default of 5. --- backend/scripts/run_reddit_simulation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/scripts/run_reddit_simulation.py b/backend/scripts/run_reddit_simulation.py index 14907cb..4d0b0ba 100644 --- a/backend/scripts/run_reddit_simulation.py +++ b/backend/scripts/run_reddit_simulation.py @@ -578,7 +578,7 @@ class RedditSimulationRunner: agent_graph=self.agent_graph, platform=oasis.DefaultPlatformType.REDDIT, database_path=db_path, - semaphore=30, # 限制最大并发 LLM 请求数,防止 API 过载 + semaphore=self.config.get("concurrency", 5), # 并发LLM请求数,可在配置中调整 ) await self.env.reset()