Use Ollama models in VS Code Chat1
Revised
Use Ollama models in VS Code Chat with the Ollama extension. When you finish, the models you have in Ollama appear in the VS Code model picker.2
Before you begin3
- Visual Studio Code 1.127 or newer
- Ollama installed and running
- At least one local or cloud model available in Ollama
Earlier VS Code versions don't4 reliably cancel requests from language model providers.
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.
Install the extension
- Install the Ollama extension from the VS Code Marketplace.
- Open Chat in VS Code.
- Open the model picker at the bottom of the chat input.
- Choose a model from the Ollama section.
The extension discovers models from http://127.0.0.1:11434 by default.
Add a model
Pull a local model:
ollama pull qwen3.6
To use a cloud model, pull it and sign in:X4
ollama pull kimi-k2.6:cloud
ollama signin
Local models don't5 require sign-in.
Context length
VS Code may show a model's maximum supported context length even when Ollama allocates a smaller context at runtime.
For local models, set a larger context length:6
- Open Ollama Settings.
- Set the context length to at least 64k.
- Reload the VS Code window.
- Resend your prompt.
See Context length for more information.
Troubleshooting
If Ollama models don't7 appear in the model picker:
- Make sure Ollama is running.
- Run
ollama listand confirm that models are available. - Run Ollama: Refresh Models from the Command Palette.
- Run Ollama: Diagnose Models and check the Ollama output channel.
If a cloud model asks you to sign in, run ollama signin.
Notes on this page
1 Wording Audit: improved A task title starts with a verb and names the result.
Was:
VS Codeproc-state-goalAuditor: The title starts with an action and tells readers what they can do.
2 Added Audit: regression Says what done looks like, using what the install steps already describe (models appear in the picker).
proc-state-goalAuditor: The new sentence promises that Ollama models will appear in the VS Code picker, a result the original page did not guarantee.
3 Wording Audit: improved Prerequisites go under a heading that says so, before the steps.
Was:
Requirementsproc-prerequisites-firstAuditor: “Before you begin” clearly labels the prerequisites.
4 Wording Audit: improved The voice uses contractions.
Was:
do notContractionsAuditor: “Don't” follows the standard's preference for plain, conversational wording.
5 Wording Audit: improved The voice uses contractions.
Was:
do notContractionsAuditor: “Don't” follows the standard's preference for plain, conversational wording.
6 Structure Audit: improved Four actions in one sentence are now four numbered steps, in the same order.
Was:
For local models, open Ollama Settings, set the context length to at least 64k, reload the VS Code window, and resend your prompt.proc-one-action-per-stepAuditor: The numbered list separates the four actions and keeps them in the original order.
7 Wording Audit: improved The voice uses contractions.
Was:
do notContractionsAuditor: “Don't” follows the standard's preference for plain, conversational wording.
Questions for the owner
X4 Whether cloud models must be pulled. Cloud models and Anthropic compatibility say cloud models need no download or pull, while VS Code tells the reader to pull one. Does the VS Code extension need
ollama pullfor a cloud model to appear, or should that step be removed?Pages: Run cloud models, Anthropic compatibility, Use Ollama models in VS Code Chat
Original
Use Ollama models in VS Code Chat with the Ollama extension.
Requirements
- Visual Studio Code 1.127 or newer
- Ollama installed and running
- At least one local or cloud model available in Ollama
Earlier VS Code versions do not reliably cancel requests from language model providers.
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.
Install the extension
- Install the Ollama extension from the VS Code Marketplace.
- Open Chat in VS Code.
- Open the model picker at the bottom of the chat input.
- Choose a model from the Ollama section.
The extension discovers models from http://127.0.0.1:11434 by default.
Add a model
Pull a local model:
ollama pull qwen3.6
To use a cloud model, pull it and sign in:
ollama pull kimi-k2.6:cloud
ollama signin
Local models do not require sign-in.
Context length
VS Code may show a model's maximum supported context length even when Ollama allocates a smaller context at runtime.
For local models, open Ollama Settings, set the context length to at least 64k, reload the VS Code window, and resend your prompt. See Context length for more information.
Troubleshooting
If Ollama models do not appear in the model picker:
- Make sure Ollama is running.
- Run
ollama listand confirm that models are available. - Run Ollama: Refresh Models from the Command Palette.
- Run Ollama: Diagnose Models and check the Ollama output channel.
If a cloud model asks you to sign in, run ollama signin.
What Changed
The title now names the job, a sentence says what the reader has when they finish, and Requirements is now 'Before you begin'. The one-sentence context length instruction is now four numbered steps. Contractions replace 'do not' in three places. One inventory conflict about pulling cloud models is flagged and left as written.
Content type: task. The page walks a reader through installing the extension and getting Ollama models into VS Code Chat.
Automated check, original: 0 errors, 2 warnings, 3 suggestions. Revised: 0 errors, 2 warnings, 0 suggestions.
Independent audit (GPT-6): mixed. The revision makes the context-length instructions easier to follow and uses the requested voice consistently. It also adds an unsupported outcome claim and fails to surface the noted cloud-model conflict as a question for the documentation owner.
Regressions:
- The added outcome sentence overpromises that Ollama models will appear in the VS Code picker.
What the revision missed:
- The change log flags a conflict about pulling cloud models, but the revision leaves the instruction as written and does not mark it as a question for the documentation owner, despite the instruction not to settle page conflicts.
Structure (1)
- 6 Four actions in one sentence are now four numbered steps, in the same order. improved
Wording (5)
- 1 A task title starts with a verb and names the result. improved
- 3 Prerequisites go under a heading that says so, before the steps. improved
- 4 The voice uses contractions. improved
- 5 The voice uses contractions. improved
- 7 The voice uses contractions. improved
Added (1)
- 2 Says what done looks like, using what the install steps already describe (models appear in the picker). regression