{"as_of":"2026-10-12","license":"CC-BY-4.0","license_url":"https://creativecommons.org/licenses/by/4.0/","cite_as":"The Local Bench (thelocalbench.com), data as of 2026-10-12, CC BY 4.0","source_url":"https://thelocalbench.com","guide":{"slug":"local-model-coding-agent-aider","title":"Connect a local model to a coding agent (Aider + Ollama)","short":"Local coding agent","dek":"Pair-program in your terminal with a model running on your own machine. Aider edits files in your git repository and commits each change; Ollama serves the model.","summary":"Install Aider with aider-install, point it at Ollama with OLLAMA_API_BASE, pull a coding model such as qwen3-coder:30b, start Ollama with a larger context, and run aider --model ollama_chat/<model> inside a git repository.","difficulty":"Intermediate","time_minutes":30,"cost":{"usd":0,"note":"free software; a 24 GB GPU or 32 GB+ unified memory for 30B-class coding models"},"hardware":["24 GB GPU or 32 GB+ unified memory for qwen3-coder:30b","12–16 GB GPU for smaller coding models, with weaker results"],"os":["Linux","macOS","Windows"],"prerequisites":["Python 3 with pip","git, and a project that is a git repository","Ollama installed (see \"Run your first local model\")"],"parts":[{"name":"Aider","note":"terminal coding agent","href":"https://aider.chat/docs/llms/ollama.html"},{"name":"Ollama","note":"model server","href":"https://ollama.com/download"},{"name":"qwen3-coder:30b","note":"MoE coding model, about 3B active per token","href":"https://ollama.com/library/qwen3-coder"}],"tested_on":[],"last_tested":null,"flag":"untested","flag_note":"Commands are copied from the Aider and Ollama documentation (checked 2026-10-13). We have not yet run this guide on our bench, and we have not yet measured how well local models do in Aider.","untested":["The whole guide end to end","Edit quality of qwen3-coder:30b in Aider","The .aider.model.settings.yml example with this model name"],"reviewed":"2026-10-13","tools":["aider","ollama","continue"],"explainers":["mixture-of-experts","context-length","tool-calling-and-mcp"],"sources":[{"label":"Aider docs: connecting to Ollama","url":"https://aider.chat/docs/llms/ollama.html"},{"label":"Ollama library: qwen3-coder","url":"https://ollama.com/library/qwen3-coder"},{"label":"Ollama docs: context length","url":"https://docs.ollama.com/context-length"},{"label":"Continue docs: using Ollama (alternative for VS Code / JetBrains)","url":"https://docs.continue.dev/guides/ollama-guide"}],"steps":[{"n":1,"title":"Install Aider"},{"n":2,"title":"Tell Aider where Ollama is"},{"n":3,"title":"Pull a coding model and start Ollama with more context"},{"n":4,"title":"Start Aider in your project"},{"n":5,"title":"Verify it works"}],"url":"https://thelocalbench.com/how-to/local-model-coding-agent-aider","markdown":"https://thelocalbench.com/how-to/local-model-coding-agent-aider.md","json":"https://thelocalbench.com/api/v1/how-to/local-model-coding-agent-aider.json"},"json_ld":{"@context":"https://schema.org","@type":"HowTo","name":"Connect a local model to a coding agent (Aider + Ollama)","description":"Install Aider with aider-install, point it at Ollama with OLLAMA_API_BASE, pull a coding model such as qwen3-coder:30b, start Ollama with a larger context, and run aider --model ollama_chat/<model> inside a git repository.","url":"https://thelocalbench.com/how-to/local-model-coding-agent-aider","totalTime":"PT30M","dateModified":"2026-10-13","estimatedCost":{"@type":"MonetaryAmount","currency":"USD","value":0},"supply":[{"@type":"HowToSupply","name":"Aider"},{"@type":"HowToSupply","name":"Ollama"},{"@type":"HowToSupply","name":"qwen3-coder:30b"}],"tool":[{"@type":"HowToTool","name":"Python 3 with pip"},{"@type":"HowToTool","name":"git, and a project that is a git repository"},{"@type":"HowToTool","name":"Ollama installed (see \"Run your first local model\")"}],"step":[{"@type":"HowToStep","position":1,"name":"Install Aider","url":"https://thelocalbench.com/how-to/local-model-coding-agent-aider#step-1"},{"@type":"HowToStep","position":2,"name":"Tell Aider where Ollama is","url":"https://thelocalbench.com/how-to/local-model-coding-agent-aider#step-2"},{"@type":"HowToStep","position":3,"name":"Pull a coding model and start Ollama with more context","url":"https://thelocalbench.com/how-to/local-model-coding-agent-aider#step-3"},{"@type":"HowToStep","position":4,"name":"Start Aider in your project","url":"https://thelocalbench.com/how-to/local-model-coding-agent-aider#step-4"},{"@type":"HowToStep","position":5,"name":"Verify it works","url":"https://thelocalbench.com/how-to/local-model-coding-agent-aider#step-5"}]}}