Skip to main content
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:
VariableNotes
COPILOT_GITHUB_TOKENExplicit Copilot token — highest priority
GH_TOKENGitHub CLI token — Copilot activates automatically if this is already exported
GITHUB_TOKENGeneric 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 IDNotes
gpt-4oDefault for Business/Enterprise
gpt-4.1
gpt-4.1-mini
gpt-4.1-nano
o3-miniReasoning model
o1Reasoning model
o1-miniReasoning model
claude-sonnet-4.6Available on Enterprise
claude-sonnet-4.5Available 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