Skip to content

[Feature Request] Support Copilot Enterprise on custom *.ghe.com hosts #1286

Description

@jDegut

Motivation

CodeBurn currently assumes Copilot quota requests use github.com / api.github.com.

For GitHub Enterprise Cloud with data residency, Copilot can instead be tied to a dedicated hostname such as:

{hostname}.ghe.com

GitHub uses a tenant-specific API host for these environments:

https://api.{hostname}.ghe.com

In my case, CodeBurn detects local Copilot usage correctly, but live quota lookup fails with:

available: false
error: Temporarily unavailable.

The current implementation hardcodes:

https://api.github.com/copilot_internal/user

and does not retain the hostname associated with credentials read from hosts.json.

Proposal

Make Copilot quota lookup hostname-aware:

  • retain the hostname together with the discovered credential
  • keep the existing api.github.com behavior for github.com
  • for {hostname}.ghe.com, use the corresponding tenant API host:
    https://api.{hostname}.ghe.com/copilot_internal/user
  • optionally allow an explicit Copilot hostname override when automatic discovery is ambiguous
  • never send a GHE.com credential to api.github.com

Data residency pricing

GitHub also documents a 10% increase in AI Credit consumption when the enterprise enables the policy restricting Copilot to data-residency compliant models.

It would be useful to support a configurable option such as:

copilot credit multiplier = 1.10

This multiplier should apply only to locally estimated credits.

If GitHub provides an exact value such as total_nano_aiu, that value should remain authoritative and must not receive the multiplier again.

Current example

Copilot Enterprise
Host: {hostname}.ghe.com
Budget: 37,600 AI Credits
Reset day: 1

CodeBurn:
estimatedCredits: ~13,037
percentUsed: 34.7%

GitHub:
~96% used

The large discrepancy is not necessarily caused only by the 10% multiplier, but CodeBurn currently cannot retrieve the authoritative live quota from the GHE.com account.

Expected behavior

For Copilot Enterprise on {hostname}.ghe.com:

  1. Detect or configure the GitHub Enterprise hostname.
  2. Associate credentials with their hostname.
  3. Query the tenant-specific Copilot quota endpoint.
  4. Display the live quota when available.
  5. Optionally apply a configurable 1.10 data-residency multiplier to estimated credits only.
  6. Preserve existing github.com behavior.

Related to #1199, but this request is specifically about GHE.com hostname support and data-residency pricing.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions