feat: 多模型 Worker 池,支持按 LLM 配置分配并发会话

实现 #41:系统配置可设置 worker_pools,使本地模型与云端模型等各占用若干 Work Agent 会话并在同一任务内并行执行。空配置保持原 workers 遗留行为。
This commit is contained in:
RuoJi6 committed 2026-10-23 19:14:35 +08:00
1 parent 620ca5d96c
commit 6f09b313d6
9 files changed
+499 -34

No files matched your search

+1
View File
@@ -3338,6 +3338,7 @@ export const settings: Settings = {
global_proxy: "",
python_interpreter: "/usr/bin/python3",
workers: 3,
worker_pools: [],
llm_pool_enabled: true,
llm_pool_bind_fallback: false,
noa_compaction: false,
+2
View File
@@ -968,6 +968,8 @@ export interface Settings {
global_proxy?: string;
python_interpreter?: string; // 自定义脚本工具的 python 解释器路径(空=运行时检测)
workers?: number; // 并发工作 agent 数(默认3);对之后启动的任务生效
// 多模型 Worker 池:每个 LLM 配置各自占用若干并发会话。空/缺省=走上面的 workers 遗留模式。
worker_pools?: { profile_id: number; workers: number }[];
// 任务并发上限:同时「运行中」的任务数上限。关闭=不限;开启后新建任务超限则排队,有空位自动启动。
task_concurrency_enabled?: boolean; // 默认 false
task_concurrency_limit?: number; // 开启后默认 5