Agent guide · rapid-mlx 0.16.2 · ← Back to README

GitHub Copilot (CLI)

GitHub Copilot's CLI supports BYOK (Bring Your Own Key) — you point it at any OpenAI-compatible base URL via env vars, and the CLI routes chat requests through your custom provider instead of GitHub's backend. rapid-mlx is that provider.

Quick start

Needs: The current standalone Copilot CLI; start the server before sending requests (rapid-mlx serve qwen3.5-4b-4bit).

$ export COPILOT_PROVIDER_TYPE=openai COPILOT_PROVIDER_BASE_URL=http://localhost:8000/v1
$ export COPILOT_MODEL=qwen3.5-4b-4bit COPILOT_OFFLINE=true
$ copilot

Choose a task that uses a tool, such as listing a directory. GitHub's current BYOK docs allow an unauthenticated local endpoint and support offline mode. There is no rapid-mlx agents profile for Copilot.

Wire: /v1/chat/completions · Setup: env vars COPILOT_PROVIDER_BASE_URL / COPILOT_PROVIDER_API_KEY / COPILOT_MODEL / COPILOT_PROVIDER_TYPE=openai · Matrix cell: ✅ ✅ XFAIL(arch) ✅ (wire-smoke only — real CLI drive deferred; see gotcha below).

Install

$ npm install -g @github/copilot
$ copilot --version

Config

Per GitHub's BYOK docs (docs.github.com), the env vars are:

$ export COPILOT_PROVIDER_TYPE=openai
$ export COPILOT_PROVIDER_BASE_URL=http://localhost:8000/v1
$ export COPILOT_MODEL=qwen3.5-4b-4bit
$ export COPILOT_OFFLINE=true

Set COPILOT_PROVIDER_API_KEY only if you started Rapid-MLX with an API key. The model must support streaming and tool calls. GitHub recommends at least a 128k context window for best results.

Run

$ rapid-mlx serve qwen3.5-4b-4bit
$ copilot

Gotchas

Empirical

The copilot row of the integration matrix is ✅ on Qwen 3.6, Gemma 4, and gpt-oss (wire-smoke); DeepSeek R1-Distill XFAIL(arch). Source of truth for this page: TestCopilot + BYOK docs at docs.github.com.

See also