Skip to content

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

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

tensorcopy wants to merge 10 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 reports null capabilities for models without observed thinking levels. Catalog merging retains prior capabilities for null incoming values and replaces them when incoming capabilities are present, including an empty set. Tests cover these states across restarts and snapshots.

Changes: Antigravity thinking capabilities

Layer / File(s) Summary
Per-model capabilities and catalog merging
apps/server/src/provider/AntigravityProvider.ts, apps/server/src/provider/ProviderRegistry.ts, apps/server/src/provider/AntigravityProvider.test.ts
The provider reports null capabilities when it has not observed thinking levels. For Antigravity, catalog merging retains prior capabilities only when incoming capabilities are null; explicit capability data replaces them. Tests cover retention across restart and clearing levels after an observed model has no thinking options.

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

Change: Bug fix

Possibly related PRs

  • pingdotgg/t3code#41699: This PR addresses the same registry merge behavior for unobserved Antigravity models after restart.
  • pingdotgg/t3code#42056: This PR changes the handling of cached Antigravity thought-level descriptors in the capability merge path.

Suggested labels: bugfix

Suggested reviewers: juliusmarminge

Merge Risk: Minimal · up to 4c38d

Antigravity models that were not observed after a restart keep their own previously reported thinking levels. Models confirmed to have no thinking options can clear stale ones and stay cleared. No remaining merge-blocking risk was found.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the fix (per-model Antigravity thinking levels kept after restart), which matches the changeset: unobserved models no longer receive the selected model's thinking descriptor, and the r…
Description check Passed The description follows the template sections: Problem, Change, Scope, and Verification. It explains the bug and the fix, links no issue but justifies that with a reason for a small obvious bug, gives…
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 names the fix (per-model Antigravity thinking levels kept after restart), which matches the changeset: unobserved models no longer receive the selected model's thinking descriptor, and the registry merge retains prior capabilities. It follows conventional commit form and is specific.

Full details: Description check

Explanation

The description follows the template sections: Problem, Change, Scope, and Verification. It explains the bug and the fix, links no issue but justifies that with a reason for a small obvious bug, gives focused test commands with observed results, and states what was not run. It does not include the template's trailing agent/model attribution line in the expected form, but it does name the model and harness ('Claude Opus 5.5 in T3 Code'). The objectives mention a later commit that handles confirmed-empty capabilities, which the description does not cover; that gap is minor for this check.

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 3cc4d66 and 4c38df9.

Files selected for processing: 2

  • apps/server/src/provider/AntigravityProvider.test.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; 8 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.
…bserved-thinking-levels

# Conflicts:
#	apps/server/src/provider/AntigravityProvider.test.ts
#	apps/server/src/provider/AntigravityProvider.ts
@tensorcopy

Copy link
Copy Markdown
Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor
Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Additional comments: 1

apps/server/src/provider/ProviderRegistry.ts-300-300: 1

300-300: Minor · Data Integrity & Integration · Quick win

Unverified finding
Verification ran but could not confirm this finding. It is shown for review, not as a verified issue.

Preserve known-empty capabilities for an unobserved model.

After a model reports no thinking options, its capabilities are { optionDescriptors: [] }. If the next snapshot leaves that model unobserved, its incoming capabilities are null. This guard returns the incoming model because the previous descriptors are empty.

The merge therefore discards confirmed absence instead of retaining the previous observation. For Antigravity, preserve any non-null previous capabilities when incoming capabilities are null. Keep explicit incoming empty capabilities authoritative.

Review info

Run configuration

Commits

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

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.

@tensorcopy

Copy link
Copy Markdown
Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor
Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

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