Skip to content

How-ToGPU

How to Use Local Ollama Models in VS Code Chat (No Copilot Plan Needed)

VS Code chat can use local Ollama models through the official Ollama extension; Microsoft says the built-in Ollama provider is deprecated. Install VS Code 1.127 or newer, pull a model, pick it in the chat model picker and raise Ollama's context length to at least 64k. Microsoft says it works offline and without a Copilot plan, but completions and semantic search still need GitHub.

By , Editorial team

3 min read

How to Use Local Ollama Models in VS Code Chat (No Copilot Plan Needed)

Visual Studio Code's chat panel isn't limited to cloud models. With Ollama running on your PC, you can pick a local model in VS Code's model picker and chat with it, and Microsoft says local models can be used completely offline. The setup has changed recently: Microsoft's documentation now says the built-in Ollama provider is deprecated and points you to the official Ollama extension instead. This guide follows Microsoft's and Ollama's documentation; Forge PC hasn't tested how well any particular model codes, so speed and quality will depend on your model and hardware.

What you need

According to Ollama's VS Code page:

  • Visual Studio Code 1.127 or newer. Earlier versions don't reliably cancel requests from language model providers.

  • Ollama installed and running, with at least one model available. Ollama 0.17.6 or newer is recommended for cloud model sign-in and richer model metadata; older versions may still work with local models.

  • A suitable PC. Local models run on your GPU or CPU. If you're unsure what your graphics card can handle, see how much VRAM you need and our guide to running AI models locally with Ollama and LM Studio.

Microsoft's language model documentation says these "bring your own key" (BYOK) models work without signing into a GitHub account and without a Copilot plan.

Step 1: pull a model in Ollama

Open a terminal and download a model, for example:

ollama pull qwen3.6

Run ollama list to confirm it's there. If you need help choosing or tidying up models, see how to manage Ollama models.

Step 2: install the Ollama extension

  1. Install the Ollama extension (from the Ollama publisher) from the Visual Studio Marketplace.

  2. Open Chat.

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

  4. Choose a model from the Ollama section.

The extension discovers models from http://127.0.0.1:11434 by default, which is where Ollama listens on your PC.

If you previously set up the deprecated built-in Ollama provider, Microsoft says to install the extension and remove the built-in provider configuration so you keep using Ollama models without interruption.

Step 3: set a bigger context length

Coding chats send a lot of text. Ollama's documentation notes that VS Code may show a model's maximum context length even when Ollama allocates a smaller context at runtime. For local models, open Ollama's settings, set the context length to at least 64k, reload the VS Code window and resend your prompt. Bigger contexts use more memory; our guide on setting Ollama's context length explains the trade-off.

What works offline, and what doesn't

Microsoft says you can use a BYOK local model completely offline once it's added. Some features still need a GitHub account and an internet connection: semantic search, inline suggestions (code completions) and features that rely on embeddings aren't available through BYOK models. So you get local chat, but not Copilot-style autocomplete from your Ollama model. For a different local coding set-up, see how to use Continue with Ollama.

Copilot Business and Enterprise users should note that an organisation administrator can disable bring-your-own-key models.

If Ollama models don't appear

Ollama's troubleshooting steps:

  1. Make sure Ollama is running.

  2. Run ollama list and confirm models are available.

  3. Run Ollama: Refresh Models from the Command Palette.

  4. Run Ollama: Diagnose Models and check the Ollama output channel.

Our verdict

Using Ollama in VS Code chat is now a two-minute job: pull a model, install the official Ollama extension, pick the model in chat and raise the context length to at least 64k. Microsoft says it works offline and without a Copilot plan, but code completions, semantic search and embedding-based features still need a GitHub account and internet connection.

The bottom line

Using Ollama in VS Code chat is now a two-minute job: pull a model, install the official Ollama extension, pick the model in chat and raise the context length to at least 64k. Microsoft says it works offline and without a Copilot plan, but code completions, semantic search and embedding-based features still need a GitHub account and internet connection.

Sources

  1. 01Ollama, VS Code integration documentation
  2. 02Visual Studio Code, AI language models in VS Code

About the author

Forge PC Staff

Editorial team

The shared byline for articles researched, written and edited by the Forge PC editorial team. How we source, check and correct our work is set out in our editorial policy.

More from Forge PC Staff

Read next

How to Check Your Wi-Fi Signal Strength in Windows 11

How-To

How to Check Your Wi-Fi Signal Strength in Windows 11

Check Wi-Fi signal strength in Windows 11 from the taskbar bars, Settings > Network & internet, or exactly with netsh wlan show interfaces (the Signal percentage). Windows Central treats 80-100% as reliable and below 60% as weak. netsh wlan show wlanreport summarises recent wireless sessions.

Forge PC Staff2 min

How to Turn Thinking On or Off in Ollama (DeepSeek-R1, Qwen 3, gpt-oss)

How-To

How to Turn Thinking On or Off in Ollama (DeepSeek-R1, Qwen 3, gpt-oss)

Ollama lets you control reasoning models' thinking: --think and --think=false on the command line, /set think and /set nothink in chats, --hidethinking for scripts and a think field in the API. Check /api/show first, as models such as gpt-oss use low, medium and high levels instead.

Forge PC Staff2 min

How to Use Embedding Models in Ollama for Local Semantic Search and RAG

How-To

How to Use Embedding Models in Ollama for Local Semantic Search and RAG

Embedding models turn text into vectors for semantic search and RAG. Pull one such as embeddinggemma in Ollama, generate vectors with ollama run or the /api/embed endpoint, store them, then embed questions with the same model and compare using cosine similarity, all locally.

Forge PC Staff3 min

How to Fix Windows Search Not Working in Windows 11

How-To

How to Fix Windows Search Not Working in Windows 11

If Windows 11 search stops finding files or apps, follow Microsoft's fixes in order: end SearchHost.exe in Task Manager, install updates, run the Search and Indexing troubleshooter, check Classic or Enhanced indexed locations, then rebuild the index and allow up to 24 hours.

Forge PC Staff3 min