MikhbarMIKHBAR
Artificial Intelligence

GitHub Adds BYOK Support to Copilot Usage API

The Copilot usage metrics API now explicitly tracks bring your own key usage and enterprise custom models, allowing developers and administrators to separate them from standard Copilot-hosted model data.

GitHub Adds BYOK Support to Copilot Usage API

API Updates for Bring Your Own Key and Custom Models

GitHub has rolled out updates to the Copilot usage metrics API, introducing explicit tracking for bring your own key (BYOK) usage across GitHub Copilot. Previously, BYOK usage blended into standard Copilot-hosted totals because local and custom models frequently shared names with native Copilot models. Developers can find comprehensive documentation and technical details by reviewing the Copilot usage metrics API documentation.

The latest updates cover two distinct kinds of BYOK configurations: local BYOK and enterprise custom models. These reporting additions help organizations maintain precise oversight across different deployment strategies, operating at both user and aggregate levels for 1-day and 28-day reporting windows. More updates can be tracked through the official GitHub Changelog.

Understanding Local BYOK and Client Configurations

Local BYOK is configured directly by developers within their client applications. Requests route from the Copilot CLI or the GitHub Copilot app straight to the developer's chosen provider key or local model. This setup accommodates local models served by tools such as Ollama, Foundry Local, LM Studio, and llama-server.

New metrics for local BYOK include used_local_byok, which tracks whether a user executed at least one local BYOK request in the Copilot CLI or app on a given day. Additionally, totals_by_local_byok captures session, request, prompt, and token counts broken down by byok_kind and surface type. Aggregate reports also feature distinct user counts for daily, weekly, and monthly activity.

Enterprise Custom Models and Server-Side Tracking

Enterprise custom models are configured by administrators directly within GitHub settings, routing requests through GitHub to the designated provider. GitHub observes these requests on the server side, introducing the is_custom_enterprise_model boolean field to every totals_by_client[].totals_by_model[] entry.

Because server-side observation captures these calls, the is_custom_enterprise_model field covers every client, including integrated development environments. When a model is utilized both as a standard Copilot-hosted model and as a custom model, the system lists it as two separate entries to keep counts distinct.

Benefits for Governance and Spend Analysis

The introduction of these dedicated fields allows enterprises to better govern their AI usage by verifying that requests sent to personal provider keys, local models, or custom enterprise models align with internal policies. Furthermore, organizations can accurately separate Copilot-hosted consumption from usage billed by independent providers or executed on free local hardware.

Administrators gain a unified view of AI adoption across all tools, regardless of which underlying model or provider developers choose to utilize. Teams can also group users by their BYOK or custom model patterns to compare efficiency against standard Copilot usage metrics without disrupting existing totals.

Limitations, Access Requirements, and Availability

While enterprise custom model counts benefit from server-side observation, local BYOK fields depend on client telemetry and can undercount if telemetry is disabled. Certain local providers also omit token usage reporting, which can affect token count accuracy. Furthermore, custom model names undergo standard normalization, rendering unrecognized names as unknown, and historical report days prior to this release do not include backfilled data for is_custom_enterprise_model.

Access to these updated metrics is restricted to enterprise owners, enterprise billing managers, organization owners, and users assigned custom roles granting the View Copilot Metrics permission. Organizations must also have the Copilot usage metrics policy enabled to view the reporting data.

Sources

Continue chronologically

Related entity coverage