Skip to content

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

docs: verify the shared Alibaba contract live and request retiring "roster"

Jack Rudenko5a5d19d4fbb5
diff --git a/ai-docs/reports/PLAN_catalog_v3_reader-20260919.md b/ai-docs/reports/PLAN_catalog_v3_reader-20260919.md
index 4130de81..61e7309d 100644
--- a/ai-docs/reports/PLAN_catalog_v3_reader-20260919.md
+++ b/ai-docs/reports/PLAN_catalog_v3_reader-20260919.md
@@ -13,7 +13,7 @@ The reader instead converts v3 into the internal shape those files already read,
What v3 can express and the internal shape could not must still survive the translation:
- `routeStatus: "unknown"` rows are **not routable**. They carry no callable id, so they are dropped from connections. Availability stays three-valued, and an unknown route never becomes "not served".
-- `rosterCoverage` travels with each plan. Only complete, unexpired coverage licenses a "not served" answer.
+- Membership coverage travels with each plan. Only complete, unexpired coverage licenses a "not served" answer. The field is `rosterCoverage` today; the backend is asked to rename it `membershipCoverage`, with every other "roster" name (see request 2 in the verification report), and the reader reads whichever name is published when it ships.
- Plan membership comes from `subscriptionPlanIds`, counted by distinct model.
## The binding table
@@ -106,7 +106,7 @@ Each slice ends green and committed. Codex writes the tests from real captured r
- `together` and `fireworks` gateway providers, each in both `BUILTIN_PROVIDERS` and `PROVIDER_PROFILES`.
- Poe's provider factory.
-**4. Roster coverage.** Expired or unknown coverage means "unknown", never "not served".
+**4. Membership coverage.** Expired or unknown coverage means "unknown", never "not served".
**5. Dev validation and release.** On the live generation, exercise everything the handoff's release acceptance lists:
diff --git a/ai-docs/reports/VERIFY_models_index_v3_contract-20260919.ts b/ai-docs/reports/VERIFY_models_index_v3_contract-20260919.ts
new file mode 100644
index 00000000..bf64e182
--- /dev/null
+++ b/ai-docs/reports/VERIFY_models_index_v3_contract-20260919.ts
@@ -0,0 +1,97 @@
+// Verify the promises in models-index ai-docs/alibaba-provider-changes.md (the shared
+// Alibaba / v3 contract) that the handoff verification did not cover, against the
+// LIVE generation. Findings: ai-docs/reports/VERIFY_models_index_v3_handoff-20260919.md
+//
+// Run: bun run ai-docs/reports/VERIFY_models_index_v3_contract-20260919.ts
+const BASE = "https://us-central1-claudish-6da10.cloudfunctions.net";
+const ACCEPT = "application/vnd.models-index.catalog+json;version=3";
+type Json = any;
+const results: { id: string; ok: boolean | "info"; claim: string; evidence: string }[] = [];
+const check = (id: string, claim: string, ok: boolean | "info", evidence: string) =>
+ results.push({ id, ok, claim, evidence });
+async function get(path: string): Promise<{ status: number; body: Json }> {
+ const r = await fetch(`${BASE}/${path}`, { headers: { Accept: ACCEPT, "Cache-Control": "no-cache" } });
+ return { status: r.status, body: await r.json().catch(() => null) };
+}
+
+// complete projection, pinned by cursor
+const models: Json[] = [];
+let cursor: string | undefined;
+let gen: string | undefined;
+do {
+ const q = new URLSearchParams({ limit: "200", status: "all", includeRouteVariants: "true" });
+ if (cursor) q.set("cursor", cursor);
+ const r = await get(`queryModels?${q}`);
+ gen ??= r.body.generationId;
+ models.push(...(r.body.data?.models ?? []));
+ cursor = r.body.data?.nextCursor ?? undefined;
+} while (cursor);
+const plans: Json[] = (await get(`queryPlans?generationId=${gen}`)).body.data.plans;
+const 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 ──
+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)}`);
+
+// ── 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}`);
+
+// ── K3: unknown aggregator rows carry no callable id ──
+let unknown = 0, unknownWithCallable = 0, unknownWithObserved = 0, mappedWithoutExt = 0;
+const reasons: Record<string, number> = {};
+for (const m of models) for (const a of m.aggregators ?? []) {
+ if (a.routeStatus === "unknown") {
+ unknown++;
+ if (a.externalModelId !== undefined || a.route) unknownWithCallable++;
+ if (a.observedExternalModelId) unknownWithObserved++;
+ reasons[a.routeReason ?? a.reason ?? "?"] = (reasons[a.routeReason ?? a.reason ?? "?"] ?? 0) + 1;
+ } else if (a.routeStatus === "mapped" && !a.externalModelId) mappedWithoutExt++;
+}
+check("K3", "unknown rows have no externalModelId and no route", unknownWithCallable === 0, `${unknown} unknown rows, ${unknownWithCallable} with a callable id, ${unknownWithObserved} with observedExternalModelId; reasons ${JSON.stringify(reasons)}`);
+check("K3", "every mapped row has an externalModelId", mappedWithoutExt === 0, `${mappedWithoutExt} mapped rows without one`);
+
+// ── K4: PAYG is metered, not a subscription record ──
+const paygPlans = plans.filter((p) => p.route?.routeProfileId === "dashscope-direct");
+check("K4", "no plan is bound to qwen/dashscope-direct", paygPlans.length === 0, `${paygPlans.length} plans`);
+
+// ── K5: Individual and Team are separate Token Plan records; Credit Pack validity sourced ──
+const ind = planById.get("alibaba-token-plan-individual");
+const team = planById.get("alibaba-token-plan-team-edition");
+check("K5", "Token Plan Individual and Team are separate records on one binding",
+ !!ind && !!team && ind.route?.routeProfileId === "qwencloud-token-plan" && team.route?.routeProfileId === "qwencloud-token-plan",
+ `individual=${ind?.displayName} team=${team?.displayName}`);
+const packs = plans.flatMap((p) => (p.pricing ?? []).filter((x: Json) => /pack/i.test(JSON.stringify(x))).map((x: Json) => ({ plan: p.id, ...x })));
+check("info", "Credit Pack pricing records", "info", JSON.stringify(packs));
+
+// ── K6: video capability fields, no duplicate field ──
+const capKeys = new Set<string>();
+for (const m of models) for (const k of Object.keys(m.capabilities ?? {})) capKeys.add(k);
+const videoKeys = [...capKeys].filter((k) => /video/i.test(k));
+check("K6", "exactly videoInput and videoOutput carry video capability", videoKeys.sort().join(",") === "videoInput,videoOutput", `video keys: ${videoKeys.join(", ")}; all keys: ${[...capKeys].sort().join(", ")}`);
+
+// ── K7: redirects ──
+const red = await get(`queryModels?catalog=redirects&generationId=${gen}`);
+const redirects = red.body?.data?.redirects ?? red.body?.data?.models ?? [];
+check("K7", "3 provider model redirects published", redirects.length === 3, `HTTP ${red.status}; ${redirects.length}: ${JSON.stringify(redirects).slice(0, 400)}`);
+
+// ── K8: roster coverage on the current generation ──
+const cov = plans.map((p) => `${p.id}=${p.rosterCoverage?.status ?? "none"}${p.rosterCoverage?.expiresAt ? "@" + p.rosterCoverage.expiresAt.slice(0, 10) : ""}`);
+check("K8", "every plan carries rosterCoverage", plans.every((p) => p.rosterCoverage?.status), cov.join("; "));
+
+// ── K9: product labels (contract responsibility 6) ──
+const labels = ["alibaba-ai-coding-plan", "alibaba-token-plan-individual", "alibaba-token-plan-team-edition"].map((id) => `${id} → "${planById.get(id)?.displayName}"`);
+check("info", "Alibaba plan display names (contract names the products Alibaba Coding Plan / Token Plan / PAYG)", "info", labels.join("; "));
+
+console.log("\nRESULTS");
+for (const r of results) console.log(`${r.ok === "info" ? "INFO" : r.ok ? "PASS" : "FAIL"} ${r.id.padEnd(4)} ${r.claim}\n ${r.evidence}`);
+const failed = results.filter((r) => r.ok === false).length;
+console.log(`\n${results.filter((r) => r.ok === true).length} pass, ${failed} fail`);
+export {};
diff --git a/ai-docs/reports/VERIFY_models_index_v3_handoff-20260919.md b/ai-docs/reports/VERIFY_models_index_v3_handoff-20260919.md
index df9f0e3c..490fff70 100644
--- a/ai-docs/reports/VERIFY_models_index_v3_handoff-20260919.md
+++ b/ai-docs/reports/VERIFY_models_index_v3_handoff-20260919.md
@@ -7,7 +7,7 @@
## Result
-Every backend claim in the handoff holds: **48 of 48 checks pass** against generation `g-20260918181642356-73127622`.
+Every backend claim in the handoff holds: **48 of 48 checks pass** against generation `g-20260918181642356-73127622`. The shared Alibaba contract's own promises hold too: **10 of 10**.
The claims about claudish also hold. Released 9.7.1 cannot read v3, Poe's factory is unimplemented, and the Vertex transport exists.
@@ -33,6 +33,24 @@ The checks also surfaced three things the reader must do that the handoff does n
| Grok video booleans | ✓ | `grok-imagine-video`: `videoInput:true`, `videoOutput:true`. `grok-imagine-video-1.5`: `videoInput:false`, `videoOutput:true` |
| OpenRouter restored | ✓ | 470 mapped `openrouter/gateway` connections (0 before) |
+### The shared contract's own promises
+
+models-index `ai-docs/alibaba-provider-changes.md` makes promises the handoff does not repeat. **10 of 10 pass** on the same generation, via `VERIFY_models_index_v3_contract-20260919.ts`:
+
+| Promise | Live result |
+|---|---|
+| Coding Plan published as unknown, with no callable route | `routeStatus: unknown`, `routeReason: authenticated_account_roster_required`, no `route` |
+| Coding Plan kept out of recommendations and defaults | 0 mentions in `catalog=recommended` and in `queryPluginDefaults` |
+| An unknown connection is never callable | 372 unknown rows, 0 with `externalModelId` or `route`, all 372 with `observedExternalModelId`. Reasons: `unsupported_provider` 268, `unverified_mapping` 94, `mutable_pointer_only` 8, `identity_conflict` 2 |
+| Every mapped connection is callable | 0 mapped rows without `externalModelId` |
+| PAYG is metered, not a subscription record | no plan is bound to `qwen/dashscope-direct` |
+| Token Plan Individual and Team stay separate records | two plans, both bound to `qwen/qwencloud-token-plan` |
+| One video field per direction, no duplicate | exactly `videoInput` and `videoOutput` |
+| Redirects published | 3, all on `z-ai/glm-coding-subscription`, e.g. `GLM-4.7` → `glm-5.3-flash` |
+| Membership coverage on every plan | present on all 19 |
+
+Not a failure, but worth a look given the rule that static values match: the contract calls the products "Alibaba Coding Plan" and "Alibaba Token Plan", while the plan records are named "Alibaba Cloud Model Studio Coding Plan", "QwenCloud Token Plan Individual" and "QwenCloud Token Plan Team Edition". Those are commercial plan names rather than product labels, so they may be intended.
+
### The six wire translations
Every connection on these profiles publishes an exact `externalModelId`. Examples:
@@ -119,9 +137,32 @@ Removed outright: provider `qwen-cloud`, prefixes `qc`, `qp` and `dashscope`, an
The new gateway providers take the fixture's names, `together` and `fireworks`, because claudish has no earlier name to keep.
-## Request to the backend
+## Requests to the backend
-**Reader ownership:** your handoff lists claudish's reader-ownership prompt as pending. It is answered: one claudish session owns the reader, as the handoff asks. No backend change is requested. The portal identifiers, the binding fixture and `alibaba-provider-changes.md` are already correct, and claudish changes to match them.
+**1. Reader ownership.** Your handoff lists claudish's reader-ownership prompt as pending. It is answered: one claudish session owns the reader, as the handoff asks. The portal identifiers, the binding fixture and `alibaba-provider-changes.md` are already correct, and claudish changes to match them.
+
+**2. Retire "roster" from the wire contract (Jack, 2026-09-19).** The word carries two meanings in the contract today, and neither reader can tell which is meant. claudish already retired it for the same reason (commit `83f9afb`, "roster becomes the dynamic models catalog"). Static values must stay identical on both sides, so the rename happens in the backend first and claudish reads the new names.
+
+- The **dynamic models catalog** is the per-credential model list a provider's discovery endpoint returns. It is never persisted.
+- **Membership** is a plan's published member list, part of the cloud catalog. The handoff already uses this word: "Use `subscriptionPlanIds` for memberships".
+
+| Current | Meaning | Requested |
+|---|---|---|
+| `authenticated_account_roster_required` (inclusion reason, and the Coding Plan's `routeReason`) | dynamic models catalog | **`dynamic_models_catalog_required`** (decided by Jack) |
+| `authenticated_variant_roster_required` | dynamic models catalog | `dynamic_variant_catalog_required` |
+| `rosterCoverage` | membership | `membershipCoverage` |
+| `rosterRequirements` | membership | `membershipRequirements` |
+| `rosterId` (in `rosterRequirements[]`) | membership | `membershipSourceId` |
+| `RosterEntryV3` | membership | `MembershipEntryV3` |
+| `rosters` (`ManualApprovalRequiredErrorV3`) | membership | `memberships` |
+| `authoritative_roster_identity_unresolved` | membership | `authoritative_membership_identity_unresolved` |
+| `no_exact_callable_roster` | membership | `no_exact_callable_membership` |
+| `sourceText` prose: "account-specific Devin model roster", "account-specific Grok subscription roster" | dynamic models catalog | "account-specific Devin dynamic models catalog", and the same for Grok |
+| `sourceText` prose: "exact roster not published" | membership | "exact membership not published" |
+
+Only the first row's spelling is Jack's decision. The others are proposed to follow the same two terms; please confirm or adjust them in the change, and claudish will read whatever is published. The reader is being written now, so renaming before it ships means one migration instead of two.
+
+Found by searching the live OpenAPI document and the live plan and probe data of generation `g-20260918181642356-73127622` for every occurrence of the word. The spec itself has no prose using it.
## Reproduce