API Error: 404 - Claude Code path assembly or unregistered route
Quick fix
Check whether the API address was assembled wrongly, or upgrade cc-switch for the 404 from OpenAI-compatible mode and the missing local route.
Symptom
Section titled “Symptom”API Error: 404(/aillm/online/chat/completions/v1/messages)A 404 in cc-switch usually comes from one of two path handling mechanisms: 1. API path assembled wrongly: in a compatibility mode such as "OpenAI Chat Completions", early versions did not convert the API format properly and simply appended /v1/messages to the full request address you entered, pointing the request at a nested path that does not exist. 2. Local route not registered: when supporting a client such as Claude Desktop, client initialisation requests GET /v1/models for the model list, and a cc-switch version that has not registered that local route endpoint returns 404 outright.
Change the API request address in cc-switch to the Base URL only (https://padd.cn/aillm/online, for example) without the full /chat/completions path, so the path is not appended twice.
Upgrade cc-switch to the latest version for the official fixes to OpenAI-compatible mode URL assembly (#924) and forwarding the local /v1/models route.
Affected Versions
Section titled “Affected Versions”Source Issues
Section titled “Source Issues”This page is distilled from 2 real issues
- Why does configuring a third-party platform (MiMo/Codex) also report 404?
- Usually because cc-switch has not fully integrated that platform's specific API format or endpoints, so the request is routed to the wrong upstream endpoint. Check the official documentation, or wait for support in a later version.
- Besides 404, the terminal also reports 503, 429, or 403. Why?
- Those usually relate to upstream API provider rate limiting (429), service unavailability (503), or authentication failure (403), not local path assembly in cc-switch. Check your API key status and upstream service health.
Related problems
Section titled “Related problems”This is an unofficial community wiki with no affiliation to the cc-switch authors or the project itself. Its content is compiled from the project's public GitHub issues. This site distributes no software.