Repository navigation
fix: group Antigravity models and refresh effort choices - #34518
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
Walkthrough
Priority: Merge Risk:
|
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to GitHub limitations.

Minor · Reread session options after the catalog awaits. · structured-agent-session-option-models.ts:84-106
src/main/native-chat/agent-session-wire/structured-agent-session-option-models.ts:84-106
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winReread session options after the catalog awaits.
recordStructuredAgentSessionOptionIntentcan replace the conversation record whilereadStructuredAgentSessionRestingOptionsawaits catalog and proof reads. The at-rest reader then derivesmodelandeffortfrom its earliersavedsnapshot. The returned options can show the previous selection instead of the user's current selection.Keep the initial snapshot for catalog selection, but reread the current record after the final catalog await and use its options for the returned fields.
Suggested fix
const listedModelIds = proof ? finishedListingIds(proof) : undefined + const currentRecord = deps.store.getConversation(sessionId) + if (!currentRecord) { + throw new Error('agent_session_identity_required') + } + const currentSaved = currentRecord.options ?? {} const defaultModels = independentAgentModelCatalog(record.provider) && reader.readsWithoutModel ? proof && proof.origin !== 'unknown' ? proof.models : [] : models const fastMode = - saved.fastMode === undefined + currentSaved.fastMode === undefined ? null - : decodeStructuredAgentSessionOptionValue('fastMode', saved.fastMode) + : decodeStructuredAgentSessionOptionValue('fastMode', currentSaved.fastMode) // Only a real listing confirms account defaults; built-in defaults cannot override client state. const model = - saved.model ?? + currentSaved.model ?? (catalog.origin === 'unknown' ? undefined : models.find((entry) => entry.isDefault)?.id) // Prefer saved effort, then live execution or the folder’s matching model default. const effort = - saved.effort ?? - (rules?.effortDefaultsToModel || (saved.model === undefined && folderDefault) + currentSaved.effort ?? + (rules?.effortDefaultsToModel || (currentSaved.model === undefined && folderDefault) ? defaultModels.find((entry) => entry.id === model)?.defaultEffort : undefined) const defaulted = (['model', 'effort'] as const).filter( - (key) => saved[key] === undefined && Boolean(key === 'model' ? model : effort) + (key) => currentSaved[key] === undefined && Boolean(key === 'model' ? model : effort) ) - const serviceTier = savedEffectiveServiceTier(saved, models) + const serviceTier = savedEffectiveServiceTier(currentSaved, models)

Review info
-
Run configuration-
- Source mode: Auto
- Repository: Unavailable
- Branch: Unavailable
- File: No configuration file from this repository applied
- Commit: Unavailable
- Layers: Repository UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
12ab668d-2d3e-4011-bebb-0a2592957643
Files selected for processing: 2-
src/main/acp/acp-structured-host-model-options.test.tssrc/renderer/src/components/native-chat/use-structured-agent-session-options.test.tsx
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 2 remain after this review.
-
[Medium impact] No blocking code issues were found; the author's pending merge reconciliation and CI still need to finish. SummaryUpdates Antigravity to
|
|
Antigravity Chat showed thinking levels as separate models and had no separate Effort choice. This PR updates all four managed runtime artifacts to 1.4.3, uses the provider’s grouped models and per-model effort menus, and preserves older saved selections through the update. The full review reached four logical rounds and fixed unknown-menu handling, saved-selection handling, action admission during optional metadata work, and unbounded optional refresh work. Main reconciliation preserves literal model/effort input, sparse messages inherit native effort, and correlated control success establishes applied input independently of readback. Provider observations cannot overwrite saved intent. No new setting, saved field, or wire operation is added. A hypothetical wrong-model success response remains deferred because no official-provider counterexample was found; the implementation trusts correlated successful responses. Verification: the first main reconciliation passed 203 targeted tests; the follow-up conflict merge Antigravity model switch not exercised: every QA sign-in offers only one model (gemini-3.8-flash), so the model-change request and the menu refresh for a different model couldn't run for real. Existing production-host tests consume official-schema-shaped provider success payloads and assert the target model’s returned Low/High effort menu before any prompt; this is test coverage, not a real model-switch pass. Intended: A chat saved on an older Antigravity runtime with a model the new runtime no longer lists keeps showing that model's exact ID, same as main; picking the listed Flash model restores the effort menu. For Brennan’s review:
Source judgments: native menu authority; raw control success and uncertain ownership; one join then current serialized read. Native iOS Simulator control presentation was exercised on this branch: one grouped Flash row, separate Low/Med/High choices, and Low visibly selected after a real tap. The existing PHONE3185_OK transcript predates the setup upgrade to 1.4.3 and is not provider-effort acknowledgement. Desktop native write/real-reply evidence establishes provider application. No physical-device or iOS 15 lifecycle claim is made.
|









The problem
Antigravity Chat listed thinking levels as separate models and had no separate Effort choice. The official server now advertises grouped models with different effort choices for each model. Saved selections and delayed provider replies also need to remain usable when that model list changes.
What changes
Model and effort choices remain provider-authoritative. Intended: successful native control responses establish the applied selection, using the exact input sent; later model observations cannot override that success or overwrite saved intent. Intended: explicit effort requests reach the provider rather than silently being skipped. Existing desktop, phone and remote formats remain compatible; no new setting, persisted field or wire operation is added.
Intended: A message that genuinely omits effort keeps the running conversation’s effort. Saving a model choice retains any explicit saved effort; the provider decides whether it can apply that effort.
Intended: A chat saved on an older Antigravity runtime with a model the new runtime no longer lists keeps showing that model's exact ID, same as main; picking the listed Flash model restores the effort menu.
Verification
92317acandbc7c472add Antigravity to two extracted fixture type declarations and make a control stub return the required empty protocol response; both normal hooks pass, the declaration repair has identical type-erased runtime output, and the affected option test file passes all 12 tests.bc7c472, including static analysis/typecheck, Mobile verify, all ten test shards, wire compatibility, persistence, Linux/Windows packaging, three WSL distributions and the PR checks gate. Shard 8’s first attempt hit an inherited command-population fixture ordering race tracked in test: stabilize command-population admission order #36111. That main test is unchanged here; the failed-job-only retry passed without a production change.59b0729and6770d7f. Accepted real-run evidence froma41b31afcarries across both main merges and test-only commits92317acandbc7c472under the staleness rule. A signed-in Antigravity chat was saved on the previous build, upgraded through the normal runtime update to 1.4.3, and received two real replies on this branch. A native effort write to Low succeeded before the first provider prompt; the second reply needed no effort repair.Visual proof
The same saved chat after two successful branch replies:
Preserved shared-agent chats after model/effort selections and two successful branch replies each:
Native iOS Simulator control presentation (the visible reply predates the runtime1.4.3 setup upgrade):
Tracked in STA-12093. Thanks to @gentslava for the original contribution. Supersedes #33448 and retains the contributor's commits and authorship; #33448 remains open.