Repository navigation
Fix Claude models showing as available on a plan that cannot run them - #360
Merged
Merged
Conversation
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)
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Owner report: the "neu" Claude plan has no Fable or Mythos, yet the picker and
conclave models listshowed them as available on it.Cause:
packages/server/src/cliproxy/catalog.tsclaudeExtrasandindex.tscatalogExtras. A Claude plan has no model list of its own, so the hub fills the built-in proxy's sharedclaudecatalog 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):
modelRefusal) whose account is known (a pinned call or a prefixed id), and (b) the plan proxy's model cooldown on one credential with reasonmodel_not_supportedornot_found(upstreamsdk/cliproxy/auth/cooldown_view.gocooldownErrorReason: a 404, or its model-support check). A rate limit (quota),transient_error, and the 400 "Claude Code version" error never record.readyAccounts,routeOf("your Claude plans") and fallback skip it.planWirenames the next plan by its prefix, so the proxy cannot send the bare id to the plan that lacks it.modelMeta:<prefix>/<model>getsunavailable: "Not on the <prefix> plan".merge.tskeeps that row as its own (nosameAs), 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 CLImodelstable 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), webmodel-picker.test.tsx, AndroidPickerTabsTest.kt.