Skip to content

Fix Claude models showing as available on a plan that cannot run them - #360

Merged
default-cybe merged 4 commits into
mainfrom
fix/claude-per-account-models
Nov 14, 2026
Merged

default-cybe merged 4 commits into
mainfrom
fix/claude-per-account-models

Conversation

@default-cybe

Copy link
Copy Markdown
Owner

Owner report: the "neu" Claude plan has no Fable or Mythos, yet the picker and conclave models list showed them as available on it.

Cause: packages/server/src/cliproxy/catalog.ts claudeExtras and index.ts catalogExtras. A Claude plan has no model list of its own, so the hub fills the built-in proxy's shared claude catalog section. That section is per provider type, not per account, so every Claude account appeared to offer every model. Nothing recorded per-account entitlement.

Fix (learn from real failures, no probe):

  • A per-credential "cannot run" record in the plan proxy manager, kept for 24 h and cleared when the account signs in again (the proxy's cooldown on it is reset too).
  • Fed from (a) a refused turn (modelRefusal) whose account is known (a pinned call or a prefixed id), and (b) the plan proxy's model cooldown on one credential with reason model_not_supported or not_found (upstream sdk/cliproxy/auth/cooldown_view.go cooldownErrorReason: a 404, or its model-support check). A rate limit (quota), transient_error, and the 400 "Claude Code version" error never record.
  • That account's model list drops the model, so readyAccounts, routeOf ("your Claude plans") and fallback skip it. planWire names the next plan by its prefix, so the proxy cannot send the bare id to the plan that lacks it.
  • modelMeta: <prefix>/<model> gets unavailable: "Not on the <prefix> plan". merge.ts keeps that row as its own (no sameAs), so the web and Android pickers list it under Not available. The bare model goes unavailable only once every plan that lists it lacks it. The CLI models table shows the reason.

No probe was built: I could not prove from source that count_tokens enforces entitlement, and testing it would spend the owner's quota.

Tests: server accounts.test.ts (record, picker data, routing, TTL, re-sign-in, errors that must not record), web model-picker.test.tsx, Android PickerTabsTest.kt.

A Claude plan has no model list of its own, so the hub fills CLIProxyAPI's
shared claude catalog section and every Claude account appeared to offer
every model (Fable and Mythos on a plan without them). The hub now records
per account which models it cannot run: from a refused turn that named the
account, or from CLIProxyAPI's model_not_supported / not_found cooldown on
that credential. That account stops offering the model (routing, order,
"your Claude plans"), its prefixed row goes to Not available with
"Not on the <plan> plan", and a bare id is sent to a named plan that can run
it. The record clears after a day or when the account signs in again.

Committed-by: Conclave (cliproxy/claude-opus-5-5)
Saved in the kv table (cliproxy.notOn) with the same day limit; a new
sign in clears it there too.

Committed-by: Conclave (cliproxy/claude-opus-5-5)
Committed-by: Conclave (cliproxy/claude-opus-5-5)
…fusal

A sign-in now clears only a credential of the same type whose file changed
since the sign-in started, and ignores its old not-supported cooldowns
instead of resetting all of them (a reset cleared quota cooldowns too). A
refused bare id that no plan's cooldown names after the next read is greyed
out everywhere, as before.

Committed-by: Conclave (cliproxy/claude-opus-5-5)
@default-cybe
default-cybe merged commit 5498e71 into main Nov 14, 2026
18 checks passed
@default-cybe default-cybe mentioned this pull request Nov 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant