thebestai.co encyclopedia

Knowledge base

AI Language Models in VS Code: Complete 2026 Guide

How to configure, switch and optimise AI language models in Visual Studio Code: GitHub Copilot, bring-your-own-key (BYOK), and local on-device models.

Published 4 min readBy , ,
On this page
  1. In short
  2. Key takeaways
  3. Access options
  4. Choose access
  5. Change the model
  6. FAQ
  7. Sources

In short

Visual Studio Code lets you switch between cloud models through GitHub Copilot, your own API keys (BYOK) and local on-device models, from one model picker in the chat input. The model supplies the reasoning, a harness coordinates tools and workflow, and the access provider handles authentication and billing; knowing which layer you are changing is most of the configuration.

#Key takeaways

  • Model flexibility: switch between cloud models (GitHub Copilot), custom API keys (BYOK) and local on-device models.
  • Orchestration layers: models provide raw reasoning, harnesses coordinate tools and workflows, and access providers handle authentication and billing.
  • Advanced controls: configure thinking effort, context sizes and auto-model routing from the chat input field or the Language Models editor.

This guide follows the VS Code documentation, linked under Sources; menu names, limits and hardware figures are the documentation's and may change between releases.

VS Code provides access to multiple built-in language models, each optimised for specific development tasks. You can switch models for chat, inline suggestions and utility tasks, or expand your options by bringing your own API key.

For background on how language models work, their characteristics and how to choose one, see the VS Code language models concepts guide.

#Quick comparison: model access and deployment options

Access method Setup complexity Best for Authentication required
GitHub Copilot Low (instant) Standard cloud-accelerated coding, chat and agent workflows GitHub account with a Copilot subscription
Bring your own key (BYOK) Medium Enterprise custom gateways, proprietary models and specialised APIs Provider API key or secret
Local on-device models Advanced High-security offline coding and zero-cost local iteration Hardware (GPU VRAM of 96 GB or more) and GitHub login
Model provider extensions Low Local testing tools (for example Ollama, Foundry Toolkit) Local runtime or extension credentials

#Choose how to access models

Start with the account, credentials or model architecture that fits your workflow:

  • GitHub Copilot access: set up Copilot, then select your preferred model from the provider options included in your subscription tier.
  • Provider account or harness credentials: follow the authentication requirements for integrations such as Anthropic Claude or OpenAI Codex, described in the agent harnesses documentation.
  • API key or custom endpoint: add a custom provider in the Language Models editor. This configures direct model access rather than a distinct harness.
  • Locally running model: integrate a local provider extension such as Ollama, or review the hardware requirements for Copilot-managed on-device models (see the FAQ below).

Architecture note: the model supplies reasoning capabilities, the harness manages tools and workflow execution, and the access provider controls billing and authentication. Review the harness-specific access requirements before reusing credentials across integrations.

#How to change the model for chat

Different language models excel at different tasks. Use fast, lightweight models for quick syntax edits and simple queries, and high-capacity reasoning models for complex refactoring, architectural planning or multi-step agent tasks.

To change the active model for chat conversations and inline code editing:

  1. Find the language model picker in the chat input field.
  2. Select the model you want from the dropdown list.

If the picker shows Models instead of a specific name, open it to check workspace trust or sign-in status. See the documentation on workspace trust and Restricted Mode.

Note for organisations: Copilot Business and Enterprise administrators must explicitly enable preview features by opting into Editor Preview Features in their GitHub Copilot policy settings.

#Frequently asked questions

#How do I add custom API keys (BYOK) to VS Code chat?

Open the Language Models editor by clicking Manage Language Models (the gear icon) in the model picker, select Add Models, choose a built-in provider or Custom Endpoint, and enter your API key or endpoint configuration.

#What are the hardware requirements for on-device models in VS Code?

Running local models such as MAI Code 1.1 Flash via Copilot requires an NVIDIA GPU with 96 GB or more of VRAM (or equivalent unified memory), about 55 GB of free disk space and a compatible build of llama.cpp.

#Can organisation administrators enforce default models in VS Code?

Yes. Organisations can set starting models for new conversations with the chat.defaultModel setting. The model picker labels these Org default, though developers can still switch models for individual sessions.

#Sources

More from the blog

Cover graphic: Top 10 Artificial Superintelligence Companies to Watch in 2026, over a dark blue network of connected points.

Knowledge base10 min read

Top 10 ASI Companies to Watch in 2026

Ten frontier AI labs and enterprise engineering firms building the reasoning models, agentic AI and infrastructure on the road to superintelligence.

Cosmic visualization of biological and artificial neural networks linked by glowing synaptic conduits.

Knowledge base103 min read

Superintelligence: The Definitive Master Guide

Complete reference on artificial superintelligence: definition, forms, ASI vs AGI, technical paths, physical limits, alignment, governance and 2026 labs.