Fix "There's an issue with the selected model" (404 model not found) in Claude Code
There's an issue with the selected model (claude-opus-6). It may not exist or you may not have access to it. Run /model to pick a different model.
Claude Code says There's an issue with the selected model, or the API returns 404 Unknown model? Usually the model ID is misspelled; sometimes ANTHROPIC_BASE_URL has an extra /v1 and every request hits an HTML 404 page. Here's how to tell which.
Fix it in 3 steps
- 1
Note the model name in parentheses
Claude Code prints the model it tried in the parentheses. Compare it with the ids returned by https://www.ccsub.net/api/v1/models or the model list on the website. CCSub's 404 message usually includes a "Did you mean" suggestion too.
- 2
Switch to a valid model ID
Pick one with /model, or fix ANTHROPIC_MODEL, the model key in settings.json, and ANTHROPIC_DEFAULT_SONNET_MODEL / OPUS / HAIKU_MODEL. Model IDs are hyphenated, e.g. claude-opus-4-6, not opus 4.6.
- 3
If every model fails, check the base URL
ANTHROPIC_BASE_URL must be https://www.ccsub.net with no trailing /v1. OpenAI-compatible tools use https://www.ccsub.net/api/v1. A wrong URL returns a full HTML 404 page, which clients misreport as a model problem.
Other forms of the same error
API Error: 404 {"type":"error","error":{"type":"not_found_error","message":"Unknown model \"opus 4.6\". Did you mean \"claude-opus-4-6\"? Model IDs use hyphens, e.g. claude-opus-4-6 (not \"opus 4.6\"). Full list: https://www.ccsub.net/api/v1/models | ..."}}unexpected status 404 Not Found: <!DOCTYPE html><html lang="zh">...
Two very different causes behind one message
When Claude Code gets a 404, it usually shows There's an issue with the selected model (...). Several reports on the Claude Code issue tracker confirm it does this even when the gateway URL itself is what returned 404. So first figure out which of these you have:
- Unknown model name. The request reached CCSub, but the model ID isn't one it recognizes. CCSub answers with a JSON
not_found_errorwhose message starts withUnknown model "...", tries to suggest the closest valid name, and links the full list. - Wrong URL. The request never hit the API route, and the server returned the website's 404 page — a full HTML document. Every model fails, and Claude Code still reports it as a model issue.
Quick test: if switching models doesn't help, it's almost certainly #2. Check whether the endpoint answers with JSON or HTML:
curl -sS -X POST https://www.ccsub.net/v1/messages -o /dev/null -w '%{http_code} %{content_type}\n'
The correct URL returns 401 application/json (no key was sent, so 401 — but the endpoint exists). Substitute the URL from your own config: 404 text/html means the URL is wrong.
Misspelled model IDs we actually see
- Spaces or dots:
opus 4.6,claude-opus-4.6. CCSub's Claude IDs use hyphens throughout, e.g.claude-opus-4-6,claude-sonnet-4-6. - Versions that don't exist, like
claude-opus-6. - Names copied from another platform with a provider prefix or a custom suffix.
- Things that aren't model IDs at all —
pro,chat gpt 4o. Both show up in CCSub's 404 logs from the last 30 days.
The authoritative list is https://www.ccsub.net/api/v1/models; every id there can be pasted into your config as-is. The website's model list shows the same IDs.
Where Claude Code picks the model from
Per the Claude Code docs, the model can come from several places. If one change didn't stick, check them all:
/modelin the session and the--modelflag, which win over everything else.- The
ANTHROPIC_MODELenvironment variable, which beats themodelkey in any settings file. - The
modelkey in~/.claude/settings.jsonor the project's.claude/settings.json. ANTHROPIC_DEFAULT_SONNET_MODEL,ANTHROPIC_DEFAULT_OPUS_MODEL, andANTHROPIC_DEFAULT_HAIKU_MODEL, which decide what the sonnet, opus, and haiku aliases resolve to. The haiku one also drives background tasks.
If you set any of these to another platform's model names, update them when you move to CCSub.
Base URL mistakes that cause HTML 404s
ANTHROPIC_BASE_URL=https://www.ccsub.net/v1. Claude Code appends/v1/messagesitself, so you end up at/v1/v1/messagesand get an HTML 404. Usehttps://www.ccsub.netwith no/v1.- A language prefix in the URL, such as
https://www.ccsub.net/en. API endpoints don't take one. - For Codex, Cursor and other OpenAI-compatible tools, the base URL is
https://www.ccsub.net/api/v1. When Codex printsunexpected status 404 Not Found: <!DOCTYPE html>..., the url at the end of the error shows exactly which address it requested.
After fixing the config, open a new terminal and restart the tool so it picks up the change.
FAQ
Where can I see every model ID CCSub accepts?
Open https://www.ccsub.net/api/v1/models. Each id in the JSON can go straight into your config. The model list page on the website shows the same IDs.
I fixed /model but background tasks still fail. Why?
Claude Code runs background work such as session titles on the model behind the haiku alias, which ANTHROPIC_DEFAULT_HAIKU_MODEL controls. If that variable points at a model that doesn't exist, your main conversation works but background calls fail.
Why does gpt-image-1 fail in chat?
Image-generation models can't be used on the chat or Responses endpoints. CCSub returns a 400 pointing you to https://www.ccsub.net/api/v1/images/generations. Likewise, keys in the image group can only call the images endpoint and get a 400 for chat models.
Am I billed for 404s?
No. The model is validated before anything is forwarded.
Still stuck?
- Read the troubleshooting guide (Chinese)
- Contact support: Email support@ccsub.net with the tool and version, your OS, the full error text, and your account email (never send your API key).
- Re-check your setup against the integration guide: Claude Code setup guide, Codex CLI setup guide, Cursor setup guide, Cline setup guide, Cherry Studio setup guide
Related errors
API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"Invalid JSON in request body: Unterminated string in JSON at position 10407567 (line 1 column 10407568)"}}A position in the millions means the body was truncated in transit: /compact or /clear, stop re-pasting big screenshots, read large files in chunks. A tiny position means the JSON itself is malformed.API Error: 401 {"type":"error","error":{"type":"authentication_error","message":"Invalid or disabled API key"}}The key never arrived or it's the wrong one. Check /status, re-copy the full key from the dashboard, and unset any leftover ANTHROPIC_API_KEY.unexpected status 401 Unauthorized: {"type":"error","error":{"type":"authentication_error","message":"Missing or invalid API key"}}, url: https://www.ccsub.net/api/v1/responsesCheck the url in the error to see where the request went, then define a custom provider with env_key and set that variable in the same environment Codex runs in.
New to CCSub?
Sign up, create an API key in the dashboard, and paste it into Claude Code, Codex CLI or your editor. You pay for what you use.