Skip to content

Comments

Allow all plans to use client BYOK and add org-manageable kill switch#3870

Draft
Copilot wants to merge 2 commits intomainfrom
copilot/allow-client-byok-for-all-plans
Draft

Allow all plans to use client BYOK and add org-manageable kill switch#3870
Copilot wants to merge 2 commits intomainfrom
copilot/allow-client-byok-for-all-plans

Conversation

Copy link
Contributor

Copilot AI commented Feb 19, 2026

BYOK was gated to individual/internal users only. This removes the plan-type restriction and adds an InTune-manageable setting to let orgs disable BYOK.

Changes

  • isBYOKEnabled(): Removed (copilotToken.isInternal || copilotToken.isIndividual) check. All plans on dotcom now qualify. GHE restriction remains.
  • New setting github.copilot.chat.bringYourOwnKey.enabled: Defaults true, scope: "machine" so orgs can lock it via InTune/MDM policy. Checked early in isBYOKEnabled().
  • ConfigKey.BYOKEnabled: Registered as a simple boolean config.
  • BYOKContrib: Injects IConfigurationService and passes it through.
export function isBYOKEnabled(copilotToken, capiClientService, configurationService): boolean {
    if (isScenarioAutomation) return true;
    if (!configurationService.getConfig(ConfigKey.BYOKEnabled)) return false;
    return capiClientService.dotcomAPIURL === 'https://api.github.com';
}

🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

- Remove isIndividual/isInternal plan check in isBYOKEnabled() so all
  plans (including business/enterprise) can use BYOK
- Add github.copilot.chat.bringYourOwnKey.enabled setting (scope: machine)
  that can be organization-managed via InTune to disable BYOK
- Add ConfigKey.BYOKEnabled in configuration service
- Update byokContribution.ts to pass IConfigurationService
- Add unit tests for the updated isBYOKEnabled function

Co-authored-by: pierceboggan <1091304+pierceboggan@users.noreply.github.com>
Copilot AI changed the title [WIP] Allow all plans to use client BYOK and remove enterprise checks Allow all plans to use client BYOK and add org-manageable kill switch Feb 19, 2026
Copilot AI requested a review from pierceboggan February 19, 2026 21:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants