GitHub Copilot

Route GitHub Copilot through FluxRouter using the CLI environment variables or the VS Code Custom Endpoint provider.

GitHub Copilot can bring your own key and point at FluxRouter. The CLI is the cleanest path. VS Code is gated and limited. Read the limits carefully.

One-click with Flux Desktop

Flux Desktop can help you set up the Copilot CLI. The manual steps below show what it configures.

Copilot CLI (cleanest path)

Set three environment variables and run Copilot. OpenAI-compatible:

bash
export COPILOT_PROVIDER_BASE_URL="https://api.fluxrouter.ai/v1"
export COPILOT_PROVIDER_API_KEY="sk-YOUR-FLUX-KEY"
export COPILOT_MODEL="flux-auto"
copilot

The served model must support tool calling and streaming.

VS Code (Business or Enterprise only)

In the Copilot Chat model picker, choose "Manage Models", then add a Custom Endpoint provider. Pick the API type per model:

  • Chat Completions: base URL https://api.fluxrouter.ai/v1
  • Responses: base URL https://api.fluxrouter.ai/v1

Enter the base URL, your Flux key, and the model id flux-auto.

Important limits

  • Custom endpoints never apply to inline code completions. They only work in Copilot Chat and agent mode. Inline suggestions always use Copilot's own models.
  • VS Code BYOK is gated to Business and Enterprise plans, and an admin can disable the "Bring your own language model key" policy.
  • Usage through your custom endpoint is billed by FluxRouter, off your Copilot quota.
  • Use the separate "Custom Endpoint" provider, not the built-in named OpenAI provider, which does not document a custom base URL.

Test it

CLI: run copilot and send a prompt. VS Code: open Copilot Chat, pick your custom model, and send a message. A reply confirms the connection. Check your FluxRouter dashboard to see the request.