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:
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:
- Detect or configure the GitHub Enterprise hostname.
- Associate credentials with their hostname.
- Query the tenant-specific Copilot quota endpoint.
- Display the live quota when available.
- Optionally apply a configurable 1.10 data-residency multiplier to estimated credits only.
- Preserve existing
github.com behavior.
Related to #1199, but this request is specifically about GHE.com hostname support and data-residency pricing.
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:
GitHub uses a tenant-specific API host for these environments:
In my case, CodeBurn detects local Copilot usage correctly, but live quota lookup fails with:
The current implementation hardcodes:
and does not retain the hostname associated with credentials read from
hosts.json.Proposal
Make Copilot quota lookup hostname-aware:
api.github.combehavior forgithub.com{hostname}.ghe.com, use the corresponding tenant API host:https://api.{hostname}.ghe.com/copilot_internal/userapi.github.comData 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:
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
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:github.combehavior.Related to #1199, but this request is specifically about GHE.com hostname support and data-residency pricing.