AnyRouter 429 error in Claude Code
Quick fix
Add "model": "opus[1m]" to the provider JSON and restart Claude Code. If 429 persists, upstream rate limiting is likely; switch networks or use haiku.
Symptom
Section titled “Symptom”出现这个说明模型1m上下文设置成功了,是AnyRouter上游服务不稳定会报429,换个网络多试几次就可以了This indicates the 1m context model setting succeeded. AnyRouter upstream service is unstable and returns 429; switch networks and retry several times.
This issue occurs when using cc-switch to configure an AnyRouter provider for Claude Code / Claude Desktop. The maintainer advised not to fill in model mapping in the UI. Instead, add "model": "opus[1m]" directly to the configuration JSON, then restart Claude Code. This configuration enables the 1m context model. If the CLI still returns 429 after configuration, the maintainer explained that the 1m context setting succeeded and the later 429 is caused by AnyRouter upstream instability or rate limiting, not a local configuration error. User feedback also showed haiku worked in the same environment while opus[1m] kept returning 429, indicating upstream availability may differ by model.
Do not fill in model mapping in the cc-switch AnyRouter provider configuration.
Add the following line to that provider's configuration JSON, then save.
// AnyRouter provider config JSON"model": "opus[1m]",Fully restart Claude Code or Claude Desktop and retry.
If 429 still appears, AnyRouter upstream is rate limiting or unstable. Switch networks, retry later, or temporarily use the haiku model.
Affected Versions
Section titled “Affected Versions”Source Issues
Section titled “Source Issues”This page is distilled from 1 real issues
- What if it still fails after configuration?
- Confirm that Claude Code was restarted. If 429 still appears, the maintainer said this is usually AnyRouter upstream instability; switch networks and retry several times.
- Why does haiku work?
- User feedback showed opus[1m] kept returning 429 while haiku worked. This indicates the issue is related to AnyRouter upstream rate limiting or availability for a specific model or 1m context.
- How should Claude Desktop be configured?
- The maintainer said they do not use Claude Desktop, but the configuration should theoretically be the same as Claude Code. Try the same JSON configuration.
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.