Repository navigation
fix(usage): recover Antigravity model names from session settings - #654
Merged
lzt404 merged 1 commit intoNov 16, 2026
Conversation
Antigravity trajectories do not record a model field. The selected model only appears in USER_SETTINGS_CHANGE text such as "changed setting `Model Selection` ... to Gemini 3.8 Flash (High).", so every Antigravity session showed up as an unknown model in agent usage. - Parse the Model Selection settings text and map client labels to real model ids (Flash (High) -> gemini-3.8-flash-high, Flash (Low), Flash Lite, Dynamic/Tiered, Pro). - Fall back to the sibling transcript.jsonl / transcript_full.jsonl when a chunk file contains no settings line, including nested chunk dirs. - Backfill empty-model samples in the same session file. - Add unit tests for label mapping and settings extraction.
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.
Problem
Antigravity's
transcript.jsonldoes not contain a model field. The selected model only appears insideUSER_SETTINGS_CHANGEtext:As a result, every Antigravity session in Agent Usage was reported as an unknown model. Chunk files (
chunks/*.jsonl) do not even contain this settings line.Changes
src-tauri/src/agent_usage.rs(+154 / -0)Model Selectionsettings text and map client labels to real model IDs:Gemini 3.8 Flash (High)->gemini-3.8-flash-highGemini 3.8 Flash (Low)->gemini-3.8-flash-lowGemini 3.8 Flash Lite->gemini-3.5-flash-liteFlash (Dynamic)/Flash Tiered->gemini-3.8-flash-tieredGemini 3 Pro->gemini-3-protranscript.jsonl/transcript_full.jsonl(handles nested chunk directories).Verification
gemini-3.8-flash-high, with 0 empty-model rows.modelcolumn in place; no records need to be deleted (168 daily rows / 264 hourly rows, 877,199,033 tokens preserved in a local test).