Custom workspace-level billing reference for GitHub Copilot AI Usage #206110
Replies: 2 comments
|
💬 Your Product Feedback Has Been Submitted 🎉 Thank you for taking the time to share your insights with us! Your feedback is invaluable as we build a better GitHub experience for all our users. Here's what you can expect moving forward ⏩
Where to look to see what's shipping 👀
What you can do in the meantime 💻
As a member of the GitHub community, your participation is essential. While we can't promise that every suggestion will be implemented, we want to emphasize that your feedback is instrumental in guiding our decisions and priorities. Thank you once again for your contribution to making GitHub even better! We're grateful for your ongoing support and collaboration in shaping the future of our platform. ⭐ |
|
Worth spelling out why Enterprise Cost Centers cannot cover this even as a partial workaround, because it strengthens the case here rather than weakening it. For AI credits, GitHub allocates to the cost center containing the user who triggered the usage, or failing that the organisation that granted that user's Copilot license. The precedence chain is direct user assignment, then enterprise team, then organisation. There is no repository, workspace or project dimension anywhere in that chain, so a cost center can only ever slice spend the same way user-level reporting already does. The closest thing available today is assigning enterprise teams to cost centers, since team membership stays current automatically as people join and leave. That gets you customer-level attribution when a developer is dedicated to one customer for a whole period, and it falls apart in exactly the scenario described here, a developer touching three projects in a day. One detail that makes that workaround worse than it first looks: cost center membership changes are not retroactive. Adding a member charges future usage to the cost center, removing one sends future usage back to the enterprise, and usage already booked cannot be reallocated. Project-based chargeback would mean moving people between teams before the work happens rather than reconciling afterwards, which is not realistic. That seems like a reasonably strong argument that the dimension has to be attached at the usage event, as proposed. More on how the allocation and precedence rules resolve: https://olumia.dev/blog/github-copilot-cost-centers |
Uh oh!
There was an error while loading. Please reload this page.
🏷️ Discussion Type
Product Feedback
💬 Feature/Topic Area
Copilot in GitHub
Body
Custom workspace-level billing reference for GitHub Copilot AI Usage
Summary
Allow GitHub Copilot clients to attach a configurable billing reference to AI usage based on the active workspace, project, repository, or solution.
The billing reference should be exposed as an additional dimension in AI Usage reporting and APIs, alongside existing dimensions such as user, model, and date.
The mechanism should work independently of where the source code is hosted and should therefore support GitHub, Azure DevOps, GitLab, internal Git servers, other source-control systems, and purely local projects.
For GitHub Enterprise Cloud customers, the billing reference could optionally be mapped to an existing GitHub Enterprise Cost Center.
Problem
In enterprise development environments, developers often work on multiple products, customer projects, organisational units, or internal initiatives during the same billing period.
User-level AI usage does not provide enough information to answer an important cost-accounting question:
A single developer may work on several projects during the same day. As a result, attributing all AI usage only to the user makes project-based cost accounting and chargeback difficult.
This affects use cases such as:
Repository-based reporting alone would also not fully solve the problem because source code is not necessarily hosted on GitHub.
Developers may use GitHub Copilot in Visual Studio Code, Visual Studio, JetBrains IDEs, or other supported development environments while working with code hosted on:
The cost-allocation context should therefore originate from the local development workspace or project context, not from the source-code hosting platform.
Proposed solution
Allow a workspace, repository, solution, or project to define a custom billing reference that the GitHub Copilot client attaches to AI usage events.
For example:
The billing reference should be an arbitrary organisation-defined identifier. GitHub should not prescribe a specific format or hierarchy.
For example, an organisation might use a convention such as:
but it could equally use a project number, numeric cost center, ERP identifier, GitHub Enterprise Cost Center ID, or another internal reference.
Expected behaviour
When a developer sends a request to GitHub Copilot:
Conceptually:
AI Usage reporting
The billing reference should be available as a filter and grouping dimension in AI Usage.
For example:
A report could look like:
This would allow organisations to analyse AI consumption independently of individual developers.
For example, the AI Usage UI could provide:
Usage API
The billing reference should also be available through the relevant GitHub Billing or Copilot Usage APIs.
For example:
{ "date": "2026-08-29", "user": "developer-a", "model": "GPT-5", "billing_reference": "engineering_customer-a_machine-control", "ai_credits_used": 42.73 }This would allow organisations to integrate GitHub Copilot usage with existing:
Independent of source-code hosting
An important requirement is that the feature must not depend on the repository being hosted on GitHub.
For example:
All of these workspaces should be able to use the same billing-reference mechanism.
The GitHub Copilot client already operates in the local development environment and is therefore the appropriate place to determine this context.
IDE support
The feature should behave consistently across GitHub Copilot integrations, including:
The configuration should ideally be part of GitHub Copilot itself rather than being specific to one IDE.
Multiple repositories and workspaces
Development environments can contain multiple workspace folders or repositories.
Where possible, the billing reference should be determined based on the workspace, repository, solution, or project associated with the context used for the Copilot request.
For requests involving multiple billing references, GitHub could:
The exact behaviour could be controlled by organisation or enterprise policy.
Enterprise governance
For managed environments, administrators should optionally be able to control how billing references are used.
Possible controls include:
This would allow organisations to use the feature without losing governance over cost allocation.
Optional GitHub Enterprise Cost Center integration
The proposed billing reference should not require GitHub Enterprise Cloud or GitHub Enterprise Cost Centers.
It should work as a generic AI Usage dimension.
For GitHub Enterprise Cloud customers, however, GitHub could optionally support a mapping between a billing reference and an existing Enterprise Cost Center.
Conceptually:
This would allow the same mechanism to support both:
The Enterprise Cost Center integration should therefore be optional rather than a prerequisite.
Minimum viable implementation
The first version would not need to modify GitHub's actual billing allocation.
A useful minimum viable implementation would simply:
Conceptually:
Organisations could then implement their own chargeback and cost-allocation processes without requiring GitHub to implement the complete accounting workflow.
Why a billing reference instead of only repository reporting?
Repository-level AI Usage would already be useful, but it does not cover all enterprise scenarios.
A billing reference provides an additional abstraction layer:
Several repositories may belong to the same project:
The source-code hosting system also becomes irrelevant.
This makes billing references better suited to project controlling and chargeback than repository names alone.
Related requests
There are already related requests for improving Copilot usage attribution:
These requests address important parts of the same problem, particularly repository-level visibility.
This proposal extends the concept by introducing a custom workspace-level cost-allocation dimension that:
Business value
AI consumption is increasingly becoming a measurable engineering cost, similar to:
As AI adoption grows, engineering organisations need to answer not only:
but increasingly:
A custom billing-reference dimension in GitHub Copilot AI Usage would make this possible without coupling cost allocation to source-code hosting or requiring GitHub Enterprise Cost Centers.
All reactions