Skip to content

feat(models): reactive discovery sync after Antigravity model-not-found 404 - #11888

Merged
diegosouzapw merged 1 commit into
release/v3.8.51from
fix/11688-recreate-reactive-model-sync
Aug 28, 2026
Merged

diegosouzapw merged 1 commit into
release/v3.8.51from
fix/11688-recreate-reactive-model-sync

Conversation

@diegosouzapw

Copy link
Copy Markdown
Collaborator

Summary

Recreation of #11688 (MumuTW) onto the active release/v3.8.51 — the original PR was opened
against main, too far diverged from the active release for a clean retarget, and MumuTW's
fork rejects maintainer pushes. Cherry-picked the PR's single commit (author preserved) onto
the current tip and re-validated here; applied cleanly, no conflicts.

Pinned model catalogs go stale the moment the upstream backend ships or renames a model
(Gemini 3.7 Flash on Antigravity this cycle, zai-web #7678, Claude Opus 4.8 #2979). Requests
404 upstream until somebody re-freezes the catalog by hand. This makes the 404 self-healing
for the Antigravity family:

  • new src/lib/providerModels/reactiveModelSync.ts — on a model-not-found 404 the Antigravity
    executor kicks a discovery sync for that connection via the existing per-connection loopback
    sync (discovery → synced AvailableModels store)
  • guardrails: provider allow-list (antigravity/agy), 10-minute per-connection cooldown,
    in-flight dedup; fire-and-forget with log-only failures — the scheduled auto-sync cycle
    (Support auto-update for model lists in API Providers and OpenRouter #488) stays the backstop
  • syncConnectionModels exported from modelSyncScheduler so the scheduled cycle and the
    reactive trigger share one loopback implementation

Related Issues

Related to #2979, #488, #8123, #7678.

Verification (on release/v3.8.51 tip)

  • node --import tsx/esm --test tests/unit/reactive-model-sync.test.ts — 9/9 passing
  • node scripts/check/check-file-size.mjs — pass

Closes #11688 (recreated — commit author MumuTW preserved via cherry-pick).

Co-authored-by: MumuTW 42820974+MumuTW@users.noreply.github.com

…nd 404

Pinned model catalogs go stale the moment the upstream backend ships or
renames a model (Gemini 3.7 Flash on Antigravity, zai-web #7678, Claude
Opus 4.8 #2979): requests 404 upstream until somebody re-freezes the
catalog by hand. The 404 itself is the most precise trigger available.

The Antigravity executor now kicks a reactive discovery sync on a
model-not-found 404:

- new src/lib/providerModels/reactiveModelSync.ts runs the existing
  per-connection loopback sync (discovery -> synced catalog), so the
  fresh model list lands in the synced AvailableModels store and the
  next request resolves — /v1/models self-heals on the same path
- guardrails: provider allow-list (antigravity/agy), 10-minute
  per-connection cooldown, in-flight dedup; fire-and-forget with log-only
  failures (the scheduled auto-sync cycle stays the backstop)
- syncConnectionModels is exported from modelSyncScheduler to share one
  loopback implementation between the scheduled cycle and this trigger

Follows the accepted direction of #2979 (background discovery/sync) with
the smallest reactive slice; extends to other discovery-capable providers
by growing the allow-list.
@diegosouzapw
diegosouzapw merged commit 675bca8 into release/v3.8.51 Aug 28, 2026
7 of 12 checks passed
diegosouzapw added a commit that referenced this pull request Aug 28, 2026
…iscovery (#11889)

Recreated from #11689 (MumuTW) onto the active release/v3.8.51 — commit cherry-picked cleanly
with author preserved (auto-merged onto the just-boarded #11888); 10/10 focused tests +
file-size all green on this tip. Thanks for the fix!
@diegosouzapw
diegosouzapw deleted the fix/11688-recreate-reactive-model-sync branch August 28, 2026 12:41
muhamadgalihsaputra pushed a commit to niyatna/NiyatnaRoute that referenced this pull request Sep 27, 2026
…nd 404 (cheaper-inference#11888)

Recreated from cheaper-inference#11688 (MumuTW) onto the active release/v3.8.51 — commit cherry-picked cleanly
with author preserved; 9/9 focused tests + file-size all green on this tip. Thanks for the fix!
muhamadgalihsaputra pushed a commit to niyatna/NiyatnaRoute that referenced this pull request Sep 27, 2026
…iscovery (cheaper-inference#11889)

Recreated from cheaper-inference#11689 (MumuTW) onto the active release/v3.8.51 — commit cherry-picked cleanly
with author preserved (auto-merged onto the just-boarded cheaper-inference#11888); 10/10 focused tests +
file-size all green on this tip. Thanks for the fix!
Witroch4 pushed a commit to Witroch4/OmniRoute that referenced this pull request Oct 24, 2026
…nd 404

Port of upstream 675bca8 (cheaper-inference#11888). When the Antigravity backend answers 404
for a model, the executor kicks a discovery sync for that connection (existing
sync-models path, fire-and-forget, 10-min per-connection cooldown, in-flight
dedup), so models the backend shipped or renamed land in the synced catalog
without waiting for the 24h cycle. Retired Gemini ids never get here: the fork
refuses them before credential selection.

Fork adaptation: the fork keeps the send loop inline in
open-sse/executors/antigravity.ts (no executeAttempt.ts module), so the trigger
is wired there; a wiring test pins it.

(cherry picked from commit 675bca8)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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