Skip to content
| Marketplace
Sign in
Visual Studio Code>AI>Magic Router for CopilotNew to Visual Studio Code? Get it now.
Magic Router for Copilot

Magic Router for Copilot

Magic Router

|
7 installs
| (0) | Free
Use Magic Router models directly from the GitHub Copilot Chat model picker. BYOK, vision-capable models, thinking mode, and agent tools.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Magic Router for Copilot

English | 简体中文

Use Magic Router models directly from the GitHub Copilot Chat model picker.

Magic Router for Copilot does not replace Copilot Chat or add a separate chat UI. It registers Magic Router as a Copilot language model provider, so you can keep using Copilot Chat, Agent mode, workspace context, instructions, and tools while sending model requests through your own OpenAI-compatible router endpoint.

Features

  • Adds Magic Router models to the Copilot Chat model picker.
  • Uses your own API key, stored in VS Code SecretStorage.
  • Prompts for Base URL and API key on first setup.
  • Loads models from {baseUrl}/models.
  • Sends chat requests to {baseUrl}/chat/completions.
  • Supports OpenAI-compatible streaming, tool calls, image input, and reasoning output.
  • Enriches model metadata with cost, vendor, multimodal, thinking, and context options for supported AIXRouter and AgileRouter base URLs when enabled.

Requirements

  • VS Code 1.116 or newer.
  • GitHub Copilot Chat installed and signed in.
  • An OpenAI-compatible Magic Router endpoint and API key.

Quick Start

  1. Install the extension.
  2. Run Magic Router: Set Base URL.
  3. Enter your OpenAI-compatible Base URL, for example https://api.example.com/openai/v1.
  4. Run Magic Router: Set API Key.
  5. Open Copilot Chat and choose a Magic Router model from the model picker.

Common Base URLs:

Provider Base URL
AIXRouter https://api.aixrouter.com/openai/v1
AgileRouter https://api.agilerouter.com/openai/v1

Commands

  • Magic Router: Set Base URL
  • Magic Router: Set API Key
  • Magic Router: Clear API Key
  • Magic Router: Refresh Models
  • Magic Router: Open Settings

Settings

Setting Default Description
magicrouter.baseUrl empty OpenAI-compatible Base URL.
magicrouter.models [] Optional pinned model list. Leave empty to load from /models.
magicrouter.maxTokens 0 Maximum completion tokens. 0 means provider default.
magicrouter.temperature null Optional temperature.
magicrouter.reasoningEffort high Default reasoning effort for models that expose thinking mode.
magicrouter.enrichPublicModelMetadata true Enrich cost, multimodal, and context metadata from the public model catalog for AIXRouter and AgileRouter base URLs.
magicrouter.debug false Write request diagnostics to the output channel. Prompt text is not logged.

Development

pnpm install
pnpm run compile
pnpm run package

Press F5 in VS Code to launch an Extension Development Host.

License

MIT

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft