Automatic model selection and routing in VS Code
Instead of picking an individual model for every chat request, you can let Visual Studio Code choose models automatically. Use Auto or Copilot Fusion when you want Copilot to decide for you, or define a model router when you want requests routed across models and workflows that you specify.
For background on how these options work and how they affect AI credit usage, see Understand language models. To pick individual models, configure thinking effort, or manage model visibility, see Choose and configure language models.
Choose an automatic selection option
| Option | Who chooses | How it works | When to use it |
|---|---|---|---|
| Auto | Copilot | Selects a single model per request based on task complexity and availability. | Everyday coding when you want good defaults without hand-picking models. |
| Copilot Fusion | Copilot | Chooses one model or orchestrates multiple models (for example, drafting, reviewing, and revising) for a task. | Substantial, well-scoped coding tasks where multi-step review is worth extra time and AI credits. |
| Model routers Model routers is in preview and might change before it becomes generally available. | Your rules | Routes requests automatically using rules, models, and optional guidance that you define. | Recurring workflows where you already know which models you prefer for different kinds of work. |
For a hands-on workflow to evaluate options on your own codebase, see Compare and choose models for your coding tasks.
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 Copilot 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 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 model routers
Unlike Auto or Copilot Fusion, which choose models for you, a model router applies routing rules that you define. Define routes for recurring work, such as a faster model for small edits and a reasoning model for multi-file changes, and select the router from the model picker like any other model.
Model routers are available in VS Code Insiders for Copilot harness sessions on desktop and are off by default.
Create and select a router
Use the Model Routers editor to create a router without writing YAML by hand:
-
Enable chat.copilot.modelRouter.enabled in the Settings editor.
-
Open a Copilot chat in the Chat view or Agents window.
-
Open the Model Routers editor in either of these ways:
- In the model picker, select Routers > Create a Router (or New Router if you already have one).
- Run Chat: Manage Language Models from the Command Palette (⇧⌘P (Windows, Linux Ctrl+Shift+P)), or select Manage Language Models (gear icon) in the model picker, and switch to the Model Routers tab in the modal editor header.
-
Select Add Router to open the router form.

-
Enter a Name and Description for the router.
-
Configure your routes. For each route, optionally enter a Name, select a Model, optionally adjust Effort and Context, describe When to use it, and optionally add Guidance for the agent. Select Add Route to add more routes (up to 10).
Put your preferred fallback route first: when no route clearly fits a chat's first request, the router uses the first available route.
-
Select Create.
VS Code writes
<name>.model-router.yamlto~/.agents/model-routers/on macOS or Linux, or%USERPROFILE%\.agents\model-routers\on Windows. The router appears in the Model Routers list and on the model picker's Routers tab without reloading. -
Open the model picker, go to the Routers tab, and select your router.
Send a task. The routing line above the response identifies the selected route, model, and effort, and the response footer identifies the answering model. You can also open a router's Details in the model picker to inspect its routes, switching mode, and file link.
In a remote window, router files live on the remote machine. Selecting Add Router starts a chat with the /model-router skill instead of opening the local form.
Manage routers in the Model Routers editor
When chat.copilot.modelRouter.enabled is enabled, Chat: Manage Language Models opens a modal editor with Language Models and Model Routers tabs in its header. Moving the modal editor into the editor area opens both views as regular editor tabs.

From the Model Routers tab, you can:
- Search routers: Filter by router name, description, file name, or a route's name, model, or
whendescription. - Toggle route switching: Turn Route switching on or off directly on a router's row to control whether a chat can switch routes after its first message.
- Edit a router: Select a router (or open More Actions > Edit) to update its name, description, or routes in the form.
- Open the router file: Open More Actions > Open File to edit the YAML file directly.
- Refine or fix with AI: Open More Actions > Edit with AI to start a chat with
/model-routertargeting that file. If a router shows a warning, More Actions also offers Fix with AI.
Form saves and Route switching toggles require the router file to have no unsaved changes in an editor and not to have changed on disk since you opened it. In remote windows, inline form editing and Route switching toggles are unavailable; use Open File or Edit with AI instead.
Edit with AI or YAML
Use Edit with AI (the built-in /model-router skill) or Open File when you want AI assistance refining route wording or when you need options that the form preserves from existing files without exposing as fields, such as model preference lists, route examples, top-level guidance, or top-level effort: off.
To find your router files from VS Code, run Chat: Open Model Routers Folder from the Command Palette on desktop to open ~/.agents/model-routers/ in your file manager. Routers in ~/.copilot/model-routers/ are also detected; for duplicate names, ~/.agents/ takes precedence.
While
chat.copilot.modelRouter.enabled
is enabled, opening a *.model-router.yaml file provides key and value completion and reports validation issues in the Problems panel. New and edited files are picked up without reloading.
Adapt this example's models to your account, manually or with /model-router:
version: 1
display-name: Daily Driver
description: Reasoning for multi-file work, faster responses for small edits.
routes:
- name: build
model: [opus, sonnet]
effort: high
when: Debugging, implementing features, or changing behavior across files.
guidance: Inspect the relevant code before editing. Run the relevant tests after changes.
- name: quick
model: haiku
effort: low
when: Small, well-defined edits, such as renaming a local variable or updating a comment.
- Models: Use a family for its newest available released model, an exact ID for a particular version, or a preference list such as
[opus, sonnet]. - Criteria: Describe the work in
when, with optionalexamplesto distinguish requests. A router with a single route andguidancecan omitwhen. - Effort: Set a supported
effortlevel, or leave it unset so the router chooses per request. Top-leveleffort: offkeeps model defaults and ignores route effort. - Context: Set
context-size: longfor a larger supported window. Once a chat uses long context, subsequent models retain it where supported.
After manual edits, ask /model-router to check for unavailable models, unsupported effort levels, and invalid YAML using check_model_router.
Control switching and route guidance
By default, the first message after you select a router determines its route for the rest of the chat. To switch routes automatically when the work clearly changes, turn on Route switching on the router's row in the Model Routers editor, or add switching: auto at the top level of its YAML file.
Short continuation replies (such as "ok, continue") stay on the current route. Evaluate edited routing criteria in a new chat.
A route's guidance instructs the main agent, including steps, skills, or custom agents to use. Switching routes replaces that guidance. Running background subagents delay guidance changes until a routed turn after they finish.
Top-level guidance in YAML influences routing decisions, not the agent's work. Put instructions such as running tests in route guidance. Guidance doesn't enforce workflows or permissions.
Switching models resets the prompt cache and can increase AI credit usage. Guidance changes, higher effort, and larger context windows can also add cost.
Check unexpected routing
If a router shows a warning in the Model Routers editor or model picker, open More Actions > Fix with AI to repair invalid YAML, missing when descriptions, or unavailable models. For unexpected route picks, open More Actions > Edit with AI to review overlapping criteria and add representative examples. Models must be available to your account and permitted by organization policies.
| Condition | Behavior |
|---|---|
| All models in a route are unavailable | The route is skipped and the router shows a warning. |
| Router file is invalid, missing, or has no available models | The chat keeps its current model and shows a notice. |
| Routing is unavailable for the first request | The first available route is used, with a notice. |
| Routing fails for a later request | The current route is kept. |
A fallback isn't necessarily the best match for your task.