Web Asset House Guides
Local AI

Use Local Ollama Models in VS Code Chat: The Official Extension, No Sign-In, and the 64k Context Setting

By Web Asset House Studio ·

Note: Some future links on this site may be affiliate links. We never claim hands-on testing; guides are researched from the public sources listed in each article.

How we wrote this: A summary of Ollama's VS Code integration and context length docs, Microsoft's "AI language models in VS Code" documentation and the Ollama extension's Marketplace listing (all linked below), checked October 29, 2026. Model names are the docs' examples. Version numbers and menu names change often; follow the current docs if yours differ.

Visual Studio Code's Chat view doesn't have to send your code to a cloud model. With Ollama running on your machine and the official Ollama extension installed, models from your local Ollama server show up in VS Code's model picker next to everything else.

What you need

From Ollama's docs and the extension's listing:

No GitHub sign-in needed for local models

Microsoft's documentation says that in Local harness sessions, models you add yourself ("bring your own key," or BYOK) work without signing in to a GitHub account and without a Copilot plan, including offline use with local models such as Ollama. Ollama's docs agree: local models don't require sign-in.

One caveat from Microsoft: if you use Copilot Business or Enterprise, an administrator can turn off bring-your-own models by policy.

Use the extension, not the old built-in provider

Microsoft's docs flag that the built-in Ollama provider in VS Code is deprecated. For local Ollama models, install the official extension from the Ollama publisher on the Visual Studio Marketplace instead. Microsoft says the extension is maintained by the Ollama team and can support new models and capabilities faster. If you previously set up the built-in provider, install the extension and remove the old provider configuration so your Ollama models keep working.

Setup, step by step

  1. Pull a local model in a terminal, for example:

    ollama pull qwen3.6
    
  2. Install the Ollama extension (publisher: Ollama) from the VS Code Marketplace.

  3. Open Chat in VS Code.

  4. Open the model picker at the bottom of the chat input.

  5. Choose a model from the Ollama section.

The extension finds models at http://127.0.0.1:11434, Ollama's default local address. You can also open VS Code's Language Models editor (the gear icon in the model picker, or Chat: Manage Language Models from the Command Palette) to see every available model, including each one's context size, and choose which ones appear in the picker.

Fix the context length first

This is the setting most likely to make a local model look worse than it is in a coding chat.

A bigger context needs more memory. Afterward, run ollama ps and check the PROCESSOR column: Ollama recommends avoiding offloading to the CPU, so if the model no longer shows 100% GPU, choose a smaller model. Our AI model memory calculator gives a rough idea of what fits, and context length explained goes deeper.

If the models don't appear

From Ollama's troubleshooting list:

  1. Make sure Ollama is running.
  2. Run ollama list to confirm you have models.
  3. Run Ollama: Refresh Models from the Command Palette.
  4. Run Ollama: Diagnose Models and read the Ollama output channel.

For server-side problems, see Ollama troubleshooting and logs.

Local versus cloud models

The extension also lists Ollama's cloud models (names ending in :cloud), which need ollama signin. Ollama's cloud docs describe these as models that run in Ollama's cloud, not on your computer. If the point is keeping your code on your machine, pick models without the :cloud tag. Also check a model's license before using it for client work: open model licenses explained.

Related guides

Sources

← All Local AI guides · All guides