Skip to content

feat(antigravity): add Gemini 4 Argon model variants and enums - #448

Merged
shuv1337 merged 4 commits into
integration-v2from
agy-gemini-argon
Oct 13, 2026
Merged

shuv1337 merged 4 commits into
integration-v2from
agy-gemini-argon

Conversation

@shuv1337

Copy link
Copy Markdown
Owner

Summary

  • Add the shipped Gemini 4 Argon variants from agy 1.3.4 (gemini-4-argon-high, gemini-4-argon-medium, gemini-4-argon-low) to GoogleAntigravityWire.shippedModels with their authoritative Cloud Code model enums (MODEL_PLACEHOLDER_M417, MODEL_PLACEHOLDER_M418, MODEL_PLACEHOLDER_M419) and 1,048,576 / 65,536 limits.
  • Add the authoritative default model enums for gemini-3.8-flash-high (MODEL_PLACEHOLDER_M318), gemini-3.8-flash-medium (MODEL_PLACEHOLDER_M319), and gemini-3.8-flash-low (MODEL_PLACEHOLDER_M320).
  • Parse disabled on fetchAvailableModels catalog entries and filter out disabled / -disabled placeholder entries (such as gemini-4-argon-disabled / MODEL_PLACEHOLDER_M421 returned to non-Ultra tiers).
  • Preserve PR fix(antigravity): surface Google 429 quota exhaustion instead of retrying it #427 (a7e864f739) model-specific 5h quota attribution (gemini:5h vs 3p:5h) and add unit + core host/session coverage for Gemini 4 Argon request wrapping, thinking config, tool-call/continuation with thoughtSignature, and 429 error classification.

Made with Cursor

Co-authored-by: Cursor <cursoragent@cursor.com>
@shuv1337

Copy link
Copy Markdown
Owner Author

Reviewed f9c11edcb4e5b5791713feb05b50b19fbe69559b, against base cacea1fc5014feca6d51a88b2faa4ab5fc5b4f0d (all 7 changed files). PR remains draft and mergeable.

P2 — Respect discovered Argon unavailability before enabling the shipped variants. The additions at wire.ts:24–26 enable Argon for every subscription, including accounts whose successful discovery returns gemini-4-argon-disabled. The new disabled filter only affects the enum map in index.ts:99–113; modelEnumsFrom() repopulates shipped defaults and applyModels() unconditionally marks every shipped variant enabled/active. Consequently, the picker advertises three usable Argon models even when the account's catalog explicitly denies Argon access. Google's launch announcement limits personal-account availability to Ultra subscribers.

Reproduced with the real plugin host and model registry using a normal mock OAuth credential and a stubbed successful fetchAvailableModels response containing the disabled Argon placeholder plus enabled Flash: all of gemini-4-argon-high, -medium, and -low resolve with enabled: true. The assertion that they remain unavailable fails. Carry discovered availability into the model transform and suppress the Argon variants on an explicit denial, while retaining the intended shipped fallback for unavailable discovery/access-only imports. Add host-level coverage for both a disabled placeholder and a disabled shipped ID; testing filterGoogleModels() alone misses this integration failure.

Validation

  • Plugin suite: 78 passed. The initial sandboxed run had one callback-listener bind failure; rerunning with local-listener permission passed all tests without changing shared services.
  • Core provider-antigravity.test.ts and session-antigravity-error.test.ts: 12 passed.
  • AI test/provider/gemini.test.ts: 48 passed.
  • bun typecheck in both packages/antigravity-plugin and packages/core: passed. Immutable diff whitespace check passed. GitHub's head typecheck workflow also succeeded.
  • Additional isolated availability reproduction: 1 failed, confirming the finding above. No production source edits.

Limits / test gap: The new continuation test checks unwrapped response text, then manually constructs the next assistant message with signatures; it does not pass the first response through the parser and durable Session history to build the continuation. Existing Gemini protocol tests pass, but an Argon Session round trip would provide stronger coverage of Google's signature-preservation requirement. Google's official agy 1.3.4 artifact (SHA-512 matched its release manifest) contains all six added/updated model IDs; I did not independently establish the numeric enum-to-ID pairings or token limits from public documentation. Full monorepo bun run check, live account entitlement checks, and paid model calls were not run.

@shuv1337
shuv1337 marked this pull request as ready for review October 13, 2026 21:17
@shuv1337
shuv1337 merged commit 0161a4f into integration-v2 Oct 13, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant