Claude Code. Any Model. The most powerful AI coding agent now speaks every language.
test(madbench): group recommended-model experiments by recommendationTier
Jack Rudenko7c6ab2d40100
diff --git a/ai-docs/benches/recommended-models/README.md b/ai-docs/benches/recommended-models/README.mdindex 0e52f31d..bde105e6 100644--- a/ai-docs/benches/recommended-models/README.md+++ b/ai-docs/benches/recommended-models/README.md@@ -1,7 +1,7 @@# recommended-models: does every recommended model work through claudish?Two Benches, one question each, swept over the recommended list by one Experiment per-list category and Bench.+recommendation tier and Bench.| Bench | Path under test | The model must ||---|---|---|@@ -22,19 +22,24 @@ Bench file, and the script writes into `experiments/` beside it.bun scripts/gen-experiments.ts```-reads `claudish --models-top --json` and writes one Experiment per list category and Bench:+reads `claudish --models-top --json` and writes one Experiment per recommendation tier+(`models[].recommendationTier`) and Bench:-| Category | Variants (one model spec each) | Files |+| Recommendation tier | 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` |+| `flagship` | the flagship models by bare name; routing chooses the hop | `experiments/flagship.cli.experiment.yaml`, `experiments/flagship.mcp.experiment.yaml` |+| `cost_efficient` | the same, for the cost-efficient models | `experiments/cost_efficient.cli.experiment.yaml`, `experiments/cost_efficient.mcp.experiment.yaml` |+| `lightweight` | the same, for the lightweight models | `experiments/lightweight.cli.experiment.yaml`, `experiments/lightweight.mcp.experiment.yaml` |+| `luxury` | the same, for the luxury models | `experiments/luxury.cli.experiment.yaml`, `experiments/luxury.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` |-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, and the script deletes files for a category that left the-list.+The recommendation tiers are read from the list, so a new one gets its own files and an empty+one (today `subscription`) gets none. A model in two tiers is a variant in both files. The+luxury files are the most expensive run: those are the priciest models on the list. 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, and the script deletes files for a recommendation+tier that left the list.## Running@@ -47,12 +52,12 @@ madbench preflight mcp.madbench.yamlmadbench check mcp.madbench.yaml```-A real run, one category at a time, MCP first because it is cheaper:+A real run, one recommendation tier at a time, MCP first because it is cheaper:```-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>+madbench experiments/flagship.mcp.experiment.yaml --report-json <path>+madbench experiments/flagship.cli.experiment.yaml --report-json <path>+madbench experiments/flagship.cli.experiment.yaml --variant kimi-k3 --report-json <path>```Both Benches run the `claudish` on `PATH`. Check `claudish --version` first: a stale globaldiff --git a/ai-docs/benches/recommended-models/experiments/cost_efficient.cli.experiment.yaml b/ai-docs/benches/recommended-models/experiments/cost_efficient.cli.experiment.yamlnew file mode 100644index 00000000..f3e04a21--- /dev/null+++ b/ai-docs/benches/recommended-models/experiments/cost_efficient.cli.experiment.yaml@@ -0,0 +1,16 @@+# GENERATED by scripts/gen-experiments.ts from `claudish --models-top --json`.+# Catalog generation g-20261016053727894-8a743761.+# Do not edit by hand: re-run the script. 4 variants.+description: "cli: recommended cost_efficient models"+bench: ../cli.madbench.yaml+guard_changes:+ allow: [harness/model]+variants:+ - name: "mimo-v2.6-pro"+ params: { model: "mimo-v2.6-pro" }+ - name: "gpt-6.1-sol"+ params: { model: "gpt-6.1-sol" }+ - name: "claude-sonnet-5-5"+ params: { model: "claude-sonnet-5-5" }+ - name: "gemini-4-argon"+ params: { model: "gemini-4-argon" }diff --git a/ai-docs/benches/recommended-models/experiments/cost_efficient.mcp.experiment.yaml b/ai-docs/benches/recommended-models/experiments/cost_efficient.mcp.experiment.yamlnew file mode 100644index 00000000..94a7ce86--- /dev/null+++ b/ai-docs/benches/recommended-models/experiments/cost_efficient.mcp.experiment.yaml@@ -0,0 +1,14 @@+# GENERATED by scripts/gen-experiments.ts from `claudish --models-top --json`.+# Catalog generation g-20261016053727894-8a743761.+# Do not edit by hand: re-run the script. 4 variants.+description: "mcp: recommended cost_efficient models"+bench: ../mcp.madbench.yaml+variants:+ - name: "mimo-v2.6-pro"+ params: { model: "mimo-v2.6-pro" }+ - name: "gpt-6.1-sol"+ params: { model: "gpt-6.1-sol" }+ - name: "claude-sonnet-5-5"+ params: { model: "claude-sonnet-5-5" }+ - name: "gemini-4-argon"+ params: { model: "gemini-4-argon" }diff --git a/ai-docs/benches/recommended-models/experiments/programming.cli.experiment.yaml b/ai-docs/benches/recommended-models/experiments/flagship.cli.experiment.yamlsimilarity index 62%rename from ai-docs/benches/recommended-models/experiments/programming.cli.experiment.yamlrename to ai-docs/benches/recommended-models/experiments/flagship.cli.experiment.yamlindex ebbe3ad3..06aa97d1 100644--- a/ai-docs/benches/recommended-models/experiments/programming.cli.experiment.yaml+++ b/ai-docs/benches/recommended-models/experiments/flagship.cli.experiment.yaml@@ -1,7 +1,7 @@# GENERATED by scripts/gen-experiments.ts from `claudish --models-top --json`.-# Catalog generation g-20261014030532231-748cc4dd.-# Do not edit by hand: re-run the script. 9 variants.-description: "cli: recommended programming models"+# Catalog generation g-20261016053727894-8a743761.+# Do not edit by hand: re-run the script. 10 variants.+description: "cli: recommended flagship models"bench: ../cli.madbench.yamlguard_changes:allow: [harness/model]@@ -10,17 +10,19 @@ variants: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: "grok-4.7"+ params: { model: "grok-4.7" }+ - name: "kimi-k3"+ params: { model: "kimi-k3" }+ - name: "qwen3.8-max"+ params: { model: "qwen3.8-max" }- 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: "deepseek-v4-pro"+ params: { model: "deepseek-v4-pro" }+ - name: "mimo-v2.6-pro"+ params: { model: "mimo-v2.6-pro" }diff --git a/ai-docs/benches/recommended-models/experiments/programming.mcp.experiment.yaml b/ai-docs/benches/recommended-models/experiments/flagship.mcp.experiment.yamlsimilarity index 60%rename from ai-docs/benches/recommended-models/experiments/programming.mcp.experiment.yamlrename to ai-docs/benches/recommended-models/experiments/flagship.mcp.experiment.yamlindex e6e6d1f7..c8626935 100644--- a/ai-docs/benches/recommended-models/experiments/programming.mcp.experiment.yaml+++ b/ai-docs/benches/recommended-models/experiments/flagship.mcp.experiment.yaml@@ -1,24 +1,26 @@# GENERATED by scripts/gen-experiments.ts from `claudish --models-top --json`.-# Catalog generation g-20261014030532231-748cc4dd.-# Do not edit by hand: re-run the script. 9 variants.-description: "mcp: recommended programming models"+# Catalog generation g-20261016053727894-8a743761.+# Do not edit by hand: re-run the script. 10 variants.+description: "mcp: recommended flagship models"bench: ../mcp.madbench.yamlvariants:- 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: "grok-4.7"+ params: { model: "grok-4.7" }+ - name: "kimi-k3"+ params: { model: "kimi-k3" }+ - name: "qwen3.8-max"+ params: { model: "qwen3.8-max" }- 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: "deepseek-v4-pro"+ params: { model: "deepseek-v4-pro" }+ - name: "mimo-v2.6-pro"+ params: { model: "mimo-v2.6-pro" }diff --git a/ai-docs/benches/recommended-models/experiments/fast.cli.experiment.yaml b/ai-docs/benches/recommended-models/experiments/lightweight.cli.experiment.yamlsimilarity index 55%rename from ai-docs/benches/recommended-models/experiments/fast.cli.experiment.yamlrename to ai-docs/benches/recommended-models/experiments/lightweight.cli.experiment.yamlindex cd4c484a..d83a827a 100644--- a/ai-docs/benches/recommended-models/experiments/fast.cli.experiment.yaml+++ b/ai-docs/benches/recommended-models/experiments/lightweight.cli.experiment.yaml@@ -1,24 +1,24 @@# GENERATED by scripts/gen-experiments.ts from `claudish --models-top --json`.-# Catalog generation g-20261014030532231-748cc4dd.+# Catalog generation g-20261016053727894-8a743761.# Do not edit by hand: re-run the script. 8 variants.-description: "cli: recommended fast models"+description: "cli: recommended lightweight models"bench: ../cli.madbench.yamlguard_changes:allow: [harness/model]variants:- name: "claude-haiku-5-5"params: { model: "claude-haiku-5-5" }+ - name: "gpt-6-luna"+ params: { model: "gpt-6-luna" }+ - name: "gemini-3.8-flash"+ params: { model: "gemini-3.8-flash" }- 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" }+ - name: "qwen3.8-omni-flash"+ params: { model: "qwen3.8-omni-flash" }+ - name: "mimo-v2.6-flash"+ params: { model: "mimo-v2.6-flash" }+ - name: "muse-spark-1.3"+ params: { model: "muse-spark-1.3" }diff --git a/ai-docs/benches/recommended-models/experiments/fast.mcp.experiment.yaml b/ai-docs/benches/recommended-models/experiments/lightweight.mcp.experiment.yamlsimilarity index 53%rename from ai-docs/benches/recommended-models/experiments/fast.mcp.experiment.yamlrename to ai-docs/benches/recommended-models/experiments/lightweight.mcp.experiment.yamlindex f143abbd..721cf08a 100644--- a/ai-docs/benches/recommended-models/experiments/fast.mcp.experiment.yaml+++ b/ai-docs/benches/recommended-models/experiments/lightweight.mcp.experiment.yaml@@ -1,22 +1,22 @@# GENERATED by scripts/gen-experiments.ts from `claudish --models-top --json`.-# Catalog generation g-20261014030532231-748cc4dd.+# Catalog generation g-20261016053727894-8a743761.# Do not edit by hand: re-run the script. 8 variants.-description: "mcp: recommended fast models"+description: "mcp: recommended lightweight models"bench: ../mcp.madbench.yamlvariants:- name: "claude-haiku-5-5"params: { model: "claude-haiku-5-5" }+ - name: "gpt-6-luna"+ params: { model: "gpt-6-luna" }+ - name: "gemini-3.8-flash"+ params: { model: "gemini-3.8-flash" }- 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" }+ - name: "qwen3.8-omni-flash"+ params: { model: "qwen3.8-omni-flash" }+ - name: "mimo-v2.6-flash"+ params: { model: "mimo-v2.6-flash" }+ - name: "muse-spark-1.3"+ params: { model: "muse-spark-1.3" }diff --git a/ai-docs/benches/recommended-models/experiments/luxury.cli.experiment.yaml b/ai-docs/benches/recommended-models/experiments/luxury.cli.experiment.yamlnew file mode 100644index 00000000..a09edb0b--- /dev/null+++ b/ai-docs/benches/recommended-models/experiments/luxury.cli.experiment.yaml@@ -0,0 +1,12 @@+# GENERATED by scripts/gen-experiments.ts from `claudish --models-top --json`.+# Catalog generation g-20261016053727894-8a743761.+# Do not edit by hand: re-run the script. 2 variants.+description: "cli: recommended luxury models"+bench: ../cli.madbench.yaml+guard_changes:+ allow: [harness/model]+variants:+ - name: "claude-fable-5-1"+ params: { model: "claude-fable-5-1" }+ - name: "gpt-6-astra"+ params: { model: "gpt-6-astra" }diff --git a/ai-docs/benches/recommended-models/experiments/luxury.mcp.experiment.yaml b/ai-docs/benches/recommended-models/experiments/luxury.mcp.experiment.yamlnew file mode 100644index 00000000..2a6dd6ab--- /dev/null+++ b/ai-docs/benches/recommended-models/experiments/luxury.mcp.experiment.yaml@@ -0,0 +1,10 @@+# GENERATED by scripts/gen-experiments.ts from `claudish --models-top --json`.+# Catalog generation g-20261016053727894-8a743761.+# Do not edit by hand: re-run the script. 2 variants.+description: "mcp: recommended luxury models"+bench: ../mcp.madbench.yaml+variants:+ - name: "claude-fable-5-1"+ params: { model: "claude-fable-5-1" }+ - name: "gpt-6-astra"+ params: { model: "gpt-6-astra" }diff --git a/ai-docs/benches/recommended-models/experiments/subscription.cli.experiment.yaml b/ai-docs/benches/recommended-models/experiments/subscription.cli.experiment.yamldeleted file mode 100644index 8df5d441..00000000--- a/ai-docs/benches/recommended-models/experiments/subscription.cli.experiment.yaml+++ /dev/null@@ -1,50 +0,0 @@-# GENERATED by scripts/gen-experiments.ts from `claudish --models-top --json`.-# Catalog generation g-20261014030532231-748cc4dd.-# 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: "[email protected]"- params: { model: "[email protected]" }- - name: "kc@k3"- params: { model: "kc@k3" }- - name: "oc@kimi-k3"- params: { model: "oc@kimi-k3" }- - name: "zengo@kimi-k3"- params: { model: "zengo@kimi-k3" }- - name: "[email protected]"- params: { model: "[email protected]" }- - name: "[email protected]"- params: { model: "[email protected]" }- - name: "[email protected]"- params: { model: "[email protected]" }- - name: "[email protected]"- params: { model: "[email protected]" }- - name: "[email protected]"- params: { model: "[email protected]" }- - name: "mmc@MiniMax-M3"- params: { model: "mmc@MiniMax-M3" }- - name: "oc@minimax-m3"- 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" }- - name: "[email protected]"- params: { model: "[email protected]" }- - name: "[email protected]"- params: { model: "[email protected]" }- - name: "zengo@deepseek-flash"- params: { model: "zengo@deepseek-flash" }- - name: "[email protected]"- params: { model: "[email protected]" }- - name: "[email protected]"- params: { model: "[email protected]" }- - name: "[email protected]"- params: { model: "[email protected]" }diff --git a/ai-docs/benches/recommended-models/experiments/subscription.mcp.experiment.yaml b/ai-docs/benches/recommended-models/experiments/subscription.mcp.experiment.yamldeleted file mode 100644index 42f58fae..00000000--- a/ai-docs/benches/recommended-models/experiments/subscription.mcp.experiment.yaml+++ /dev/null@@ -1,48 +0,0 @@-# GENERATED by scripts/gen-experiments.ts from `claudish --models-top --json`.-# Catalog generation g-20261014030532231-748cc4dd.-# 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: "[email protected]"- params: { model: "[email protected]" }- - name: "kc@k3"- params: { model: "kc@k3" }- - name: "oc@kimi-k3"- params: { model: "oc@kimi-k3" }- - name: "zengo@kimi-k3"- params: { model: "zengo@kimi-k3" }- - name: "[email protected]"- params: { model: "[email protected]" }- - name: "[email protected]"- params: { model: "[email protected]" }- - name: "[email protected]"- params: { model: "[email protected]" }- - name: "[email protected]"- params: { model: "[email protected]" }- - name: "[email protected]"- params: { model: "[email protected]" }- - name: "mmc@MiniMax-M3"- params: { model: "mmc@MiniMax-M3" }- - name: "oc@minimax-m3"- 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" }- - name: "[email protected]"- params: { model: "[email protected]" }- - name: "[email protected]"- params: { model: "[email protected]" }- - name: "zengo@deepseek-flash"- params: { model: "zengo@deepseek-flash" }- - name: "[email protected]"- params: { model: "[email protected]" }- - name: "[email protected]"- params: { model: "[email protected]" }- - name: "[email protected]"- params: { model: "[email protected]" }diff --git a/ai-docs/benches/recommended-models/scripts/gen-experiments.ts b/ai-docs/benches/recommended-models/scripts/gen-experiments.tsindex c5de76f3..14bf3309 100644--- a/ai-docs/benches/recommended-models/scripts/gen-experiments.ts+++ b/ai-docs/benches/recommended-models/scripts/gen-experiments.ts@@ -1,6 +1,6 @@#!/usr/bin/env bun/**- * Write one Experiment per (recommended-list category × Bench) into experiments/.+ * Write one Experiment per (recommendation tier × Bench) into experiments/.** bun scripts/gen-experiments.ts (from the Bench folder)*@@ -8,11 +8,14 @@* 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.*- * 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:+ * The recommendation tiers come from the list too (`models[].recommendationTier`:+ * `flagship`, `cost_efficient`, `lightweight`, `luxury`, `subscription`), so a new+ * tier gets its own files without a code change, and an empty tier gets none.+ * A model in two tiers is a variant in both files. 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`);+ * a native-route row's command is the bare name, such as `claude-opus-5-5`).+ * Only subscription rows carry `subscriptions`, so every cost_efficient and+ * luxury variant is a bare id;* - 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.@@ -25,7 +28,7 @@ interface Subscription {}interface RecommendedModel {id: string;- category: string;+ recommendationTier: string;subscriptions?: Subscription[];}interface RecommendedDoc {@@ -36,37 +39,89 @@ 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) {- console.error(`claudish --models-top --json exited ${proc.exitCode}`);+function fail(message: string): never {+ console.error(`gen-experiments: ${message}`);+ console.error("No Experiment file was changed.");process.exit(1);}-const doc = JSON.parse(proc.stdout.toString()) as RecommendedDoc;-// Category → model specs, in list order, without repeats inside a category.-const byCategory = new Map<string, string[]>();+const proc = Bun.spawnSync(["claudish", "--models-top", "--json"], { stderr: "inherit" });+if (proc.exitCode !== 0) fail(`claudish --models-top --json exited ${proc.exitCode}`);++/**+ * Validate the whole response BEFORE any file is touched: a claudish build older+ * than the recommendation tiers prints `category` instead of `recommendationTier`,+ * and grouping that would replace every Experiment with `undefined.*` files.+ */+function readDoc(stdout: string): RecommendedDoc {+ let value: unknown;+ try {+ value = JSON.parse(stdout);+ } catch (error) {+ fail(`claudish --models-top --json did not print JSON (${(error as Error).message})`);+ }+ if (value === null || typeof value !== "object") fail("the response is not a JSON object");+ const { generationId, models } = value as { generationId?: unknown; models?: unknown };+ if (typeof generationId !== "string" || generationId.length === 0) {+ fail("the response has no string `generationId`");+ }+ if (!Array.isArray(models) || models.length === 0) {+ fail("the response's `models` is not a non-empty array");+ }+ models.forEach((row: unknown, i) => {+ const r = row as { id?: unknown; recommendationTier?: unknown; subscriptions?: unknown } | null;+ if (r === null || typeof r !== "object" || typeof r.id !== "string" || r.id.length === 0) {+ fail(`models[${i}] has no string \`id\``);+ }+ if (typeof r.recommendationTier !== "string" || r.recommendationTier.length === 0) {+ fail(+ `models[${i}] (${r.id}) has no string \`recommendationTier\`. The \`claudish\` on PATH ` ++ `(${Bun.which("claudish") ?? "not found"}) predates recommendation tiers: put this ` ++ "branch's build first on PATH (`bun run build`) and re-run."+ );+ }+ if (+ r.subscriptions !== undefined &&+ !(+ Array.isArray(r.subscriptions) &&+ r.subscriptions.every(+ (s: unknown) =>+ s !== null && typeof s === "object" && typeof (s as Subscription).command === "string"+ )+ )+ ) {+ fail(`models[${i}] (${r.id}) has a \`subscriptions\` entry without a string \`command\``);+ }+ });+ return value as RecommendedDoc;+}++const doc = readDoc(proc.stdout.toString());++// Recommendation tier → model specs, in list order, without repeats inside one.+const byRecommendationTier = new Map<string, string[]>();for (const m of doc.models) {- const specs = byCategory.get(m.category) ?? [];- byCategory.set(m.category, specs);+ const specs = byRecommendationTier.get(m.recommendationTier) ?? [];+ byRecommendationTier.set(m.recommendationTier, 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);}-// A category that left the list must not leave a stale file behind.+// A recommendation tier 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));const files: string[] = [];console.log(`Recommended list, catalog generation ${doc.generationId}\n`);-for (const [category, specs] of byCategory) {+for (const [recommendationTier, specs] of byRecommendationTier) {for (const bench of ["cli", "mcp"]) {const lines = [- `# GENERATED by scripts/gen-experiments.ts from \`claudish --models-top --json\`.`,+ "# GENERATED by scripts/gen-experiments.ts from `claudish --models-top --json`.",// No write time here: a timestamp changes every file on every run, so a// regeneration over the same generation must leave the files byte-identical.`# Catalog generation ${doc.generationId}.`,`# Do not edit by hand: re-run the script. ${specs.length} variants.`,- `description: ${JSON.stringify(`${bench}: recommended ${category} models`)}`,+ `description: ${JSON.stringify(`${bench}: recommended ${recommendationTier} models`)}`,`bench: ../${bench}.madbench.yaml`,];// The CLI Bench passes the model as harness.model, so its variants differ@@ -79,13 +134,16 @@ for (const [category, specs] of byCategory) {// exact spec that was sent.lines.push("variants:");for (const spec of specs) {- lines.push(` - name: ${JSON.stringify(spec)}`, ` params: { model: ${JSON.stringify(spec)} }`);+ lines.push(+ ` - name: ${JSON.stringify(spec)}`,+ ` params: { model: ${JSON.stringify(spec)} }`+ );}- const file = `${category}.${bench}.experiment.yaml`;+ const file = `${recommendationTier}.${bench}.experiment.yaml`;writeFileSync(join(OUT_DIR, file), `${lines.join("\n")}\n`);files.push(`experiments/${file}`);}- console.log(`${category} (${specs.length})`);+ console.log(`${recommendationTier} (${specs.length})`);specs.forEach((spec, i) => console.log(` ${String(i + 1).padStart(2)}. ${spec}`));console.log("");}