Repository navigation
Description
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.combehavior forgithub.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.combehavior.
Related to #1199, but this request is specifically about GHE.com hostname support and data-residency pricing.
Activity
fix(menubar): follow the credential's GitHub host for Copilot quota
merge: bring the localization branch up to origin/main
feat(menubar): translate the strings the two new menubar features added
feat(menubar): translate the strings the two new menubar features added
iamtoruk commentedon Sep 14, 2026
@jDegut, sorry this closed without a reply. Copilot Enterprise on a self-hosted GitHub with data residency is a real gap and it is on the list. It also happens to be the setup CodeBurn Teams is being built for, enterprise seats and subscriptions included, with nothing but aggregates leaving a machine. Would you tell us what you use today to see the team's spend and what it misses? https://codeburn.app/teams
jDegut commentedon Sep 15, 2026
@iamtoruk Thanks for the follow-up. One nuance on my side: I’m not really operating as a team today. I’m the only user on the subscription, and I’m primarily trying to understand and optimize my own Copilot usage.
I’m using GitHub Enterprise because I need the data residency restrictions. What I’m missing today is the ability to monitor that usage as a GitHub Copilot Enterprise account rather than as standard Copilot usage, and especially to configure the pricing multiplier introduced by data residency so that the spend statistics remain accurate.
So my use case is less about managing a team and more about getting a reliable view of my own usage and cost. Longer term, I’d like to use that experience to potentially share useful feedback or practices with others, but the first goal is simply to optimize my own setup.