Skip to content

[defer] feat(antigravity): support Gemini 3.8 Flash, live catalog sync, and family quota pools - #12672

Open
TheDemonTuan wants to merge 7 commits into
diegosouzapw:release/v3.8.52from
TheDemonTuan:feat/upstream-antigravity-gemini-38
Open

TheDemonTuan wants to merge 7 commits into
diegosouzapw:release/v3.8.52from
TheDemonTuan:feat/upstream-antigravity-gemini-38

Conversation

@TheDemonTuan

Copy link
Copy Markdown
Contributor

⚠️ base-red inherited: #12581

Summary

This PR upgrades Antigravity & AGY support to handle Gemini 3.8 Flash, enables real dynamic live-catalog synchronization for future models, and implements model family quota pools (Gemini Models, Claude & GPT Models) with 5h and weekly windows.

1. Gemini 3.8 Flash Support & Request Semantics

  • Adds gemini-3.8-flash-high, gemini-3.8-flash-medium, gemini-3.8-flash-low to Antigravity and AGY public models.
  • Maps bare gemini-3.8-flash -> gemini-3.8-flash-medium without forcing -tiered routing.
  • Translates Gemini 3.8 to thinkingConfig.thinkingLevel ("LOW" | "MEDIUM" | "HIGH") across both OpenAI-to-Gemini and Claude-to-Gemini translators, avoiding invalid thinkingBudget injection.
  • Strips unsupported legacy sampling parameters (topK, topP, temperature) for Gemini 3.8.

2. Live Catalog Synchronization & Self-Healing

  • Removes static allowlist filtering from the quota normalization path (liveModelIds.ts, quotaNormalize.ts), allowing newly launched upstream models to retain their quota buckets immediately.
  • Syncs agy model filtering to use isDiscoverableAgyModelId.
  • Includes legacy connections without explicit autoSync into periodic synchronization.
  • Enhances reactive model sync on 404: awaits the sync, re-resolves the model against updated discovery aliases, rebuilds the request envelope, and transparently retries once.

3. Family Quota Pools & Multi-Window Routing

  • Parses v1internal:retrieveUserQuotaSummary into family quota pools (Gemini Models, Claude & GPT Models) with independent 5-hour and weekly windows, supporting both flat and nested remaining.remainingFraction responses.
  • Persists quotaGroups in providerLimitsCache so initial dashboard load renders the grouped UI without requiring a manual refresh.
  • Enforces multi-window quota safety: blocks requests when any reported family window (5h or weekly) reaches the threshold, preventing 429 loops when weekly is exhausted.
  • Renders grouped quota pools with live discovered model inventories in Provider Limits, removing static ordering penalties for new models.

Validation

  • node --import tsx/esm --test tests/unit/antigravity-*.test.ts tests/unit/reactive-model-sync*.test.ts tests/unit/model-sync-legacy-autosync-backfill.test.ts tests/unit/quota-cache-antigravity-*.test.ts tests/unit/provider-limits-ui.test.ts (364 tests pass)
  • npm run typecheck:core (clean)
  • ESLint clean on all changed files

diegosouzapw pushed a commit that referenced this pull request Sep 4, 2026
…g conversation (#12646)

Validado sobre o tip de `release/v3.8.51`, com duas coisas resolvidas antes do merge.

**A falha de CI era stale.** O job `No new ESLint warnings` deste PR apontava `react-hooks/set-state-in-effect` em `src/app/(dashboard)/dashboard/combos/page.tsx:774` — arquivo que este PR não toca, e o mesmo erro aparecia em #12668 e #12672, que também não o tocam. A linha do tempo: o #12355 introduziu a violação de manhã, os CIs rodaram nessa janela, e o #12607 acrescentou a entrada de supressão à tarde. Medido no tip atual com o comando exato do job: **0 ocorrências não suprimidas**. A supressão sobrevivente é "unpruned", e o script passa `--pass-on-unpruned-suppressions` justamente para isso não bloquear.

**Faltava o teste que a regra do projeto exige** para mudanças em `src/`. Acrescentei `tests/unit/ui/log-detail-conversation-link-12646.test.tsx`, verificado **RED-then-GREEN** em vez de escrito contra o código pronto: revertendo `RequestLoggerDetail.sections.tsx` para o tip, 2 dos 3 casos falham; com a mudança deste PR, 3/3 passam.

Detalhe que valeu a pena descobrir: a seção curto-circuita em `allTurns.length === 0`, então o fixture precisa de um `requestBody` que normalize em pelo menos um turno — sem isso o cabeçalho inteiro nunca monta e as asserções passariam pelo motivo errado. O teste fixa três coisas: o href para um `sessionTag` simples, o percent-encoding para um que não é URL-safe, e a ausência de link quando não há `sessionTag`.

Obrigado, @hartmark.
diegosouzapw pushed a commit that referenced this pull request Sep 11, 2026
Straightforward and well-scoped: a live catalog model falling through to the conservative 16384 clamp because `MODEL_SPECS` never got a 3.8 entry. Keeping the fallback for genuinely unknown ids is right, and the note on how this relates to #12663, #12499 and #12672 saved the review.

---

Validated in one consolidated worktree cut from `release/v3.8.51`, boarded with the other 19 PRs of this batch. Two in-batch conflicts, both additive and resolved by keeping each side: the `ENVIRONMENT.md` table (#13035 + #13011) and the `chatHelpers.ts` import block (#12975 on the tip + #13017).

- `typecheck:core` clean; `check:dashboard-typecheck` OK (206 pre-existing, within baseline); `check:changelog-integrity` OK; `check:docs-counts` migrations ✓
- complexity 2816 / baseline 3218 and cognitive-complexity 1271 / baseline 1437 — both under baseline
- 531 of 532 focused assertions green across the batch's 46 test files
- `check-file-size` rebaselined for the batch's real growth (annotation `_rebaseline_2026_09_11_mergebatch_v3851_houminxi`, landed on #13038), attributed per PR

The single red is **not this batch**: `tests/unit/combo/quota-weighted-strategy.test.ts` → "A/B isolation: 7 hard-empty + 2 at 0.5% + 1 at 40%, floor=1" asserts an order between two connections of identical weight and flakes on the pure tip too — 2 failures in 4 runs at `origin/release/v3.8.51` with nothing from this batch applied.

⚠️ base-red inherited: #12732 — `Docs Gates`, `Merge integrity`, `No new ESLint warnings`, `Unit Tests fast-path` and `Fast Quality Gates` reproduce on the pure tip (provider count 356 vs the 358 the modules define, SKILL.md drift, and `open-sse/utils/stream.ts` at 3115 > frozen 3098, untouched here).

Thanks @HouMinXi — the live evidence on these (X500 logs, `storage.sqlite` state, real `/v1/models` probes, the 36-minute outage write-up) is what let a 20-PR batch be reviewed as a unit.
@diegosouzapw

Copy link
Copy Markdown
Owner

This is a big, well-tested PR (ran your 11 new/changed test files locally — 70/70 pass)
but it bundles three separate things: the Gemini 3.8 Flash catalog entries (which use a
different tiering scheme than the PR we're merging for that piece, #13318), a live
catalog-sync mechanism for model ids discovered outside the static catalog, and a new
"family quota pools" dashboard UI. The last two are genuinely valuable and unique to this
PR, but they deserve their own focused review and design sign-off rather than riding in
with a model registration. Could you split the live-sync + quota-pools-UI pieces into
their own PR, rebased onto today's catalog refactor (#13410), and drop the 3.8-flash
catalog piece (already covered by #13318)? Also please add a changelog fragment and a
quick note on which ESLint suppressions you removed and why.

@diegosouzapw diegosouzapw changed the title feat(antigravity): support Gemini 3.8 Flash, live catalog sync, and family quota pools [defer] feat(antigravity): support Gemini 3.8 Flash, live catalog sync, and family quota pools Sep 15, 2026
@TheDemonTuan

Copy link
Copy Markdown
Contributor Author

Done! Split the live catalog sync and family quota pools pieces into a dedicated, focused PR: #13739.

Summary of changes:

  1. *Rebased onto active
    elease/v3.8.51*
    (which includes the catalog deduplication from fix(providers): de-duplicate agy and antigravity model catalogs #13410).
  2. Dropped the Gemini 3.8 Flash catalog pieces (covered by feat(models): add Gemini 3.8 Flash tiers to Antigravity and AGY catalogs #13318).
  3. Changelog fragment added: \changelog.d/features/antigravity-live-sync-family-quota-pools.md.
  4. ESLint suppressions: Cleaned up the 2 @typescript-eslint/no-unused-vars\ suppressions for \open-sse/executors/antigravity.ts\ in \config/quality/eslint-suppressions.json\ because those unused variables were eliminated during the reactive 404 sync refactoring (
    e-resolve model and rebuild request envelope).

All 8 focused unit tests pass and
pm run typecheck:core\ is clean on #13739. Thanks!

Githab-capibara added a commit to Githab-capibara/OmniRoute that referenced this pull request Sep 17, 2026
…13195)

Straightforward and well-scoped: a live catalog model falling through to the conservative 16384 clamp because `MODEL_SPECS` never got a 3.8 entry. Keeping the fallback for genuinely unknown ids is right, and the note on how this relates to diegosouzapw#12663, diegosouzapw#12499 and diegosouzapw#12672 saved the review.

---

Validated in one consolidated worktree cut from `release/v3.8.51`, boarded with the other 19 PRs of this batch. Two in-batch conflicts, both additive and resolved by keeping each side: the `ENVIRONMENT.md` table (diegosouzapw#13035 + diegosouzapw#13011) and the `chatHelpers.ts` import block (diegosouzapw#12975 on the tip + diegosouzapw#13017).

- `typecheck:core` clean; `check:dashboard-typecheck` OK (206 pre-existing, within baseline); `check:changelog-integrity` OK; `check:docs-counts` migrations ✓
- complexity 2816 / baseline 3218 and cognitive-complexity 1271 / baseline 1437 — both under baseline
- 531 of 532 focused assertions green across the batch's 46 test files
- `check-file-size` rebaselined for the batch's real growth (annotation `_rebaseline_2026_09_11_mergebatch_v3851_houminxi`, landed on diegosouzapw#13038), attributed per PR

The single red is **not this batch**: `tests/unit/combo/quota-weighted-strategy.test.ts` → "A/B isolation: 7 hard-empty + 2 at 0.5% + 1 at 40%, floor=1" asserts an order between two connections of identical weight and flakes on the pure tip too — 2 failures in 4 runs at `origin/release/v3.8.51` with nothing from this batch applied.

⚠️ base-red inherited: diegosouzapw#12732 — `Docs Gates`, `Merge integrity`, `No new ESLint warnings`, `Unit Tests fast-path` and `Fast Quality Gates` reproduce on the pure tip (provider count 356 vs the 358 the modules define, SKILL.md drift, and `open-sse/utils/stream.ts` at 3115 > frozen 3098, untouched here).

Thanks @HouMinXi — the live evidence on these (X500 logs, `storage.sqlite` state, real `/v1/models` probes, the 36-minute outage write-up) is what let a 20-PR batch be reviewed as a unit.
@diegosouzapw diegosouzapw added the deferred-v3.8.52 Grande demais / suspeito para o lote atual; precisa de sessão dedicada no ciclo v3.8.52 label Sep 25, 2026
muhamadgalihsaputra pushed a commit to niyatna/NiyatnaRoute that referenced this pull request Sep 27, 2026
…g conversation (diegosouzapw#12646)

Validado sobre o tip de `release/v3.8.51`, com duas coisas resolvidas antes do merge.

**A falha de CI era stale.** O job `No new ESLint warnings` deste PR apontava `react-hooks/set-state-in-effect` em `src/app/(dashboard)/dashboard/combos/page.tsx:774` — arquivo que este PR não toca, e o mesmo erro aparecia em diegosouzapw#12668 e diegosouzapw#12672, que também não o tocam. A linha do tempo: o diegosouzapw#12355 introduziu a violação de manhã, os CIs rodaram nessa janela, e o diegosouzapw#12607 acrescentou a entrada de supressão à tarde. Medido no tip atual com o comando exato do job: **0 ocorrências não suprimidas**. A supressão sobrevivente é "unpruned", e o script passa `--pass-on-unpruned-suppressions` justamente para isso não bloquear.

**Faltava o teste que a regra do projeto exige** para mudanças em `src/`. Acrescentei `tests/unit/ui/log-detail-conversation-link-12646.test.tsx`, verificado **RED-then-GREEN** em vez de escrito contra o código pronto: revertendo `RequestLoggerDetail.sections.tsx` para o tip, 2 dos 3 casos falham; com a mudança deste PR, 3/3 passam.

Detalhe que valeu a pena descobrir: a seção curto-circuita em `allTurns.length === 0`, então o fixture precisa de um `requestBody` que normalize em pelo menos um turno — sem isso o cabeçalho inteiro nunca monta e as asserções passariam pelo motivo errado. O teste fixa três coisas: o href para um `sessionTag` simples, o percent-encoding para um que não é URL-safe, e a ausência de link quando não há `sessionTag`.

Obrigado, @hartmark.
muhamadgalihsaputra pushed a commit to niyatna/NiyatnaRoute that referenced this pull request Sep 27, 2026
…13195)

Straightforward and well-scoped: a live catalog model falling through to the conservative 16384 clamp because `MODEL_SPECS` never got a 3.8 entry. Keeping the fallback for genuinely unknown ids is right, and the note on how this relates to diegosouzapw#12663, diegosouzapw#12499 and diegosouzapw#12672 saved the review.

---

Validated in one consolidated worktree cut from `release/v3.8.51`, boarded with the other 19 PRs of this batch. Two in-batch conflicts, both additive and resolved by keeping each side: the `ENVIRONMENT.md` table (diegosouzapw#13035 + diegosouzapw#13011) and the `chatHelpers.ts` import block (diegosouzapw#12975 on the tip + diegosouzapw#13017).

- `typecheck:core` clean; `check:dashboard-typecheck` OK (206 pre-existing, within baseline); `check:changelog-integrity` OK; `check:docs-counts` migrations ✓
- complexity 2816 / baseline 3218 and cognitive-complexity 1271 / baseline 1437 — both under baseline
- 531 of 532 focused assertions green across the batch's 46 test files
- `check-file-size` rebaselined for the batch's real growth (annotation `_rebaseline_2026_09_11_mergebatch_v3851_houminxi`, landed on diegosouzapw#13038), attributed per PR

The single red is **not this batch**: `tests/unit/combo/quota-weighted-strategy.test.ts` → "A/B isolation: 7 hard-empty + 2 at 0.5% + 1 at 40%, floor=1" asserts an order between two connections of identical weight and flakes on the pure tip too — 2 failures in 4 runs at `origin/release/v3.8.51` with nothing from this batch applied.

⚠️ base-red inherited: diegosouzapw#12732 — `Docs Gates`, `Merge integrity`, `No new ESLint warnings`, `Unit Tests fast-path` and `Fast Quality Gates` reproduce on the pure tip (provider count 356 vs the 358 the modules define, SKILL.md drift, and `open-sse/utils/stream.ts` at 3115 > frozen 3098, untouched here).

Thanks @HouMinXi — the live evidence on these (X500 logs, `storage.sqlite` state, real `/v1/models` probes, the 36-minute outage write-up) is what let a 20-PR batch be reviewed as a unit.
@diegosouzapw
diegosouzapw changed the base branch from release/v3.8.51 to release/v3.8.52 September 29, 2026 11:28
@diegosouzapw

Copy link
Copy Markdown
Owner

Re-homed to release/v3.8.52: v3.8.51 entered its release freeze, so the branch now belongs to the release captain and development continues on the next cycle. Nothing is wrong with this PR — it just needed a live base. No action needed from you; CI will re-run against the new base.

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

deferred-v3.8.52 Grande demais / suspeito para o lote atual; precisa de sessão dedicada no ciclo v3.8.52

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants