Repository navigation
Add Antigravity usage and quota support - #17
Conversation
Token history comes from Antigravity's per-conversation SQLite databases: the CLI folder, the legacy IDE folder, and T3 Code's Antigravity folders, found by globbing because T3 records no home path for that driver. Each model generation is a protobuf row. Input excludes cache reads, output already includes thinking, thinking is kept separately, and there is no cache-write count. The duplicated usage copy is ignored, request IDs deduplicate copied history, and generations are timed by their planner step. Quota comes from the zero-turn agy /usage report, mapping the Gemini and Claude/GPT weekly and 5-hour windows to used-percent meters with reset times. A mise install is run directly rather than through the PATH shim, which can stall re-resolving the tool. The check runs only when the source is enabled. Models stay unpriced unless the served id matches an existing catalog entry. Release 1.11.0.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (14)
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThis change adds Antigravity conversation history collection and quota reporting. It adds Antigravity to provider configuration, the UI, and demo data. The README and documentation describe its sources, account folders, pricing, and quota behavior. Release metadata changes to version 1.11.0. ChangesAntigravity provider support
Priority: ➖ Normal Estimated code review effort: 3 (Moderate) | ~25 minutes Change: Feature Sequence Diagram(s)sequenceDiagram
participant Collector
participant ConversationDB as Antigravity conversation database
participant agyCLI as agy CLI
participant UsageRecords as Antigravity usage records
Collector->>ConversationDB: Read changed conversation database
ConversationDB-->>Collector: Return generation usage and timestamps
Collector->>agyCLI: Run -p /usage and request JSON output
agyCLI-->>Collector: Return quota windows and remaining fractions
Collector->>UsageRecords: Write history and quota records when enabled
Suggested reviewers: Merge Risk: ⚪ Minimal · up to No actionable issue was established that should block merging. Normal validation remains appropriate. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 24.24% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 33 functions across 3 files. (11 skipped: 11 unsupported.)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Adds Antigravity as a first-class provider.
History. Each Antigravity conversation is a SQLite database with one protobuf
gen_metadatarow per model generation. The collector reads them read-only from~/.gemini/antigravity-cli, the legacy~/.gemini/antigravity, and T3 Code's Antigravity folders under~/.t3/userdata/providers/antigravity. T3 records no home path for this driver, so those folders are found by globbing. Input excludes cache reads, output includes thinking, thinking is kept as reasoning, and there is no cache-write count. The duplicate usage copy in the row is ignored, request IDs deduplicate copied history, and generations are timed from their planner step.Quota.
agy -p /usage --output-format jsonis a zero-turn command that reports remaining fractions and reset times for the Gemini and Claude/GPT groups, each with a 5-hour and a weekly window. These become four used-percent meters. A mise install is run directly because theagyshim on PATH re-resolves the tool first and can stall. The check only runs when the source is enabled.Pricing. No rate table. Served ids such as
gemini-3.8-flash-ndon't match catalog entries, so they stay unpriced.Release 1.11.0.
Validation
python3 -m unittest discover -s tests: 246 tests pass, including new fixture tests for protobuf parsing, the duplicate usage field, thinking mapping, slash-only conversations, request ID dedup, T3 folder discovery, quota parsing, mise binary preference and disabled-source gating.py_compileandbash -ncommands pass.Summary by CodeRabbit