[AI Assisted] Usage: add Google Antigravity usage tracking (#1490)

* Usage: add Google Antigravity usage tracking

- Add dedicated fetcher for google-antigravity provider
- Fetch credits and per-model quotas from Cloud Code API
- Report individual model IDs sorted by usage (top 10)
- Include comprehensive debug logging with [antigravity] prefix

* fix: refine antigravity usage tracking (#1490) (thanks @patelhiren)

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
This commit is contained in:
Hiren Patel
2026-01-23 02:17:59 -05:00
committed by GitHub
parent 58f638463f
commit 4de660bec6
5 changed files with 867 additions and 1 deletions

View File

@@ -1,5 +1,6 @@
import { type ProviderAuth, resolveProviderAuths } from "./provider-usage.auth.js";
import {
fetchAntigravityUsage,
fetchClaudeUsage,
fetchCodexUsage,
fetchCopilotUsage,
@@ -57,8 +58,9 @@ export async function loadProviderUsageSummary(
return await fetchClaudeUsage(auth.token, timeoutMs, fetchFn);
case "github-copilot":
return await fetchCopilotUsage(auth.token, timeoutMs, fetchFn);
case "google-gemini-cli":
case "google-antigravity":
return await fetchAntigravityUsage(auth.token, timeoutMs, fetchFn);
case "google-gemini-cli":
return await fetchGeminiUsage(auth.token, timeoutMs, fetchFn, auth.provider);
case "openai-codex":
return await fetchCodexUsage(auth.token, auth.accountId, timeoutMs, fetchFn);