Flatrouter

GitHub Copilot Setup

Point GitHub Copilot Chat at Flatrouter with the OAI Compatible Provider extension, and use Claude, GPT, Gemini and more.

With the VS Code extension OAI Compatible Provider for Copilot, you can send GitHub Copilot Chat through Flatrouter and use Claude, GPT-5.6, Gemini and other models in the editor you already know.

The extension needs a GitHub Copilot Individual subscription. Copilot Business and Enterprise are not supported yet. If you do not have a Copilot subscription, use Claude Code, Codex CLI or Cherry Studio instead.

Requirements

  • A Flatrouter account and an API key (get one here)
  • VS Code installed
  • A valid GitHub Copilot Individual subscription (Business / Enterprise are not supported)

Setup

Step 1: install the extension

In the VS Code Marketplace, search for OAI Compatible Provider for Copilot (author: Johnny Zhao) and click Install.

Step 2: open the configuration UI

Open the command palette with Cmd+Shift+P (macOS) / Ctrl+Shift+P (Windows/Linux) and run:

OAICopilot: Open Configuration UI

Step 3: fill in global configuration

In Global Configuration, set the following, then click Save Global Configuration:

FieldValue
Global Base URLhttps://api.flatrouter.com/v1
Global API KeyYour Flatrouter API key

Step 4: add a provider

In Provider Management, click Add Provider, fill in the new row, then click Save:

FieldValue
Provider IDflatrouter
Base URLhttps://api.flatrouter.com
API KeyYour Flatrouter API key
API ModeAnthropic

Step 5: add models

In Model Management, click Add Model, fill in the fields, then click Save Model:

FieldValue
Provider IDflatrouter
Model IDA model name such as anthropic/claude-opus-4.5

Repeat to add more models. Copy IDs from the Flatrouter model catalog.

Step 6: pick the model in chat

Open the Copilot Chat panel, click the model picker, turn Auto off, and select the Flatrouter model you just added under Other Models.

If it does not show up, click Manage Models… to open the model list.

Step 7: confirm and start chatting

In the Language Models panel, added Flatrouter models appear under the OAI Compatible group. Select the model in the chat box and start talking.

See the model catalog for current recommendations.

FAQ

Q: I cannot find the extension in the Marketplace

Search for the full name OAI Compatible Provider for Copilot, or search for the author Johnny Zhao.

Q: The command palette has no OAICopilot: Open Configuration UI

Make sure the extension is installed and enabled. After install you may need to reload the VS Code window (Cmd+Shift+P → Reload Window).

Q: The model I added does not show up in chat

Turn Auto off in the model picker and look under Other Models, or click Manage Models… to check that the model was saved.

Q: I get "Invalid API Key" or the request fails

Check:

  1. Global Base URL is https://api.flatrouter.com/v1 (no trailing slash)
  2. The API key was copied in full from the Flatrouter console, with no extra spaces
  3. The provider's API Mode is set to Anthropic

Q: Tab completion still uses Copilot's official models

That is expected. OAI Compatible Provider currently only affects Copilot Chat. Tab completion stays under GitHub Copilot's official control.

Q: I am on Copilot Business / Enterprise. Can I use this?

Not yet. The extension only works for GitHub Copilot Individual. Business and Enterprise need a later release.

On this page