This error is good news wrapped in a bad message: your credential worked. The endpoint authenticated you and then could not find the model you asked for. The fix is almost always to stop typing the model name from memory.
Model slugs are not portable. The same underlying model can carry different identifiers on a vendor's own API and on a router that proxies it.
Ask the endpoint what it actually has
curl -s "$BASE_URL/v1/models" -H "Authorization: Bearer $TOKEN" \
| python3 -c "import sys,json;[print(m['id']) for m in json.load(sys.stdin).get('data',[])]"
# Narrow it down if the list is long:
curl -s "$BASE_URL/v1/models" -H "Authorization: Bearer $TOKEN" \
| python3 -c "import sys,json;[print(m['id']) for m in json.load(sys.stdin).get('data',[]) if 'claude' in m['id'].lower()]"Copy an id from that output exactly as printed, including any vendor prefix and any suffix. A prefix like vendor/ is part of the identifier on many routers, not decoration you can drop. Equally, an id that works on a router will often fail on the vendor's own API precisely because of that prefix.
Most agents let you set several models independently. Fixing the main one and missing a secondary one produces an error that looks intermittent.
Prove the model resolves with a minimal completion
curl -s "$BASE_URL/v1/chat/completions" \
-H "Authorization: Bearer $TOKEN" \
-H 'Content-Type: application/json' \
-d '{"model":"PASTE_ID_FROM_THE_LIST","messages":[{"role":"user","content":"reply with OK"}],"max_tokens":5}' \
| head -c 400| Code | Meaning | Next step |
|---|---|---|
404 on completions, 200 on /v1/models | Auth fine, this specific slug is not served. | Copy an id from the model list verbatim. |
404 on both | Wrong path or a doubled /v1 in the base URL. | Print the effective URL and remove the duplicated segment. |
400 with a model message | Slug recognised but the request shape is wrong for it. | Check whether that model requires different parameters. |
401 | Not a model problem at all. | See the 401 page. |
This error is almost always a slug that does not exist on your endpoint. AgentRouter publishes its model list openly, so there is nothing to guess: on the default group it serves gpt-5.6-sol, claude-opus-4-8 and claude-opus-5, reachable from both the Anthropic and OpenAI-compatible surfaces. Copy an id straight from that list into your config and this class of 404 disappears.
See the model list →Referral link — we may earn a reward if you sign up, at no extra cost to you. This is the same advice we would give with no link at all. Check their current pricing and model list on their own site; we deliberately do not restate numbers that change.
The Setup Doctor walks through your tool, symptom, and setup and points at the likely cause — no account needed.