Skip to main content
>_ cc-copilot-bridge
MIT License Version Platform Bash

Multi-Provider Router for Claude Code

Switch between Anthropic, GitHub Copilot, or Ollama with 3 characters. Use your Copilot subscription with Claude Code CLI.

3 providers 25+ models 30s install

How It Works

┌─────────────────────────────────────────────────┐
│           Claude Code CLI                       │
│         (Anthropic's CLI tool)                  │
└─────────────────┬───────────────────────────────┘
                  │
        ┌─────────▼──────────┐
        │  cc-copilot-bridge │  ◄─── This Tool
        └─────────┬──────────┘
                  │
    ┌─────────────┼─────────────┐
    │             │             │
┌───▼────┐  ┌─────▼──────┐  ┌───▼────┐
│ Direct │  │  Copilot   │  │ Ollama │
│  API   │  │   Bridge   │  │ Local  │
└────────┘  └────────────┘  └────────┘
Anthropic    GitHub Copilot   Self-hosted
Pay-per-token Premium requests Free (offline)

Three Providers, One Interface

🎯

Anthropic Direct

ccd

Official Anthropic API. Maximum quality for production code review, security audits, and critical decisions.

💰 Pay-per-token🔒 Official API
🚀

GitHub Copilot

ccc

Use your Copilot subscription with Claude Code. Access Claude, GPT, and Gemini models via copilot-api proxy.

Setup: Run copilot-api start in Terminal 1, then use ccc in Terminal 2

📊 Premium requests quota⚠️ ToS risk
🏠

Ollama Local

cco

100% offline inference. Perfect for proprietary code, air-gapped environments, and privacy-first workflows.

🆓 Free (local compute)🔐 100% private

Features

Instant Switching

Switch providers with 3 characters. No config changes, no restarts, no environment juggling.

🎨

25+ Models

Access Claude, GPT-4.1, GPT-5, Gemini, and local models (Devstral 68% SWE-bench, Qwen3 69.6%, Granite4) through a unified interface.

🔧

MCP Profiles

Auto-generated compatibility profiles exclude problematic MCP servers for strict models like GPT-4.1.

🆔

Model Identity

System prompt injection ensures GPT and Gemini correctly identify themselves when running through Claude Code.

🩺

Health Checks

Fail-fast validation. Get clear error messages when copilot-api or Ollama isn't running.

📝

Session Logging

Full audit trail in ~/.claude/claude-switch.log. Track provider, model, duration, and exit status.

GitHub Copilot Quotas & Limits

cc-copilot-bridge is free and open-source (MIT). This section explains GitHub Copilot's quota system, which applies when using the ccc provider.

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

Model Multipliers

Different models consume different amounts of premium requests:

Model Multiplier Effective Quota (Pro, 300) Effective Quota (Pro+, 1500)
GPT-4.1, GPT-4o, GPT-5-mini 0x Unlimited Unlimited
Claude Haiku 4.5 0.33x ~900 interactions ~4,500 interactions
Claude Sonnet 4.5 1x 300 interactions 1,500 interactions
Gemini 2.5 Pro 1x 300 interactions 1,500 interactions
Claude Opus 4.5 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.

See It In Action

Claude Sonnet 4.5 via Copilot

Claude Sonnet 4.5 (default) via GitHub Copilot

Claude Opus 4.5 via Copilot

Claude Opus 4.5 (premium, 3x multiplier)

GPT-4.1 via Copilot

GPT-4.1 (free, 0x multiplier)

Ollama Local

Ollama Local (100% offline)

claude-switch help

Full command reference

Quick Start

Get started in 30 seconds:

Homebrew (Recommended)

bash
brew tap FlorianBruniaux/tap
brew install cc-copilot-bridge
eval "$(claude-switch --shell-config)"

Script Install (Alternative)

bash
curl -fsSL https://raw.githubusercontent.com/FlorianBruniaux/cc-copilot-bridge/main/install.sh | bash
source ~/.zshrc  # or ~/.bashrc

Also available: Debian/Ubuntu (.deb), RHEL/Fedora (.rpm) — See all install options →

Setup Aliases

bash
# Add to ~/.bash_aliases or ~/.zshrc
alias ccd='claude-switch direct'      # Anthropic API (paid)
alias ccc='claude-switch copilot'     # GitHub Copilot (quota)
alias cco='claude-switch ollama'      # Ollama Local (offline)
alias ccs='claude-switch status'      # Check all providers

# Model shortcuts
alias ccc-gpt='COPILOT_MODEL=gpt-4.1 claude-switch copilot'
alias ccc-opus='COPILOT_MODEL=claude-opus-4.5 claude-switch copilot'

First Usage

bash
# Terminal 1: Start copilot-api (keep running)
copilot-api start
# or start the unified fork
scripts/launch-unified-fork.sh

# Terminal 2: Use Copilot (uses your subscription)
ccc

# Switch models on-the-fly
COPILOT_MODEL=gpt-4.1 ccc         # GPT-4.1 (free!)
COPILOT_MODEL=claude-opus-4.5 ccc # Opus (3x quota)

# Check provider status
ccs

Note: copilot-api (or the unified fork via scripts/launch-unified-fork.sh) must be running for Copilot mode. Direct (ccd) and Ollama (cco) don't need it.

Full installation guide →

⚠️ Risk Disclosure

Terms of Service Considerations

This project uses copilot-api, a community tool that reverse-engineers GitHub Copilot's API. Start the proxy first: copilot-api start or scripts/launch-unified-fork.sh.

Important Disclaimers

  • Not officially supported: copilot-api is not endorsed by GitHub, Microsoft, Anthropic, or any AI provider
  • ToS risk: Using third-party proxies to access Copilot may violate GitHub Copilot Terms of Service
  • Account suspension: GitHub reserves the right to suspend accounts for ToS violations without prior notice
  • API changes: This tool may stop working at any time if providers change their APIs
  • No guarantees: The authors provide no warranty and accept no liability for account suspension

Recommendations

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
💡