Local terminal agent · Ollama endpoint · repository tools
OpenCode with Ollama: set up a local coding model correctly
The fast path is one command. A reliable setup also needs a tool-capable model, at least 64K configured context for repository work, enough memory for that context and a safe Git workspace.
Model + 64K context + headroom
How much memory does OpenCode with Ollama need?
OpenCode itself is not the main memory consumer. The loaded model, quantization, KV cache and parallel sessions set the hardware target.
| Local model class | Practical starting hardware | Suitable workload | Before you commit |
| 7B–14B quantized | 12–16 GB VRAM; 32 GB system RAM | Focused chat, small edits, first agent tests | Confirm 64K context fits and tools work reliably. |
| 20B–24B quantized | 24 GB VRAM; 64 GB system RAM | More capable single-agent work | Leave reserve for context, display use and build tools. |
| 30B–32B quantized | 32 GB VRAM for speed, or 64 GB+ unified memory for capacity | Repository agents and stronger code generation | The exact quantization may fit at 32K but become tight at 64K. |
| Large model or several agents | 96–128 GB unified/coherent memory | Capacity-first workflows and multiple services | Validate runtime support and expect a different speed profile from a discrete GPU. |
These ranges deliberately include working headroom but remain estimates. Use the actual model file, configured context and measured peak use. The PC Finder turns those inputs into a hardware class.