From e3e759e630f9baa280729c3391f8d4cd7a956e2c Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 25 Sep 2026 01:35:33 +0000 Subject: [PATCH] feat: model selection for droid, agy, cursor and trae Each takes the configured model as --model, now verified against the CLI itself: droid 0.226.2 (exec -m/--model), agy 1.2.10 (--model), cursor-agent 2026.09.23 (--model) and traecli 0.207.1 (exec -m/--model). Every generated review, judge and resume command was run against the real binary: each rejects an unknown flag at parse time but accepts --model in the generated position and proceeds to authentication (droid validates the model id itself). Their modelNote entries are replaced by modelArgs and a {{modelArgs}} slot in every command variant. Every built-in agent except amp can now take a model; amp has no per-run model flag. Also corrects the agy install hint: @google/antigravity-cli does not exist on npm; the official installer is https://antigravity.google/cli/install.sh. Closes #103 Closes #104 Closes #108 Closes #111 Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01YWwuLax3VBtTJuujgK748c --- CHANGELOG.md | 6 ++++-- README.md | 2 +- docs/configuration.md | 5 ++++- lib/agents/agy.json | 9 +++++++-- lib/agents/cursor.json | 7 ++++++- lib/agents/droid.json | 7 ++++++- lib/agents/trae.json | 7 ++++++- test/models.test.js | 12 +++++++++--- 8 files changed, 43 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5579887..9c7356d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,13 +2,15 @@ ## Unreleased +- The `agy` install hint now points at the official `https://antigravity.google/cli/install.sh`; + the npm package it named does not exist. - Configure the model each agent runs with: `jury agents model ` saves a default in `~/.jury/config.json`, a `model` field per agent in `jury.config.json` sets one per repository, and `--model =` sets one for a run, each overriding the one before. The model is passed as a flag or environment variable only when Jury runs the agent, on first runs, resumed rounds, replies and judging alike; the agent's own configuration is never changed. Supported for - codex, claude, grok, opencode, qwen, copilot and kimi; a configured model for any other agent - stops the run with an error. Runs record the models used, and `jury agents` shows them (#99). + every built-in agent except amp, which has no per-run model flag; a configured model for amp + stops the run with an error. Runs record the models used, and `jury agents` shows them (#99, #103, #104, #108, #111). - Add `jury agents jury` to save default reviewers globally in `~/.jury/config.json`, beside the global judge: `jury agents jury claude,droid`, `--reset`, and a checkbox picker when run with no arguments in a terminal. Runs without `--jury` use them; repository `reviewer` roles and diff --git a/README.md b/README.md index 0278e9f..04542ea 100644 --- a/README.md +++ b/README.md @@ -197,7 +197,7 @@ See [models](docs/configuration.md#models) for each agent's flag and the precede | `claude` | Anthropic Claude Code | `npm i -g @anthropic-ai/claude-code` | reviewer | | `grok` | xAI Grok | `npm i -g @vibe-kit/grok-cli` | reviewer | | `droid` | Factory Droid | `curl -fsSL https://app.factory.ai/cli \| sh` | reviewer | -| `agy` | Google Antigravity | see Antigravity's docs | reviewer | +| `agy` | Google Antigravity | `curl -fsSL https://antigravity.google/cli/install.sh \| bash` | reviewer | | `qwen` | Qwen Code | `npm i -g @qwen-code/qwen-code` | opt-in | | `copilot` | GitHub Copilot CLI | `npm i -g @github/copilot` | opt-in | | `opencode` | OpenCode | `npm i -g opencode-ai` | opt-in | diff --git a/docs/configuration.md b/docs/configuration.md index 6199e65..aaa591a 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -91,8 +91,11 @@ one stops the run before any agent starts rather than silently using its default | `qwen` | `--model` | qwen 0.24.4 | | `copilot` | `--model` | Copilot CLI 1.0.88 | | `kimi` | `--model`, an alias defined in `~/.kimi-code/config.toml` | Kimi Code 2.1.1 | +| `droid` | `--model` after `exec` (`droid exec --help` lists the IDs) | droid 0.226.2 | +| `agy` | `--model` (`agy models` lists them) | agy 1.2.10 | +| `cursor` | `--model` (`cursor-agent --list-models` lists them) | cursor-agent 2026.09.23 | +| `trae` | `--model` after `exec` | traecli 0.207.1 | | `amp` | not supported: `--mode` selects model, prompt and tools together | — | -| `droid`, `agy`, `cursor`, `trae` | not yet verified; set the model in the CLI's own configuration | — | A built-in definition supports models by marking the flag's position with a `"{{modelArgs}}"` element in every command it runs and giving `modelArgs` (for example `["--model", "{{model}}"]`), diff --git a/lib/agents/agy.json b/lib/agents/agy.json index 2045d8d..b87973c 100644 --- a/lib/agents/agy.json +++ b/lib/agents/agy.json @@ -6,6 +6,7 @@ "cwd": "worktree", "argv": [ "agy", + "{{modelArgs}}", "--dangerously-skip-permissions", "--add-dir", "{{worktree}}", @@ -22,6 +23,7 @@ "supported": true, "argv": [ "agy", + "{{modelArgs}}", "--dangerously-skip-permissions", "--add-dir", "{{worktree}}", @@ -36,9 +38,12 @@ ], "idFrom": "\"conversation_id\"\\s*:\\s*\"([^\"]+)\"" }, - "modelNote": "no per-run model flag verified for this CLI yet; set its model in the CLI's own configuration", + "modelArgs": [ + "--model", + "{{model}}" + ], "report": "agy-json", "expectSeconds": 420, - "install": "npm install -g @google/antigravity-cli", + "install": "curl -fsSL https://antigravity.google/cli/install.sh | bash", "docs": "https://antigravity.google/docs/cli" } diff --git a/lib/agents/cursor.json b/lib/agents/cursor.json index bf91d77..56c6edc 100644 --- a/lib/agents/cursor.json +++ b/lib/agents/cursor.json @@ -7,6 +7,7 @@ "cwd": "worktree", "argv": [ "cursor-agent", + "{{modelArgs}}", "-p", "--output-format", "json", @@ -15,6 +16,7 @@ ], "judgeArgv": [ "cursor-agent", + "{{modelArgs}}", "-p", "--output-format", "json", @@ -28,7 +30,10 @@ "supported": false, "reason": "fresh conversation with finding context; never extract session ids from assistant prose" }, - "modelNote": "no per-run model flag verified for this CLI yet; set its model in the CLI's own configuration", + "modelArgs": [ + "--model", + "{{model}}" + ], "report": "result-json", "expectSeconds": 400, "install": "curl https://cursor.com/install -fsS | bash", diff --git a/lib/agents/droid.json b/lib/agents/droid.json index 2516861..6fbbf0d 100644 --- a/lib/agents/droid.json +++ b/lib/agents/droid.json @@ -7,6 +7,7 @@ "argv": [ "droid", "exec", + "{{modelArgs}}", "--cwd", "{{worktree}}", "--auto", @@ -23,6 +24,7 @@ "argv": [ "droid", "exec", + "{{modelArgs}}", "--cwd", "{{worktree}}", "--auto", @@ -36,7 +38,10 @@ ], "idFrom": "\"session_id\"\\s*:\\s*\"([^\"]+)\"" }, - "modelNote": "no per-run model flag verified for this CLI yet; set its model in the CLI's own configuration", + "modelArgs": [ + "--model", + "{{model}}" + ], "report": "result-json", "expectSeconds": 130, "install": "curl -fsSL https://app.factory.ai/cli | sh", diff --git a/lib/agents/trae.json b/lib/agents/trae.json index ec2ff6b..05b0f71 100644 --- a/lib/agents/trae.json +++ b/lib/agents/trae.json @@ -8,6 +8,7 @@ "argv": [ "traecli", "exec", + "{{modelArgs}}", "--sandbox", "read-only", "--skip-git-repo-check", @@ -17,6 +18,7 @@ "judgeArgv": [ "traecli", "exec", + "{{modelArgs}}", "--sandbox", "workspace-write", "--skip-git-repo-check", @@ -29,7 +31,10 @@ "supported": false, "reason": "exec session ids are not documented in its output; replies start fresh with finding context" }, - "modelNote": "no per-run model flag verified for this CLI yet; set its model in the CLI's own configuration", + "modelArgs": [ + "--model", + "{{model}}" + ], "report": "whole", "expectSeconds": 900, "install": "sh -c \"$(curl -fsSL https://trae.cn/trae-cli/install_v2.sh)\"", diff --git a/test/models.test.js b/test/models.test.js index 9978f04..763fc23 100644 --- a/test/models.test.js +++ b/test/models.test.js @@ -23,7 +23,9 @@ async function scratch(t, prefix) { // Where each CLI's model flag lands, verified against its own --help: // codex-cli 0.156.1 (exec and exec resume: -m, --model), Claude Code 2.1.281 // (--model), opencode 1.18.32 (run: -m, --model), qwen 0.24.4 (-m, --model), -// Copilot CLI 1.0.88 (--model), Kimi Code 2.1.1 (-m, --model). +// Copilot CLI 1.0.88 (--model), Kimi Code 2.1.1 (-m, --model), droid 0.226.2 +// (exec: -m, --model), agy 1.2.10 (--model), cursor-agent 2026.09.23 (--model), +// traecli 0.207.1 (exec: -m, --model). const FLAG_AT = { codex: { argv: 2, judgeArgv: 2, resume: 3 }, claude: { argv: 1, judgeArgv: 1, resume: 1 }, @@ -31,6 +33,10 @@ const FLAG_AT = { qwen: { argv: 1, judgeArgv: 1, resume: 1 }, copilot: { argv: 1, judgeArgv: 1 }, kimi: { argv: 1, judgeArgv: 1, resume: 1 }, + droid: { argv: 2, resume: 2 }, + agy: { argv: 1, resume: 1 }, + cursor: { argv: 1, judgeArgv: 1 }, + trae: { argv: 2, judgeArgv: 2 }, }; const byName = new Map(DEFAULTS.agents.map(a => [a.name, a])); @@ -54,8 +60,8 @@ test("each supported agent gets its model flag in every command, and nothing wit assert.deepEqual(withModel(grok.argv, { ...grok, model: "grok-4.3" }), grok.argv); }); -test("agents without a verified per-run model say so and refuse a configured model", () => { - for (const name of ["amp", "droid", "agy", "cursor", "trae"]) { +test("agents without a per-run model say so and refuse a configured model", () => { + for (const name of ["amp"]) { const agent = byName.get(name); assert.equal(supportsModel(agent), false, name); assert.ok(agent.modelNote, `${name} explains why`);