Skip to content

fix(antigravity): restore concrete models with ACP 1.4 - #20979

Open
pauljones0 wants to merge 3 commits into
pingdotgg:mainfrom
pauljones0:fix/antigravity-acp-14-model-selection
Open

pauljones0 wants to merge 3 commits into
pingdotgg:mainfrom
pauljones0:fix/antigravity-acp-14-model-selection

Conversation

@pauljones0

@pauljones0 pauljones0 commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

Antigravity ACP 1.4 advertises concrete models separately from its family and thinking-level options. T3 displayed only the family and rejected saved concrete choices, including resumed chats and helper generation.

Use the advertised session models and existing session/set_model operation for this split configuration. Keep legacy config-option selection, preserve the concrete catalog through config updates, and reapply concrete selections when reconfiguring so removing a saved thinking override restores the manifest default. Chat and helpers share the same selection boundary; no client or contract changes.

Rebuilt from @pauljones0's protocol discovery and captured session data in #20979, retaining the contributor's commits and merging current main.

Verification at 86d7df9:

  • Reduced 12 PR-added cases across four existing test files to three lifecycle cases across three existing files, preserving 111 main tests. All 114 tests in the five affected Antigravity suites pass. All three lifecycle cases fail against main: catalog collapse, saved Low chat failure, and saved Low helper failure.
  • Real adapter/runtime/native-stdio tests cover fresh and resumed Low chat, default restoration after a thinking override, catalog updates and return to legacy mode, and isolated helper selection before prompt. Existing helper/driver tests retain error, cleanup and legacy coverage.
  • Server typecheck, lint and formatting for all changed files, and diff check pass. One full independent review round with GPT-6 Sol and Claude Opus 5.5 found no blocking code findings.
  • Headless Linux web/server with a native ACP peer derived from the captured response: main displays one family and fails a saved Low chat; this head displays High/Medium/Low and completes Low chat. After a server restart, the recorded process sends session/resume → session/set_model(Low) → session/prompt, and the second run completes. A separate helper sends session/new → session/set_model(Low) → session/prompt and persists the generated title. Sanitized native sequence and persisted results.

Before — main collapses the concrete catalog:

Before: only the model family appears

After — concrete choices survive:

After: High, Medium and Low are available

Before — saved Low fails:

Before: saved Low is unavailable and the session fails

After — saved Low completes:

After: the selected Low model responds

The peer is a protocol fixture, not Google's authenticated runtime. Authenticated Google ACP 1.4, real provider transcript persistence, macOS, Windows, Electron desktop, iOS and Android were not verified. The fixture does not implement durable provider transcript history. The thinking-override regression uses saved/agent-supplied options; this change does not add a thinking control to the composer.

Implementation: GPT-6.1 Sol / Codex. Tests: GPT-6 Astra / Codex. Reviews: GPT-6 Sol / Codex and Claude Opus 5.5 / Claude Code.

@github-actions github-actions Bot added the vouch:unvouched PR author is not yet trusted in the VOUCHED list. label Oct 17, 2026
@github-actions github-actions Bot added the size:L 100-499 changed lines (additions + deletions). label Oct 17, 2026
@macroscopeapp

macroscopeapp Bot commented Oct 17, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at ea8e441

Macroscope's review found this PR approvable — This is a focused ACP 1.4 compatibility fix that restores advertised concrete Antigravity models while preserving the legacy selection path. The affected chat, text-generation, catalog, and config-update behavior is narrowly scoped and backed by targeted regression tests, without changing product defaults or introducing broader infrastructure or schema changes.

You can add or adjust custom eligibility rules. Learn more.

@coderabbitai

coderabbitai Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Path: .coderabbit.config.ts
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 3c36460c-4b90-4874-a7b3-f55939e12668
📥 Commits

Reviewing files that changed from the base of the PR and between 13aa882 and ea8e441.

📒 Files selected for processing: 9
  • apps/server/src/orchestration-v2/Adapters/AntigravityAdapterV2.test.ts
  • apps/server/src/orchestration-v2/Adapters/AntigravityAdapterV2.ts
  • apps/server/src/provider/AntigravityProvider.test.ts
  • apps/server/src/provider/AntigravityProvider.ts
  • apps/server/src/provider/acp/AntigravityAcpSupport.test.ts
  • apps/server/src/provider/acp/AntigravityAcpSupport.ts
  • apps/server/src/provider/acp/antigravity140.fixture.ts
  • apps/server/src/textGeneration/AntigravityTextGeneration.test.ts
  • apps/server/src/textGeneration/AntigravityTextGeneration.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.

📝 Walkthrough

Antigravity ACP model selection now supports ACP 1.4 session model state. The provider preserves session model catalogs when thinking-level options are present, and adapter and text-generation callers pass session models into selection. Tests cover model resolution, provider snapshots, and runtime paths.

Changes: Antigravity ACP model selection

Layer / File(s) Summary
Session-aware model resolution
apps/server/src/provider/acp/antigravity140.fixture.ts, apps/server/src/provider/acp/AntigravityAcpSupport.ts, apps/server/src/provider/acp/AntigravityAcpSupport.test.ts
The selection helper resolves advertised session models and applies them through setSessionModel when session model state is present. Tests cover concrete and default model selection, unavailable IDs, and the config-option path.
Provider session model catalog
apps/server/src/provider/AntigravityProvider.ts, apps/server/src/provider/AntigravityProvider.test.ts
The provider uses session models when session setup includes models and a thinking_level option. Config-option updates preserve that catalog, and sign-out clears its authority flag. Tests check catalog IDs and snapshot updates.
Runtime model-selection wiring
apps/server/src/orchestration-v2/Adapters/AntigravityAdapterV2.ts, apps/server/src/orchestration-v2/Adapters/AntigravityAdapterV2.test.ts, apps/server/src/textGeneration/AntigravityTextGeneration.ts, apps/server/src/textGeneration/AntigravityTextGeneration.test.ts
The adapter and text-generation path pass session models to the selection helper. Tests cover concrete ACP 1.4 model selections.

Priority: ➖ Normal

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Bug fix

Sequence Diagram(s)

sequenceDiagram
  participant AntigravityAdapterV2
  participant applyAntigravityAcpModelSelection
  participant AcpSessionRuntime
  AntigravityAdapterV2->>applyAntigravityAcpModelSelection: pass selection and session models
  applyAntigravityAcpModelSelection->>AcpSessionRuntime: setSessionModel with resolved model
Loading

Suggested reviewers: t3dotgg, juliusmarminge

Merge Risk: ⚪ Minimal · up to ea8e4

The reported default-restoration concern is resolved by the existing selection path. No identified issue remains that should delay merging after normal checks.

Security architecture risk: 🔵 Low · up to ea8e4

The change stays within an existing authenticated session and does not appear to broaden access or privileges. Incomplete coverage of behavior outside the inspected source limits assurance.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • inferred — The demonstrated exposure is selection within an existing ACP session and catalog metadata shared by its provider instance. The inspected change does not add a path to choose another session, credential, service, or environment. Remote-side authorization and model-specific capabilities remain outside the verified source boundary.

Trust Boundaries and Controls

  • observed — Caller-controlled explicit IDs must match the session-advertised catalog before the new operation executes. Text generation retains independent rejection of permission requests, elicitation, file and terminal access, unknown requests, and tool-call updates; selecting a different advertised ID does not remove those application-side controls.

Resilience and Maintainability Implications

  • observed — Selection failures prevent text-generation prompt dispatch, and scoped cancellation and cleanup remain in place. Chat records the selected current ID only after successful model application. Selection and subsequent configuration updates are sequential rather than transactional, so partial remote-session configuration remains possible; the inspected paths did not establish a new cross-session security consequence.
Pre-merge checks: Passed 4
Check name Status Explanation
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.
Title check Passed The title clearly and concisely describes restoring concrete Antigravity models for ACP 1.4.
Description check Passed The description thoroughly explains the problem, implementation, scope, verification, test results, limitations, and review context. It does not use the template headings and does not explicitly docum…
Full details: Description check

Explanation

The description thoroughly explains the problem, implementation, scope, verification, test results, limitations, and review context. It does not use the template headings and does not explicitly document maintainer approval, but the required information is otherwise substantially present.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@juliusmarminge juliusmarminge self-assigned this Oct 19, 2026
@juliusmarminge

Copy link
Copy Markdown
Member

Taking over this one for batch other-providers-16. I will rebuild against current main, keep the minimum concrete-model lifecycle tests, verify resumed chat and helper generation, and push to this branch without merging.

@nozamdavid

Copy link
Copy Markdown

Taking over this one for batch other-providers-16. I will rebuild against current main, keep the minimum concrete-model lifecycle tests, verify resumed chat and helper generation, and push to this branch without merging.

Can this include discovering GPT-OSS models as well?

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:L 100-499 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants