Continue + Ollama in VS Code: Set Up Local AI Chat, Edits and Autocomplete (2026)
You do not need to send every code question to a paid cloud model to get AI help inside VS Code. With Ollama running a model on your own computer and Continue providing the IDE interface, you can try local chat, targeted edits, and inline autocomplete in one workflow. The important part is configuring the right model for each job—and verifying where your prompts are actually going.
This guide walks through a practical setup for macOS, Windows, and Linux, then shows how to test it, diagnose common failures, and keep the workflow safer. The examples use Qwen2.5-Coder model tags currently listed in Ollama's library; they are examples, not a claim that one model is best for every machine.
Documentation checked on 22 October 2026. Continue's interface and model catalogue can change, so use the linked official docs if a label differs on your installed version.
What you will build
- Local chat and edits: ask questions about selected code and request focused changes.
- Inline autocomplete: get code suggestions while typing, using a smaller model for responsiveness.
- A reproducible smoke test: verify Ollama works before debugging the IDE extension.
- A safer default: keep the Ollama endpoint on your own machine and review every suggested change.
This is not the same as enabling a fully autonomous coding agent. Chat, inline edits, autocomplete, and tool-using agent mode have different model requirements. Start with chat and edits; add agent tools only after you have verified the model's actual tool support.
Prerequisites
- A supported macOS, Windows, or Linux computer with enough free memory and disk space for the model you choose.
- Ollama installed and running locally.
- Visual Studio Code.
- The Continue VS Code extension.
- A project you can safely experiment with. Use a small test repository first, not a production checkout containing secrets.
Model download size is not the same as total runtime memory. Context length, operating-system overhead, other running applications, and whether inference uses CPU or GPU all affect performance. If a larger model is sluggish or fails to load, begin with a smaller tag rather than assuming the extension is broken.
Step 1: Install Ollama and download two models
Install Ollama using its official download page. On macOS and Windows, start the Ollama application after installation. On Linux, follow the official Linux instructions for your distribution and service setup.
Open a terminal and check that the command is available:
ollama --version
For this example, use one model for chat and editing, and a smaller model for autocomplete:
ollama pull qwen2.5-coder:7b
ollama pull qwen2.5-coder:1.5b
ollama list
The official Ollama library currently lists Qwen2.5-Coder variants including 7B and 1.5B. These tags provide a concrete starting point, but choose a smaller or different model if your hardware cannot run them comfortably. Before copying a tag into Continue, make sure it appears in the output of ollama list.
Official model reference: Ollama's Qwen2.5-Coder library page.
Step 2: Verify Ollama before opening Continue
First, check the local service:
curl http://localhost:11434/api/tags
Expected result: a JSON response listing the models available to the local Ollama service. If the request cannot connect, resolve that first. The Ollama application or service normally runs the server for you; use ollama serve only when you intentionally need to start the server yourself and it is not already running.
Next, send a small chat request directly to the API:
curl http://localhost:11434/api/chat -d '{
"model": "qwen2.5-coder:7b",
"messages": [
{
"role": "user",
"content": "Explain in one sentence what a Python dictionary is."
}
],
"stream": false
}'
Expected result: a JSON response with generated text under message.content. The wording will vary. If this request fails, troubleshoot Ollama or the model tag before changing Continue settings. The request shape and the stream option are documented in the official Ollama chat API reference.
Step 3: Install Continue in VS Code
- Open the official Continue installation guide and install the VS Code extension from the Marketplace.
- Open a small project folder in VS Code so you can test with files that are safe to share with a local model.
- Open the Continue sidebar. If it is hidden, use the VS Code command palette (
Ctrl+Shift+Pon Windows/Linux orCmd+Shift+Pon macOS) and search for Continue-related commands, or use the sidebar icon. - Open Continue's configuration menu and select the gear/settings control for the local configuration. The current configuration guide documents the UI route and the default file locations.
The local YAML configuration is usually at ~/.continue/config.yaml on macOS/Linux or %USERPROFILE%\.continue\config.yaml on Windows. You can also open it from Continue's configuration UI; this is preferable if your installed version places the controls differently. See Continue's configuration guide.
Step 4: Configure separate models for chat/edit and autocomplete
In the local config.yaml, configure Ollama as the provider and use exact model tags from ollama list. The following is a minimal starting point for the two example models:
name: Local Ollama Developer Setup
version: 0.0.1
schema: v1
models:
- name: Qwen2.5 Coder 7B - Chat and Edit
provider: ollama
model: qwen2.5-coder:7b
apiBase: http://localhost:11434
roles:
- chat
- edit
- name: Qwen2.5 Coder 1.5B - Autocomplete
provider: ollama
model: qwen2.5-coder:1.5b
apiBase: http://localhost:11434
roles:
- autocomplete
Save the file. Continue's configuration system should refresh when the file is saved; if the new entries do not appear, reload the VS Code window and check the extension logs.
Why split the roles? Chat and editing can benefit from a larger model, while autocomplete needs to respond quickly as you type. A smaller model is often a sensible first experiment for autocomplete, but actual speed and quality depend on the machine, model build, and project. If you prefer one model, you can assign the roles to a single entry and compare the trade-off yourself.
Continue's official documentation also supports preconfigured model blocks and autodetection. If you use either, verify that the block's model tag is installed locally; a configuration block does not download the model for you. See Using Ollama with Continue and the autocomplete setup guide.
Step 5: Test chat, edits, and autocomplete separately
A. Test chat without changing files
Open a small source file, select a function, and ask Continue:
Explain this function's inputs, outputs, and edge cases. Do not edit any files. If you are unsure about a behavior, say what should be tested rather than guessing.
Choose the configured chat model in Continue's model selector. Confirm that you receive a response, then compare it with the code and your own understanding.
B. Test a targeted edit
Select a small function and use Continue's edit action. For example, ask it to add input validation and propose two unit tests, while explicitly requesting a minimal diff. Review the proposed diff before accepting it. Continue's edit workflow supports reviewing changes rather than requiring you to accept every suggestion automatically; see the official Edit quick start.
C. Test inline autocomplete
- Open a disposable file in your test project.
- Start a function and add a descriptive comment about what the next line should do.
- Wait for an inline suggestion. If none appears, confirm that Tab Autocomplete is enabled and that the model assigned the
autocompleterole is selected/configured. - Accept a suggestion only if it is correct; use Escape to dismiss a bad one.
Continue's official autocomplete guide documents the enable/disable control and the default accept/reject shortcuts. Treat the model's output as a draft, not as verified code.
Step 6: Make the workflow useful for a real project
Once the smoke test passes, use a repeatable routine instead of asking vague questions:
- Give bounded context. Select the relevant function or file, and include the error message or expected behavior. Avoid attaching an entire repository when a few files are enough.
- Ask for analysis before changes. For a bug, request a short explanation of the likely cause and a test that would distinguish it from other causes.
- Request a small diff. Ask for one change at a time. Smaller diffs are easier to review and easier to revert.
- Run your own checks. Use your project's formatter, linter, unit tests, type checker, and integration tests. A fluent explanation is not evidence that the code passes.
- Check the Git diff. Run
git diffbefore committing. Confirm that unrelated files, secrets, generated files, and configuration changes were not introduced. - Record what works. Keep a note of the model tag, role, context settings, and tasks that perform well on your hardware. Model updates can change behavior.
If you are new to the Ollama terminal workflow, GyanAangan's Ollama CLI commands cheat sheet covers listing, running, and removing models. For a different coding-agent workflow, compare this setup with our Cline guide for local AI coding. Those tools have different interaction and permission models, so do not assume settings transfer directly.
Troubleshooting: fix the layer that is failing
| Symptom | Likely cause | What to try |
|---|---|---|
curl cannot connect to port 11434 | Ollama is not running, or the client is pointed at the wrong host. | Start the Ollama application/service, retry curl http://localhost:11434/api/tags, and check local firewall or service logs. |
| Model not found / 404 | The configured tag does not match an installed model. | Run ollama list, then pull the exact tag or update model: to match it. |
| Continue does not show the model | YAML syntax error, unsaved configuration, or wrong model role. | Check indentation, save the file, reload VS Code, and confirm that the entry has the role you need. |
| Chat works but autocomplete does not | The chat model may not have the autocomplete role, or inline suggestions may be disabled. | Use a dedicated entry with roles: [autocomplete] expressed as a YAML list, enable Tab Autocomplete, and test in a simple file. |
| Responses are slow or the model will not load | The model/context may be too large for available memory, or another model is occupying resources. | Try a smaller model, reduce the context setting if needed, close memory-heavy apps, and inspect ollama ps to see what is loaded. |
| Agent mode says tools are unsupported | The selected model or provider may not support the required tool-calling behavior. | Do not assume a chat model supports tools. Check Continue's model-capabilities documentation and use a model whose tool support is verified. |
For extension-specific diagnostics, follow Continue's troubleshooting guide. It explains how to inspect VS Code developer-console logs and Continue logs. For model memory and server settings, use Ollama's official FAQ.
Security and privacy checklist
- Local inference is not automatically the same as a fully offline IDE. A local model can process prompts on your computer, while the editor extension may still make separate requests for sign-in, updates, or telemetry. For an air-gapped setup, follow Continue's official offline guide, including its installation and telemetry steps.
- Check every model role. Make sure chat, edit, autocomplete, and any other enabled role point to the provider you intend to use. One local model entry does not guarantee every feature is local.
- Do not expose Ollama casually. Ollama binds to localhost by default. Avoid binding it to all network interfaces or forwarding port 11434 to the public internet unless you have deliberately designed and secured that access.
- Keep secrets out of prompts. Avoid selecting files containing API keys, private keys, customer data, production credentials, or confidential logs. A local model still has access to the context you give it.
- Review generated commands and code. Do not run destructive shell commands, migrations, deployment steps, or database operations just because a model recommends them. Review the diff and test in a safe environment.
- Check model licensing. Read the license for the exact model and variant you download before using it in a commercial product or redistributing it.
Frequently asked questions
Does Continue require a paid API key for this setup?
The chat and autocomplete examples above use a local Ollama provider and do not configure a paid model API key. Continue's onboarding or other features may have separate account or network requirements, so consult its current offline documentation if you need a strictly disconnected environment.
Can I use one model for everything?
Yes. You can assign chat, edit, and autocomplete roles to one installed model, then compare the latency and quality. Separate models are simply a practical way to try a smaller, faster autocomplete model alongside a larger chat model.
Why does Continue show the model but return an error?
A visible configuration entry does not prove that the exact model tag is installed or that it supports every requested capability. Verify the tag with ollama list, test the Ollama API directly, and check Continue's logs.
Is agent mode enabled by this configuration?
No. This configuration sets up chat, edit, and autocomplete. Agent mode may require model tool-calling support and additional permissions. Add it only after verifying the model and understanding which tools can read files, run commands, or access external services.
Where can I find the official configuration reference?
Start with Continue's Ollama guide, its configuration guide, and the Ollama chat API reference. These are the authoritative places to check when syntax or UI labels change.
Final checklist
ollama listshows the exact model tags used in Continue.- The direct API smoke test returns a response under
message.content. - Continue has distinct, correctly assigned chat/edit and autocomplete roles.
- You have tested chat, edit, and autocomplete independently.
- You have reviewed a diff and run your project's own tests.
- You have checked telemetry, model licensing, secrets, and network exposure for your environment.
The best local coding setup is the one you can verify and safely review. Start with a small project, keep the model roles explicit, and expand only after the basics work reliably.
