Fix Antigravity 2 Gemini 3.5 Flash tracking#377
Merged
iamtoruk merged 1 commit intoMay 22, 2026
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #376 by making CodeBurn see Antigravity 2 app usage again and by adding Gemini 3.5 Flash model aliases for the labels Antigravity can emit.
The main provider bug was discovery: CodeBurn 0.9.10 only looked for legacy Antigravity
*.pbconversation files under~/.gemini/antigravity/conversations, but Antigravity 2 app sessions on this setup are stored as SQLite*.dbfiles. That meant the Antigravity provider could report no usage even while the Antigravity app had local session data and a live language-server RPC endpoint with token metadata.This PR also handles Gemini 3.5 Flash high/medium/low labels by pricing them as the base
gemini-3.5-flashmodel and displaying them as Gemini 3.5 Flash.Root cause
Antigravity has two different local storage shapes now:
The existing provider discovered only this shape:
On Antigravity 2, the app conversations were present as
.dbfiles, so CodeBurn never created session sources for them. No source meant no call toGetCascadeTrajectoryGeneratorMetadata, even though the live Antigravity language server could resolve those.dbcascade ids and return model/token usage.A second bug was model normalization. Antigravity can surface thinking-level labels such as:
Those variants were not mapped to the priced LiteLLM key
gemini-3.5-flash, so they could show as unknown or$0if returned by the provider.What changed
*.dbconversation files alongside legacy*.pbfiles..db/.pb.db-wal.DBantigravityCascadeIdFromPath()so both.dband.pbsources produce the same clean cascade id used by the RPC call..db/.pbcascade-id helper instead ofbasename(path, '.pb').app_data_dirfrom language-server process args.antigravity-clisources do not get mixed.--https_server_port 0by matching the language-server PID and then askinglsoffor its actual listener port.antigravity-cli*.pbsources, while avoiding fabricated historical cost data when those files cannot expose token usage locally.Behavior proof
I reproduced the user-visible failure with CodeBurn 0.9.10 and Antigravity data present locally.
Before this PR, the released CLI did not surface Antigravity model usage:
After this PR, with Antigravity 2.0.1 running and a fresh CodeBurn cache, the same provider path discovers the
.dbconversations and returns Antigravity rows:That proves the broken discovery path is fixed: CodeBurn now reaches the live Antigravity RPC metadata for Antigravity 2
.dbsessions instead of reporting no usage.Gemini 3.5 Flash notes
The local Antigravity app
.dbsessions available during validation currently returnedOpus 4.6andGemini 3 Flashfrom the Antigravity RPC. The Gemini 3.5 Flash High usage observed on this machine is fromagy/antigravity-cli.The CLI data currently appears as binary
.pbconversation files and logs/settings that show the selected label, but do not expose local token usage fields in a readable JSON/SQLite shape. This PR therefore does not invent historical CLI costs from label-only data.What this PR does for Gemini 3.5 Flash:
gemini-3.5-flash-high,gemini-3.5-flash-medium, orgemini-3.5-flash-low, CodeBurn prices it asgemini-3.5-flash;Gemini 3.5 Flash;Gemini 3.5 Flash (High)also resolve togemini-3.5-flash;antigravity-clisources are discovered best-effort, but routed only to anantigravity-clilive server if one is available, not incorrectly sent to the Antigravity app server.Tests added
app_data_dirnormalization for app and CLI process args, including Windows-style paths.antigravity-clipaths..pband Antigravity 2.dbfiles..pb,.db, and uppercase.DBfiles while excluding.db-walsidecars and directories.Validation
npm test -- --run tests/providers/antigravity.test.ts tests/models.test.ts- 102 tests passed.npm run build- passed.npm test -- --run- 65 files / 909 tests passed.git diff --check- passed.No model usage found for the selected period.--effort maxreview - PASS conditional; I added the requestedapp_data_dirand source-routing tests.agyGemini 3.5 Flash High review - PASS; I addressed the case-insensitive extension note.Scope and privacy notes
antigravity-clihistory when the local files expose only binary conversation data and label-only logs/settings.antigravity-clitoken accounting may need a follow-up if Antigravity exposes a stable local SQLite/JSON token source or a persistent CLI RPC endpoint for those cascade ids.