With several Claude accounts and only one with Claude Mythos 5.2, the
model was asked of the first account, which answered Anthropic's 404
"There's an issue with the selected model (claude-mythos-5-2). It may
not exist or you may not have access to it." That 404 wasn't read as
the model's, so the account rested for every model, with a backoff
that grew, and was asked Mythos again each time the rest ended.
- claudeLists: Claude Code names only the gated models an account has
(additionalModelOptionsCache), never the ones it lacks. A model
models.dev doesn't list that another account's Claude Code offers is
now out of an account whose own file doesn't offer it. AccountsFor
then tries it only after the accounts that have it. A model no
account offers, nor models.dev lists, is still taken to be in, so an
account is never left out when nothing is known.
- ModelUnserved: Claude Code's "may not exist or you may not have
access" and the API's not_found_error "model: …" rest only that
model on that account (restID). Its other models stay on it.
Run on mote at 3438b7bd9 plus this change (rebased since on cd25b3735,
which touches internal/update only):
- go test -run 'TestClaudeGatedModel|TestClaudeModelNoAccess|
TestAnthropicModelNoAccess|TestClaudeMadeFirst|TestEscapedWords|
TestClaude.*Account|TestPool' ./internal/gateway: ok
- go test -run 'Claude|Unserved|ModelOnly|Plugin401' ./internal/provider: ok
- GOOS=linux and GOOS=windows go vet of both packages: ok; gofmt -l clean.
Broken by hand:
- With the old claude_code_models.go, TestClaudeGatedModelGoesToTheAccountThatHasIt
is red: "A ... was asked it 1 times".
- With the old ModelUnserved, TestClaudeModelNoAccessRestsTheModelOnly
is red: Sonnet went to B. TestAnthropicModelNoAccessIsTheModels is
red for both bodies.
The first try read an account with a Claude Code file as lacking every
model when models.dev's list was empty. TestClaudeMadeFirstSpentGoesToTheOther
caught it, and it is fixed before this commit.
The fixture bytes are Claude Code's real 404 lines for a model the
account can't call.
Not tried: a real account with Mythos 5.2 beside one without it. There
is no such pair here.
Full suite: run after push.