GitHub Copilot can be used as an AI provider through the OpenClaw gateway, routing requests through your organisation’s Copilot subscription.
Prerequisites
- A GitHub account with an active GitHub Copilot subscription (Individual, Business, or Enterprise)
- The
openclaw CLI version 1.3.0 or later
Authentication
Use the interactive device-flow login:
openclaw models auth login-github-copilot
This displays a device code and URL for you to visit. On completion, the token is stored in your config automatically.
Alternatively, supply the token via environment variable. OpenClaw checks the following in priority order:
| Variable | Notes |
|---|
COPILOT_GITHUB_TOKEN | Explicit Copilot token — highest priority |
GH_TOKEN | GitHub CLI token — Copilot activates automatically if this is already exported |
GITHUB_TOKEN | Generic GitHub token — lowest-priority fallback |
GitHub Copilot tokens expire. Run openclaw models auth login-github-copilot again if you see authentication errors.
Configuration
# No config file entry needed — Copilot is activated via env var:
# COPILOT_GITHUB_TOKEN=<your-token>
# Or run: openclaw models auth login-github-copilot
The API endpoint (https://api.individual.githubcopilot.com) is also dynamically derived from the Copilot token exchange — do not change this unless using a proxy.
Available models
Models vary by subscription tier:
| Model ID | Notes |
|---|
gpt-4o | Default for Business/Enterprise |
gpt-4.1 | |
gpt-4.1-mini | |
gpt-4.1-nano | |
o3-mini | Reasoning model |
o1 | Reasoning model |
o1-mini | Reasoning model |
claude-sonnet-4.6 | Available on Enterprise |
claude-sonnet-4.5 | Available on Enterprise |
Run openclaw models status --provider copilot to see the current list for your subscription.
Verify the connection
openclaw models status --probe-provider github-copilot