Repository navigation
Keep Antigravity's full model list when agy models comes back short - #47341
Merged
Merged
Conversation
orca-remote-automation
Bot
requested a review
from brennanb2025
as a code owner
November 23, 2026 03:22
Contributor
Author
|
@coderabbitai review |
orca-remote-automation
Bot
force-pushed
the
agentint-46905-agy-model-refresh
branch
9 times, most recently
from
November 24, 2026 02:48
e29986d to
861b567
Compare
orca-remote-automation
Bot
force-pushed
the
agentint-46905-agy-model-refresh
branch
from
November 24, 2026 02:54
861b567 to
cc529f7
Compare
11 tasks done
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.
ELI5
Antigravity's model picker gets its list by running
agy models. Sometimes that command answers with an old, short list even though your account has the new models, and Orca showed that short list. Now, while Orca runs, a short answer can't push out models a chat or an earlier listing showed, Orca asks again 5 minutes later, and there is a Refresh button next to the model search.What Changed
agy modelsrun (Gemini 3.8 Flash, Sonnet 4.6, Opus 4.6, GPT-OSS) replaced the whole list, and the bot and new-chat pickers stayed on it. The picker had no way to ask again.Error: Eligibility check failed) never replaced the list, and still doesn't.relist: true, as a read that waits for the listing: the host resolves the catalog that read belongs to, clears any failure hold on it, lists it again (a listing already running stands), and the open picker shows what that listing found. Enter or Space on the focused button refreshes; it never picks the highlighted model. Other catalogs and their listings are untouched. A read that was still running when you clicked can't answer for the Refresh. The icon spins at least 400ms.Mechanism:
keepsRicherAgentModelListing(agent)(Antigravity only) gatesagent-model-catalog-seen-rows.ts.seenAgentModelRowsupdates an entry's in-memoryseenrows on each write (the entry factory inagent-model-catalog-entry-lifetime.ts), andwithSeenRowsappends the seen rows the listings lack.seen.relistAftermakesagentModelCatalogEntryIsStaletrue 5 minutes after a short probe. Persistence writes only the listings, soseenis never saved.store.forgetSeenRows(antigravityHostCatalogFingerprints())runs fromaccounts.antigravitySelectwhen the host's active account changed; Antigravity catalogs are keyed by account home, so only the host agy catalog is touched. For Refresh,ModelCatalogParamstakesrelist, sent only to hosts that advertiseagent-session.model-catalog.relist.v1; it rides the read to the catalog refresh, which callsstore.relistScope(fingerprint)once its scope is resolved.Why
Holding what this process saw, and letting only an equally long probe replace it, fixes the cause: one bad run used to replace the list. New rows a short run lists are real, so they are accepted. Earlier rounds of this PR also saved carried rows across restarts and followed agy account changes made outside Orca; each round found new edges in that machinery, so this version drops both and keeps the fix in memory. Other options:
agyevery time.preflight.refreshAgents: it expires every agent's catalog on the host, aborts other agents' listings, and on Windows can go to the WSL host while the picker reads the native one. The flag on the picker's own read avoids all three, and is capability-gated because older hosts refuse unknown keys.Reconciled with open #45588 (superseded, touches launch/server files, not the catalog store) and #46309 (sidebar labels from agent hooks). No overlapping files.
Linked Issue
Fixes #46905
Refs #46288: this keeps each account home's catalog separate, so the managed server's listing never merges into the host agy catalog.
Visual Proof
From a seeded component fixture (
agent/AgentLaunchPicker:dropdownAntigravityRefresh). No real account is involved. Before: the same card with no Refresh button.Testing
agent-model-catalog-degraded-listing.test.tsfeeds fakeagy modelsoutput throughparseAgyModelListingintoAgentModelCatalogStore:antigravity-accounts.test.tsruns the real select handler: a host switch makes the host agy catalog due and leaves Orca's home fresh; a WSL switch reads the distro's login only twice (no extra lookup); a switch lists again a catalog under a launch HOME sharing the login, not one with its own file.agent-launch-picker-acquisition.test.ts: a Refresh of a settled catalog shows what the listing it started found.AgentPickerRefreshModelsButton.test.tsx(happy-dom, realAgentLaunchSetupPanel): Enter on the focused Refresh button refreshes instead of using the highlighted current model.Each fails with its fix reverted.
pnpm check:changedpasses (format, lint, typecheck, related tests, ratchets, localization). Tested on macOS. The one DOM test covers a keyboard-capture regression, not a button-does-X check; the fixture screenshot is the visual proof.Performance
None in steady state, because:
Risk
Level: Low
relistparam is generic but only the Antigravity picker sends it.agylogin in a terminal) is not seen: the picker can show the previous account's extra models until Refresh lists a probe at least as long, or Orca restarts. Picking one of those fails visibly when the chat starts; nothing else is affected.Review
Agent skill upstream boundary
Notes
Ensure no issues in: Security, Cross-platform support (Linux, Windows, Mac), Remote SSH, Mobile, general backwards compatibility, performance
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)