Docs · Guide

Copilot CLI on any model

GitHub Copilot CLI can run on model providers of your own (bring your own key), which needs no GitHub sign-in. magpie adds itself to Copilot CLI as one, so copilot can run on any model you have in magpie: DeepSeek, Kimi, GLM, Qwen, an OpenAI key, or a ChatGPT subscription, with no key pasted into Copilot.

Copilot CLI keeps its folder in ~/.copilot (or $COPILOT_HOME). Its own providers are in providers.json there (or $COPILOT_PROVIDERS_CONFIG). magpie adds a provider named magpie to that file, OpenAI-compatible, with the gateway’s address and a key of Copilot’s own, and adds magpie’s models beside it, each with its name, context window and output limit. Then it sets model in settings.json to magpie/<model>. The gateway translates each request for the model’s provider, tool calls and reasoning included.

Connect Copilot CLI

  1. Add providers in magpieIn the Providers tab, add an API key or sign in to a subscription.
  2. Pick a model on Copilot CLI’s rowIn the Agents tab, choose a model under magpie.
  3. Start copilotIt runs on that model. Copilot’s own /model lists magpie’s models too.
Terminal
magpie copilot deepseek/deepseek-v4-pro    # settings.json: magpie/deepseek/deepseek-v4-pro
magpie copilot                             # what Copilot CLI runs on now

The row also lists Copilot’s own models and auto, Copilot’s own choice, for when you want GitHub’s models back.

Effort

The row sets effortLevel, which Copilot saves beside the model: the model’s own levels, or low, medium, high and xhigh when Copilot’s list doesn’t name them. Copilot clears it when its own /model changes the model.

Terminal
magpie copilot effort high
magpie copilot effort default

Your providers.json

magpie owns only the provider named magpie and the models that name it. Your other providers, their models and any other key in the file stay where they are, and so does a key you add to magpie’s provider yourself. A providers.json that isn’t valid JSON is left alone, never written over. When magpie’s models change, magpie brings its entries up to date, and writes the file only when they would change.

Switch back

Pick one of Copilot’s own models on the row, or run magpie copilot default. That removes model from settings.json and takes magpie’s provider and models out of providers.json, leaving the rest.

FAQ

Do I need a GitHub Copilot subscription?

No. Copilot CLI’s own providers need no GitHub sign-in, so magpie’s models work without a Copilot plan.

Can Copilot CLI use my ChatGPT subscription?

Yes. Sign in to ChatGPT in magpie and pick a GPT model under magpie on Copilot CLI’s row. Copilot sends its requests to magpie, which uses the subscription.

Why does settings.json say magpie/deepseek/…?

Copilot names a model of one of its providers as provider/model, and magpie’s provider is called magpie. On the command line you can leave the magpie/ out.

Can I keep my own BYOK providers?

Yes. magpie only touches its own provider and models in providers.json; yours stay as they are.

More agents on the same models: Models in OpenCode, Models in Claude Code and Raycast on any model. Something fails? See Fixing common errors, or ask on Discord.