Skip to content

API Error: 400 model_not_supported - Claude Code

Quick fix

Restart CC Switch to repair the proxy routing, or confirm whether the model ID requested became invalid after a Copilot policy change.

Error output
API Error: 400 {"error":{"message":"The requested model is not supported.","code":"model_not_supported","param":"model","type":"invalid_request_error"}}

This error appears on macOS using CC Switch to make GitHub Copilot the provider for Claude Code. Per community feedback it has two distinct causes: first, a broken local proxy state that fails to intercept and forward the request (restarting CC Switch resolves it); second, a model name mismatch, where the model ID Claude Code sends (`claude-sonnet-4.6`, for instance) does not match what the Copilot upstream expects — and GitHub Copilot has adjusted its subscription policy (dropping the Opus model from the Pro subscription, for example), which invalidates the older CC Switch model mapping.

  1. Quit the CC Switch application completely and restart it, making sure the local proxy (`http://127.0.0.1:15721`) takes over and converts requests properly.

  2. Check the model configured in the Claude Code environment variables (`ANTHROPIC_DEFAULT_SONNET_MODEL`, for instance) and make sure it is one GitHub Copilot currently supports.

  3. If it still errors after a restart, the CC Switch model mapping has not caught up with the latest Copilot interface. Use a community reverse proxy tool (`kobashi`, for instance) for now, or wait for a CC Switch update fixing the model name mismatch.

ToolClaude Code
Versionv2.1.94
PlatformsmacOS
Why do all the Claude models (Sonnet and Haiku included) error?
Usually because the CC Switch model name mapping does not match the GitHub Copilot upstream. If restarting CC Switch does not help, you need a CC Switch update that matches the latest Copilot model IDs.
What do I do when the log shows the circuit breaker tripping (Circuit Breaker Open)?
When the upstream returns 400 repeatedly, CC Switch trips its circuit breaker and returns a local 502. Restart CC Switch to reset the breaker state, and investigate the model mapping.

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.