API Error: 400 All target providers failed (Claude Code Router)
Claude Code Router could not match the requested model to a model in any provider it tried. Read the stage and message fields in the error, then fix the model name in the profile.
Summary
- The error comes from Claude Code Router, the local gateway at 127.0.0.1:3456, not from Anthropic or the model provider.
- Each attempt in the error body has a stage; model_resolution means the model name did not match the provider's models list.
- In CCR 3.0.18 to 3.0.20, users report the vendor prefix before the first slash being dropped, so IDs such as nvidia/... fail.
- A stale model left in a profile's availableModels fails the same way; recreate the profile to clear it.
On this page
Read the error body, not just the first line
All target providers failed. is Claude Code Router's (CCR) summary after every provider it tried for the request has failed. CCR is a local gateway: Claude Code sends requests to it, by default at http://127.0.0.1:3456, and CCR resolves the provider, model and credential. The useful part is in the JSON under the summary. In CCR issue #1658 it carried these fields:
"message": "All target providers failed.""target_provider_names": ["nvidia::openai_chat_completions"]"stage": "model_resolution"on the attempt- the attempt's message:
Model "nemotron-3-ultra-550b-a55b" is not configured for target provider nvidia::openai_chat_completions. Allowed models: nvidia/nemotron-3-ultra-550b-a55b, thinkingmachines/inkling.
stage tells you where the attempt broke. At model_resolution, the model name in the request did not match any entry in that provider's model list, and the allowed list is what the provider has configured. CCR's own Logs page also shows the resolved provider, model, status and error for each request.
If the allowed list has a slash in it
Compare the requested name with the allowed list. In #1658 the request asks for nemotron-3-ultra-550b-a55b while the provider lists nvidia/nemotron-3-ultra-550b-a55b. Issue #1624 reports this pattern on CCR 3.0.18 to 3.0.20: the text before the first / in a model ID is dropped during model resolution, so any provider whose IDs carry a vendor prefix fails. Groq (openai/gpt-oss-20b), NVIDIA and OpenRouter (openai/gpt-5.3-codex) are named in the thread; Ollama IDs without a slash work.
There is no confirmed workaround inside CCR. One commenter points to CCR 3.0.21 and a commit titled "Preserve target-provider slash model routing", without having verified it end to end, and a later comment says the problem still exists. Update CCR, retry, and if it still fails, use a provider whose model IDs have no slash for that model, or follow #1624.
If the model is a leftover in the profile
Issue #1910 (CCR 3.1.3) shows another way to reach the same message. A profile's availableModels can hold a model that is not in any provider's models list, because CCR saves the profile without checking. At request time every provider fails at model_resolution, and the error names providers unrelated to the one you meant. The profile editor only lists models from providers, so the stale entry cannot be removed there; the reporter deleted and recreated the profile.
When you add a provider in CCR (Providers → Add Provider), pick the models from its list, then select one of those in Agent Config for Claude Code. That keeps the profile and the provider's list in step.
Other stages
If an attempt shows a different stage, its own message is the provider-side error to fix; the summary line stays the same whatever went wrong. For pointing Claude Code at a non-Anthropic model without a local router, see how to use Kimi K3.1 Pro in Claude Code; our LLM API config GUI guide covers a desktop tool that writes the base URL and key for you. Other 400s are on the Claude Code API Error 400 page.
Sources and checks
- Claude Code Router README
- musistudio/claude-code-router #1658: API Error: 400 All target providers failed
- musistudio/claude-code-router #1624: Model resolution strips vendor prefix for providers with slash-namespaced model IDs
- musistudio/claude-code-router #1910: A profile's availableModels is accepted without checking the provider's models list


