Integration guide
Visual Studio Code Integration
Developer editor that can use built-in AI models, provider keys, and extensions for coding workflows.
Recommended path
Visual Studio Code local AI quick start
- 1. Run a local coding model firstStart Ollama or another supported local provider, load a code-aware instruction model, and confirm it answers outside the editor before configuring VS Code.
- 2. Add it through Manage Language ModelsRun Chat: Manage Language Models, install the official Ollama extension when prompted, and add the local provider without supplying a hosted API key.
- 3. Select it for chat and test a repository taskChoose the local model in Chat, ask a read-only question about the workspace, and set chat.utilityModel separately if commit messages or title generation should use it too.
Best for
Developers who want chat, inline edits, and local-model experimentation inside their editor.
Model support
VS Code supports bringing your own model through the Chat: Manage Language Models command. Local models are added as a provider there, and Microsoft now directs Ollama users to the official Ollama extension from the Ollama publisher, because the previously built-in Ollama provider is deprecated.
Choose models by role
Chat and code edits
Qwen3 Coder
A code-aware instruction model is the useful local choice for repository chat, explanations, and requested edits. Size it to the context and hardware you actually have.
Open the model profile →Inline suggestions
Separate completion provider
VS Code does not currently use a local BYOK model for inline suggestions. Treat completion as a separate provider path instead of assuming the chat model covers it.
How to use this integration
- Chat about a private repository with a model running on the same laptop, fully offline
- Point commit-message and title generation at a local model instead of a hosted one
- Compare a local model against a hosted one in the same chat interface before choosing
- Keep client or regulated code out of a vendor API while still getting editor assistance
Connecting a local model
Run Chat: Manage Language Models, add the provider, and install the official Ollama extension for Ollama-backed models. The docs note that a local model works without a GitHub account, without a Copilot plan and without an internet connection, which makes the editor genuinely usable offline.
Tradeoffs
The important boundary is that a local model drives chat only: you cannot currently connect a local model for inline suggestions, so completion still needs a hosted service. Utility features such as commit messages and title generation only use it if chat.utilityModel is pointed at it, agent-host sessions need an experimental setting, and on Copilot Business or Enterprise seats an administrator can disable bring-your-own-key entirely.