# How to Set Up Roo Code with GitHub Copilot: A Technical Guide
<div class="callout" data-callout="info">
<div class="callout-title">Overview</div>
<div class="callout-content">
This guide provides step-by-step instructions for setting up Roo Code with GitHub Copilot as your AI provider. This configuration allows you to leverage Roo Code's agentic coding capabilities while utilizing GitHub Copilot's models (including Claude 3.7 Sonnet), eliminating the need for OpenRouter subscriptions and maintaining enterprise compliance.
</div>
</div>
<div class="topic-area">
## Prerequisites
- Visual Studio Code (latest version)
- GitHub account with Copilot subscription (Pro or Enterprise)
- Basic familiarity with VS Code extensions
</div>
<div class="topic-area">
## Step 1: Install Required Extensions
First, let's install the required extensions in VS Code:
1. Open VS Code
2. Navigate to Extensions (Ctrl+Shift+X)
3. Search for and install:
- GitHub Copilot
- Roo Code
</div>
<div class="topic-area">
## Step 2: Configure GitHub Copilot
1. Sign in to your GitHub account in VS Code
2. Authenticate GitHub Copilot when prompted
3. Verify Copilot is working by testing basic code completion
</div>
<div class="topic-area">
## Step 3: Configure Roo Code to Use GitHub Copilot
1. Open VS Code settings (File > Preferences > Settings or Ctrl+,)
2. Search for "Roo Code configuration"
3. Create or edit your Roo Code configuration file:
```json
{
"experimentalFeatures": {
"enableGitHubCopilotConnection": true
},
"providers": {
"githubCopilot": {
"models": {
"claude": {
"modelId": "claude-3-7-sonnet-20250219",
"priority": 1
}
}
}
}
}
```
</div>
<div class="topic-area">
## Step 4: Verify Connection
1. Open the Roo Code panel in VS Code
2. Check connection status in the panel
3. If you see "Connected to GitHub Copilot", your setup is successful
</div>
<div class="topic-area">
## Step 5: Optional Model Configuration
For organizations that want to specify which models are available:
1. In your GitHub organization settings, navigate to Copilot settings
2. Under "Model preferences", specify allowed models
3. Configure rate limits as needed for your team
</div>
<div class="callout" data-callout="warning">
<div class="callout-title">Troubleshooting</div>
<div class="callout-content">
### Rate Limit Issues
If you encounter "rate limit exceeded" errors:
1. Check your current usage in the Copilot dashboard
2. Consider implementing a token rotation system
3. Add a small delay between consecutive requests
### Connection Problems
If Roo Code fails to connect to GitHub Copilot:
1. Verify your GitHub Copilot subscription is active
2. Check VSCode is updated to the latest version
3. Ensure all authentication tokens are valid
</div>
</div>
<div class="topic-area">
## Enterprise Compliance Benefits
This setup offers several advantages for enterprise users:
1. **Security**: All AI requests go through GitHub Copilot's secure channels
2. **Compliance**: Maintains organizational policies configured in GitHub Copilot
3. **Audit Trail**: Keeps all AI interactions within enterprise-approved systems
4. **Cost Management**: Eliminates need for multiple AI provider subscriptions
</div>
<div class="topic-area">
## Command Line Configuration
For users who prefer command line configuration:
```bash
# Install required extensions
code --install-extension GitHub.copilot
code --install-extension rooveterinary.roo-code
# Configure Roo Code to use GitHub Copilot
mkdir -p ~/.config/roocode
echo '{
"experimentalFeatures": {
"enableGitHubCopilotConnection": true
},
"providers": {
"githubCopilot": {
"models": {
"claude": {
"modelId": "claude-3-7-sonnet-20250219",
"priority": 1
}
}
}
}
}' > ~/.config/roocode/settings.json
```
</div>
<div class="callout" data-callout="success">
<div class="callout-title">Conclusion</div>
<div class="callout-content">
By following this guide, you've successfully set up Roo Code to work with GitHub Copilot, giving you access to powerful AI assistance while maintaining enterprise security and compliance requirements. This configuration eliminates the need for OpenRouter subscriptions and leverages your existing GitHub Copilot investment.
Remember to check for updates regularly, as both Roo Code and GitHub Copilot are actively developed with new features being added frequently.
</div>
</div>