Case study · September 20, 2026

How to connect Reality Router to VS Code

VS Code's built-in chat takes a custom endpoint — no GitHub account, no Copilot plan, no extension. Point it at Reality Router and every chat and agent-mode call routes across your own model pool.

Copilot plan needed
None
Extensions to install
Zero
Setup time
2 min

VS Code's own chat sidebar accepts a custom OpenAI-compatible endpoint. No GitHub account, no Copilot subscription, no extension — point it at Reality Router and chat, agent mode and the editor's own AI tasks all route across your model pool.

Most people assume the chat panel in VS Code is Copilot, and Copilot means a subscription. It isn't, and it doesn't. Recent VS Code ships a Custom Endpoint model provider in the box: you give it a base URL, a key and a model id, and the built-in chat uses it like any other model. Point that at Reality Router and:

  • Every chat and agent-mode call routes per request — RealitySignal calibrated probabilities pick the model per step, so boilerplate goes cheap and hard turns go to something serious.
  • VS Code calls the router from your machine, not from a cloud service, so a router on localhost works with no tunnel and no exposure.
  • Full receipts — every request lands in your dashboard with model, tokens, cost and latency.
  • Same editor. Same chat panel, same agent mode, same keybindings.

Here's the whole setup.


Before you start: what routes, what doesn't

  • ✅ Chat (ask and edit) routes through RR
  • ✅ Agent mode, including tool calls — file edits, terminal commands, the lot
  • ⏸ Inline completions stay on GitHub's models, exactly as Cursor's Tab stays on Cursor's

That's the same split as every other IDE: the expensive part is the agent, and that's the part RR routes.

1. Add Reality Router as a custom endpoint (2 minutes)

Three things in this flow are easy to trip over, so follow the order.

First, trust the workspace. If VS Code opened your folder in Restricted Mode, models are unavailable entirely. Trust it before anything else.

Then use the Command Palette, not the model picker. The picker in the chat box offers only Sign in to use Copilot. That is not the way in.

  • Command Palette → Chat: Manage Language Models
  • Add Models → Custom Endpoint
  • Give the group a name (Reality Router), enter rr-local as the API key, and choose Chat Completions as the API type

Then fill in the URL, which that flow never asks for.

  • Command Palette → Chat: Open Language Models (JSON)
  • Complete the entry:
[
  {
    "name": "Reality Router",
    "vendor": "customendpoint",
    "apiKey": "${input:chat.lm.secret.…}",
    "apiType": "chat-completions",
    "models": [
      {
        "id": "auto",
        "name": "Reality Router (auto)",
        "url": "http://localhost:8000/v1",
        "toolCalling": true,
        "vision": true,
        "maxInputTokens": 128000,
        "maxOutputTokens": 16000
      }
    ]
  }
]

Leave the apiKey line exactly as VS Code wrote it — it points at the key in VS Code's own secret store rather than holding it. The url is the /v1 base; VS Code appends /chat/completions itself. If RR runs on another machine, swap localhost for that host.

id is the model the router sees. auto lets RR choose per call, which is what you want; use any id from reality-router models to pin one instead.

2. Pick the model (10 seconds)

Open the chat panel, click the model dropdown, choose Reality Router (auto).

3. Verify it worked (20 seconds)

Ask the chat anything trivial:

what does this repo do?

Then open the RR dashboard at http://localhost:8000/metrics/dashboard. Your call appears in the Agent Activity table as GitHubCopilotChat/<version> — that's the extension id VS Code's chat ships under, even with no Copilot plan involved.

What tool calls look like

Agent mode is the real test, because it exercises tool calling in both directions. Ask it to create a file:

Create a file called rr-test.txt containing the words: routed via RR

VS Code sends its tool definitions, the routed model calls one, VS Code executes it and sends the result back. In our own run, that single task was spread across three different models — the reasoning step, the tool call and the summary each went somewhere different, and the file landed on disk 35 seconds later.

That's the part worth watching in the dashboard: one task, several models, one bill.

Why bother

VS Code is the most-installed editor in the world, and its chat panel is the one part most people assume they have to pay a subscription for. You don't. You need a model provider, and the router is a model provider that happens to choose between all of yours.

  • No plan, no seat, no per-user pricing. Your provider keys, your models, your spend.
  • Per-call model choice. Cheap models handle the boring 80%, expensive ones fire when they help.
  • Cost becomes visible. Every agent-mode session shows up per request, in real time, instead of as a line item at the end of the month.
  • It's the same editor. Nothing about your workflow changes.

→ realityrouter.dev


Reality Router is open source and self-hosted. Setup verified with VS Code 1.138 against a running Reality Router, September 2026.