A community-driven registry for Claude, Cursor, Windsurf, Cline & more. Not affiliated with Anthropic.
Are you the author? Sign in to claim
Multi-provider routing for Claude Code CLI. Use your Copilot subscription, Ollama offline, or Anthropic Direct.
TL;DR: Bash script that routes Claude Code CLI through multiple AI providers. Switch between Anthropic Direct API, GitHub Copilot (via copilot-api proxy), or Ollama local with simple aliases (
ccd,ccc,cco).
📖 New to Claude Code? Check out the Claude Code Ultimate Guide for comprehensive documentation, tips, and best practices.
Multi-provider routing for Claude Code CLI
Use your existing GitHub Copilot subscription with Claude Code, or run 100% offline with Ollama. Access Claude, GPT, and Gemini models through a unified interface.
🌐 View Landing Page • Quick Start • Pricing & Limits • Features • Risk Disclosure
A multi-provider router for Claude Code CLI that lets you switch between AI backends with simple aliases.
| Provider | Command | Use Case | Cost Model |
|---|---|---|---|
| Anthropic Direct | ccd | Production, maximum quality | Pay-per-token |
| GitHub Copilot | ccc | Daily development | Premium requests quota |
| Ollama Local | cco | Offline, proprietary code | Free (local compute) |
┌─────────────────────────────────────────────────┐
│ Claude Code CLI │
│ (Anthropic's CLI tool) │
└─────────────────┬───────────────────────────────┘
│
┌─────────▼──────────┐
│ cc-copilot-bridge │ ◄─── This Tool
└─────────┬──────────┘
│
┌─────────┴────────────┌─────────────────┐
│ | │
┌───▼────┐ ┌───────▼────────┐ ┌───▼────┐
│ Direct │ │ Copilot Bridge │ │ Ollama │
│ API │ │ (copilot-api) │ │ Local │
└────────┘ └────────────────┘ └────────┘
Anthropic GitHub Copilot Self-hosted
Pay-per-token Premium requests Free (offline)
quota system
Recommended: Package Managers (clean, dependency-managed, easy updates)
brew tap FlorianBruniaux/tap
brew install cc-copilot-bridge
eval "$(claude-switch --shell-config)"
Add to ~/.zshrc: eval "$(claude-switch --shell-config)"
VERSION="1.5.3" # Check releases for latest
wget https://github.com/FlorianBruniaux/cc-copilot-bridge/releases/download/v${VERSION}/claude-switch_${VERSION}.deb
sudo dpkg -i claude-switch_${VERSION}.deb
eval "$(claude-switch --shell-config)"
Add to ~/.bashrc: eval "$(claude-switch --shell-config)"
VERSION="1.5.3" # Check releases for latest
wget https://github.com/FlorianBruniaux/cc-copilot-bridge/releases/download/v${VERSION}/claude-switch-${VERSION}-1.noarch.rpm
sudo rpm -i claude-switch-${VERSION}-1.noarch.rpm
eval "$(claude-switch --shell-config)"
Add to ~/.bashrc: eval "$(claude-switch --shell-config)"
Alternative: Script Install (if package managers unavailable)
curl -fsSL https://raw.githubusercontent.com/FlorianBruniaux/cc-copilot-bridge/main/install.sh | bash
Full guides:
The installer creates ~/.claude/aliases.sh with these commands:
# Core commands (created automatically)
ccd # Anthropic API (paid)
ccc # GitHub Copilot (default: Claude Sonnet 4.6)
cco # Ollama Local (offline)
ccs # Check all providers
# Model shortcuts (40+ models)
ccc-opus='COPILOT_MODEL=claude-opus-4-6 claude-switch copilot'
ccc-sonnet='COPILOT_MODEL=claude-sonnet-4-6 claude-switch copilot'
ccc-gpt='COPILOT_MODEL=gpt-4.1 claude-switch copilot'
ccc-grok='COPILOT_MODEL=grok-code-fast-1 claude-switch copilot'
ccc-prod, ccc-dev, ccc-quick, ccc-alt, ccc-private # semantic shortcuts
See INSTALL-OPTIONS.md for integration with antigen, oh-my-zsh, zinit, etc.
# Start with Copilot (free via your subscription)
ccc
# Switch models on-the-fly
COPILOT_MODEL=gpt-4.1 ccc
COPILOT_MODEL=claude-opus-4-6 ccc
# Check status
ccs
Visual Examples:
Claude Sonnet 4.6 (Default):

Claude Opus 4.6 (Premium):

GPT-4.1 (OpenAI):

Ollama Offline (Private):

Important: Using Claude Code via Copilot consumes your premium request quota. Usage is NOT unlimited.
| Plan | Monthly Cost | Premium Requests | Notes |
|---|---|---|---|
| Copilot Free | $0 | 50 | Limited model access |
| Copilot Pro | $10 | 300 | Access to most models |
| Copilot Pro+ | $39 | 1,500 | Full model access |
| Copilot Business | $19/user | 300 | Organization features |
| Copilot Enterprise | $39/user | 1,000 | Custom models, knowledge bases |
Different models consume different amounts of premium requests per interaction:
| Model | Multiplier | Effective Quota (Pro, 300 req) | Effective Quota (Pro+, 1500 req) |
|---|---|---|---|
| GPT-4.1, GPT-4o | 0x | Unlimited | Unlimited |
| Grok Code Fast 1 | 0.25x | ~1,200 interactions | ~6,000 interactions |
| Claude Haiku 4.5 | 0.33x | ~900 interactions | ~4,500 interactions |
| Claude Sonnet 4.6 | 1x | 300 interactions | 1,500 interactions |
| Gemini 2.5 Pro | 1x | 300 interactions | 1,500 interactions |
| GPT-5.3-Codex | 1x | 300 interactions | 1,500 interactions |
| — | — | ||
| — | — | ||
| Claude Opus 4.6 | 3x | ~100 interactions | ~500 interactions |
Key insight: GPT-4.1 and GPT-4o are free (0x multiplier) on paid plans. Use them for routine tasks to preserve premium requests for Claude/Opus.
Source: GitHub Copilot Plans
ccd # Anthropic Direct API (production)
ccc # GitHub Copilot Bridge (prototyping)
cco # Ollama Local (offline/private)
No config changes, no restarts, no environment variable juggling.
Help Menu:

Available commands:
ccs / claude-switch status - Check all providers healthclaude-switch --help - Full command reference| Provider | Models | Cost Model |
|---|---|---|
| Anthropic | opus-4-6, sonnet-4-6, haiku-4.5 | Per token |
| Copilot | claude-, gpt-4.1, gpt-5, gemini-, gpt-codex* | Premium requests quota |
| Ollama | devstral, granite4, qwen3-coder | Free (local) |
# Switch models mid-session
ccc # Default: claude-sonnet-4-6
ccc-opus # Claude Opus 4.6
ccc-gpt # GPT-4.1
COPILOT_MODEL=gemini-2.5-pro ccc # Gemini
# Ollama models
cco # Default: devstral-small-2
cco-devstral # Explicit Devstral
cco-granite # Granite4 (long context)
GPT Codex models use OpenAI's /responses endpoint, and Gemini 3 models have thinking support. Both require a fork of copilot-api that combines PR #167 and #170.
⚠️ Important: Codex models are tested and working. Gemini 3 agentic mode is Supported - PR #167 adds thinking support, and tool calling issues have been addressed in fork v1.3.1.
Setup:
# Terminal 1: Launch unified fork (auto-clones if needed)
ccunified
# Terminal 2: Use models
ccc-codex # gpt-5.2-codex ✅ Tested
ccc-gemini3 # gemini-3-flash-preview ✅ Supported
ccc-gemini3-pro # gemini-3-pro-preview ✅ Supported
Model Status:
| Model | Endpoint | Status |
|---|---|---|
gpt-5.2-codex | /responses | ✅ Tested |
gpt-5.1-codex-mini | /responses | ✅ Tested |
gemini-3-flash-preview | /chat/completions | ⚠️ Agentic untested |
gemini-3-pro-preview | /chat/completions | ⚠️ Agentic untested |
What to test for Gemini 3:
# 1. Baseline (should work)
ccc-gemini3 -p "1+1"
# 2. Agentic mode (uncertain - please report results!)
ccc-gemini3
❯ Create a file test.txt with "hello"
Fork source: caozhiyuan/copilot-api branch 'all' | PR #167 | PR #170
📖 Full guide: docs/ALL-MODEL-COMMANDS.md
Problem: GPT-4.1 has strict JSON schema validation → breaks some MCP servers
Solution: Auto-generated profiles exclude incompatible servers
~/.claude/mcp-profiles/
├── excludes.yaml # Define problematic servers
├── generate.sh # Auto-generate profiles
└── generated/
├── gpt.json # GPT-compatible (9/10 servers)
└── gemini.json # Gemini-compatible
Problem: GPT-4.1 thinks it's Claude when running through Claude Code CLI
Solution: System prompts injection
~/.claude/mcp-profiles/prompts/
├── gpt-4.1.txt # "You are GPT-4.1 by OpenAI..."
└── gemini.txt # "You are Gemini by Google..."
Result: Models correctly identify themselves
ccc
# → ERROR: copilot-api not running on :4141
# Start it with: copilot-api start (or scripts/launch-unified-fork.sh)
tail ~/.claude/claude-switch.log
[2026-01-22 09:42:33] [INFO] Provider: GitHub Copilot - Model: gpt-4.1
[2026-01-22 09:42:33] [INFO] Using restricted MCP profile for gpt-4.1
[2026-01-22 09:42:33] [INFO] Injecting model identity prompt for gpt-4.1
[2026-01-22 10:15:20] [INFO] Session ended: duration=32m47s exit=0
Use Case: Daily coding, prototyping, exploration
ccc # Default: claude-sonnet-4-6
ccc-gpt # GPT-4.1 (0x multiplier = free)
ccc-opus # Claude Opus 4.6 (3x multiplier)
COPILOT_MODEL=gemini-2.5-pro ccc # Gemini
How It Works:
copilot-api Running:

Screenshot: copilot-api proxy server logs showing active connections
Requirements:
copilot-api start or scripts/launch-unified-fork.sh)Use Case: Offline work, proprietary code, air-gapped environments
cco # Default: devstral-small-2
OLLAMA_MODEL=devstral-64k cco # With 64K context (recommended)
OLLAMA_MODEL=ibm/granite4:small-h cco # Granite4 (long context, 70% less VRAM)
How It Works:
Important: Ollama is architecturally independent from Copilot bridging. It's a separate provider for local inference, not related to copilot-api.
⚠️ Critical: Context Configuration
Claude Code sends ~18K tokens of system prompt + tools. Default Ollama context (4K) causes hallucinations and slow responses.
Create a 64K Modelfile (recommended):
mkdir -p ~/.ollama
cat > ~/.ollama/Modelfile.devstral-64k << 'EOF'
FROM devstral-small-2
PARAMETER num_ctx 65536
PARAMETER temperature 0.15
EOF
ollama create devstral-64k -f ~/.ollama/Modelfile.devstral-64k
OLLAMA_MODEL=devstral-64k cco
Recommended Models (March 2026):
SWE-bench measures real-world agentic coding ability (GitHub issue resolution with tool calling, multi-file editing). High HumanEval scores don't guarantee agentic performance.
| Model | SWE-bench Verified | Params | Min RAM | Practical Status | Use Case |
|---|---|---|---|---|---|
| devstral-small-2 | 68.0% | 24B | 32GB | ✅ Best agentic (default) | Daily coding, proven reliable |
| qwen3-coder:30b | 69.6% | 30B | 32GB | ⚠️ Needs template work | Highest bench, config issues |
| ibm/granite4:small-h | ~62% | 32B (9B active) | 16GB | ✅ Long context | 70% less VRAM, 1M context |
| glm-4.7-flash | ~65-68% (estimated) | 30B MoE (3B active) | 16GB | ⚠️ Ollama 0.15.1+ required | Tool calling fix (v0.15.1) |
| qwen3-coder-next:80b | 42.8% | 80B (3B active) | 64GB | ⚠️ High-end only | Near-Sonnet quality, MoE efficient |
On the radar (not yet locally runnable):
| Model | SWE-bench Verified | Params | Status |
|---|---|---|---|
| DeepSeek V4 | ~80%+ (internal) | 1T | ❌ Cloud only — watch for distilled variants |
DeepSeek V4 (released Feb 2026): 1T parameters, 1M context window, Apache 2.0. Top SWE-bench scores but requires 200GB+ RAM even quantized. No runnable distillation confirmed for Ollama yet. Follow DeepSeek releases for Q4 distillations.
Benchmark Sources:
Why Devstral despite lower SWE-bench?
⚠️ Models NOT recommended (low SWE-bench despite good HumanEval):
Requirements:
ollama.ai)ollama pull devstral-small-2)Note: Ollama uses GGUF format (universal). For maximum Mac performance with small models (<22B), LM Studio + MLX can be up to 4x faster. However, for models >30B, GGUF becomes more performant. LM Studio is not compatible with claude-switch.
Use Case: Production, maximum quality, critical analysis
ccd
How It Works:
Requirements:
ANTHROPIC_API_KEY environment variableFor general multi-provider routing, see @musistudio/claude-code-router (31.9k weekly downloads). For a complete open-source alternative, see OpenCode (48k stars).
cc-copilot-bridge specifically serves Copilot Pro+ subscribers who want to use Claude Code CLI with their existing subscription.
# Use GPT-4.1 for routine tasks (0x multiplier = doesn't consume quota)
ccc-gpt
❯ Build user authentication flow
# Use Claude Sonnet for complex logic (1x multiplier)
ccc
❯ Design database schema
# Use Anthropic Direct for production review (official API)
ccd
❯ Security audit of auth implementation
# Compare approaches across models
ccc-gpt # GPT-4.1 analysis (free)
ccc # Claude Sonnet analysis (1x)
ccc-opus # Claude Opus analysis (3x - use sparingly)
# Work on proprietary code (airplane mode)
cco
❯ Implement proprietary encryption algorithm
# ✅ No internet required
# ✅ Code never leaves machine
| Component | Description |
|---|---|
| claude-switch | Main script (provider switcher) |
| install.sh | Auto-installer |
| mcp-check.sh | MCP compatibility checker |
| MCP Profiles | Auto-generated configs for strict models |
| System Prompts | Model identity injection |
| Health Checks | Fail-fast validation |
| Session Logging | Full audit trail |
/responses endpoint, gpt-5.4, gemini-3.1)Current: v1.7.0
Changelog: See CHANGELOG.md
This project uses copilot-api, a community tool that reverse-engineers GitHub Copilot's API.
Important disclaimers:
Community reports indicate that:
| Use Case | Recommended Provider |
|---|---|
| Production code | Anthropic Direct (ccd) - Official API, no ToS risk |
| Sensitive/proprietary code | Ollama Local (cco) - 100% offline, no cloud |
| Daily development | Copilot (ccc) - Understand the risks first |
| Risk-averse users | Avoid copilot-api entirely |
Source: GitHub Terms of Service - API Terms
Enhance your Claude Code workflow:
More: florian.bruniaux.com
MIT
Native macOS app to monitor Claude AI usage limits and watch your coding sessions live
干净、强大、属于你的 AI Agent 平台 --AI agents, without the clutter.
npx CLI installing 100+ agents, commands, hooks, and integrations in one command
Pocket Flow: Codebase to Tutorial