Skip to content

fix(server): let Antigravity validate newly discovered models - #36804

Open
Kirat0201 wants to merge 3 commits into
pingdotgg:mainfrom
Kirat0201:codex/issue-35693-current
Open

Kirat0201 wants to merge 3 commits into
pingdotgg:mainfrom
Kirat0201:codex/issue-35693-current

Conversation

@Kirat0201

Copy link
Copy Markdown
Contributor

Problem

An existing Antigravity session rejects newly available models before asking the provider. Its cached choices can be older than the catalog refreshed in a separate session. Fixes #35693.

Change

For an explicit model absent from cached choices, send the existing setConfigOption("model", value, { allowUnlistedValue: true }) request. Let the provider accept or reject it, preserving errors through the existing mapper. Advertised choices, defaults, and legacy aliases retain their existing paths.

Scope

A small validation fix in one provider helper, covered by CONTRIBUTING.md's small obvious bug-fix exception. The session remains in place and provider rejection propagates without a fallback.

Related #28433 fixes catalog discovery and #32167 isolates catalog refresh failures. This fix handles explicit selection in an already-open session whose cached choices are stale.

Verification

On base 121f0cf014, four regression cases fail: an unlisted explicit model is rejected locally, and three provider-rejection cases receive the local error instead of the provider's mapped error. With this change, the acceptance case returns the selected model after exactly one unlisted-model request; the rejection cases preserve the provider error and issue no fallback request.

  • vp test run --project t3 apps/server/src/provider/acp/AntigravityAcpSupport.test.ts apps/server/src/orchestration-v2/Adapters/AntigravityAdapterV2.test.ts apps/server/src/textGeneration/AntigravityTextGeneration.test.ts: 101 tests passed, including defaults, advertised/grouped choices, legacy aliases, and caller behavior.
  • node scripts/check-changed.ts --concurrency 2: formatting, lint, both unused-code passes, GraphQL validation, three package type checks, and 54 selected tests passed. Test selection excluded browser and renders projects for the CLI-only workflow. Commit hooks passed.
  • macOS arm64, Node 26.12.1, isolated TMPDIR and T3CODE_HOME, frozen dependencies. No live T3 data was used.

This proves deterministic server selection and error propagation. A live account rollout and UI model switch were not verified. Current main has no additional changes to the two files in this fix.

Model and harness: GPT-6 via Codex desktop.

@github-actions github-actions Bot added vouch:unvouched Author is not yet trusted in the VOUCHED list. size:XS 0-9 changed lines (additions + deletions). labels Nov 14, 2026
@macroscopeapp

macroscopeapp Bot commented Nov 14, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at 495a503

Macroscope's review found this PR approvable — Explicitly selected, unlisted Antigravity models are now validated by the agent instead of rejected locally. Default selection behavior and agent error propagation remain unchanged.

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

@coderabbitai

coderabbitai Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

Explicit model IDs that are absent from cached Antigravity options are now sent to the provider with allowUnlistedValue: true. Legacy-family selections retain their listed family value. Tests cover successful selection and mapped provider rejection.

Changes: Antigravity model selection

Layer / File(s) Summary
Set explicit unlisted models
apps/server/src/provider/acp/AntigravityAcpSupport.ts, apps/server/src/provider/acp/AntigravityAcpSupport.test.ts
Explicit unlisted model IDs are sent with allowUnlistedValue: true and returned when accepted. Legacy-family selections return the listed family. Tests verify provider rejection is propagated through mapError.

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

Change: Bug fix · Severity of issue fixed: Low

Suggested reviewers: t3dotgg, yash-singh1

Merge Risk: Minimal · up to 54427

This change lets an open Antigravity session select a newly discovered model by asking the provider to validate it. Listed choices, defaults, and legacy aliases keep their existing behavior. No merge-blocking risk was found.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title "fix(server): let Antigravity validate newly discovered models" matches the main change. The change lets explicit models that are missing from cached session choices go to the provider, whic…
Description check Passed The description follows the template sections: Problem, Change, Scope, and Verification. The Problem section states the stale cached model choices and links issue #35693. The Change section explains t…
Linked Issues check Passed Issue #35693 requires that an explicit model, discovered after an Antigravity ACP session started, can be applied in that open session. The issue allows either applying the model through session/set_c…
Out of Scope Changes check Passed The whole-PR diff touches only AntigravityAcpSupport.ts (selection branch) and AntigravityAcpSupport.test.ts. The source change extends one condition to include explicit unlisted models and returns th…
Full details: Title check

Explanation

The title "fix(server): let Antigravity validate newly discovered models" matches the main change. The change lets explicit models that are missing from cached session choices go to the provider, which accepts or rejects them. The title is short, uses a conventional commit prefix, and names the affected provider and the behavior.

Full details: Description check

Explanation

The description follows the template sections: Problem, Change, Scope, and Verification. The Problem section states the stale cached model choices and links issue #35693. The Change section explains the unlisted-model request and the preserved error path. The Scope section explains why the fix is small and cites the CONTRIBUTING.md exception. The Verification section lists the focused test command, the results, and the untested live rollout and UI switch. It also names the model and harness, as the template asks.

Full details: Linked Issues check

Explanation

Issue #35693 requires that an explicit model, discovered after an Antigravity ACP session started, can be applied in that open session. The issue allows either applying the model through session/set_config_option or setModel, or refreshing the session. The whole-PR diff (mergeBase to head) of apps/server/src/provider/acp/AntigravityAcpSupport.ts shows the change. When an explicit model is absent from cached configOptions, applyAntigravityAcpModelSelection now calls runtime.setConfigOption("model", resolved, { allowUnlistedValue: true }) and returns the resolved model. Provider errors pass through input.mapError. The local invalidParams rejection now applies only to non-explicit, non-legacy IDs with no matching option. The test file adds an acceptance case (one unlisted request) and provider-rejection cases (mapped error, no fallback). Advertised choices and legacy-family handling keep their earlier path. Live acceptance on an open session is not verified. The mock-based tests establish the code path. The issue outcome depends on the provider accepting the model at runtime, which this change delegates to the provider as the issue expects.

Full details: Out of Scope Changes check

Explanation

The whole-PR diff touches only AntigravityAcpSupport.ts (selection branch) and AntigravityAcpSupport.test.ts. The source change extends one condition to include explicit unlisted models and returns the resolved model for that case. Test changes cover the same selection path: a provider-failure option in the model-runtime test double, an acceptance case, and reworked rejection cases. One behavior widens: explicit IDs that are neither advertised nor legacy, such as 'Gemini saved', now reach the provider instead of failing locally. This follows from the same objective of delegating unlisted explicit models to the provider. No unrelated files or changes were found.

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 495a503 and 544276b.

Files selected for processing: 2

  • apps/server/src/provider/acp/AntigravityAcpSupport.test.ts
  • apps/server/src/provider/acp/AntigravityAcpSupport.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 14, 2026
@github-actions github-actions Bot added size:S 10-29 changed lines (additions + deletions). and removed size:XS 0-9 changed lines (additions + deletions). labels Nov 14, 2026
@juliusmarminge

Copy link
Copy Markdown
Member

The automated pipeline stopped on this pull request and will not merge it:

the fix is written and reviewed, but proving it needs something no worker has:

  • Permanent blocker: Antigravity and a signed-in account are unavailable on all worker VMs. The reproduction requires a live session retained across discovery of a newly available model; replay cannot substitute for this provider-specific condition. Base rejection, head acceptance and turn startup, and propagation of the provider's mapped rejection error remain unverified.

It stays open for a person to finish or close.

@juliusmarminge juliusmarminge added takeover:blocked Takeover blocked; reason in the PR body and removed takeover:in-progress A takeover lead is working on this PR labels Nov 14, 2026

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:blocked Takeover blocked; reason in the PR body vouch:unvouched Author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Antigravity existing sessions reject newly discovered models due to stale cached configOptions

2 participants