{"slug": "usage-metrics-api-adds-usage-from-tools-like-opencode", "title": "Usage metrics API adds usage from tools like OpenCode", "summary": "GitHub's Copilot usage metrics API now reports model usage from tools outside the IDE, including OpenCode, Claude Code, Codex, Zed, Copilot CLI, the GitHub app, cloud agent, code review, VS Code and JetBrains, through a new `totals_by_client` array in the enterprise, organization, enterprise-user and organization-user 1-day and 28-day reports. Each entry carries `request_count`, `session_count`, `token_usage` and a `totals_by_model` breakdown with a `model_selection_mode` of `user_selected`, `auto` or `product_selected`, closing a gap left by tools that send no editor telemetry and were missing from `totals_by_ide`. GitHub said the change is additive, existing fields are unchanged, and `totals_by_client` is an empty array when there is no usage to report; access requires the `View Copilot Metrics` permission and the Copilot usage metrics policy enabled.", "body_md": "# Usage metrics API adds usage from tools like OpenCode\n\nThe Copilot usage metrics API now reports model usage from more of the tools your developers use with Copilot, including tools like OpenCode that weren’t previously captured in your reports. A new `totals_by_client` array is available in the enterprise, organization, enterprise-user, and organization-user 1-day and 28-day reports.\n\n### [What’s new](#whats-new)\n\nEach `totals_by_client` entry represents one client and includes:\n\n- **`client`** : The tool that sent the requests, such as` opencode` ,`claude_code` ,`codex` ,`zed` ,`copilot_cli` ,`github_app` ,`cloud_agent` ,`code_review` ,`vscode` , or`jetbrains` . Unrecognized clients are grouped under`other` .\n- **`request_count`** : The number of successful model requests from the client.\n- **`session_count`** : The number of distinct sessions from the client.\n- **`token_usage`** : Prompt tokens, output tokens, and average tokens per request.\n- **`totals_by_model`** : The same request and token metrics broken down by model, with a`model_selection_mode` that shows whether the model was requested directly (`user_selected` ), chosen by auto (`auto` ), or chosen by the product (`product_selected` ). Selection modes that aren’t reported individually yet appear as`other` , and values that can’t be normalized appear as`unknown` .\n\n### [Why this matters](#why-this-matters)\n\nMore developers now use Copilot as the model provider behind tools outside the IDE. Because those tools often don’t send editor telemetry, their usage was missing from `totals_by_ide` and hard to account for. Counting requests on the server closes that gap, so you can see which tools drive Copilot usage, compare request and token volume across them, and base tool support and governance decisions on real usage.\n\nThis is different from [agent app activity](https://github.blog/changelog/2026-08-06-copilot-usage-metrics-api-adds-agent-app-activity/), which counts jobs started by agent apps such as Claude and Codex on GitHub. `totals_by_client` measures model traffic, meaning requests and tokens, from any tool that uses Copilot.\n\n### [Important notes](#important-notes)\n\n- **Scope:** Enterprise, organization, enterprise-user, and organization-user reports, in both 1-day and 28-day versions. In the aggregated 28-day reports,`totals_by_client` appears in each`day_totals` entry.\n- **Access:** Available to enterprise owners and billing managers, organization owners, and anyone with a custom organization or enterprise role that grants the`View Copilot Metrics` permission. The Copilot usage metrics policy must be enabled.\n- **Copilot code review and Copilot cloud agent:** Requests from these clients report`product_selected` because the product chooses the model. Copilot code review models are reported as`unknown` .\n- **Request counts:**`request_count` counts model calls, not prompts. One prompt can trigger several model calls, so don’t compare this field directly with prompt or interaction counts.\n- **Client identification:** Clients are identified by the integration ID they send with each request. Treat`client` as a best-effort grouping, not a verified identity.\n- **Backward compatibility:** This change is additive. Existing fields are unchanged, and`totals_by_client` is an empty array when there is no usage to report.\n\nVisit the [Copilot usage metrics API documentation](https://docs.github.com/rest/copilot/copilot-usage-metrics) to get started.", "url": "https://wpnews.pro/news/usage-metrics-api-adds-usage-from-tools-like-opencode", "canonical_source": "https://github.blog/changelog/2026-10-23-usage-metrics-api-adds-usage-from-tools-like-opencode", "published_at": "2026-10-23 23:42:03+00:00", "updated_at": "2026-10-24 00:13:30.611384+00:00", "lang": "en", "topics": ["ai-tools", "developer-tools", "ai-products", "mlops"], "entities": ["GitHub", "Copilot", "OpenCode", "Claude Code", "Codex", "Zed", "VS Code", "JetBrains"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/usage-metrics-api-adds-usage-from-tools-like-opencode", "markdown": "https://wpnews.pro/news/usage-metrics-api-adds-usage-from-tools-like-opencode.md", "text": "https://wpnews.pro/news/usage-metrics-api-adds-usage-from-tools-like-opencode.txt", "jsonld": "https://wpnews.pro/news/usage-metrics-api-adds-usage-from-tools-like-opencode.jsonld"}}