Skip to content

Claude Code. Any Model. The most powerful AI coding agent now speaks every language.

test(madbench): split the recommended-model experiments by list category

Jack Rudenko1529c4c0309b
diff --git a/ai-docs/benches/recommended-models/README.md b/ai-docs/benches/recommended-models/README.md
index f7a5b478..0e52f31d 100644
--- a/ai-docs/benches/recommended-models/README.md
+++ b/ai-docs/benches/recommended-models/README.md
@@ -1,6 +1,7 @@
# recommended-models: does every recommended model work through claudish?
-Two Benches, one question each, swept over the recommended list by two Experiments.
+Two Benches, one question each, swept over the recommended list by one Experiment per
+list category and Bench.
| Bench | Path under test | The model must |
|---|---|---|
@@ -13,20 +14,27 @@ that a route answers, not that the model can use tools.
## The variants come from the catalog
+Every command in this README runs from this folder
+(`ai-docs/benches/recommended-models/`). The Benches resolve their own paths against the
+Bench file, and the script writes into `experiments/` beside it.
+
```
bun scripts/gen-experiments.ts
```
-Every command in this README runs from this folder
-(`ai-docs/benches/recommended-models/`). The Benches resolve their own paths against the
-Bench file, and the script writes next to itself, so the folder is the only working
-directory to remember.
+reads `claudish --models-top --json` and writes one Experiment per list category and Bench:
+
+| Category | Variants (one model spec each) | Files |
+|---|---|---|
+| `programming` | the recommended models by bare name; routing chooses the hop | `experiments/programming.cli.experiment.yaml`, `experiments/programming.mcp.experiment.yaml` |
+| `fast` | the same, for the fast models | `experiments/fast.cli.experiment.yaml`, `experiments/fast.mcp.experiment.yaml` |
+| `subscription` | each published subscription command (`[email protected]`, `kc@k3`, ...); a native-route row is its bare name (`claude-opus-5-5`) | `experiments/subscription.cli.experiment.yaml`, `experiments/subscription.mcp.experiment.yaml` |
-writes `cli.experiment.yaml` and `mcp.experiment.yaml` from `claudish --models-top --json`:
-first every recommended model by bare name (routing chooses the hop), then every distinct
-subscription command the list publishes (`[email protected]`, `kc@k3`, ...). The list changes
+The categories are read from the list, so a new one gets its own files. Each variant is named
+by its model spec; quote it on the command line: `--variant [email protected]`. The list changes
with each catalog generation, so re-run the script before a real run. Each file names the
-generation it was written from.
+generation it was written from, and the script deletes files for a category that left the
+list.
## Running
@@ -39,11 +47,12 @@ madbench preflight mcp.madbench.yaml
madbench check mcp.madbench.yaml
```
-A real run, one variant first:
+A real run, one category at a time, MCP first because it is cheaper:
```
-madbench cli.experiment.yaml --variant kimi-k3 --report-json <path>
-madbench mcp.experiment.yaml --report-json <path>
+madbench experiments/programming.mcp.experiment.yaml --report-json <path>
+madbench experiments/programming.cli.experiment.yaml --report-json <path>
+madbench experiments/programming.cli.experiment.yaml --variant kimi-k3 --report-json <path>
```
Both Benches run the `claudish` on `PATH`. Check `claudish --version` first: a stale global
diff --git a/ai-docs/benches/recommended-models/experiments/fast.cli.experiment.yaml b/ai-docs/benches/recommended-models/experiments/fast.cli.experiment.yaml
new file mode 100644
index 00000000..c65a7f39
--- /dev/null
+++ b/ai-docs/benches/recommended-models/experiments/fast.cli.experiment.yaml
@@ -0,0 +1,24 @@
+# GENERATED by scripts/gen-experiments.ts from `claudish --models-top --json`.
+# Catalog generation g-20261014030532231-748cc4dd, written 2026-10-14T03:37:15.986Z.
+# Do not edit by hand: re-run the script. 8 variants.
+description: "cli: recommended fast models"
+bench: ../cli.madbench.yaml
+guard_changes:
+ allow: [harness/model]
+variants:
+ - name: "claude-haiku-5-5"
+ params: { model: "claude-haiku-5-5" }
+ - name: "deepseek-v4.1-flash"
+ params: { model: "deepseek-v4.1-flash" }
+ - name: "gemini-3.5-flash-lite"
+ params: { model: "gemini-3.5-flash-lite" }
+ - name: "mistral-small-2603"
+ params: { model: "mistral-small-2603" }
+ - name: "gpt-5.4-nano-2026-03-17"
+ params: { model: "gpt-5.4-nano-2026-03-17" }
+ - name: "qwen3.8-omni-flash"
+ params: { model: "qwen3.8-omni-flash" }
+ - name: "grok-build-0.1"
+ params: { model: "grok-build-0.1" }
+ - name: "glm-5.3-flash"
+ params: { model: "glm-5.3-flash" }
diff --git a/ai-docs/benches/recommended-models/experiments/fast.mcp.experiment.yaml b/ai-docs/benches/recommended-models/experiments/fast.mcp.experiment.yaml
new file mode 100644
index 00000000..35b9606d
--- /dev/null
+++ b/ai-docs/benches/recommended-models/experiments/fast.mcp.experiment.yaml
@@ -0,0 +1,22 @@
+# GENERATED by scripts/gen-experiments.ts from `claudish --models-top --json`.
+# Catalog generation g-20261014030532231-748cc4dd, written 2026-10-14T03:37:15.986Z.
+# Do not edit by hand: re-run the script. 8 variants.
+description: "mcp: recommended fast models"
+bench: ../mcp.madbench.yaml
+variants:
+ - name: "claude-haiku-5-5"
+ params: { model: "claude-haiku-5-5" }
+ - name: "deepseek-v4.1-flash"
+ params: { model: "deepseek-v4.1-flash" }
+ - name: "gemini-3.5-flash-lite"
+ params: { model: "gemini-3.5-flash-lite" }
+ - name: "mistral-small-2603"
+ params: { model: "mistral-small-2603" }
+ - name: "gpt-5.4-nano-2026-03-17"
+ params: { model: "gpt-5.4-nano-2026-03-17" }
+ - name: "qwen3.8-omni-flash"
+ params: { model: "qwen3.8-omni-flash" }
+ - name: "grok-build-0.1"
+ params: { model: "grok-build-0.1" }
+ - name: "glm-5.3-flash"
+ params: { model: "glm-5.3-flash" }
diff --git a/ai-docs/benches/recommended-models/experiments/programming.cli.experiment.yaml b/ai-docs/benches/recommended-models/experiments/programming.cli.experiment.yaml
new file mode 100644
index 00000000..cbf4b422
--- /dev/null
+++ b/ai-docs/benches/recommended-models/experiments/programming.cli.experiment.yaml
@@ -0,0 +1,26 @@
+# GENERATED by scripts/gen-experiments.ts from `claudish --models-top --json`.
+# Catalog generation g-20261014030532231-748cc4dd, written 2026-10-14T03:37:15.986Z.
+# Do not edit by hand: re-run the script. 9 variants.
+description: "cli: recommended programming models"
+bench: ../cli.madbench.yaml
+guard_changes:
+ allow: [harness/model]
+variants:
+ - name: "claude-opus-5-5"
+ params: { model: "claude-opus-5-5" }
+ - name: "gpt-6.1-sol"
+ params: { model: "gpt-6.1-sol" }
+ - name: "kimi-k3"
+ params: { model: "kimi-k3" }
+ - name: "grok-4.7"
+ params: { model: "grok-4.7" }
+ - name: "gemini-4-argon"
+ params: { model: "gemini-4-argon" }
+ - name: "qwen3.8-max-0902"
+ params: { model: "qwen3.8-max-0902" }
+ - name: "glm-5.3"
+ params: { model: "glm-5.3" }
+ - name: "minimax-m3"
+ params: { model: "minimax-m3" }
+ - name: "deepseek-v3.2-exp"
+ params: { model: "deepseek-v3.2-exp" }
diff --git a/ai-docs/benches/recommended-models/experiments/programming.mcp.experiment.yaml b/ai-docs/benches/recommended-models/experiments/programming.mcp.experiment.yaml
new file mode 100644
index 00000000..e8843690
--- /dev/null
+++ b/ai-docs/benches/recommended-models/experiments/programming.mcp.experiment.yaml
@@ -0,0 +1,24 @@
+# GENERATED by scripts/gen-experiments.ts from `claudish --models-top --json`.
+# Catalog generation g-20261014030532231-748cc4dd, written 2026-10-14T03:37:15.986Z.
+# Do not edit by hand: re-run the script. 9 variants.
+description: "mcp: recommended programming models"
+bench: ../mcp.madbench.yaml
+variants:
+ - name: "claude-opus-5-5"
+ params: { model: "claude-opus-5-5" }
+ - name: "gpt-6.1-sol"
+ params: { model: "gpt-6.1-sol" }
+ - name: "kimi-k3"
+ params: { model: "kimi-k3" }
+ - name: "grok-4.7"
+ params: { model: "grok-4.7" }
+ - name: "gemini-4-argon"
+ params: { model: "gemini-4-argon" }
+ - name: "qwen3.8-max-0902"
+ params: { model: "qwen3.8-max-0902" }
+ - name: "glm-5.3"
+ params: { model: "glm-5.3" }
+ - name: "minimax-m3"
+ params: { model: "minimax-m3" }
+ - name: "deepseek-v3.2-exp"
+ params: { model: "deepseek-v3.2-exp" }
diff --git a/ai-docs/benches/recommended-models/cli.experiment.yaml b/ai-docs/benches/recommended-models/experiments/subscription.cli.experiment.yaml
similarity index 58%
rename from ai-docs/benches/recommended-models/cli.experiment.yaml
rename to ai-docs/benches/recommended-models/experiments/subscription.cli.experiment.yaml
index 2300b1ea..1c2f81bf 100644
--- a/ai-docs/benches/recommended-models/cli.experiment.yaml
+++ b/ai-docs/benches/recommended-models/experiments/subscription.cli.experiment.yaml
@@ -1,45 +1,13 @@
# GENERATED by scripts/gen-experiments.ts from `claudish --models-top --json`.
-# Catalog generation g-20261014030532231-748cc4dd, written 2026-10-14T03:36:04.684Z.
-# Do not edit by hand: re-run the script. 36 variants.
-description: "cli: every recommended model and subscription command"
-bench: ./cli.madbench.yaml
+# Catalog generation g-20261014030532231-748cc4dd, written 2026-10-14T03:37:15.986Z.
+# Do not edit by hand: re-run the script. 21 variants.
+description: "cli: recommended subscription models"
+bench: ../cli.madbench.yaml
guard_changes:
allow: [harness/model]
variants:
- name: "claude-opus-5-5"
params: { model: "claude-opus-5-5" }
- - name: "gpt-6.1-sol"
- params: { model: "gpt-6.1-sol" }
- - name: "kimi-k3"
- params: { model: "kimi-k3" }
- - name: "grok-4.7"
- params: { model: "grok-4.7" }
- - name: "gemini-4-argon"
- params: { model: "gemini-4-argon" }
- - name: "qwen3.8-max-0902"
- params: { model: "qwen3.8-max-0902" }
- - name: "glm-5.3"
- params: { model: "glm-5.3" }
- - name: "minimax-m3"
- params: { model: "minimax-m3" }
- - name: "deepseek-v3.2-exp"
- params: { model: "deepseek-v3.2-exp" }
- - name: "claude-haiku-5-5"
- params: { model: "claude-haiku-5-5" }
- - name: "deepseek-v4.1-flash"
- params: { model: "deepseek-v4.1-flash" }
- - name: "gemini-3.5-flash-lite"
- params: { model: "gemini-3.5-flash-lite" }
- - name: "mistral-small-2603"
- params: { model: "mistral-small-2603" }
- - name: "gpt-5.4-nano-2026-03-17"
- params: { model: "gpt-5.4-nano-2026-03-17" }
- - name: "qwen3.8-omni-flash"
- params: { model: "qwen3.8-omni-flash" }
- - name: "grok-build-0.1"
- params: { model: "grok-build-0.1" }
- - name: "glm-5.3-flash"
- params: { model: "glm-5.3-flash" }
params: { model: "[email protected]" }
- name: "kc@k3"
@@ -64,6 +32,8 @@ variants:
params: { model: "oc@minimax-m3" }
- name: "zengo@minimax-m3"
params: { model: "zengo@minimax-m3" }
+ - name: "claude-haiku-5-5"
+ params: { model: "claude-haiku-5-5" }
- name: "zengo@claude-haiku-5-5"
params: { model: "zengo@claude-haiku-5-5" }
diff --git a/ai-docs/benches/recommended-models/mcp.experiment.yaml b/ai-docs/benches/recommended-models/experiments/subscription.mcp.experiment.yaml
similarity index 57%
rename from ai-docs/benches/recommended-models/mcp.experiment.yaml
rename to ai-docs/benches/recommended-models/experiments/subscription.mcp.experiment.yaml
index 4510ea1b..2595bb40 100644
--- a/ai-docs/benches/recommended-models/mcp.experiment.yaml
+++ b/ai-docs/benches/recommended-models/experiments/subscription.mcp.experiment.yaml
@@ -1,43 +1,11 @@
# GENERATED by scripts/gen-experiments.ts from `claudish --models-top --json`.
-# Catalog generation g-20261014030532231-748cc4dd, written 2026-10-14T03:36:04.684Z.
-# Do not edit by hand: re-run the script. 36 variants.
-description: "mcp: every recommended model and subscription command"
-bench: ./mcp.madbench.yaml
+# Catalog generation g-20261014030532231-748cc4dd, written 2026-10-14T03:37:15.986Z.
+# Do not edit by hand: re-run the script. 21 variants.
+description: "mcp: recommended subscription models"
+bench: ../mcp.madbench.yaml
variants:
- name: "claude-opus-5-5"
params: { model: "claude-opus-5-5" }
- - name: "gpt-6.1-sol"
- params: { model: "gpt-6.1-sol" }
- - name: "kimi-k3"
- params: { model: "kimi-k3" }
- - name: "grok-4.7"
- params: { model: "grok-4.7" }
- - name: "gemini-4-argon"
- params: { model: "gemini-4-argon" }
- - name: "qwen3.8-max-0902"
- params: { model: "qwen3.8-max-0902" }
- - name: "glm-5.3"
- params: { model: "glm-5.3" }
- - name: "minimax-m3"
- params: { model: "minimax-m3" }
- - name: "deepseek-v3.2-exp"
- params: { model: "deepseek-v3.2-exp" }
- - name: "claude-haiku-5-5"
- params: { model: "claude-haiku-5-5" }
- - name: "deepseek-v4.1-flash"
- params: { model: "deepseek-v4.1-flash" }
- - name: "gemini-3.5-flash-lite"
- params: { model: "gemini-3.5-flash-lite" }
- - name: "mistral-small-2603"
- params: { model: "mistral-small-2603" }
- - name: "gpt-5.4-nano-2026-03-17"
- params: { model: "gpt-5.4-nano-2026-03-17" }
- - name: "qwen3.8-omni-flash"
- params: { model: "qwen3.8-omni-flash" }
- - name: "grok-build-0.1"
- params: { model: "grok-build-0.1" }
- - name: "glm-5.3-flash"
- params: { model: "glm-5.3-flash" }
params: { model: "[email protected]" }
- name: "kc@k3"
@@ -62,6 +30,8 @@ variants:
params: { model: "oc@minimax-m3" }
- name: "zengo@minimax-m3"
params: { model: "zengo@minimax-m3" }
+ - name: "claude-haiku-5-5"
+ params: { model: "claude-haiku-5-5" }
- name: "zengo@claude-haiku-5-5"
params: { model: "zengo@claude-haiku-5-5" }
diff --git a/ai-docs/benches/recommended-models/scripts/gen-experiments.ts b/ai-docs/benches/recommended-models/scripts/gen-experiments.ts
index 4939b84f..f709d730 100644
--- a/ai-docs/benches/recommended-models/scripts/gen-experiments.ts
+++ b/ai-docs/benches/recommended-models/scripts/gen-experiments.ts
@@ -1,25 +1,26 @@
#!/usr/bin/env bun
/**
- * Write cli.experiment.yaml and mcp.experiment.yaml from the recommended list.
+ * Write one Experiment per (recommended-list category × Bench) into experiments/.
*
- * bun ai-docs/benches/recommended-models/scripts/gen-experiments.ts
+ * bun scripts/gen-experiments.ts (from the Bench folder)
*
* The list is read from `claudish --models-top --json`, never typed here: it
* changes with every catalog generation, and a hand-kept copy is the hardcoded
* model data CLAUDE.md forbids. Re-run this before a real run.
*
- * Two kinds of variant, in this order:
- * 1. every recommended model by its bare name, so routing chooses the hop the
- * user would get (the first one is the Experiment's baseline);
- * 2. every distinct subscription command the list publishes (`[email protected]`,
- * `kc@k3`), so each subscription connection is exercised on its own. A row
- * with no provider shortcut is the native route and is already in (1).
+ * The categories come from the list too (today `programming`, `fast`,
+ * `subscription`), so a new category gets its own files without a code change.
+ * A variant is one model spec:
+ * - in a `subscription` row, each published command (`[email protected]`, `kc@k3`;
+ * a native-route row's command is the bare name, such as `claude-opus-5-5`);
+ * - in any other row, the bare model id, so routing chooses the hop the user
+ * would get.
+ * The first variant of each file is its baseline.
*/
-import { writeFileSync } from "node:fs";
+import { mkdirSync, readdirSync, rmSync, writeFileSync } from "node:fs";
import { join, resolve } from "node:path";
interface Subscription {
- prefix?: string;
command: string;
}
interface RecommendedModel {
@@ -33,6 +34,7 @@ interface RecommendedDoc {
}
const BENCH_DIR = resolve(import.meta.dir, "..");
+const OUT_DIR = join(BENCH_DIR, "experiments");
const proc = Bun.spawnSync(["claudish", "--models-top", "--json"], { stderr: "inherit" });
if (proc.exitCode !== 0) {
@@ -41,51 +43,43 @@ if (proc.exitCode !== 0) {
}
const doc = JSON.parse(proc.stdout.toString()) as RecommendedDoc;
-const variants: Array<{ name: string; model: string }> = [];
-const seenModels = new Set<string>();
-const add = (model: string) => {
- if (seenModels.has(model)) return;
- seenModels.add(model);
- // The variant is named by its model spec, `@` and all: madbench accepts it in
- // the file and in `--variant '[email protected]'`, and the report then names the
- // exact spec that was sent.
- variants.push({ name: model, model });
-};
-
-for (const m of doc.models) if (m.category !== "subscription") add(m.id);
+// Category → model specs, in list order, without repeats inside a category.
+const byCategory = new Map<string, string[]>();
for (const m of doc.models) {
- if (m.category !== "subscription") continue;
- for (const s of m.subscriptions ?? []) if (s.prefix) add(s.command);
+ const specs = byCategory.get(m.category) ?? [];
+ byCategory.set(m.category, specs);
+ const candidates = m.subscriptions?.length ? m.subscriptions.map((s) => s.command) : [m.id];
+ for (const spec of candidates) if (!specs.includes(spec)) specs.push(spec);
}
-const header = (bench: string) =>
- [
- `# GENERATED by scripts/gen-experiments.ts from \`claudish --models-top --json\`.`,
- `# Catalog generation ${doc.generationId}, written ${new Date().toISOString()}.`,
- `# Do not edit by hand: re-run the script. ${variants.length} variants.`,
- `description: ${JSON.stringify(`${bench}: every recommended model and subscription command`)}`,
- `bench: ./${bench}.madbench.yaml`,
- ].join("\n");
-
-const variantLines = variants
- .map((v) => ` - name: ${JSON.stringify(v.name)}\n params: { model: ${JSON.stringify(v.model)} }`)
- .join("\n");
+// A category that left the list must not leave a stale file behind.
+mkdirSync(OUT_DIR, { recursive: true });
+for (const f of readdirSync(OUT_DIR)) if (f.endsWith(".experiment.yaml")) rmSync(join(OUT_DIR, f));
-// The CLI Bench passes the model as harness.model, so the variants differ there
-// and only there. The MCP Bench keeps harness.model fixed (the model under test
-// is in the prompt and the Checks), so its staged inputs never differ.
-const cli = `${header("cli")}
-guard_changes:
- allow: [harness/model]
-variants:
-${variantLines}
-`;
-const mcp = `${header("mcp")}
-variants:
-${variantLines}
-`;
-
-writeFileSync(join(BENCH_DIR, "cli.experiment.yaml"), cli);
-writeFileSync(join(BENCH_DIR, "mcp.experiment.yaml"), mcp);
-console.log(`generation ${doc.generationId}: ${variants.length} variants`);
-for (const v of variants) console.log(` ${v.name}`);
+const written = new Date().toISOString();
+for (const [category, specs] of byCategory) {
+ for (const bench of ["cli", "mcp"]) {
+ const lines = [
+ `# GENERATED by scripts/gen-experiments.ts from \`claudish --models-top --json\`.`,
+ `# Catalog generation ${doc.generationId}, written ${written}.`,
+ `# Do not edit by hand: re-run the script. ${specs.length} variants.`,
+ `description: ${JSON.stringify(`${bench}: recommended ${category} models`)}`,
+ `bench: ../${bench}.madbench.yaml`,
+ ];
+ // The CLI Bench passes the model as harness.model, so its variants differ
+ // there and only there. The MCP Bench keeps harness.model fixed (the model
+ // under test is in the prompt and the Checks), so its staged inputs never
+ // differ and it declares no guard.
+ if (bench === "cli") lines.push("guard_changes:", " allow: [harness/model]");
+ // The variant is named by its model spec, `@` and all: madbench accepts it
+ // in the file and in `--variant '[email protected]'`, and the report names the
+ // exact spec that was sent.
+ lines.push("variants:");
+ for (const spec of specs) {
+ lines.push(` - name: ${JSON.stringify(spec)}`, ` params: { model: ${JSON.stringify(spec)} }`);
+ }
+ writeFileSync(join(OUT_DIR, `${category}.${bench}.experiment.yaml`), `${lines.join("\n")}\n`);
+ }
+ console.log(`${category}: ${specs.length} variants ${specs.join(" ")}`);
+}
+console.log(`generation ${doc.generationId}`);