Copilot usage metrics API が返すレポート JSON に totals_by_client が加わる。OpenCode のように IDE 外から Copilot モデルへリクエストするツールは、従来 totals_by_ide に入りにくく、利用量の把握が欠けやすかった。各リクエストに付く integration ID をサーバーで集計し、クライアント単位の request_count・session_count・token_usage を載せる。既存フィールドはそのままで、対象外の日は空配列。

#対象レポート

  • enterprise / organization の 1 日・28 日集計
  • enterprise-user / organization-user の 1 日・28 日
  • 28 日集計では各 day_totals 要素に totals_by_client が付く

新規 REST パスは増えず、ダウンロード JSON の additive 拡張。

#totals_by_client の要素

各配列要素は 1 クライアント分。

  • client: リクエスト送信元。opencode、claude_code、codex、zed、copilot_cli、github_app、cloud_agent、code_review、vscode、jetbrains。未認識は other
  • request_count: 成功したモデルリクエスト数(プロンプト数ではない。1 プロンプトが複数モデル呼び出しになることがある)
  • session_count: セッション数
  • token_usage: プロンプトトークン、出力トークン、リクエストあたり平均トークン
  • totals_by_model: モデル別の同種メトリクス。model_selection_mode は user_selected / auto / product_selected / other / unknown

#agent app activity との違い

GitHub 上で Claude や Codex などの agent app が起動したジョブを数える agent app activity とは別物。totals_by_client は Copilot モデルへ流れる任意ツールのモデルトラフィック(リクエストとトークン)向け。

#読み取り上の注意

  • Copilot code review と Copilot cloud agent は product_selected。code review のモデル名は unknown として報告
  • client は各リクエストの integration ID による best-effort グルーピング。検証済み ID ではない
  • 利用権: enterprise owner・billing manager、organization owner、または View Copilot Metrics を付与したカスタム enterprise / organization ロール。enterprise 全体で Copilot usage metrics ポリシーが有効であること

#参考文献