IAnswerable

Run a Local Coding Assistant in VS Code

15 Dec 2025

Your API key isn’t required to autocomplete a for-loop. Here’s the offline setup.

What you need

Skip anything that asks you to sign up or paste an API key. This whole stack runs on your machine.

1. Pull a coding model

ollama pull qwen2.5-coder:7b

qwen2.5-coder is the strongest open coding model in the 7B-32B range as of 2026 for most languages. If you have 16GB+ of VRAM or unified memory, pull the 14b variant instead — better completions, still fast enough for interactive use. Also pull a small model for inline fill-in-the-middle completions, since that runs on every keystroke and needs to be fast:

ollama pull qwen2.5-coder:1.5b-base

2. Install Continue

Install “Continue” from the VS Code marketplace. It’s the extension that gives you the chat sidebar and the inline autocomplete ghost text, backed by whatever model you point it at.

3. Configure it to use Ollama

Continue reads ~/.continue/config.json (or use the in-editor config UI). Set your chat model and your autocomplete model separately:

{
  "models": [
    {
      "title": "Qwen Coder 7B",
      "provider": "ollama",
      "model": "qwen2.5-coder:7b"
    }
  ],
  "tabAutocompleteModel": {
    "title": "Qwen Coder 1.5B",
    "provider": "ollama",
    "model": "qwen2.5-coder:1.5b-base"
  }
}

The split matters. Chat can tolerate a second or two of latency. Autocomplete can’t — if it takes longer than your typing cadence, you’ll turn it off within a day. Use the smallest model that still gives useful completions for that slot.

4. Verify it’s actually offline

Turn off Wi-Fi and try both the chat panel and autocomplete. If either still works, you’re actually offline. If chat errors out, check that Ollama is running (ollama list should show your models) and that Continue’s provider is set to ollama, not openai.

What you lose

Be honest with yourself about the tradeoff:

Where it’s worth it

If your day-to-day is mixed, run local for autocomplete (the high-frequency, low-stakes calls) and keep a cloud model wired in as a second Continue provider for chat on hard problems. Continue lets you switch models per-request from a dropdown, so you’re not locked into one choice.

The gotcha

The first response after your machine wakes from sleep is often slow or fails outright — Ollama unloads the model from memory after a few minutes idle and has to reload it. If autocomplete suddenly stops working, that’s usually it, not a config problem. Give it 10-20 seconds and try again before you go digging.