Skip to content

fix(cloud-account): group Gemini 4 Argon and 3.8 Flash quota families - #367

Merged
Draculabo merged 1 commit into
Draculabo:mainfrom
timacek:fix/quota-gemini-4-argon-family
Oct 23, 2026
Merged

Draculabo merged 1 commit into
Draculabo:mainfrom
timacek:fix/quota-gemini-4-argon-family

Conversation

@timacek

@timacek timacek commented Oct 23, 2026

Copy link
Copy Markdown
Contributor

Problem

Antigravity now advertises two Gemini families that the quota model registry does not know:
gemini-4-argon-{low,medium,high} and gemini-3.8-flash-{low,medium,high}.

Because getQuotaModelFamilyId returns the raw id for unknown models, each family falls through as
three unrelated quota entries:

  • the account card lists three rows with raw ids (Gemini 4 Argon High, Gemini 4 Argon Low, ...)
    instead of one family row with the product display name, and each row gets its own percentage;
  • the conservative family summary used for account comparison/recommendation counts each tier as a
    separate model, so one family can dominate the list and the aggregate is not comparable with
    Gemini 3.7 Flash, Gemini 3.5 Flash or Gemini 3.1 Pro;
  • getAvailabilityModelCandidates has no candidates for the family id, so the live-availability
    badge cannot resolve physical ids for the aggregated row.

Both families draw from a shared upstream allowance (Argon is documented as one separate weekly-only
allowance; 3.8 Flash shares the Gemini pool), so the existing conservative family aggregation
(minimum remaining percentage, earliest reset) is the correct presentation for them.

Changes

  • src/modules/cloud-account/utils/quota-model-families.ts
    • FAMILY_DISPLAY_NAMES: add gemini-4-argon → Gemini 4 Argon, gemini-3.8-flash → Gemini 3.8 Flash.
    • getQuotaModelFamilyId: register both families before the 3.7/3.6 Flash rule.
    • Both stay out of EXACT_PRESENTATION_FAMILIES: the families are rendered as one row, matching the
      documented shared allowance, rather than one row per physical tier.
  • src/modules/cloud-account/components/CloudAccountCard.tsx
    • getAvailabilityModelCandidates: map the two family ids to their physical tier ids.
  • src/tests/unit/quota-model-families.test.ts
    • aggregation, family-id and presentation coverage for both families.

Physical ids and display names were confirmed from a live Google AI Pro account (agy models).

Validation

Run on Windows 11, Node 24.22.0, pnpm 10.34.6.

  • node ./node_modules/vitest/vitest.mjs run on src/tests/unit/quota-model-families.test.ts
    (vitest 4.1.8, harness pointed at this worktree because main currently fails pnpm run check:ci tests:
    the lockfile pairs vitest@4.1.8 with vite@5.4.21, and vitest imports vite/module-runner,
    which Vite 5 does not export. Both tests-unit jobs fail on main at that step).
    Result: 12/12 pass.
  • Regression check: the same test file against the pre-change source fails 3/3 new cases and passes the
    9 existing ones, so the new assertions cover the behavior.
  • prettier --check on the three changed files: pass.
  • eslint on the three changed files: pass.
  • tsc --noEmit: pass.

Limitations

  • The exact quota-summary payload for Argon was not captured from a live account, so the change is
    verified at unit level plus the live model list. If Google reports the Argon allowance as a quota
    group instead of per-model entries, the existing group path already renders it and this mapping is
    unaffected.

  • No packaged-app screenshot: the change is limited to family aggregation keys and has unit coverage.

  • The change is focused and excludes unrelated edits.

  • Relevant behavior and documentation have been checked for this change.

  • The diff and attachments contain no credentials, private data or generated application artifacts.

Antigravity advertises gemini-4-argon-{low,medium,high} and
gemini-3.8-flash-{low,medium,high}, but the quota model registry only
knew families up to Gemini 3.7 Flash. Unknown ids stay independent, so
each family rendered as three rows with raw ids and the conservative
family summary counted every tier as a separate model.

Register both families with their product display names and map the
family ids to their physical tiers for the availability badge lookup.
Both families keep the conservative aggregation instead of joining
EXACT_PRESENTATION_FAMILIES because each draws from one shared allowance.
@codereviewbot-ai

codereviewbot-ai Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Summary of Changes

LGTM. The pull request correctly registers and collapses the gemini-4-argon and gemini-3.8-flash quota families:

  1. Family Mapping & Aggregation (quota-model-families.ts):

    • Added gemini-4-argon and gemini-3.8-flash entries with user-facing display names in FAMILY_DISPLAY_NAMES.
    • Registered prefix matching in getQuotaModelFamilyId prior to legacy version fallbacks.
    • Retained conservative family aggregation (omitted from EXACT_PRESENTATION_FAMILIES) to present shared allowance tiers as unified family rows rather than fragmented tier rows.
  2. Availability Candidate Resolution (CloudAccountCard.tsx):

    • Updated getAvailabilityModelCandidates so aggregated family presentation keys map to their underlying physical tier candidates (-low, -medium, -high), ensuring live model availability and rate-limit indicators are properly surfaced.
  3. Test Coverage (quota-model-families.test.ts):

    • Added unit test cases for tier aggregation, earliest reset calculation, display names, and presentation filtering for both model families.

🤖 Reviewed by codereviewbot.ai - Catch bugs before your team does.

@timacek

timacek commented Oct 23, 2026

Copy link
Copy Markdown
Contributor Author

Both tests-unit jobs fail at startup, before any test file is collected:

Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './module-runner' is not defined by "exports"
in .../node_modules/vite/package.json imported from .../node_modules/vitest/dist/chunks/nativeModuleRunner.*.js

That is a dependency mismatch in the current lockfile (vitest@4.1.8 resolved against vite@5.4.21), and it
also fails on main without this diff (for example run 39636647774 at 86a3600). It is not caused by the change
in this PR.

How the affected behavior was verified instead, on Windows 11 with Node 24.22.0:

  • src/tests/unit/quota-model-families.test.ts run with vitest@4.1.8 against this worktree: 12/12 pass.
  • The same file against the pre-change source: 3/3 new cases fail and 9/9 existing cases pass, so the new
    assertions actually cover the mapping.
  • prettier --check, eslint and tsc --noEmit on the worktree: clean. The formatting, lint and react-doctor
    jobs pass on this PR.

@Draculabo
Draculabo merged commit 3e350a6 into Draculabo:main Oct 23, 2026
3 of 5 checks passed
Draculabo pushed a commit that referenced this pull request Oct 23, 2026
# 🚀 Antigravity Manager Release v0.26.0

**Release Date:** 2026-10-23
**Since v0.25.2:** 15 commits · 6 merged PRs · 3 verified contributors

> This release includes updates in Tooling & Maintenance, Desktop & User Experience, Documentation, Accounts & Core.

---

## ✨ Highlights

- **Feature** — add evidence-backed agent lessons ([dbd2b25](dbd2b25))
- **Feature** — add weekly quota summary and support Claude/GPT items in minima… ([#364](#364))
- **Fix** — improve client detection and switch failure diagnostics ([d472eaa](d472eaa))
- **Fix** — group Gemini 4 Argon and 3.8 Flash quota families ([#367](#367))
- **Fix** — apply AppImage maker patch with pnpm ([420ea77](420ea77))

---

## 🔧 Tooling & Maintenance

- **Maintenance** — unify agent checks and document lifecycle ([78910c9](78910c9))
- **Feature** — add evidence-backed agent lessons ([dbd2b25](dbd2b25))
- **Change** — Further optimize the display effect of the minimal mode. ([#357](#357))
- **Build** — migrate to pnpm and Node 24 ([ccec07e](ccec07e))
- **Fix** — improve client detection and switch failure diagnostics ([d472eaa](d472eaa))
- **Feature** — add weekly quota summary and support Claude/GPT items in minima… ([#364](#364))
- **Change** — Dev/d1021 2 ([#365](#365))
- **Fix** — apply AppImage maker patch with pnpm ([420ea77](420ea77))

---

## 🖥️ Desktop & User Experience

- **Maintenance** — update package metadata to v0.25.2 ([#353](#353))

---

## 📚 Documentation

- **Documentation** — organize guides by module ownership ([2f029a3](2f029a3))
- **Documentation** — refresh bilingual READMEs and application screenshots ([c97c8a8](c97c8a8))
- **Documentation** — clarify contribution workflow and onboarding ([3db10bf](3db10bf))
- **Documentation** — split development security and testing guides by owner ([f3225fa](f3225fa))
- **Documentation** — add Swiftproxy sponsor ([#362](#362))

---

## 🏗️ Accounts & Core

- **Fix** — group Gemini 4 Argon and 3.8 Flash quota families ([#367](#367))

---

## 👥 Contributors

Thanks to everyone who contributed to this release.

@FisherMS · @Draculabo · @timacek

<details>
<summary>Merged pull requests and authors</summary>

- chore(linux): update package metadata to v0.25.2 by @Draculabo ([#353](#353))
- Further optimize the display effect of the minimal mode. by @FisherMS ([#357](#357))
- docs: add Swiftproxy sponsor by @Draculabo ([#362](#362))
- feat: add weekly quota summary and support Claude/GPT items in minima… by @FisherMS ([#364](#364))
- Dev/d1021 2 by @FisherMS ([#365](#365))
- fix(cloud-account): group Gemini 4 Argon and 3.8 Flash quota families by @timacek ([#367](#367))

</details>

---

**Full Changelog:** v0.25.2...v0.26.0
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.

2 participants