GitHub Copilot Provider
GitHub Copilot provides AI-powered coding assistance through GitHub’s infrastructure. VibeCody can use your existing Copilot subscription as an AI provider.
Prerequisites
- A GitHub account with an active Copilot subscription (Individual, Business, or Enterprise)
- A GitHub personal access token (PAT) with the
copilotscope
Get a Token
- Go to github.com/settings/tokens
- Click Generate new token (classic) or Fine-grained token
- For classic tokens: select the
copilotscope - Copy the token
VibeCody exchanges this GitHub token for a short-lived Copilot API token automatically (refreshed every ~30 minutes).
Configure VibeCody
Option 1: Environment variable (recommended)
export GITHUB_TOKEN="ghp_..."
vibecli --provider copilot
Option 2: Config file (~/.vibecli/config.toml)
[copilot]
enabled = true
api_key = "ghp_..."
model = "gpt-4o"
Model Selection
GitHub Copilot provides access to models through its API:
| Model | Best for |
|---|---|
gpt-4o |
General-purpose coding (default) |
Default: gpt-4o
Best For
- Existing Copilot subscribers – use your subscription for VibeCody without additional API costs
- GitHub-integrated workflows – works with your existing GitHub authentication
- No separate billing – included in your Copilot subscription
Verify Connection
vibecli --provider copilot -c "Write a JavaScript function to debounce events"
Troubleshooting
Token exchange failed
Error: Failed to exchange GitHub token
- Verify your GitHub token is valid and has the
copilotscope - Confirm you have an active Copilot subscription
- Check:
curl -H "Authorization: token ghp_..." https://api.github.com/user
Expired token
VibeCody caches the Copilot API token and refreshes it automatically. If you see authentication errors, try restarting VibeCody to force a token refresh.
No Copilot subscription
The Copilot provider requires an active GitHub Copilot subscription. Sign up at github.com/features/copilot.