Use Ollama in VS Code as a full coding agent

Turn Ollama into a Copilot-style agent inside VS Code with LocalPilot — tool calling, file edits, terminal commands, parallel agents and screenshots, all offline.

Ask AI about this page

Ollama makes running models like qwen2.5-coder, llama3.3 or devstral a one-liner — but on its own it is just a chat endpoint. LocalPilot turns it into a complete coding agent inside VS Code: it reads your project, edits files, runs your tests, and fixes what breaks.

Setup in two minutes

Zero-setup path: install LocalPilot, open the sidebar and click Set up automatically. LocalPilot installs Ollama if needed (Homebrew / winget / official script), starts it, and pulls qwen2.5-coder in the size that fits your machine (7b on 16 GB+, 3b or 1.5b below that) plus qwen2.5-coder:1.5b for inline completions.

Manual path:

ollama pull qwen2.5-coder:7b       # 14b / 32b from Settings → Models once you know it fits
ollama serve                        # usually already running as a service

Install LocalPilot (download VSIX → code --install-extension localpilot.vsix), open the sidebar, and pick ollama/qwen2.5-coder:7b from the model dropdown. Ollama on localhost:11434 is detected automatically. Settings → Models lists every Ollama model with its size and lets you pull more from the catalog, delete models and switch them on or off without leaving VS Code.

What you get beyond the Ollama CLI

Capability How LocalPilot uses Ollama
Tool calling Native /api/chat tools for models that support them (qwen2.5-coder, qwen3, llama3.x, mistral); prompt-based fallback for the rest
Large context Sets num_ctx per request (default 32k) so the model actually sees your files, then prunes/compacts history automatically
Thinking models localpilot.thinking enables Ollama’s think for qwen3 / deepseek-r1 and shows the reasoning collapsed
Vision Screenshots and pasted images go to qwen2.5vl, llava, gemma3
Inline completions Ollama’s FIM suffix support; routing picks the smallest FIM model (qwen2.5-coder:1.5b) automatically
Model management ollama pull / ollama rm from the Settings UI with progress, hardware-aware size recommendations, per-model enable/disable
Parallel agents Several sessions at once; set OLLAMA_NUM_PARALLEL=4 so Ollama serves them concurrently

The catalog in Settings → Models marks each size fits / tight / too big for your machine and stars the recommended one, so you don’t have to guess.

Tips

Next: Getting started · Models & providers · Parallel agents