Skip to main content
This integration lets Claude Code route all its requests through Copilot API, so your existing GitHub Copilot subscription powers Claude Code without a separate Anthropic API key. This page covers two setup methods: an interactive one-command setup and a persistent manual configuration using settings.json.
Set your model to claude-opus-4-6 or claude-opus-4.6 — without the [1m] suffix. Requesting a context window that exceeds GitHub Copilot’s limit may trigger account restrictions.

Method 1: Interactive setup with --claude-code

The quickest way to get started is the --claude-code flag. It starts the proxy, prompts you to pick models, and copies a ready-to-run Claude Code launch command to your clipboard.
1

Start the proxy with the flag

Run the following command in your terminal:
2

Select your models

The CLI prompts you to choose a primary model and a small, fast model for background tasks. Select the models you want to use.
3

Launch Claude Code

After you select models, the proxy copies a launch command to your clipboard. Paste and run it in a new terminal window to start Claude Code with the proxy already configured.
If you have API key authentication enabled (auth.apiKeys in config.json), set ANTHROPIC_AUTH_TOKEN to one of your configured keys so Claude Code can authenticate with the proxy.

Method 2: Manual configuration with settings.json

For a persistent setup that survives reboots without re-running the interactive flow, create a .claude/settings.json file at the root of your project.
1

Start the proxy

In one terminal, start the Copilot API proxy:
2

Create the settings file

Create .claude/settings.json in your project root with the following content:
3

Launch Claude Code

Start Claude Code in the same project directory. It will automatically pick up the settings file and route requests through the proxy.

Key environment variables

Set ANTHROPIC_MODEL, ANTHROPIC_DEFAULT_SONNET_MODEL, and ANTHROPIC_DEFAULT_HAIKU_MODEL to consistent values. Keeping them aligned ensures Claude Code behaves like a native GitHub Copilot Claude agent.
Do not enable ENABLE_TOOL_SEARCH. Claude Code uses client-side tool search mode, which requires an extra request per deferred tool load and reduces cache hit rates. The proxy has known compatibility issues with client tool search mode that can cause errors.
Add the following reminders to your CLAUDE.md file. They instruct the model to use the question tool for user interactions instead of outputting free-form questions, which helps maintain clean tool semantics:
If you set CLAUDE_PLUGIN_ENABLE_QUESTION_RULES=1 in your settings, the Claude Code plugin injects these reminders automatically at session start — you do not need to add them to CLAUDE.md manually.

Install the Claude Code plugin

After configuring the proxy, install the Claude Code plugin to enable subagent marker injection and session tracking. The plugin helps the proxy correctly classify subagent-originated traffic and preserve session context. See the Plugin Integrations guide for installation instructions.