Configure Aider to use Ollama's DeepSeek-R1 model with optimized timeout and retry settings for local LLM inference
Configure Aider to use Ollama's locally-hosted DeepSeek-R1 model with optimized settings for reliability and git integration.
This Aider setup connects to a local Ollama instance running DeepSeek-R1, with safeguards against hanging requests, optimized retry logic, and git workflow customization. Ideal for developers running AI coding assistants entirely on local hardware.
**Model Setup:**
**Git Integration:**
**Automation:**
Ensure you have Ollama installed and the DeepSeek-R1 model pulled:
```bash
curl -fsSL https://ollama.com/install.sh | sh
ollama pull deepseek-r1:latest
```
In your project root, create `.aider.conf.yml`:
```yaml
model: ollama/deepseek-r1:latest
auto-commits: false
yes-always: true
env-file: .env
check-update: false
timeout: 120
max-retries: 3
model-settings:
temperature: 0.7
max-tokens: 4096
git: true
dirty-commits: true
attribute-author: false
attribute-committer: false
```
If your project needs environment variables for Ollama (e.g., custom host):
```bash
OLLAMA_HOST=http://localhost:11434
```
```bash
aider
```
Aider will automatically detect and use the configuration file.
| Setting | Value | Purpose |
|---------|-------|---------|
| `model` | `ollama/deepseek-r1:latest` | Use DeepSeek-R1 via Ollama |
| `auto-commits` | `false` | Manual control over git commits |
| `yes-always` | `true` | Skip confirmation prompts |
| `timeout` | `120` | 2-minute timeout for model responses |
| `max-retries` | `3` | Retry failed requests up to 3 times |
| `temperature` | `0.7` | Balanced randomness in outputs |
| `max-tokens` | `4096` | Maximum response length |
| `dirty-commits` | `true` | Allow commits with uncommitted changes |
| `check-update` | `false` | Skip version check on startup |
**Use a different Ollama model:**
```yaml
model: ollama/codellama:latest
```
**Increase timeout for slower hardware:**
```yaml
timeout: 300 # 5 minutes
```
**Enable auto-commits for faster workflow:**
```yaml
auto-commits: true
yes-always: false # Review commits interactively
```
**Adjust creativity level:**
```yaml
model-settings:
temperature: 0.3 # More deterministic
# or
temperature: 1.0 # More creative
```
Leave a review
No reviews yet. Be the first to review this skill!
# Download SKILL.md from killerskills.ai/api/skills/aider-configuration-for-ollama-deepseek-r1/raw