Proposal: add Google Antigravity and Gemini models to Usage reporting #9736
nickwarters
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Context
With Google Antigravity recently added as an ACP provider (#9348), turns run on Gemini models (e.g.,
gemini-3.8-flash,gemini-2.5-pro) currently do not appear in T3 Code's Usage graphs and breakdowns.Following the architecture established for Claude Code, Codex, and Grok Build (#8358),
UsageServiceaggregates usage by scanning local session files on disk so that usage metrics stay complete across connected environments and for sessions driven outside T3 Code.Technical Findings
Antigravity persists turn history and exact token metrics locally in SQLite database files (
<conversationId>.db):<stateDir>/providers/antigravity/<instanceHash>/antigravity-acp/conversations/*.db~/.gemini/antigravity-cli/conversations/*.dbInside each conversation database:
gen_metadatatable stores generation turns with a Protocol Buffers payload (data) per turn.gemini-3.8-flash,gemini-2.5-pro(field1.19).1.4).1.9.4.1).<conversationId>-<turn>(field1.20).Because Node.js includes
node:sqlite(DatabaseSync) in read-only mode, and the wire format for these fields is straightforward to extract in pure TypeScript without external dependencies, no new dependencies are required. Unchanged databases are memoized by(size, mtime)inScanCachejust like existing JSONL transcripts.Additionally:
usagePricing.ts) already catalogs 180+ Gemini models (with unlisted newer models falling back to"unpriced"gracefully while keeping token counts accurate).AntigravityIcon) and mobile (assets/antigravity.png).Proposed Scope
packages/contracts/src/usage.ts):USAGE_CONTRACT_VERSIONto 6 (retainingUSAGE_MERGE_COMPATIBLE_SINCEso v4/v5 servers continue to merge)."antigravity"toUsageProviderKind.apps/server/src/usage/):UsageService.resolveTranscriptDirs, discover managed and standalone Antigravity conversation directories.UsageRecordobjects.antigravitypresentation configuration toapps/webandapps/mobile(PROVIDER_ORDER,PROVIDER_PRESENTATION, brand colors).Question for Maintainers
Would maintainers be open to a PR implementing Antigravity usage reporting along these lines? If so, I have tested the SQLite/protobuf extraction against active sessions and can submit a focused PR with unit tests.
All reactions