Skip to content
LUNAROUTEDocs

VS Code

VS Code has no CLI path: LunaRoute is a VS Code extension (LunaRoute.lunaroute) that adds the gateway as a model provider in Chat. You sign in through the browser and the key is kept in VS Code’s SecretStorage, so there is no config file to edit and no key to paste anywhere.

Install LunaRoute for VS Code from the Marketplace, or from the Command Palette (Ctrl+Shift+P, Cmd+Shift+P on macOS) run Extensions: Install Extensions and search for LunaRoute. The equivalent one-liner:

ext install LunaRoute.lunaroute

Need VS Code itself? Download it.

Open the Command Palette and run LunaRoute: Sign In, then approve the request in the browser. Wait for the “Connected to LunaRoute” notification — that means the credential is saved. Approval codes expire after 60 seconds; if yours did, run the command again.

The key goes into VS Code’s SecretStorage, backed by your operating system’s credential store — not into a settings file — and LunaRoute: Manage shows the current connection, opens the dashboard, and signs you out.

In Chat, choose a LunaRoute model in the model picker. Three things can leave that picker empty, in this order:

  1. chat.agentHost.byokModels.enabled — VS Code 1.141 ships it off, and extension-provided models are not offered while it is off. Enable it, then run LunaRoute: Refresh Models and reload the window.
  2. Hidden provider group — run Chat: Manage Language Models (or the gear in the model picker), find the LunaRoute group, and make its models visible.
  3. Stale catalog — LunaRoute: Refresh Models pulls /v1/models again. Newly enabled models do not appear until you do.
  • Agent mode needs a tool-calling model; a model without tool support answers in plain chat only.
  • LunaRoute’s hosted web, image and document tools are offered through MCP — enable the LunaRoute server under MCP SERVERS - INSTALLED, or run MCP: List Servers.
  • Chat’s utility models (chat.utilityModel, chat.utilitySmallModel) still default to Copilot models. Pick a LunaRoute model there too, or VS Code prompts for a GitHub sign-in it does not need.

Run LunaRoute: Manage and sign out (that clears the SecretStorage credential), then uninstall the extension if you want it gone. VS Code’s own settings were never touched.

In VS Code:

  1. Ask: Reply with “LunaRoute is connected.”
  2. Send a follow-up: What did I just ask you to say?
  3. Confirm both replies, and confirm both requests in LunaRoute Activity.
  • Zed — the other IDE setup.
  • Harness setup — the other harnesses, and the MCP server.
  • CLI — the terminal harnesses, configured in one command.