Building a Local AI Coding Assistant With Continue and Ollama

Continue and Ollama give you a private coding assistant that runs entirely on your machine. This tutorial covers install, setup, config and daily use.

By Galactic News Editorial · Published 2026-11-21T01:36:03+00:00 · Updated 2026-11-21T01:36:03+00:00

Building a local AI coding assistant with Continue and Ollama

Building a Local AI Coding Assistant With Continue and Ollama

A local AI coding assistant runs entirely on your own machine. Continue connects your editor to models served by Ollama. No code leaves your computer. No monthly subscription. This tutorial walks through the full setup: install Ollama, pull coding models, install Continue in VS Code, and wire them together. It takes about 30 minutes on a modern laptop.

Local AI Coding Assistant Continue Ollama: What You Need

Continue is an open-source extension for VS Code, JetBrains IDEs, and Neovim. It acts as middleware between your editor and a language model. It ships no model of its own. Ollama is the model runtime. It downloads models, manages quantization, and serves them through a local HTTP API on port 11434.

Check your hardware first. Continue’s documentation lists a minimum of 8 GB of RAM, with 16 GB or more recommended. You need at least 10 GB of free disk space for the model set. A small coding model needs about 4 GB of RAM. A 7B model needs about 8 GB. A 32B model needs about 32 GB. A CPU-only laptop can run this setup, but chat will be slow. A GPU makes a large difference.

Use two models, not one. That is the key design choice. A small, fast model handles autocomplete. A larger model handles chat and edits. One model for both jobs gives you laggy completions or weak chat. Two models give you both.

Step 1: Install Ollama

  1. Install Ollama for your operating system. On macOS, run brew install ollama. On Linux, run curl -fsSL https://ollama.ai/install.sh | sh. On Windows, download the installer from ollama.com.
  2. Start the service. Run ollama serve in a terminal. On some systems it starts automatically.
  3. Verify it is running. Run curl http://localhost:11434. It should return “Ollama is running”. Also run ollama --version to confirm the install.

Step 2: Pull your models

Always use ollama pull to download models. The run command starts an interactive session, which you do not need here. Pull with the exact tag. Pulling deepseek-r1 without a tag installs :latest, which may be a different size than you expect.

ollama pull qwen2.5-coder:1.5b   # autocomplete model, fast and small
ollama pull qwen2.5-coder:7b     # chat and edit model, 8 GB VRAM
ollama pull deepseek-r1:32b      # optional reasoning model, 32 GB RAM

Run ollama list to confirm what is installed. The recommended pairing is qwen2.5-coder:1.5b for autocomplete and qwen2.5-coder:7b for chat. If you have 24 GB of VRAM, use qwen2.5-coder:32b for chat instead. For code search and retrieval, add an embeddings model such as nomic-embed-text.

Step 3: Install Continue in VS Code

  1. Open VS Code. Go to Extensions with Ctrl+Shift+X on Windows and Linux, or Cmd+Shift+X on macOS.
  2. Search for “Continue”. Install the extension named “Continue - Codestral, Claude, and more”. Its identifier is Continue.continue.
  3. Or install from the command line. Run code --install-extension Continue.continue.
  4. Open the Continue panel. Click the Continue icon in the sidebar. It will prompt you to configure a model.

Step 4: Connect Continue to Ollama

Continue stores its configuration in ~/.continue/config.yaml. Open it from the Command Palette with “Continue: Open Config”. Here is a working dual-model configuration.

name: Local AI Coding Stack
version: 0.0.1
schema: v1
models:
  - name: Qwen2.5-Coder 7B (Chat)
    provider: ollama
    model: qwen2.5-coder:7b
    apiBase: http://localhost:11434
    roles:
      - chat
      - edit
      - apply
  - name: Qwen2.5-Coder 1.5B (Autocomplete)
    provider: ollama
    model: qwen2.5-coder:1.5b
    apiBase: http://localhost:11434
    roles:
      - autocomplete

Roles are what make the dual-model setup work. The chat, edit, and apply roles send work to the 7B model. The autocomplete role sends inline completions to the 1.5B model. The model name must match exactly what ollama list shows, including the tag.

Continue can also detect your models automatically. Set a model block with model: AUTODETECT and the provider ollama. Continue scans your local Ollama installation and lists what is installed. This is handy for switching models quickly. For fine control, keep the manual configuration above.

Step 5: Use it day to day

Open the Continue panel and start chatting about your code. Use @codebase to ask questions across the whole project. Use @file to focus on one file. Use @terminal to bring terminal output into the conversation. Press Ctrl+I on Windows and Linux, or Cmd+I on macOS, to generate or edit code inline. Tab accepts an autocomplete suggestion.

Agent mode can read and edit files across your project. It needs a model with tool support. Add capabilities: [tool_use] to the model configuration. Not every model that claims tool support works well. If agent mode reports that the model does not support tools, switch to a model with confirmed support, such as Llama 3.1 or Mistral.

Set a sensible context length. A contextLength of 8192 works for most setups. If Continue reports context errors, lower it to 2048 or use a smaller model. Keep temperature around 0.7 for chat. Lower it toward 0.2 for autocomplete so suggestions stay predictable.

Local vs cloud coding assistants

FactorLocal: Continue + OllamaCloud coding assistant
PrivacyCode stays on your machine after the model downloadCode is sent to a vendor’s servers
CostFree after hardware; no subscriptionMonthly subscription per seat
Offline useWorks fully offline once models are downloadedNeeds an internet connection
Model choiceAny Ollama model; swap in minutesVendor’s models only
SpeedDepends on your hardware; fast autocomplete with a small modelDepends on vendor servers and your connection
Setup effortAbout 30 minutes of install and configMinutes; sign in and go

Troubleshooting quick fixes

Bottom line

Continue and Ollama give you a private coding assistant with no subscription and no code leaving your machine. The setup is simple once you use two models: a small one for autocomplete and a larger one for chat. Start with qwen2.5-coder:1.5b and qwen2.5-coder:7b. If chat feels slow, the fix is usually a smaller model or a GPU, not a different tool. Your code stays yours. That is the whole point.