Repository navigation
fix(antigravity): parse two-column agy models output - #31
Open
andromarces wants to merge 4 commits into
Open
andromarces wants to merge 4 commits into
andromarces wants to merge 4 commits into
Conversation
agy models prints a model slug and a display name in two tab-separated columns. The adapter treated each whole line as the display name, so the picker id became the slug joined with the display and --model received the raw line. Antigravity rejected every discovered model. Parse the first column as the model id and pass it to --model. Keep the single-column path for older builds, including the display-name reverse mapping. Update the fixture to the two-column format and assert the exact --model slug. Verified live with agy 1.2.2: listModels() returns the slug column, and agy --model gemini-3.8-flash-medium --print exits 0.
…n coverage Address review feedback on the two-column parser: - derive the --model argument only for single-column rows, so the two-column path no longer stores identity entries; rename the field to modelArgs to match what it holds - restore the single-column slug-collision test - add the required one-line justification to each generated test
…tifications Address review feedback: - move the single- and two-column collision cases into one test so each test name matches what it asserts - reduce each generated-test justification to one line
AGENTS.md requires a one-line justification that names both the requirement and the reason the test is not redundant. Add the missing non-redundancy clause to each generated test.
There was a problem hiding this comment.
🟢 Approval recommended
No unresolved issues remain, and the requested behavior is covered by implementation, tests, and documentation.
Pull request overview
Updates the Antigravity adapter to parse two-column agy models output while preserving single-column compatibility.
Changes:
- Uses two-column slugs directly as model IDs.
- Preserves legacy parsing and collision protection.
- Expands tests for both catalog formats.
- Documents the updated behavior.
File summaries
| File | Summary |
|---|---|
packages/adapters/antigravity/src/adapter.ts |
Implements catalog parsing and model argument mapping. |
packages/adapters/antigravity/src/adapter.spec.ts |
Tests both formats, argument forwarding, and collisions. |
packages/adapters/antigravity/NOTES.md |
Documents current and legacy catalog behavior. |
Review details
- Files reviewed: 3/3 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This branch has not been deployed
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.
Fixes #28
Problem
Antigravity CLI 1.2.2 prints
agy modelsas two tab-separated columns perline: a model slug, then a display name.
The adapter treated each whole line as a display name. The picker id became the
slug joined with the display (
gemini-3.8-flash-medium-gemini-3.8-flash-medium),and
--modelreceived the raw tab-joined line.agyrejected every discoveredmodel as not recognized.
Intended result
The picker lists one valid model per row, and the selected value reaches
agyas an argument it accepts.
Change
listModelssplits each line on the first tab. The first column is the modelid passed to
--model; the second is the display name.antigravitySlugderivation and the reverse mapping back to the listed value.
applies to two-column model ids.
agyoutput in the spec changes to the two-column format; the specasserts the exact
--modelslug and covers collision rejection for bothcatalog shapes.
Compatibility decisions
agyslugs are[a-z0-9.-].older builds keep working.
ModelCatalogcarries no display names, so the second column is used only todistinguish two entries that share an id.
Harn
This edits prose inside the
harn:assume adapters-own-their-model-catalogblockin
packages/adapters/antigravity/NOTES.md. Intended behavior change: theadapter treats the first
agy modelscolumn as the model id passed to--model,retains the single-column fallback, and still fails discovery on id collisions.
.harn/assumptions/and Harn hashes are untouched.Tests
pnpm -r --no-bail testfails in 7 package scripts and passes in 13; Antigravitypasses 12/12. The failures are pre-existing relative to this diff. Unmodified
origin/main(03481a3) reproduced the same seven failed package scripts and thesame broad failure classes. The diff touches only
packages/adapters/antigravity. By class:@codor/adapter-copilot,@codor/adapter-gemini,@codor/adapter-grok,@codor/adapter-opencode,@codor/switchboard: macOS/varvs/private/varcwd canonicalization and the discovery assertions that depend on it, with
intermittent timeout cases.
@codor/cli: PTY-driven specs, Windows setup specs running on macOS, setup andpairing timeouts, and one worktree path assertion.
@codor/web-next: browser-storage setup failures (localStorageundefined),plus timeout and state-assertion cases.
Per-package counts differed across parallel full-suite executions, so this report
states failure classes rather than unstable counts.
Live verification on macOS with
agy1.2.2:listModels()returneddiscovered, 14 models,gemini-3.8-flash-highfirst.agy --mode plan --model gemini-3.8-flash-medium --print "Reply with the single word ok."returned
ok, exit 0.Not tested
agyinstall available; the parser is platform-independent butwas not exercised there.
agy1.2.2 was run live. The single-column older-build path is covered bya fixture, not a real binary.