觉
AI觉醒星球
Awakening is here
Knowledge File / AI小生意项目库
2026-10-24 1 浏览 免费阅读

Copilot 用量指标 API 新增 OpenCode 等工具的使用统计

GitHub Copilot 用量指标 API 新增 totals_by_client 数组,可统计 OpenCode、Claude Code、Codex、Zed 等客户端发起的模型请求、会话和 token 用量,并区分模型选择模式。

SOURCE / AI小生意项目库 MIN / 9 ACCESS / 免费阅读 POST / 2026-10-24 07:42:03

原贴

查看原文
作者:Allison 来源站点:github.blog 原贴时间:

原文

The 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. Each totals_by_client entry represents one client and includes: 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 . request_count : The number of successful model requests from the client. session_count : The number of distinct sessions from the client. token_usage : Prompt tokens, output tokens, and average tokens per request. 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 . More 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. This is different from 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. 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. 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. 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 .

中文翻译

Copilot 用量指标 API 现在会报告开发者通过更多与 Copilot 配合使用的工具所产生的模型用量,包括 OpenCode 等此前未能在你的报告中捕获的工具。新的 totals_by_client 数组可在企业、组织、企业用户和组织用户的 1 天与 28 天报告中获取。

每个 totals_by_client 条目代表一个客户端,并包括:

  • client:发送请求的工具,例如 opencode、claude_code、codex、zed、copilot_cli、github_app、cloud_agent、code_review、vscode 或 jetbrains。无法识别的客户端会归入 other。
  • request_count:来自该客户端的成功模型请求数。
  • session_count:来自该客户端的不同会话数。
  • token_usage:提示 token、输出 token 以及每次请求的平均 token。
  • totals_by_model:按模型拆分的相同请求与 token 指标,并带有一个 model_selection_mode,显示模型是直接请求(user_selected)、由 auto 选择(auto),还是由产品选择(product_selected)。尚未单独报告的选择模式会显示为 other,无法标准化的值会显示为 unknown。

现在更多开发者将 Copilot 用作 IDE 之外工具背后的模型提供方。由于这些工具通常不发送编辑器遥测,它们的用量在 totals_by_ide 中缺失,难以核算。在服务端统计请求填补了这一缺口,因此你可以看到哪些工具驱动了 Copilot 用量,比较它们之间的请求与 token 量,并基于真实用量做出工具支持与治理决策。

这与 agent app activity 不同,后者统计 Claude 和 Codex 等 agent 应用在 GitHub 上启动的任务。totals_by_client 衡量的是来自任何使用 Copilot 的工具的模型流量,即请求与 token。

范围:企业、组织、企业用户和组织用户报告,均有 1 天和 28 天版本。在聚合的 28 天报告中,totals_by_client 会出现在每个 day_totals 条目中。

访问:企业所有者和账单管理者、组织所有者,以及拥有授予 View Copilot Metrics 权限的自定义组织或企业角色的任何人。必须启用 Copilot 用量指标策略。

Copilot 代码审查和 Copilot 云代理:来自这些客户端的请求会报告为 product_selected,因为产品会选择模型。Copilot 代码审查模型会报告为 unknown。

核心信息

GitHub Copilot 用量指标 API 新增 totals_by_client 数组,可统计 OpenCode、Claude Code、Codex、Zed 等客户端发起的模型请求、会话和 token 用量,并区分模型选择模式。

  • GitHub Copilot 用量指标 API 新增 totals_by_client 数组,可统计 OpenCode、Claude Code、Codex、Zed 等客户端发起的模型请求、会话和 token 用量,并区分模型选择模式。
  • 原贴提到:The Copilot usage metrics API now reports model usage from more of the t
  • 来源:github.blog

详细解读

这是什么信号

GitHub 把 Copilot 的用量统计从 IDE 遥测扩展到服务端模型流量:新增 totals_by_client,让企业、组织及对应层级用户报表能看到 OpenCode、Claude Code、Codex、Zed、Copilot CLI、GitHub App、Cloud Agent、Code Review、VS Code、JetBrains 等客户端发起的请求、会话和 token。关键变化不是多了一个字段,而是把“谁在调用 Copilot 模型”从 IDE 内扩展到 IDE 外,并用服务端计数补齐工具不发送编辑器遥测造成的盲区。

为什么重要

当 Copilot 作为模型提供方被更多外部工具调用时,仅看 totals_by_ide 会低估真实使用,也无法解释请求和 token 从何而来。totals_by_client 让平台团队、DevEx、FinOps 和安全治理可以把用量按工具拆开,比较请求量、会话量和 token 消耗,并观察模型选择模式(user_selected、auto、product_selected)。这对成本分摊、工具准入、模型策略和采用率分析都有直接价值。

对谁有价值

企业所有者、账单管理者、组织所有者,以及拥有 View Copilot Metrics 权限的自定义角色最直接受益。平台工程和开发者体验团队可以用它判断哪些工具真正驱动 Copilot 使用;财务和 FinOps 可以把 token 与请求量对应到工具和团队;安全与治理团队可以据此制定工具白名单、审批和监控策略。

可以怎么行动

先确认 Copilot 用量指标策略已启用,并检查 1 天和 28 天报表中的 totals_by_client 是否出现预期客户端。然后把客户端列表与内部工具准入清单对照,识别 other 和 unknown 的来源;对 OpenCode、Claude Code、Codex 等非 IDE 工具建立单独的使用与成本观察口径。接着用 totals_by_model 和 model_selection_mode 判断模型是用户直选、自动选择还是产品选择,避免把产品选择造成的消耗误归因给用户。最后把请求量、会话量和 token 三个指标结合看,不要只用请求数判断工具价值。

风险与限制

这个指标衡量的是服务端模型流量,不等同于完整开发者行为或 IDE 遥测;无法识别的客户端会归入 other,无法标准化的值会显示为 unknown,可能影响归因精度。它只覆盖企业、组织、企业用户和组织用户报表,并且需要相应权限与策略开启。Copilot 代码审查和云代理的请求会因产品选择模型而显示 product_selected,代码审查模型还会显示 unknown,因此不能简单把 product_selected 当作用户主动选择。把该数据用于考核或成本分摊前,应先定义客户端归类、模型选择模式解释和异常值处理规则。

信息差价值

这条内容的真正价值,不只是“有人发布了一个新功能”,而是它揭示了 github.blog 背后的产品方向、工作流变化或竞争信号。对 OPC 来说,这种信息可以转化成持续追踪的栏目选题。

如果把《Copilot 用量指标 API 新增 OpenCode 等工具的使用统计》放到你的内容系统里,它最大的价值在于帮助读者更快看懂“为什么值得关注”,而不是只看到一条碎片化动态。

参考来源

AI SUMMARY

这篇文章回答了什么

Copilot 用量指标 API 新增 OpenCode 等工具的使用统计主要讲什么?

GitHub Copilot 用量指标 API 新增 totals_by_client 数组,可统计 OpenCode、Claude Code、Codex、Zed 等客户端发起的模型请求、会话和 token 用量,并区分模型选择模式。

这篇文章最值得关注的要点是什么?

GitHub Copilot 用量指标 API 新增 totals_by_client 数组,可统计 OpenCode、Claude Code、Codex、Zed 等客户端发起的模型请求、会话和 token 用量,并区分模型选择模式。;原贴提到:The Copilot usage metrics API now reports model usage from more of the t;来源:github.blog

这篇文章和哪些AI专题相关?

它适合放在AI副业、AI工具、Agent工作流专题里阅读。 关联原因:这篇内容命中「项目、小生意、变现」等主题信号。;这篇内容命中「工具、模型、Claude」等主题信号。;这篇内容命中「Claude Code」等主题信号。

阅读这篇文章建议先理解哪些关键词?

建议先理解AI工具、工具、自动化、模型、Cursor这些关键词,再结合正文判断工具、机会或风险是否值得进入自己的工作流。

上一篇 已经是本栏目第一篇
下一篇 在 Teams 里用 GitHub Copilot 把通知直接变成代码
北竹游乐场 免费玩小游戏 免费玩