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.
Requirement
Section titled “Requirement”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.
What this enables
Section titled “What this enables”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 loginfor your Cosine accountcos login-with-chatgptfor ChatGPT-backed models
Start the login flow
Section titled “Start the login flow”Run:
cos login-with-copilotThe CLI starts GitHub’s device authorization flow and shows:
- a verification URL
- a short user code
- a browser window, if one can be opened automatically
Device flow
Section titled “Device flow”When the login starts:
- open the GitHub verification page shown in the terminal
- sign in to GitHub, if needed
- enter the device code
- approve access for the app
- return to the terminal and wait for confirmation
You can also prevent the browser from opening automatically:
cos login-with-copilot --no-browserThis is useful on remote machines, inside SSH sessions, or when you want to copy the URL into another browser manually.
What happens after login
Section titled “What happens after login”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:
cos start --model copilot-claude-sonnet-4.6Using Copilot models
Section titled “Using Copilot models”After login, Copilot-backed models appear under the GitHub Copilot provider in the model picker.
Common workflow:
- run
cos start - open the model picker
- choose a model under GitHub Copilot
- continue working normally
You can also use them in non-interactive mode:
cos start --model copilot-claude-sonnet-4.6 --prompt "Explain the authentication flow in this repository"Troubleshooting
Section titled “Troubleshooting””no Copilot tokens found”
Section titled “”no Copilot tokens found””If you see an error like:
no Copilot tokens found; run 'cos login-with-copilot'run the login command again:
cos login-with-copilotThe browser does not open
Section titled “The browser does not open”Use:
cos login-with-copilot --no-browserThen 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:
- run
cos login-with-copilotagain - retry the model
- confirm the GitHub account you approved has Copilot access for that model