Skip to content

fix(server): keep per-model Antigravity thinking levels after restart - #39398

Open
tensorcopy wants to merge 6 commits into
pingdotgg:mainfrom
tensorcopy:fix-antigravity-unobserved-thinking-levels
Open

tensorcopy wants to merge 6 commits into
pingdotgg:mainfrom
tensorcopy:fix-antigravity-unobserved-thinking-levels

Conversation

@tensorcopy

@tensorcopy tensorcopy commented Nov 19, 2026 •

Copy link
Copy Markdown

Problem

After a restart, an Antigravity model could lose its own thinking levels and show the currently selected model's levels instead. For example, low/medium/high/xhigh became low/medium/high; each model should retain the levels it last reported.

Change

Stop giving unobserved models the selected model's thinking descriptor. They now report no descriptor until observed, so the registry merge retains their previously reported capabilities. Selected and observed models still use their own descriptors, including an explicit absence of thinking options.

Scope

This is a small fix for an obvious catalog bug, so no separate issue is needed. It changes only Antigravity's model catalog construction and its regression tests.

Verification

  • Added a regression that publishes deep with low/medium/high/xhigh, then merges a restarted provider snapshot that has observed only fast with low/medium/high. On main, deep incorrectly becomes low/medium/high; with this change, it keeps xhigh.
  • Updated the catalog test to require no descriptor for an unobserved model.
  • Ran the following in apps/server; six files with 211 tests passed:
vp test run src/provider/AntigravityProvider.test.ts src/provider/Drivers/AntigravityDriver.test.ts src/provider/ProviderRegistry.test.ts src/provider/providerStatusCache.test.ts src/orchestration-v2/Adapters/AntigravityAdapterV2.test.ts src/provider/acp/AntigravityAcpSupport.test.ts
  • packages/provider-acp sessionConfig.test.ts: six tests passed.
  • effect-tsgo tsrs --noEmit, vp lint, and vp fmt --check are clean for the changed files.

I did not run the full repository suite or a live Antigravity session.

Claude Opus 5.5 in T3 Code.

Antigravity reports thinking levels only for the selected model. A model
the server had not observed yet was given the selected model's levels
(without a current value). Because that fallback was non-empty, the
registry merge replaced the levels the model had reported earlier, so a
model with more levels (for example xhigh) lost them after a restart.

An unobserved model now reports no thinking descriptor, which lets the
registry keep the levels it last reported.
@github-actions github-actions Bot added vouch:unvouched Author is not yet trusted in the VOUCHED list. size:S 10-29 changed lines (additions + deletions). labels Nov 19, 2026
@coderabbitai

coderabbitai Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

Note

Reviews paused

It 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 reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • Resume reviews
  • Trigger review

No actionable comments were generated in the recent review.

Walkthrough

The Antigravity provider now reports thinking capabilities from observed model configurations. Catalog merging retains prior capabilities when incoming capabilities are null and replaces them when they are explicitly empty. Tests cover these cases across catalog snapshots.

Changes: Antigravity thinking capabilities

Layer / File(s) Summary
Per-model capabilities and restart coverage
apps/server/src/provider/AntigravityProvider.ts, apps/server/src/provider/ProviderRegistry.ts, apps/server/src/provider/AntigravityProvider.test.ts
Observed configurations produce model-specific thinking capabilities. Unobserved configurations produce null capabilities. Snapshot merging retains prior capabilities for null values and replaces them for explicit empty values. Tests cover model choices across restart and clearing choices after an observed configuration has no thinking options.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Suggested reviewers: juliusmarminge

Merge Risk: Minimal · up to 8cf07

Antigravity models should no longer inherit another model's thinking levels after a restart. Models observed with no thinking options clear stale levels. No merge-blocking risk was identified.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title "fix(server): keep per-model Antigravity thinking levels after restart" matches the main change. The PR stops unobserved Antigravity models from inheriting the selected model's thinking desc…
Description check Passed The description follows the repository template. It has Problem, Change, Scope, and Verification sections. The Problem section gives the bug and expected behavior with a concrete example (low/medium/h…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title "fix(server): keep per-model Antigravity thinking levels after restart" matches the main change. The PR stops unobserved Antigravity models from inheriting the selected model's thinking descriptor, so each model keeps its own levels across a restart. The title is specific, uses a conventional commit prefix, and does not list files.

Full details: Description check

Explanation

The description follows the repository template. It has Problem, Change, Scope, and Verification sections. The Problem section gives the bug and expected behavior with a concrete example (low/medium/high/xhigh becoming low/medium/high). The Change section explains the fix and why the registry merge keeps prior capabilities. The Scope section justifies the absence of a linked issue for a small catalog bug. The Verification section lists a regression test, the commands run with results, and what was not checked. The template's opening comment asks for a conventional commit title, which the title satisfies. The description does not link an issue, but the template allows a stated reason instead for small obvious fixes, and the author gave one. The description also ends with the model and harness used, as the template requests for agent work.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between cbc438a and 8cf0703.

Files selected for processing: 3

  • apps/server/src/provider/AntigravityProvider.test.ts
  • apps/server/src/provider/AntigravityProvider.ts
  • apps/server/src/provider/ProviderRegistry.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

@juliusmarminge juliusmarminge added the takeover:in-progress A takeover lead is working on this PR label Nov 19, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@juliusmarminge juliusmarminge added takeover:needs-julius Takeover done; route gate says Julius decides and removed takeover:in-progress A takeover lead is working on this PR labels Nov 19, 2026
@tensorcopy
tensorcopy force-pushed the fix-antigravity-unobserved-thinking-levels branch from 81d67b9 to e61c256 Compare November 22, 2026 07:06
@rune-gh

rune-gh commented Nov 22, 2026

Copy link
Copy Markdown
Contributor

Hit this exact issue on live agy acp 1.5.14 (Windows):

  • After a T3 Code restart, running a session on gemini-4-neon (thought_level: low, high, xhigh) caused every unobserved Antigravity model in the picker to inherit Low / High / Extra—including claude-opus-5.5 (hiding Medium and offering Extra), claude-opus-4.6, and gpt-oss-120b-medium.
  • Direct JSON-RPC verification against agy acp 1.5.14 confirms session/set_config_option (configId: "model", value: "claude-opus-5.5") returns thought_level options low (Low), medium (Medium), and high (High), and sending thought_level: "xhigh" to claude-opus-5.5 fails with -32602:
    Thinking level "xhigh" is not offered for model "Claude Opus 5.5"
    
  • Likewise, claude-opus-4.6 / claude-sonnet-4.6 report only low / max, gemini-4-argon and gemini-3.1/3.5-flash-lite report low / high, and gpt-oss-120b-medium reports no thought_level option at all.

Dropping the currentThinking fallback for unobserved models here directly fixes the cross-model capability overwrite across restarts. +1!

@Murqin

Murqin commented Nov 22, 2026

Copy link
Copy Markdown

Building on @rune-gh's note about models with no thought_level option (we hit the same thing with gemini-pro-orchestrator-neon / gemini-pro-orchestrator-g1-pro, where AcpAdapterV2.startTurn logs ACP session does not expose requested configuration option(s) and drops thought_level):

There's one edge case left with mergeProviderModels in apps/server/src/provider/ProviderRegistry.ts:

Even with this PR, thinkingCapabilities(observed) returns EMPTY_MODEL_CAPABILITIES ({ optionDescriptors: [] }) for both observed === undefined (unobserved) and observed === null (explicitly selected and observed to have no thought_level). Since hasModelCapabilities(model) checks (model.capabilities?.optionDescriptors?.length ?? 0) > 0, mergeProviderModels falls back to previousModel.capabilities in both cases.

So for any existing user upgrading from 0.1.11 whose cached provider snapshot already stored stale thought_level options on a non-thinking model (like gemini-pro-orchestrator-neon or gpt-oss-120b-medium) — or if a model ever drops thought_level later — selecting that model still cannot clear the stale option without signing out or wiping the cache.

Flagging this in case you want to distinguish "unobserved" vs "explicitly observed as having no thinking options" here (while keeping Cursor's mergeProviderSnapshot fallback test intact) or track it as a follow-up.

An Antigravity model observed without thinking options reported empty
capabilities, which the registry treated the same as an unobserved
model and replaced with the levels from an older snapshot.

Unobserved models now report null capabilities, which still inherit the
last reported levels. A model observed without options reports explicit
empty capabilities, and for Antigravity the registry no longer replaces
them, so stale levels clear. Other providers keep the existing fallback.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S 10-29 changed lines (additions + deletions). takeover:needs-julius Takeover done; route gate says Julius decides vouch:unvouched Author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants