BYOK and enterprise custom models in the Copilot usage API
For centrally managed endpoints, GitHub added iscustomenterprisemodel, a boolean attribute nested inside the totalsbyclient[].totalsbymodel[] structure.
By Dillip Chowdary • Nov 10, 2026 • Source: GitHub Changelog
In this post
GitHub launched an update to the Copilot usage metrics API that surfaces bring your own key (BYOK) traffic across developer environments, as detailed in GitHub Changelog's report. The update isolates client-side BYOK activity and server-routed custom models from standard Copilot-hosted usage. Engineering leaders and workspace administrators can now view split metrics across 1-day and 28-day reporting windows at both the individual user and aggregate organization levels.
This breakdown covers telemetry changes for local runtimes such as Ollama and LM Studio, schema flags for custom enterprise models, and administrative permission prerequisites. The reporting structure gives engineering managers, platform teams, and billing administrators direct visibility into third-party key usage, local runtime adoption, and external provider spend across enterprise seats.
01Usage API metrics breakout and schema additions
The Copilot usage metrics API separates traffic into two primary categories: local BYOK and enterprise custom models. Local BYOK metrics capture traffic initiated directly from developer clients, including the Copilot CLI and GitHub Copilot app, out to self-hosted engines or private provider keys. The API introduces used_local_byok to track whether a developer made a local BYOK request on a given day, alongside totals_by_local_byok to report sessions, prompts, requests, and token volume.
Aggregate reports now supply active user counts across multiple calendar spans, specifically daily_active_local_byok_users, weekly_active_local_byok_users, and monthly_active_local_byok_users. For centrally managed endpoints, GitHub added is_custom_enterprise_model, a boolean attribute nested inside the totals_by_client[].totals_by_model[] structure. When this attribute returns true, the underlying prompt was routed through GitHub to a custom enterprise provider configured in organization settings.
GitHub tracks enterprise custom models server-side, ensuring coverage across integrated development environments and terminal clients. When a specific model identifier serves dual roles as both an official Copilot-hosted model and an enterprise custom deployment, the metrics endpoint separates the data into two distinct model entries.
02Telemetry visibility across local and enterprise models
Local and enterprise custom models previously shared model names with native Copilot endpoints, causing distinct infrastructure costs to blend into Copilot-hosted metrics. The updated API schema separates external provider volume from seats utilizing GitHub-hosted hardware, allowing platform owners to inspect usage against internal compliance rules without losing visibility into overall developer throughput.
| Metric Dimension | Before Update | After Update |
|---|---|---|
| BYOK Tracking | Blended with hosted totals | Dedicated totals_by_local_byok |
| Custom Enterprise Models | Grouped into standard models | Distinct entry via is_custom_enterprise_model |
| Client Visibility | Mixed client volume | Split by copilot_cli and copilot_app |
| Model Classification | Single aggregated count | Separate counts for shared model names |
| Local User Visibility | Standard active metrics | Daily, weekly, monthly active BYOK counts |

Because custom enterprise model requests route through GitHub infrastructure, their telemetry provides verified request and token counts across all IDEs. Teams can group developer populations by BYOK usage to evaluate productivity outcomes alongside baseline Copilot adoption, verifying external API consumption while isolating Copilot subscription value.
03Configuration workflow and client surface tracking
Advertisement
Tech Pulse Daily
Get tomorrow's pulse first
Join engineers who read Tech Pulse before stand-up. Free, weekday mornings.
Platform administrators configure enterprise custom models inside GitHub settings, establishing server-side routing that passes requests from developer clients directly through to the external provider. Developers configure local BYOK inside their client surfaces, targeting keys and local endpoints provided by runtimes such as Ollama, Foundry Local, LM Studio, or llama-server.
Telemetry reports categorize local activity using the surface field, distinguishing between copilot_cli and copilot_app. Requests are also classified by the byok_kind attribute into four distinct operational modes: local_managed, local_user, local_auto, and remote_user.
# Query enterprise Copilot usage metrics via the REST API
curl -X GET \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer $GITHUB_TOKEN" \
https://api.github.com/enterprises/$ENTERPRISE/copilot/usage# Query organization-level metrics for 28-day aggregate reports
curl -X GET \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer $GITHUB_TOKEN" \
https://api.github.com/orgs/$ORG/copilot/usage// Sample totals_by_client entry for custom models
{
"client": "vscode",
"totals_by_model": [
{
"name": "custom-endpoint",
"is_custom_enterprise_model": true,
"request_count": 1420,
"token_count": 845000
}
]
}04Boundary limits and reporting edge cases
The schema updates do not alter existing metric totals. Local BYOK activity remains a mathematical subset of totals_by_cli and totals_by_copilot_app, while custom enterprise traffic remains included within existing totals_by_client rollups.
Local BYOK telemetry operates strictly as a lower-bound estimate because it relies on client-side data transmission. If a developer disables client telemetry, those requests do not reach the reporting pipeline.
Furthermore, token calculations can undercount when local runtimes fail to emit usage metadata. Enterprise custom models do not suffer from client-side drops because GitHub records requests on its own servers.
Reporting days recorded prior to the release do not contain retroactive backfills for the is_custom_enterprise_model property. Custom model names follow standard normalization rules, causing unrecognized model strings to appear under the label unknown. Additionally, local BYOK metrics do not break down counts by individual model names.
05Enterprise access rules and administrative rollout
The updated usage endpoints are restricted to enterprise owners, enterprise billing managers, organization owners, and users holding custom administrative roles with the View Copilot Metrics permission. Organizations must also have the Copilot usage metrics policy enabled within their management console to access the data.
Once permissions are verified, administrative teams can ingest the payload into internal business intelligence pipelines to audit external LLM consumption. Monitoring the split between self-hosted runtimes and managed endpoints enables organizations to adjust seat quotas, monitor egress to unauthorized private keys, and confirm that external compute budgets align with actual developer adoption.
BYOK and enterprise custom models FAQ
Who has permission to view BYOK metrics in the Copilot usage API?
Access is granted to enterprise owners, enterprise billing managers, organization owners, and users with custom roles that include the View Copilot Metrics permission, provided the Copilot usage metrics policy is enabled.
Why are local BYOK token metrics considered a lower bound?
Local BYOK metrics rely on client-side telemetry, meaning requests go uncounted if telemetry is disabled, while some local model providers do not report token counts.
How does GitHub handle a model name used as both a Copilot-hosted and custom model?
The API outputs two separate entries for that model name so administrators can view custom model metrics independently from Copilot-hosted counts.
Does this API update change the existing total usage numbers?
No, existing totals remain unchanged because local BYOK is a subset of client totals and custom enterprise model usage was already included in totals_by_client.
Sources
Author
Dillip Chowdary
Writes Tech Bytes coverage of AI, engineering, and the tools that actually ship. Editor of Tech Pulse Daily.
Related on Tech Bytes
Advertisement