v2.0.5: FAST_MODEL routing + tool-use summaries + Qwen dispatch + Arena
Source-level recon of QwenLM/qwen-code (Apache-2.0) informed 4 lifts: 1. FAST_MODEL config: optional env var routes cheap LLM calls (titles, summaries, labeling) to a smaller model on llama-swap. auto_name.ts uses ctx.config.FAST_MODEL ?? session.model. Set FAST_MODEL=nemotron- nano-4b to avoid loading the 35B model for 20-token title generation. 2. Tool-use summaries (services/inference/tool-summaries.ts): utility that generates "git-commit-subject-style" labels for tool batches via a fast-model LLM call. System prompt + truncation logic ported from Qwen Code's toolUseSummary.ts. Exported via @boocode/server/inference for BooCoder's dispatcher to call after task completion. 3. Qwen as dispatchable agent: added to agent-probe.ts KNOWN_AGENTS. PTY dispatch builds: qwen -p "<task>" --output-format stream-json (NDJSON structured events over stdout). Env: OPENAI_BASE_URL + OPENAI_API_KEY points Qwen Code at llama-swap. execution_path CHECK constraint extended with 'qwen'. 4. Arena routes (routes/arena.ts): POST /api/arena dispatches the same task to N contestants (2-5, each with different agent/model), each getting its own task row linked by arena_id UUID. GET /api/arena/:id shows all contestants. POST /api/arena/:id/select/:task_id marks winner. Schema: arena_id column added to tasks. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
* Supported agents:
|
||||
* - claude: `claude -p --model <model>` (print mode, reads task from stdin)
|
||||
* - opencode: `echo <task> | opencode` (stdin pipe — exact flags TBD)
|
||||
* - qwen: `qwen -p <task> --output-format stream-json` (NDJSON structured output)
|
||||
* - goose: stub (not yet supported)
|
||||
* - pi: stub (not yet supported)
|
||||
*/
|
||||
@@ -51,6 +52,12 @@ function buildAgentCommand(agent: string, task: string, model?: string): string
|
||||
? `echo '${escapedTask}' | opencode --model '${model}'`
|
||||
: `echo '${escapedTask}' | opencode`;
|
||||
|
||||
case 'qwen':
|
||||
// Qwen Code: structured JSON output mode for parseable events
|
||||
return model
|
||||
? `qwen -p '${escapedTask}' --model '${model}' --output-format stream-json`
|
||||
: `qwen -p '${escapedTask}' --output-format stream-json`;
|
||||
|
||||
case 'goose':
|
||||
// Not yet verified for non-interactive use
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user