Yes, 9 Router is small Node.js server on your machine that proxies chat requests to 40+ AI providers (Anthropic, OpenAI, Gemini, GLM, local Ollama, etc.), with automatic fallback when a subscription hits its quota and a built-in token-compression layer ("RTK") that trims 20–40% off tool-output tokens. Because it exposes a standard /v1 chat endpoint, any client that supports Bring Your Own Key (BYOK). including Visual Studio 2026's Copilot Chat can point at it instead of GitHub's own model backend. This good scenario when you want to utilize your LLM model into Visual Studio as alternative of Github Copilot. Visual Studio codes altready has extension for 9 Router. How about Visual Studio 2026? This article will discuss how to configure Visual Studio 2026 to work with 9 Router.
Benefit of using 9 router
- You can save your token by utilizing unused free token
- You can avoid subscription by combining all free LLM token
- You can create and connect LLM based on task and combos
Challange using 9 router
- you need to install 9 routers in your PC / Server
- You can get inconsistent result because each LLM will have different response
- You need to create account for each LLM that you need
git clone https://github.com/decolua/9router.git cd 9router npm install npm run build npm run start # or run persistently with PM2: npm install -g pm2 pm2 start npm --name 9router -- start pm2 save
By default the server listens on http://localhost:20128, with:
- Proxy endpoint:
http://localhost:20128/v1
- Dashboard:
http://localhost:20128/dashboard
Step 2: Connect providers and generate a key
- Open the dashboard and sign in with the password you set via
INITIAL_PASSWORD.
- Add your provider accounts (e.g.
cc/ for Claude Code subscription, glm/, kr/, vertex/, etc.).
- Optionally build a fallback stack (e.g. primary subscription, cheap backup, free model) so Visual Studio never hits a hard stop mid-session.
- Copy the generated API key from the dashboard, you'll paste it into Visual Studio next.
Step 3: Register 9Router inside Visual Studio 2026 Copilot Chat
Visual Studio's native Manage Models dialog (Copilot Chat , model picker , Manage Models) currently ships provider slots for OpenAI, Anthropic, Google, xAI, Azure, and Foundry Local it does not (as of this writing) expose a bare "custom base URL" field the way VS Code Insiders does. The practical, documented workaround is to use the Azure OpenAI slot, which does accept an arbitrary resource endpoint:
- Model picker, Manage Modelsm Add Models, provider Azure.
- Resource Endpoint:
http://localhost:20128/v1
- API Key: the key copied from the 9Router dashboard
- Model ID: the provider-prefixed model you configured, e.g.
kr/claude-sonnet-4.5
- Display Name: anything recognizable, e.g. "9Router – Ridilabs"
- Save, then select it from the model picker in a chat request to confirm a response comes back.
- Check this dialog against your current VS build before relying on it Microsoft has been actively expanding BYOK/custom-endpoint support through 2026, and a native "OpenAI Compatible" slot may already exist by the time you read this.
Step 4: Verify and tune
- Inline completions still run through GitHub's own infrastructure and are not rerouted, BYOK only affects Chat/Agent requests.
- Output from a non-Copilot model bypasses GitHub's Responsible AI content filtering.
- Toggle RTK / token-saving filters and fallback order any time from Dashboard, Endpoint settings without touching the Visual Studio config again.