Text of code.visualstudio.com › docs › agent-customization › language-models as Styx crawled it on Nov 19, 2026. The page may have changed since. Only its words are kept, without pictures or layout, and only the first part of a long page.

Open the live page

AI language models in VS Code

AI agents: See llms.txt for documentation discovery and navigation. Documentation articles are also available as Markdown by appending .md to the article URL. Join VS Code at Microsoft Ignite or catch the sessions online. A year of VS Code, wrapped. Explore the highlights. AI language models in VS Code View as Markdown Ask in VS Code Ask in VS Code Insiders Visual Studio Code gives you access to multiple built-in language models, each optimized for different tasks.

You can switch models for chat, inline suggestions, and utility tasks, and you can add more models by bringing your own API key. For background on how language models work, their characteristics, and how to choose the right model, see Language models concepts . Choose how to access models Start with the account, credentials, or model you already have: GitHub Copilot access : Set up Copilot , then choose a model from the providers available through your plan.

A provider account or harness-specific credentials : Follow the Anthropic Claude or OpenAI Codex requirements for that harness. Supported accounts and authentication methods depend on the integration. An API key or custom endpoint : Add a model provider in the Language Models editor. This configures model access, not a different harness. A locally running model : Add a model provider extension , such as Ollama. Alternatively, check the hardware and sign-in requirements for Copilot-managed on-device models .

The model provides reasoning, the harness coordinates tools and workflow, and the access provider determines authentication and billing. These choices are related, but aren't interchangeable. Compare harness-specific access options before reusing an account or key. Change the model for chat Different models have different strengths. Use a fast model for quick edits and simple questions, and a reasoning model for complex refactoring, architectural decisions, or multi-step tasks.

Depending on the harness you are using, the list of available models might differ. Use the language model picker in the chat input field to change the model for chat conversations and code editing. If the model picker shows Models instead of a model name, open it to check whether workspace trust or sign-in is required. Learn more about workspace trust and Restricted Mode . You can further extend the list of available models by using your own language model API key .

Note If you are a Copilot Business or Copilot Enterprise user, your administrator needs to enable certain models for your organization by opting in to Editor Preview Features in the Copilot policy settings on GitHub.com. If you're unsure which option to use, follow the Compare and choose models guide to start with Fusion, Auto, or an individual model and evaluate it on your own code. To compare solutions to the same coding task, use model comparison in the Agents window.

Run one prompt with multiple models or harnesses, then review the results side by side. Organization-managed model defaults Your organization can set the starting model for new conversations in both the editor and the Agents window. The model picker marks the organization's choice as Org default , and the Settings editor shows an indicator for chat.defaultModel Open in VS Code Open in VS Code Insiders with a Managed by organization explanation.

The managed default takes precedence over your saved model preference for new conversations, but you can still select another available model for the current conversation. Existing conversations keep their model. Your saved preference is preserved and applies to new conversations again when the managed default is removed. For administrator configuration, see Set managed model defaults . Configure thinking effort and context size Some models support configurable thinking effort, context size, and other parameters.These control how much reasoning the model applies to each request, and how much context the model can consider at once.

For background on thinking and reasoning, see Thinking and reasoning . By default, VS Code sets recommended effort levels and has adaptive reasoning enabled, where the model dynamically determines how much to think based on the complexity of each request. For most use cases, the default configuration works well. Tip Higher thinking effort produces more thinking tokens, which increases AI credit consumption. Only increase thinking effort for genuinely complex tasks.

Learn more about optimizing AI credit usage . To configure model parameters: Open the model picker in the chat input field and select a reasoning model. Select the > arrow that appears next to the model name to open the model configuration submenu. Note Non-reasoning models, such as GPT-4.1 and GPT-4o, do not show the thinking effort option in the model configuration submenu. Select an effort level. The model configuration is remembered per session, so revisiting an earlier session keeps the same effort level and context size it was using.

New conversations start from the effort level and context size you last set for that model. Note The github.copilot.chat.anthropic.thinking.effort Open in VS Code Open in VS Code Insiders and github.copilot.chat.responsesApiReasoningEffort Open in VS Code Open in VS Code Insiders settings are deprecated. Configure thinking effort directly from the language model picker. Use auto model selection With auto model selection, VS Code evaluates task complexity and real-time model availability to route each request to the optimal model.

For background on how auto model selection works, see Auto model selection . To use auto model selection, select Auto from the model picker in chat. In Copilot harness sessions , Copilot Fusion replaces Auto when dynamic Auto tiers are enabled and the service offers a Fusion tier your account can run. If the picker shows Copilot Fusion , follow the Fusion instructions instead. Use Optimize for , when available, to choose a tier that matches your priorities.

The offered tiers depend on the service and can include: Efficiency favors lower AI credit consumption. Balance balances capability and credit consumption. Intelligence favors more capable models for complex tasks. Your organization can set a starting tier for new chats. The managed tier appears as Default in the Optimize for menu, but you can still choose a different tier. An explicit choice is preserved when the managed default changes or is removed.

You can see which model is used for generating a response by hovering over the chat response. Use Copilot Fusion Copilot Fusion chooses models and a workflow to complete your task, so you don't need to select a model for each step. For background on how Fusion differs from Auto and when to use it, see Copilot Fusion concepts . For details about orchestration, effort levels, availability, and AI credit usage, see GitHub Copilot Fusion in the GitHub documentation.

To use Copilot Fusion: Verify that chat.copilot.dynamicAutoTiers.enabled Open in VS Code Open in VS Code Insiders is enabled in the Settings editor. Changing it restarts the Copilot runtime after active requests finish. Start a new chat with the Copilot harness . In the model picker, select Copilot Fusion , then choose an available tier: Standard , High , or Max . Enabling the setting doesn't grant access to Fusion tiers.

If the service doesn't offer a Fusion tier that your account can run, the picker continues to show Auto instead. Use on-device models On-device models let you run a coding model provided by Copilot, currently MAI Code 1.1 Flash, directly on your device in Copilot harness sessions. VS Code uses llama.cpp to serve the model on your device. On-device models bring that capability to Copilot in VS Code, without you having to find, download, and serve a model yourself.

You can use the local model alongside cloud models. Auto-model selection can route suitable requests to the local model, with fallback to a cloud model. On-device models differ from BYOK local models . Co

The rest of this page is on the live site.