Skip to content

GitHub Copilot

The login-with-copilot command connects the Cosine CLI to your GitHub Copilot subscription. After you sign in, Copilot-backed models appear in the model picker and future requests can be billed through your Copilot account instead of your Cosine account.

You need a GitHub Copilot Business or Enterprise license for this login method.

If your account does not have the required Copilot entitlement, the login may complete but Copilot-backed models will not become available in the CLI.

After you log in with GitHub Copilot, you can:

  • select GitHub Copilot models from the model picker
  • run one-shot prompts with a Copilot-backed model
  • use Copilot-backed models inside the interactive CLI

This is separate from:

  • cos login for your Cosine account
  • cos login-with-chatgpt for ChatGPT-backed models

Run:

Terminal window
cos login-with-copilot

The CLI starts GitHub’s device authorization flow and shows:

  1. a verification URL
  2. a short user code
  3. a browser window, if one can be opened automatically

When the login starts:

  1. open the GitHub verification page shown in the terminal
  2. sign in to GitHub, if needed
  3. enter the device code
  4. approve access for the app
  5. return to the terminal and wait for confirmation

You can also prevent the browser from opening automatically:

Terminal window
cos login-with-copilot --no-browser

This is useful on remote machines, inside SSH sessions, or when you want to copy the URL into another browser manually.

When the flow succeeds, the CLI:

  • stores your Copilot authentication locally
  • marks Copilot auth as enabled in your CLI config
  • makes Copilot-backed models available in the model picker

Once logged in, you can start the CLI normally and choose a Copilot model from the model selector, or pass one directly:

Terminal window
cos start --model copilot-claude-sonnet-4.6

After login, Copilot-backed models appear under the GitHub Copilot provider in the model picker.

Common workflow:

  1. run cos start
  2. open the model picker
  3. choose a model under GitHub Copilot
  4. continue working normally

You can also use them in non-interactive mode:

Terminal window
cos start --model copilot-claude-sonnet-4.6 --prompt "Explain the authentication flow in this repository"

If you see an error like:

no Copilot tokens found; run 'cos login-with-copilot'

run the login command again:

Terminal window
cos login-with-copilot

Use:

Terminal window
cos login-with-copilot --no-browser

Then open the printed URL manually and enter the displayed code.

A model appears in another tool but not in Cosine

Section titled “A model appears in another tool but not in Cosine”

Model availability depends on the GitHub account, Copilot entitlement, and the authentication path GitHub accepts for that session. If a model is rejected:

  1. run cos login-with-copilot again
  2. retry the model
  3. confirm the GitHub account you approved has Copilot access for that model