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.
This commit is contained in:
_Yusaki 2026-03-13 20:16:27 +07:00
parent c9c1f44711
commit 65d8524a9d

View file

@ -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()