Last updated July 2026.
Configuring Aider to run with a local Ollama instance running Qwen 2.5-Coder (14B or 32B) provides a completely offline, agentic coding assistant in your terminal. By setting the target OpenAI-compatible endpoint in Aider and enabling Git integration, the assistant can edit multiple files, run tests, and automatically commit changes to your repository without any API usage costs.
AI coding assistants like GitHub Copilot and Cursor are incredibly powerful, but they operate as closed boxes that stream your code to external servers. For developers working on offline systems, private corporate networks, or proprietary intellectual property, cloud-dependent tools are not an option. Aider has emerged as the premier command-line tool for agentic code editing, and by pairing it with a local Ollama server running Qwen 2.5-Coder, you can build a high-performance, private development assistant that runs entirely on your local machine.
Establishing the Local Inference Backend
The first step is setting up Ollama with a capable coding model. While general-purpose models like Llama 3 can write code, they often struggle with Aider’s structured edit formats. Qwen 2.5-Coder is specifically optimized for code generation, repository-level understanding, and structured diff formats. For most consumer GPUs with 16GB to 24GB of VRAM, the 14B or 32B quantized models represent the sweet spot between reasoning capability and generation speed.
Running the model via Ollama is straightforward. Once Ollama is running, pull the Coder model using your terminal, ensuring the model is cached in memory for Aider to call via the local API port 11434.
Configuring Aider for Local Execution
Aider connects to LLMs using LiteLLM, which natively supports Ollama’s OpenAI-compatible endpoint. To prevent code duplication or corrupt edits, you should instruct Aider to use the specific editing format optimized for Qwen models. This is done by setting the model environment variable when launching Aider in your project directory.
Because Aider reads your Git repository to map out context, you should always run it from the root of a Git repo. Aider will automatically add a map of your codebase to the LLM prompt, letting it understand how your modules interact without exceeding the local context window limits.
Frequently Asked Questions
Q: Does Aider commit changes to Git automatically?
A: Yes. By default, Aider will create a Git commit with a descriptive message describing the changes after every successful edit. You can disable this behavior using the --no-git or --auto-commit false flags.
Q: What is the minimum hardware required to run Aider with Qwen 2.5-Coder?
A: For the 7B Coder model, a system with 8GB VRAM is sufficient. For the 14B model, at least 12GB VRAM is recommended. For the 32B model, a 24GB GPU like an RTX 3090 or RTX 4090 is required for fast, real-time responses.
Q: Can Aider run tests automatically after editing my code?
A: Yes. You can launch Aider with the --test-cmd flag (for example, --test-cmd "npm test" or --test-cmd "pytest"). Aider will run the tests and attempt to fix any errors it detects automatically.
Q: Is Qwen 2.5-Coder competitive with GPT-4o for local code editing?
A: Yes. Community benchmarks show Qwen 2.5-Coder 32B is highly competitive with commercial models on code generation and editing tasks, making it the top recommendation for local Aider workflows.