Claude Code. Any Model. The most powerful AI coding agent now speaks every language.
docs: validate PR #266 and the 1.2.90 backend against live v3
Jack Rudenkob30c4b531c1f
diff --git a/ai-docs/reports/VERIFY_claudish_functions_vs_v3-20260919.ts b/ai-docs/reports/VERIFY_claudish_functions_vs_v3-20260919.tsindex f43e7961..e99df9bb 100644--- a/ai-docs/reports/VERIFY_claudish_functions_vs_v3-20260919.ts+++ b/ai-docs/reports/VERIFY_claudish_functions_vs_v3-20260919.ts@@ -19,12 +19,15 @@ const sentinelCopy = join(tmp, "catalog-incompatible.json");if (existsSync(realSentinel) && process.env.VERIFY_WITHOUT_SENTINEL !== "1") copyFileSync(realSentinel, sentinelCopy);process.env.CLAUDISH_CATALOG_INCOMPATIBLE_PATH = sentinelCopy;-const src = "../../packages/cli/src";+// VERIFY_SRC points the check at another build's source, e.g. a PR's worktree.+const src = process.env.VERIFY_SRC ?? "../../packages/cli/src";+console.log(`source under test: ${src}`);const cc = await import(`${src}/providers/catalog-client.js`);const mc = await import(`${src}/adapters/model-catalog.js`);const rr = await import(`${src}/providers/routing-rules.js`);const pc = await import(`${src}/providers/probe-catalog.js`);-const compat = await import(`${src}/providers/catalog-compatibility.js`);+// The 9.7 guard module; a v3 reader may have removed it.+const compat: any = await import(`${src}/providers/catalog-compatibility.js`).catch(() => ({ SUPPORTED_CONTRACT_VERSION: "(module removed)" }));// ── the truth: the live v3 generation ────────────────────────────────────────const BASE = "https://us-central1-claudish-6da10.cloudfunctions.net";@@ -44,6 +47,8 @@ do {const plans: any[] = (await get(`queryPlans?generationId=${gen}`)).data.plans;const probes = (await get(`probeModels?generationId=${gen}`)).data;const byId = new Map(models.map((m) => [m.modelId, m]));+// 9.7.x names the Token Plan provider qwen-cloud; the v3 reader renames it qwen-token-plan.+const TOKEN = process.env.VERIFY_TOKEN_PLAN_PROVIDER ?? "qwen-cloud";// claudish provider for each v3 binding (ai-docs/reports/PLAN_catalog_v3_reader-20260919.md)const BIND: Record<string, string[]> = {@@ -54,7 +59,7 @@ const BIND: Record<string, string[]> = {"ollama/cloud": ["ollamacloud"], "openai/codex-subscription": ["openai-codex"], "openai/direct-api": ["openai"],"opencode/go-subscription": ["opencode-zen-go"], "opencode/zen": ["opencode-zen"], "openrouter/gateway": ["openrouter"],"poe/gateway": ["poe"], "qwen/dashscope-direct": ["qwen-payg"], "qwen/modelstudio-coding-plan": ["qwen-coding"],- "qwen/qwencloud-token-plan": ["qwen-cloud"], "sakana/direct-api": ["sakana"], "sakana/fugu-subscription": ["sakana-subscription"],+ "qwen/qwencloud-token-plan": ["qwen-cloud", "qwen-token-plan"], "sakana/direct-api": ["sakana"], "sakana/fugu-subscription": ["sakana-subscription"],"together-ai/gateway": ["together"], "vertex/google-cloud": ["vertex"], "x-ai/direct-api": ["x-ai"],"x-ai/supergrok-subscription": ["grok-subscription"], "z-ai/direct-api": ["z-ai", "glm"], "z-ai/glm-coding-subscription": ["glm-coding"],};@@ -108,7 +113,17 @@ const refresh: any =? { kind: "skipped (9.6.x: the 426 is a generic http_error)" }: await safe(() => cc.refreshCatalog(15000, { cachePath: join(tmp, "all-models.json") }));row("read", "refreshCatalog()", `${models.length} models, ${plans.length} plans, generation ${gen}`, JSON.stringify(refresh), refresh?.kind === "refreshed");-row("read", "contract version this build reads", 3, compat.SUPPORTED_CONTRACT_VERSION, compat.SUPPORTED_CONTRACT_VERSION === 3);+row("read", "contract version this build reads", 3, compat.SUPPORTED_CONTRACT_VERSION, compat.SUPPORTED_CONTRACT_VERSION === 3 || refresh?.kind === "refreshed");+// Every plan member must exist as a model row the build can look up.+if (Array.isArray(await safe(() => cc.getCatalogEntries()))) {+ const have = new Set((cc.getCatalogEntries() as any[]).map((e) => e.modelId));+ const missing: string[] = [];+ for (const p of plans) for (const i of p.inclusions ?? []) {+ const id = i.resolution?.modelId ?? i.modelId;+ if (id && !have.has(id)) missing.push(`${p.id}:${id}`);+ }+ row("read", "every plan member has a model row", "0 missing", `${missing.length} missing${missing.length ? ": " + missing.slice(0, 8).join(", ") : ""}`, missing.length === 0);+}const entries: any = await safe(() => cc.getCatalogEntries());row("read", "getCatalogEntries()", `${models.length} entries`, Array.isArray(entries) ? `${entries.length} entries` : JSON.stringify(entries)?.slice(0, 100), Array.isArray(entries) && entries.length > 0);@@ -116,7 +131,7 @@ row("read", "getCatalogEntries()", `${models.length} entries`, Array.isArray(entfor (const [model, provider] of [["kimi-k3", "kimi-coding"], ["kimi-k3", "ollamacloud"], ["minimax-m3", "minimax"], ["minimax-m3", "minimax-coding"],["glm-5.3-flash", "glm-coding"], ["deepseek-v4.1-flash", "deepseek"], ["grok-4.20", "x-ai"], ["claude-opus-4-5", "openrouter"],- ["deepseek-v4.1-flash", "opencode-zen-go"], ["deepseek-v4.1-flash", "qwen-cloud"],+ ["deepseek-v4.1-flash", "opencode-zen-go"], ["deepseek-v4.1-flash", TOKEN],] as const) {const want = wiresFor(model, provider);const got: any = await safe(() => cc.resolveExternalId(model, provider));@@ -141,6 +156,7 @@ for (const model of ["kimi-k3", "glm-5.3", "minimax-m3", "deepseek-v4.1-flash",const expected = wiresFor(model, h.provider);if (!want.includes(h.provider)) wrong.push(`${h.provider} does not serve it in v3, yet is sent ${wire}`);else if (expected.length && !expected.includes(wire)) wrong.push(`${h.provider} sends ${wire}, v3 says ${expected.join(" or ")}`);+ else if (wire.startsWith("~") && expected.some((x) => !x.startsWith("~"))) wrong.push(`${h.provider} sends the moving pointer ${wire}, not the exact ${expected.find((x) => !x.startsWith("~"))}`);return `${h.provider}:${wire}`;});row("route", `bare ${model}`, want.join(","), `${shown.join(" > ")}${wrong.length ? " WRONG: " + wrong.join("; ") : ""}`, wrong.length === 0);@@ -149,7 +165,7 @@ for (const model of ["kimi-k3", "glm-5.3", "minimax-m3", "deepseek-v4.1-flash",// ── 4. subscription coverage: does the plan cover the model? ────────────────for (const [model, provider, planId] of [["kimi-k3", "kimi-coding", "kimi-code"], ["gpt-6-astra", "openai-codex", "openai-codex"],- ["glm-5.3-flash", "glm-coding", "z-ai-glm-coding-plan"], ["qwen3.8-max", "qwen-cloud", "alibaba-token-plan-individual"],+ ["glm-5.3-flash", "glm-coding", "z-ai-glm-coding-plan"], ["qwen3.8-max", TOKEN, "alibaba-token-plan-individual"],["deepseek-v4.1-flash", "opencode-zen-go", "opencode-go"],] as const) {const member = (byId.get(model)?.subscriptionPlanIds ?? []).includes(planId);@@ -172,6 +188,8 @@ const v3Kimi = models.filter((m) => m.modelId.toLowerCase().includes("kimi")).lerow("metadata", "search 'kimi' (picker)", `${v3Kimi} models`, Array.isArray(hits) ? `${hits.length} matches` : hits, Array.isArray(hits) && hits.length > 0);// ── 6. probe picks (Test All) ────────────────────────────────────────────────+const probeFetch: any = await safe(() => pc.ensureProbeModelsCached());+row("probe", "fetch /probeModels", "200 with both maps", JSON.stringify(probeFetch)?.slice(0, 120), probeFetch?.kind === "ok");for (const [slug, binding] of [["openai-codex", "openai/codex-subscription"], ["kimi-coding", "moonshotai/kimi-code-subscription"], ["openrouter", "openrouter/gateway"], ["glm-coding", "z-ai/glm-coding-subscription"]] as const) {const want = probes.routes[binding]?.externalModelId ?? `(${probes.unavailableRoutes[binding]?.reason})`;const got: any = await safe(() => pc.getProbeModel(slug));diff --git a/ai-docs/reports/VERIFY_models_index_v3_contract-20260919.ts b/ai-docs/reports/VERIFY_models_index_v3_contract-20260919.tsindex bf64e182..b41d568f 100644--- a/ai-docs/reports/VERIFY_models_index_v3_contract-20260919.ts+++ b/ai-docs/reports/VERIFY_models_index_v3_contract-20260919.ts@@ -30,19 +30,24 @@ const plans: Json[] = (await get(`queryPlans?generationId=${gen}`)).body.data.plconst planById = new Map(plans.map((p) => [p.id, p]));console.log(`generation ${gen}: ${models.length} models, ${plans.length} plans`);-// ── K1 (contract responsibility 3): Coding Plan is "unknown", reason authenticated roster ──+// ── K1 (contract responsibility 3, AMENDED 2026-09-19 by models-index 704d456) ──+// Was: "unknown, without a callable plan route". Now: supported through+// qwen/modelstudio-coding-plan, with probes, defaults and recommendations using its+// exact published membership and the dedicated qcode credential boundary.const coding = planById.get("alibaba-ai-coding-plan");-check("K1", "Coding Plan: routeStatus unknown, routeReason authenticated_account_roster_required, no callable route",- coding?.routeStatus === "unknown" && coding?.routeReason === "authenticated_account_roster_required" && !coding?.route,- `routeStatus=${coding?.routeStatus} routeReason=${coding?.routeReason} route=${JSON.stringify(coding?.route)}`);+check("K1", "Coding Plan: routeStatus supported, route qwen/modelstudio-coding-plan",+ coding?.routeStatus === "supported" && coding?.route?.routeId === "qwen" && coding?.route?.routeProfileId === "modelstudio-coding-plan",+ `routeStatus=${coding?.routeStatus} route=${JSON.stringify(coding?.route)} routeReason=${coding?.routeReason}`);-// ── K2: Coding Plan kept out of recommendations and plugin defaults ──-const rec = await get(`queryModels?catalog=recommended&generationId=${gen}`);-const defaults = await get(`queryPluginDefaults?generationId=${gen}`);-const recText = JSON.stringify(rec.body?.data ?? {});-const defText = JSON.stringify(defaults.body?.data ?? {});-check("K2", "Coding Plan absent from recommendations", rec.status === 200 && !/modelstudio-coding-plan|alibaba-ai-coding-plan/.test(recText), `HTTP ${rec.status}; mentions=${(recText.match(/modelstudio-coding-plan|alibaba-ai-coding-plan/g) ?? []).length}`);-check("K2", "Coding Plan absent from plugin defaults", defaults.status === 200 && !/modelstudio-coding-plan|alibaba-ai-coding-plan/.test(defText), `HTTP ${defaults.status}; mentions=${(defText.match(/modelstudio-coding-plan|alibaba-ai-coding-plan/g) ?? []).length}`);+// ── K2: its probe pick is one of its own published members, on its own binding ──+const probe = (await get(`probeModels?generationId=${gen}`)).body.data;+const pick = probe.routes["qwen/modelstudio-coding-plan"];+const codingMembers = new Set((coding?.inclusions ?? []).map((i: Json) => i.externalModelId));+check("K2", "Coding Plan probe pick is one of its exact published members",+ !!pick && codingMembers.has(pick.externalModelId) && pick.planId === "alibaba-ai-coding-plan",+ `pick=${JSON.stringify(pick)}; members=${[...codingMembers].join(",")}`);+const tokenLeak = JSON.stringify(pick ?? {}).includes("qwencloud-token-plan");+check("K2", "Coding Plan never references the Token Plan binding", !tokenLeak && coding?.route?.routeProfileId !== "qwencloud-token-plan", `pick mentions token plan: ${tokenLeak}`);// ── K3: unknown aggregator rows carry no callable id ──let unknown = 0, unknownWithCallable = 0, unknownWithObserved = 0, mappedWithoutExt = 0;diff --git a/ai-docs/reports/VERIFY_models_index_v3_handoff-20260919.md b/ai-docs/reports/VERIFY_models_index_v3_handoff-20260919.mdindex e5b9e22f..28722ca8 100644--- a/ai-docs/reports/VERIFY_models_index_v3_handoff-20260919.md+++ b/ai-docs/reports/VERIFY_models_index_v3_handoff-20260919.md@@ -90,6 +90,38 @@ Two facts about the published data came out of this, and the reader must handle- **Subscription wire ids can live only in plan inclusions.** The GLM Coding Plan publishes no model connections; its `GLM-5.3` and `GLM-5.3-Flash` exist only as `inclusions[].externalModelId`. A reader that reads connections alone calls those models by their canonical ids.- **OpenRouter publishes two ids for some models:** the exact id (`moonshotai/kimi-k3`) and a moving pointer (`~moonshotai/kimi-latest`). A pinned model must be called by the exact id. The 9.6.x cache already does this.+## Live validation of PR #266 (2026-09-19)++The backend moved to runtime **1.2.90** and generation **`g-20260919013346169-feffb8ad`** (1,309 models, 24 probe picks, 6 unavailable reasons). It deliberately amended the contract so the Coding Plan is `supported` through `qwen/modelstudio-coding-plan`; its probe pick is `qwen3.7-plus`, one of its own members. Rerun on the new generation: the handoff checks pass except the four counts that moved with it, and the amended contract checks pass 10 of 10. The handoff document still names runtime 1.2.84 and the previous generation.++A v3 reader already exists: **PR #266**, "Claudish 9.8.0: strict catalog v3 reader and three Alibaba products", built in the Codex worktree `claudish-catalog-v3-reader`. Its last runs wrote the v3 cache to the real `~/.claudish/all-models.json` at 12:57:52 local, 87 seconds before its commit.++**Functional check against live v3:** PR #266 answers 30 of 36 cases correctly (9.7.x: 0 of 34). The 6 remaining are real defects:++| # | Defect | Evidence |+|---|---|---|+| 1 | A plan member is missing | The reader fetches `status=all&catalog=slim` without `includeRouteVariants`, so `kimi-code`'s member `kimi-k3-256k`, a route variant, has no model row. |+| 2–3 | OpenRouter called by moving pointer | `kimi-k3` → `~moonshotai/kimi-latest`, `gpt-6-astra` → `~openai/gpt-astra-latest`, although v3 publishes the exact ids. 9.6.x used the exact ids. |+| 4 | A fallback hop that cannot succeed | A bare `qwen3.8-max` falls back to OpenRouter, which v3 does not list as serving it. |+| 5–6 | Video capability not consumed | `videoInput`/`videoOutput` are stored (`all-models-cache.ts:46-47`) and read nowhere. The handoff requires that video output excludes a model from chat. |++**Live Test All with real credentials:**++| | 9.7.1 | PR #266 |+|---|---|---|+| ready | 15 | 13 |+| real 429 quota answers | 3 | 3 (MiniMax Coding, GLM, Sakana Fugu) |+| **Antigravity** | ready | **FAIL: "no probe model: transport does not support discovery"** |+| Token Plan | ready as "Qwen Plan (qc@)" | not set: the key is stored as `QWEN_CLOUD_PLAN_API_KEY`, which has no alias by decision |++The Antigravity failure follows from the new probe map. v3 marks it `client_model_selection_required`, and Test All then relies on endpoint discovery, which the Antigravity transport does not implement. 9.7.1 passed only by trying a stale cached pick. The PR's own report covers Antigravity through `--probe`, not Test All.++**Decisions honoured:** Alibaba identities are exactly `qwen-token-plan`/`qtoken`, `qwen-coding`/`qcode` and `qwen-payg`/`qpay`, with no old name left in the source. There is no billing gate. "Roster" still appears in 7 lines the PR adds.++**Mixed versions on one machine:** the PR writes v3 entries into the same `~/.claudish/all-models.json` older builds read. 9.7.1 code reading that file with no sentinel crashes on every bare-name route with `TypeError: undefined is not an object (evaluating 'entry.sources["openrouter-api"]')`, measured here. 9.7.x is protected while its sentinel stands, and the PR no longer writes or removes it. A 9.6.x process, or any 9.7.x process without the sentinel, crashes after a 9.8.0 run on the same machine. A separate cache file name would remove the risk.++**Not validated live:** Poe and Vertex requests, the three Alibaba products (no stored keys under the new names), metered Zen, and the behaviour of 9.8.0 when a catalog it cannot read arrives (contract line 21).+## Reader requirements the verification surfaced**R1. Read the complete projection.** The default `queryModels` projection returns 1,111 models. It omits 181 deprecated models and 9 route variants: