Requirements
- Visual Studio Code 1.127 or newer
- Ollama installed and running
- At least one local or cloud model available in Ollama
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.
http://127.0.0.1:11434 by default.
Add a model
Pull a local model: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.
ollama signin.
