Describe the bug
Using CC Switch as the local proxy for Claude Code with the GitHub Copilot provider, all Claude models fail with:
API Error: 400 {"error":{"message":"The requested model is not supported.","code":"model_not_supported","param":"model","type":"invalid_request_error"}}
This happens not only for Sonnet, but also for Opus and Haiku.
Environment
- CC Switch version: 3.13.0
- OS: macOS
- App path:
/Applications/CC Switch.app
- Claude Code configured base URL:
http://127.0.0.1:15721
- Upstream provider:
https://api.githubcopilot.com
- Copilot plan: GitHub Copilot Pro
Models tested
All of the following returned model_not_supported from the upstream Copilot endpoint:
claude-sonnet-4.6
claude-sonnet-4-6
claude-opus-4.6
claude-haiku-4-5-20251001
Current injected provider config also shows:
ANTHROPIC_DEFAULT_SONNET_MODEL=claude-sonnet-4.6
ANTHROPIC_DEFAULT_OPUS_MODEL=claude-opus-4.6
ANTHROPIC_DEFAULT_HAIKU_MODEL=claude-haiku-4.5
Steps to reproduce
- Subscribe to GitHub Copilot Pro
- Configure GitHub Copilot as the Claude provider in CC Switch
- Let Claude Code use the local proxy at
http://127.0.0.1:15721
- Use any Claude model and send a prompt
- Observe upstream error
model_not_supported
Actual behavior
Claude Code fails with:
API Error: 400 {"error":{"message":"The requested model is not supported.","code":"model_not_supported","param":"model","type":"invalid_request_error"}}
After repeated failures, CC Switch may also trip the circuit breaker and return a local 502.
Expected behavior
Claude models available through the GitHub Copilot provider should work in Claude Code, or CC Switch should at least map to currently supported upstream model IDs.
Relevant logs
~/.cc-switch/logs/cc-switch.log repeatedly shows:
[claude] [FWD-003] Provider GitHub Copilot 请求失败: 上游 HTTP 400: The requested model is not supported.
[CB-004] 熔断器触发: 连续失败 8 次 → Open
Recent proxy DB records from ~/.cc-switch/cc-switch.db also show status_code=400 for:
claude-opus-4.6
claude-sonnet-4-6
claude-haiku-4-5-20251001
Notes
GitHub Copilot docs still list Claude models as supported, so this looks like a compatibility/mapping problem in the CC Switch GitHub Copilot provider layer rather than a simple local config typo.
Describe the bug
Using CC Switch as the local proxy for Claude Code with the GitHub Copilot provider, all Claude models fail with:
This happens not only for Sonnet, but also for Opus and Haiku.
Environment
/Applications/CC Switch.apphttp://127.0.0.1:15721https://api.githubcopilot.comModels tested
All of the following returned
model_not_supportedfrom the upstream Copilot endpoint:claude-sonnet-4.6claude-sonnet-4-6claude-opus-4.6claude-haiku-4-5-20251001Current injected provider config also shows:
ANTHROPIC_DEFAULT_SONNET_MODEL=claude-sonnet-4.6ANTHROPIC_DEFAULT_OPUS_MODEL=claude-opus-4.6ANTHROPIC_DEFAULT_HAIKU_MODEL=claude-haiku-4.5Steps to reproduce
http://127.0.0.1:15721model_not_supportedActual behavior
Claude Code fails with:
After repeated failures, CC Switch may also trip the circuit breaker and return a local 502.
Expected behavior
Claude models available through the GitHub Copilot provider should work in Claude Code, or CC Switch should at least map to currently supported upstream model IDs.
Relevant logs
~/.cc-switch/logs/cc-switch.logrepeatedly shows:Recent proxy DB records from
~/.cc-switch/cc-switch.dbalso showstatus_code=400for:claude-opus-4.6claude-sonnet-4-6claude-haiku-4-5-20251001Notes
GitHub Copilot docs still list Claude models as supported, so this looks like a compatibility/mapping problem in the CC Switch GitHub Copilot provider layer rather than a simple local config typo.