refactor: MoA uses lightweight API references + SDK arbiter as aggregator

Instead of spawning separate processes or using OpenRouter, MoA now:
- Queries external API models (Kimi, GLM) in parallel for opinions
- Injects opinions into the SDK arbiter's prompt
- The existing subscription-based arbiter aggregates all perspectives

No extra SDK processes, no OpenRouter dependency. Per-model config via
MOA_REF_MODELS + MOA_{NAME}_MODEL/BASE_URL/API_KEY env vars.
This commit is contained in:
Eyejoker
2026-03-31 00:26:24 +09:00
parent f4b04d6c4d
commit f98dd27712
6 changed files with 130 additions and 175 deletions

View File

@@ -58,13 +58,17 @@ STATUS_CHANNEL_ID= # Discord channel ID for live status updat
# ARBITER_FALLBACK_ENABLED=true # Fall back to codex on Claude failure (default: true)
# --- Mixture of Agents (MoA) ---
# Queries multiple models in parallel for arbiter verdicts, then aggregates.
# Requires OpenAI-compatible API (OpenRouter recommended for multi-model access).
# Queries external API models in parallel before arbiter runs.
# Their opinions are injected into the arbiter's prompt for better judgment.
# The SDK arbiter (subscription-based, no extra cost) aggregates all perspectives.
# MOA_ENABLED=true
# MOA_BASE_URL=https://openrouter.ai/api/v1
# MOA_API_KEY=sk-or-xxx
# MOA_REFERENCE_MODELS=anthropic/claude-sonnet-4-6,openai/gpt-5.4,deepseek/deepseek-chat
# MOA_AGGREGATOR_MODEL=anthropic/claude-opus-4-6
# MOA_REF_MODELS=kimi,glm # Comma-separated reference model names
# MOA_KIMI_MODEL=kimi-k2.5 # Kimi model
# MOA_KIMI_BASE_URL=https://api.kimi.com/coding # Kimi API endpoint
# MOA_KIMI_API_KEY=sk-kimi-xxx # Kimi API key
# MOA_GLM_MODEL=glm-4-plus # GLM model
# MOA_GLM_BASE_URL=https://open.bigmodel.cn/api/paas/v4 # GLM API endpoint
# MOA_GLM_API_KEY=xxx # GLM API key
# --- Advanced ---
# MAX_CONCURRENT_AGENTS=5 # Max parallel agent processes