github / github/copilot-cli

Support bearerToken for BYO-K

Open
#4,300 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area:authentication area:models
Dominant language
Shell
Stars
11.2k
Forks
1.9k
Avg merge
14h 16m
Merged PRs (30d)
6

Description

Describe the feature or problem you'd like to solve

In corp context, key based auth is disabled per compliance requirements. BearedToken based auth or customized broker would be helpful to automate the CLI runs.

Proposed solution

Similar as what have been offered in GitHub Copilot SDK.
https://docs.github.com/en/copilot/how-tos/copilot-sdk/auth/byok#providerconfig-fields

field type description
bearerToken / bearer_token string Bearer token auth (takes precedence over apiKey)
bearerTokenProvider / bearer_token_provider callback Returns a bearer token on demand (takes precedence over apiKey and bearerToken)
Example prompts or workflows

No response

Additional context

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the existing CLI BYO-K configuration and apiKey authentication flow, then compare it with the linked GitHub Copilot SDK provider fields. Done means CLI runs can authenticate with bearerToken or bearerTokenProvider, with those options taking precedence over apiKey.

Written by the indexing model from the issue text.

Assessment

Tech stack
shell
Domain
authentication, cli
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.