Configure Aider to use GitHub Copilot models (GPT-4.1/4.0) with auto-watch, gitignore handling, and Playwright support
Configure Aider to use GitHub Copilot's GPT-4.1 and GPT-4.0 models via LiteLLM's native support, with sensible defaults for file watching, gitignore handling, and browser automation.
This configuration sets up Aider with:
1. **Aider installed** (version with LiteLLM native GitHub Copilot support)
2. **GitHub Copilot subscription** active on your GitHub account
3. **GitHub Copilot CLI** authenticated (`gh auth login` with copilot scope)
1. **Create or edit `.aider.conf.yml` in your project root** (or `~/.aider.conf.yml` for global config):
```yaml
model: github_copilot/gpt-4.1
weak-model: github_copilot/gpt-4.0
show-model-warnings: false
auto-commits: false
add-gitignore-files: true
watch-files: true
gitignore: false
disable-playwright: false
```
2. **Verify configuration**:
```bash
aider --help
```
Check that the model is recognized and no errors are shown.
3. **Start Aider**:
```bash
aider
```
It should connect to GitHub Copilot automatically using your authenticated session.
If you need to route Playwright through a proxy (for web scraping features), uncomment and modify:
```yaml
playwright-proxy: "socks5://127.0.0.1:10808"
```
The original file includes commented-out legacy configurations for:
These are no longer needed with LiteLLM's native support (see [Aider #2227](https://github.com/Aider-AI/aider/issues/2227#issuecomment-3141551921)).
| Setting | Value | Why |
|---------|-------|-----|
| `model` | `github_copilot/gpt-4.1` | Latest GPT-4 turbo via Copilot subscription |
| `weak-model` | `github_copilot/gpt-4.0` | Faster model for simpler tasks |
| `auto-commits` | `false` | Manual git control preferred |
| `add-gitignore-files` | `true` | Auto-add modified files to .gitignore when needed |
| `watch-files` | `true` | Auto-detect external file changes |
| `disable-playwright` | `false` | Keep web scraping capability |
| `show-model-warnings` | `false` | Suppress model deprecation warnings |
```bash
cd ~/projects/my-app
aider
```
**Issue**: `github_copilot/gpt-4.1` not recognized
**Issue**: GitHub Copilot authentication failed
**Issue**: Playwright errors
Adapted from configuration in [Zhaoyilunnn/utils](https://github.com/Zhaoyilunnn/utils) repository.
Leave a review
No reviews yet. Be the first to review this skill!
# Download SKILL.md from killerskills.ai/api/skills/aider-configuration-for-github-copilot/raw