Claude Code. Any Model. The most powerful AI coding agent now speaks every language.
docs: take the Alibaba identities from the backend contract, with no aliases
Jack Rudenko843dd5a1cd8e
diff --git a/ai-docs/reports/PLAN_catalog_v3_reader-20260919.md b/ai-docs/reports/PLAN_catalog_v3_reader-20260919.mdindex 76d0f09e..4130de81 100644--- a/ai-docs/reports/PLAN_catalog_v3_reader-20260919.md+++ b/ai-docs/reports/PLAN_catalog_v3_reader-20260919.md@@ -2,13 +2,13 @@**Owner:** the claudish session `v3-subscription:blocks-everyone`**Inputs:** the backend handoff (models-index `docs/reviews/2026-09-19-claudish-v3-reader-handoff.md`) and its verification, `VERIFY_models_index_v3_handoff-20260919.md`-**Decisions:** recorded in the verification report (no billing gate; Alibaba provider names kept; Token Plan key renamed)+**Decisions:** recorded in the verification report. No billing gate. claudish's static values match the backend contract exactly, with no aliases: the Alibaba providers are `qwen-coding`, `qwen-token-plan` and `qwen-payg`, as models-index `ai-docs/alibaba-provider-changes.md` names them.## Design: translate once, at the edgeclaudish reads v2 catalog vocabulary in many places. `aggregators[]` and its `provider` field alone are read in 17 files, across routing, pricing, the picker and the TUI probe. Rewriting every consumer would put billing-critical routing at risk in the same release.-The reader instead converts v3 into the internal shape those files already read, at one boundary. This works because every v3 route binding names exactly one claudish provider: `openai/codex-subscription` is `openai-codex`, and `qwen/qwencloud-token-plan` is `qwen-cloud`. After translation, an aggregator row's `provider` **is** the claudish provider name, and its external id is the published `externalModelId`. The handoff asks for the same thing: "Keep SDK provider names and prefixes in the client transport adapter."+The reader instead converts v3 into the internal shape those files already read, at one boundary. This works because every v3 route binding names exactly one claudish provider: `openai/codex-subscription` is `openai-codex`, and `qwen/qwencloud-token-plan` is `qwen-token-plan`. After translation, an aggregator row's `provider` **is** the claudish provider name, and its external id is the published `externalModelId`. The handoff asks for the same thing: "Keep SDK provider names and prefixes in the client transport adapter."What v3 can express and the internal shape could not must still survive the translation:@@ -43,7 +43,7 @@ All 30 registered profiles, and the claudish provider each one means:| `poe/gateway` | `poe` | needs its factory || `qwen/dashscope-direct` | `qwen-payg` | || `qwen/modelstudio-coding-plan` | `qwen-coding` | **new provider** |-| `qwen/qwencloud-token-plan` | `qwen-cloud` | |+| `qwen/qwencloud-token-plan` | `qwen-token-plan` | **renamed** from `qwen-cloud` || `sakana/direct-api` | `sakana` | || `sakana/fugu-subscription` | `sakana-subscription` | || `together-ai/gateway` | `together` | **new provider** |@@ -70,20 +70,20 @@ That session stopped on 2026-09-19 and holds 9 commits plus 72 uncommitted files| `83f9afb` roster → dynamic models catalog | yes | It is independent of the gate. || `6b627f1` black-box tests | yes, edited | Drop `metered-fallback.ts` and `metered-fallback.blackbox.test.ts`. || `80ff29b`, `1e5e157` docs | yes, edited | Remove the gate passages (53 and 2 lines). |-| `0ba1bfa` three products | yes, edited | Remove `meteredFallbackDefault: "block"` from `qwen-coding` and the test that it blocks; apply Jack's names. |+| `0ba1bfa` three products | yes, edited | Remove `meteredFallbackDefault: "block"` from `qwen-coding` and the test that it blocks. |**Uncommitted groups**| Group | Carry | Why ||---|---|---|-| A. rename to `qwen-token-plan`/`qtoken`/`qpay`, delete the aliases | **no** | Contradicts Jack's decision. The key rename is the one part kept, via the deprecated alias. |+| A. rename to `qwen-token-plan`/`qtoken`/`qpay`, delete the aliases | **yes** | It is the backend contract exactly: one spelling, no aliases, no shims. Check each value against the contract table while carrying it. || B. gate removal | only the log fix | The gate is never carried. Keep the fix for `routing-rules.ts` printing `[claudish] [claudish]`, a bug already on `main`. || C. video capability | yes | The handoff requires it: `videoOutput` excludes chat, `videoInput` alone never does, and the name-shaped rule applies only where the catalog has no row. Runtime-verified there on 6 cases. || D. public discovery is not entitlement | yes | The handoff requires it. `qwen-coding` lists its models without authentication, so its list proves coverage, not account access. Availability denies only on `"account"` evidence. || E. partial v3 join | no, rebuilt | It is unverified after a late edit, and this plan translates at the edge instead. Its `subscriptionPlanIds` handling is a reference. || F. tests and fixtures | with their groups | |-**Contract conflict to resolve with the backend.** models-index `ai-docs/alibaba-provider-changes.md` line 15 reads: "Product identities have one spelling and no aliases, migration shims, alternate credential names, or retired-name diagnostics." Its table names `qwen-token-plan` / `qtoken` / `qpay`. Jack's decisions keep `qwen-cloud` / `qc` / `qp` and deprecate `QWEN_CLOUD_PLAN_API_KEY` with a warning. That document must be amended, or the two sides disagree again.+**The backend contract is the source of static values.** models-index `ai-docs/alibaba-provider-changes.md` fixes the provider names, prefixes, credentials and hosts, and says: "Product identities have one spelling and no aliases, migration shims, alternate credential names, or retired-name diagnostics." Jack confirmed it on 2026-09-19. Where claudish differs, claudish changes.## Slices@@ -95,13 +95,14 @@ Each slice ends green and committed. Codex writes the tests from real captured r- Pin `queryPlans` and `probeModels` to page 1's `generationId`. A 410 mid-walk restarts the walk once; a 503 or 426 keeps the current cache and the 9.7 guard.- Translate through the binding table. The cache file records `contractVersion: 3` and the `generationId`, and a v2 cache on disk is refused, which forces one refresh after updating.- Remove `FIREBASE_SLUG_TO_PROVIDER_NAME` from its 3 files; the binding table replaces it.+- Bring the 9.7 guard in line with the contract. `alibaba-provider-changes.md` line 21: "Unavailable catalog data means coverage is unknown … Claudish discards incompatible catalog payloads, reports that state visibly, and continues using its existing configured routing and discovery behavior." Today `routeBare` throws on an unreadable catalog, so a bare model name stops routing. It must report the state and continue with configured routing, with coverage unknown.- Acceptance: 1,301 models and 19 plans read live. Alibaba memberships are 10/20/31 after translation. `minimax@minimax-m3` sends `MiniMax-M3`. A before/after table of bare-name routes shows no removed route.**2. Probes.** Read both maps, keyed by binding. A `client_model_selection_required` or `no_verified_probe_model` entry goes to endpoint discovery, and the client never invents a model id.**3. Providers.**- `qwen-coding`, rebased from `worktree-qwen-token-plan` without its two billing-gate commits.-- The Token Plan key becomes `QWEN_TOKEN_PLAN_API_KEY`; `QWEN_CLOUD_PLAN_API_KEY` keeps working with a one-time deprecation warning.+- The Alibaba identities match the contract with nothing left behind: `qwen-cloud` becomes `qwen-token-plan`; the prefixes are `qcode`, `qtoken` and `qpay`; the credentials are `QWEN_CODING_PLAN_API_KEY`, `QWEN_TOKEN_PLAN_API_KEY` and `DASHSCOPE_API_KEY`. `qc`, `qp`, `dashscope`, `QWEN_CLOUD_PLAN_API_KEY` and `QWEN_API_KEY` are removed, and so are comments describing them.- `together` and `fireworks` gateway providers, each in both `BUILTIN_PROVIDERS` and `PROVIDER_PROFILES`.- Poe's provider factory.diff --git a/ai-docs/reports/VERIFY_models_index_v3_handoff-20260919.md b/ai-docs/reports/VERIFY_models_index_v3_handoff-20260919.mdindex e7cad7e5..df9f0e3c 100644--- a/ai-docs/reports/VERIFY_models_index_v3_handoff-20260919.md+++ b/ai-docs/reports/VERIFY_models_index_v3_handoff-20260919.md@@ -90,7 +90,7 @@ Missing on `main`, all needed for the handoff's release acceptance:| Token Plan | `qwen-token-plan` / `qtoken` / `QWEN_TOKEN_PLAN_API_KEY` | `qwen-cloud` / `qc` / `QWEN_CLOUD_PLAN_API_KEY` | `qwen-cloud` / `qc`, `qtp` / `QWEN_TOKEN_PLAN_API_KEY` + alias `QWEN_CLOUD_PLAN_API_KEY` || PAYG | `qwen-payg` / `qpay` / `DASHSCOPE_API_KEY` | `qwen-payg` / `qp`, `dashscope` / `DASHSCOPE_API_KEY` | same as `main` |-The backend portal already shows users `qcode`, `qtoken` and `qpay`. claudish accepts none of them today.+The backend portal already shows users `qcode`, `qtoken` and `qpay`. claudish accepts none of them today, which is claudish's defect to fix.4. **Poe cannot make a request** until its factory exists.@@ -107,22 +107,21 @@ The handoff says the opposite: "An available PAYG key is permission to use it",1. **Reader ownership:** the claudish session `v3-subscription:blocks-everyone` owns the reader and coordinates the provider changes. It rebases the Alibaba work from `worktree-qwen-token-plan` instead of rewriting it, and it has told that session.2. **No billing gate.** The reader follows the handoff: subscriptions → dynamic subscriptions → native API → aggregators → fallback, and a configured key is permission to use it. The two gate commits on `worktree-qwen-token-plan` are not carried.-3. **claudish keeps its Alibaba provider names and shortcuts**, and only the Coding Plan is added. The Token Plan **key** is renamed: `QWEN_TOKEN_PLAN_API_KEY` is the name, and `QWEN_CLOUD_PLAN_API_KEY` is deprecated because it does not say which Alibaba plan it belongs to. The deprecated name keeps working and prints a one-time warning that names the replacement.+3. **claudish adopts the backend's Alibaba identities exactly.** The static values in models-index `ai-docs/alibaba-provider-changes.md` are the single source: one spelling, and no aliases, migration shims, alternate credential names or retired-name diagnostics. The old names are removed, not deprecated.-| Product | claudish provider | Shortcut | Key | Binding |+| Product | Provider | Prefix | Credential | Binding ||---|---|---|---|---|-| Token Plan | `qwen-cloud` | `qc` | `QWEN_TOKEN_PLAN_API_KEY` (deprecated alias: `QWEN_CLOUD_PLAN_API_KEY`) | `qwen/qwencloud-token-plan` |-| Coding Plan (new) | `qwen-coding` | `qcode` | `QWEN_CODING_PLAN_API_KEY` | `qwen/modelstudio-coding-plan` |-| PAYG | `qwen-payg` | `qp` | `DASHSCOPE_API_KEY` | `qwen/dashscope-direct` |+| Alibaba Coding Plan (new) | `qwen-coding` | `qcode` | `QWEN_CODING_PLAN_API_KEY` | `qwen/modelstudio-coding-plan` |+| Alibaba Token Plan | `qwen-token-plan` | `qtoken` | `QWEN_TOKEN_PLAN_API_KEY` | `qwen/qwencloud-token-plan` |+| Alibaba PAYG | `qwen-payg` | `qpay` | `DASHSCOPE_API_KEY` | `qwen/dashscope-direct` |++Removed outright: provider `qwen-cloud`, prefixes `qc`, `qp` and `dashscope`, and the credentials `QWEN_CLOUD_PLAN_API_KEY` and `QWEN_API_KEY`.The new gateway providers take the fixture's names, `together` and `fireworks`, because claudish has no earlier name to keep.-## Requests to the backend+## Request to the backend-1. **Portal identifiers:** show `qc` and `qp` instead of `qtoken` and `qpay`. `qcode` is correct. Today the portal shows users shortcuts that claudish rejects. The key names in the handoff (`QWEN_CODING_PLAN_API_KEY`, `QWEN_TOKEN_PLAN_API_KEY`, `DASHSCOPE_API_KEY`) are correct and need no change.-2. **Binding fixture:** in `functions/src/test-fixtures/consumer-subscription-bindings.ts`, the Token Plan row names `qwen-token-plan`. claudish's provider is `qwen-cloud`. The binding, `qwen/qwencloud-token-plan`, is unchanged.-3. **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.-4. **Amend `ai-docs/alibaba-provider-changes.md`.** Its table names the Token Plan `qwen-token-plan` / `qtoken` and PAYG `qpay`, and line 15 forbids "aliases, migration shims, alternate credential names, or retired-name diagnostics". claudish keeps `qwen-cloud` / `qc` and `qp`, and accepts `QWEN_CLOUD_PLAN_API_KEY` with a deprecation warning. Please change the table to claudish's names and allow that one deprecated key name, so the document and the client agree.+**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.## Reproduce