Skip to content

GitHub Copilot provider returns model_not_supported for all Claude models in Claude Code on macOS #2016

Description

@meiyingqishi

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

  1. Subscribe to GitHub Copilot Pro
  2. Configure GitHub Copilot as the Claude provider in CC Switch
  3. Let Claude Code use the local proxy at http://127.0.0.1:15721
  4. Use any Claude model and send a prompt
  5. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions