Skip to main content
TheBestSI

AI Language Models in VS Code: Setup, BYOK and On-Device (2026)

How to choose, switch and add language models in Visual Studio Code: Copilot models, your own API key, local providers, and the experimental on-device model with its hardware requirements.

Guide5 min readBy Technology Desk

VS Code lets you switch models for chat, inline edits and some utility tasks. Different models suit different work: a small, fast model is usually enough for a syntax edit, while multi-step refactors and agent tasks tend to benefit from a larger reasoning model. That is a general rule of thumb, not a tested result.

Four ways to get models

Access routes described in Microsoft's VS Code documentation.
RouteSetup effortWhat you needNotes
GitHub CopilotLowA GitHub account with a Copilot planModels available depend on your plan and organization policy.
Provider or harness accountLow to mediumCredentials for that integrationSupported accounts differ by integration.
API key or custom endpointMediumProvider key or endpointConfigured in the Language Models editor; direct model access, not a different harness.
Local runtimeMedium to highA provider extension such as Ollama, or Copilot-managed on-device modelsOn-device models are experimental.

Access routes described in Microsoft's VS Code documentation.

Change the model for chat

  1. Open the pickerFind the language model picker in the chat input field.
  2. Choose a modelSelect the model from the list. It applies to chat and inline editing.
  3. If it says "Models"The picker shows a generic label when it cannot show a specific model. Open it and check workspace trust and sign-in status.

On Copilot Business or Enterprise, an administrator must enable Editor Preview Features in the Copilot policy settings before preview models appear.

Bring your own key

Open the Language Models editor from the picker's manage option. Use it to see every available model, choose which appear in the picker, and add models from a built-in provider, an extension-provided provider, or a custom endpoint. Enter your key or endpoint when prompted. Treat the key like any secret and prefer a provider or gateway your organization already approves.

Organization defaults

Organizations can set the starting model for new conversations in both the editor and the Agents window. The picker marks it Org default, and the Settings editor shows chat.defaultModel as managed by the organization. The managed default takes precedence over a personal one.

On-device models (experimental)

Microsoft's docs describe on-device models as experimental and subject to change or removal. They run a coding model provided by Copilot, currently MAI Code 1.1 Flash, in Copilot harness sessions on your machine, served through llama.cpp.

  • An NVIDIA GPU with 96 GB or more of GPU memory. Unified memory shared with the system counts.
  • About 55 GB of free disk space for MAI Code 1.1 Flash. VS Code does not install llama.cpp for you.
  • A llama.cpp build that supports the model. The docs name b11658 or later; the picker warns if yours is too old.
  • A Copilot harness session running locally, and an administrator-enabled Editor Preview Features policy on Business or Enterprise.

A 96 GB requirement puts this out of reach for most laptops and single consumer GPUs. For offline or low-cost local work today, a provider extension such as Ollama with a smaller model is the more practical route, with the quality trade-off that implies.

Rewritten from an unattributed staging draft and re-checked against Microsoft's documentation on 2026-11-17. We did not install or run any of these configurations; this is Editorial Analysis of the vendor's docs, not a hands-on test. VS Code settings and features change often, so confirm in the current docs.

Frequently asked questions

How do I add my own API key to VS Code chat?+

Open the Language Models editor from the model picker's manage option, add models from a built-in provider or a custom endpoint, and enter your key or endpoint details. This gives direct model access; it does not install a different harness.

What hardware do on-device models need?+

Microsoft's docs list an NVIDIA GPU with 96 GB or more of GPU memory (unified memory counts), about 55 GB of free disk for MAI Code 1.1 Flash, and a llama.cpp build that supports the model. The feature is marked experimental and may change or be removed.

Can an organization set the default model?+

Yes. Organizations can set the starting model for new conversations. The picker labels it Org default and the setting chat.defaultModel shows as managed by the organization. The managed default takes precedence over a personal default.

Sources

  1. AI language models in VS Code — Microsoft, Visual Studio Code documentation (accessed November 17, 2026). Primary source for every setup step, setting name and hardware figure on this page.

Who writes this?

This piece carries the Technology Desk byline. The site was co-founded by Liyam Flexer, Co-Founder & Investor. Content is managed by Adam Green, Content Manager, with Tal Slavin joining as Writer & Editor. A byline identifies who is responsible for the editorial content; it does not claim the author tested a product. Articles carry an editorial-review status, and those awaiting review say so. Questions or corrections: contact.

The Index: every page on TheBestSI

I want to
Explore rankings

Always here for any question