6 min read

How to Set Up a Local AI Coding Assistant in VS Code with Ollama and Continue (2026)

You can run a local AI coding assistant in VS Code with two free pieces: Ollama serves the models on your machine, and the Continue extension wires them into the editor for tab autocomplete, chat and edits. The setup that works on most laptops uses two models, not one: a small code model for autocomplete and a larger general model for chat. Expect about 6 GB of downloads and a 16 GB machine for a smooth result.

The most common failure is a model that is too big for the job. Autocomplete has to answer while you type, so a 1.5B model beats a 32B one there. The rest of this guide is about getting that split right, then making sure nothing leaves your machine.

If you are still choosing a runtime, read Ollama vs LM Studio on a Mac first. This guide assumes Ollama because Continue's docs cover it in the most detail.

Prerequisites

  • VS Code with the Continue extension from the Marketplace.
  • Ollama installed and running. On Linux the official script is curl -fsSL https://ollama.com/install.sh | sh; on macOS and Windows use the installer from the download page.
  • Memory: the Continue Ollama guide lists 8 GB as the minimum and 16 GB or more as recommended, with about 10 GB of free disk.
  • Any other inline completion provider, such as GitHub Copilot, turned off while you test. Continue's troubleshooting steps name this as a cause of missing completions.

Step 1: Pull two models, one per job

Pull models with ollama pull, not ollama run, and use the exact tag. Continue's guide stresses this because a bare name pulls :latest, which may be a different size from the one your config expects.

Bash
1ollama pull qwen2.5-coder:1.5b # autocomplete, about 986 MB
2ollama pull qwen3:8b # chat and agent mode, about 5.2 GB
3ollama list # confirm the exact tags
4curl http://localhost:11434 # should print "Ollama is running"

Why these two. The Continue autocomplete docs recommend Qwen2.5-Coder 1.5B or 7B as the best open autocomplete models. They also explain why a big chat model is the wrong pick for this role: vendors train autocomplete models on a specific fill-in-the-middle prompt format, and most state-of-the-art autocomplete models are under 10B parameters. For chat, Qwen3 on Ollama carries the "tools" tag, which matters for agent mode later. Sizes come from the Qwen2.5-Coder library page and the Qwen3 page.

If you have 32 GB or more, swap the chat model for qwen2.5-coder:14b (9.0 GB) or qwen3:14b (9.3 GB). Keep autocomplete small either way.

Step 2: Write the Continue config

Continue reads a local config.yaml from ~/.continue/config.yaml on macOS and Linux, or %USERPROFILE%\.continue\config.yaml on Windows, per its configuration docs. Continue has deprecated the older config.json format. Replace the generated file with this:

Bash
1cat > ~/.continue/config.yaml <<'YAML'
2name: Local Ollama
3version: 0.0.1
4schema: v1
5models:
6 - name: Qwen3 8B (chat)
7 provider: ollama
8 model: qwen3:8b
9 apiBase: http://localhost:11434
10 roles: [chat, edit, apply]
11 capabilities: [tool_use]
12 defaultCompletionOptions:
13 contextLength: 8192
14 - name: Qwen2.5-Coder 1.5B (autocomplete)
15 provider: ollama
16 model: qwen2.5-coder:1.5b
17 roles: [autocomplete]
18 autocompleteOptions:
19 debounceDelay: 250
20 maxPromptTokens: 1024
21YAML

Three choices in that file deserve a reason.

  • Explicit roles. Continue's default roles are chat, edit, apply and summarize. Leaving the small model on defaults would let it answer chat, where it gives weak answers.
  • capabilities: [tool_use]. Continue's config reference says this flag enables tool calling, which agent mode requires. The Ollama guide warns that some models still report "Agent mode is not supported" even with the flag, so test it before you rely on it.
  • contextLength: 8192. Ollama defaults to a 4096-token context unless you raise it, per the Ollama FAQ. Continue may request more than that. If you see "Model requires more system memory to run", lower this value or pick a smaller model.

Save the file and Continue reloads it. You should see gray inline suggestions after you type in any code file.

Step 3: Keep both models warm

Ollama unloads an idle model after 5 minutes by default, per the same FAQ. The next request then waits for a cold load, and the first suggestion of the morning feels broken. Two server settings fix this:

Bash
1# macOS app: set for the Ollama app, then restart it
2launchctl setenv OLLAMA_KEEP_ALIVE "30m"
3
4# any platform when running the server yourself
5OLLAMA_KEEP_ALIVE=30m ollama serve
6
7ollama ps # lists both models while you code

Ollama can keep more than one model loaded at once (OLLAMA_MAX_LOADED_MODELS defaults to 3 on CPU), so the real limit is memory. If ollama ps shows Ollama swapping one model out every time you switch from typing to chat, your machine cannot hold both. Use a smaller chat model rather than accept that delay on every completion.

Step 4: Confirm nothing leaves the machine

A local model covers half of an offline setup. Continue also sends anonymous usage telemetry by default. Its guide on running Continue without internet lists the steps:

  1. Turn off "Allow Anonymous Telemetry" in Continue's user settings.
  2. Set your default models to local ones, as in the config above.
  3. Restart VS Code to apply the change.
  4. For an air-gapped machine, install the .vsix file from the Continue releases page instead of the Marketplace.

Then test it the blunt way: switch off Wi-Fi, open a project and type. If completions and chat still work, the loop is local.

Step 5: Share one model server with a small team

A laptop fan at full speed during chat is a sign to move the heavy model elsewhere. Ollama binds to 127.0.0.1:11434 by default. To serve other machines, set OLLAMA_HOST=0.0.0.0:11434 on the host, then point each developer's apiBase at that host's address. Keep autocomplete on each laptop, since typing latency over a network is noticeable. Put chat alone on the shared box.

The local server does not ask for an API key, so treat the port like a database port: LAN or VPN only, never the open internet. If you are choosing hardware for that host, I compared the options in Mac mini vs Windows PC as an always-on local LLM host. For the wider process around local agents, see how I would ship a local-first agent workflow for a real team.

Troubleshooting the three errors you will hit

  • 404 model "qwen3:8b" not found, try pulling it first. The tag in config.yaml does not match ollama list. Copy the tag character for character.
  • No inline suggestions at all. Check that "Enable Tab Autocomplete" is on in the Continue status bar item, that editor.inlineSuggest.enabled is true in VS Code settings, and that Copilot or any other completion provider is off.
  • Autocomplete is slow or prints reasoning text. You put a thinking model on the autocomplete role. Use qwen2.5-coder:1.5b, or follow the Continue docs and set think: false under requestOptions.extraBodyProperties for a switchable model such as qwen3:4b.

When a cloud assistant is still the better call

Local models win on privacy, cost per request and offline work. They lose on hard multi-file refactors, where a frontier cloud model still reasons better than an 8B model on a laptop. Continue's own autocomplete docs say closed models are slightly better for completions, so the gap is smallest where you type most.

My rule for client work: autocomplete runs locally on every project, and chat stays local by default. I switch chat to a cloud model per project only when the client allows code to leave the machine. With two blocks in one config.yaml, that switch takes a minute.

Share this article