Skip to content

fix(resilience): keep Ollama model-not-found failures scoped to connection model lockout (#11071) - #11078

Merged
diegosouzapw merged 1 commit into
diegosouzapw:release/v3.8.50from
rqzbeh:fix/ollama-404-model-lockout
Aug 22, 2026
Merged

diegosouzapw merged 1 commit into
diegosouzapw:release/v3.8.50from
rqzbeh:fix/ollama-404-model-lockout

Conversation

@rqzbeh

@rqzbeh rqzbeh commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes #11071 where a 404 model-not-found error on ollama-local / local self-hosted providers was improperly treated as a connection-wide failure instead of a model-scoped lockout.

Changes

  1. open-sse/services/accountFallback.ts: Included isLocalProviderId(canonicalId) and isSelfHostedChatProvider(canonicalId) in hasPerModelQuota() check, and resolved canonicalId = resolveProviderId(provider) so local providers (such as ollama-local, ollama, lm-studio, etc.) receive per-model lockouts on 404 / transient model errors instead of whole-connection cooldowns.
  2. tests/unit/ollama-404-model-lockout-11071.test.ts: Added automated unit test verifying hasPerModelQuota returns true for ollama-local and that markAccountUnavailable locks only the missing model on a 404 error without marking the connection unavailable for sibling models.

Verification

  • node --import tsx/esm --test tests/unit/ollama-404-model-lockout-11071.test.ts (2/2 passed)
  • npm run check:mutation-test-coverage (passed)
  • npm run check:dashboard-typecheck (passed)
  • npm run check:open-sse-typecheck (passed)

@diegosouzapw
diegosouzapw force-pushed the fix/ollama-404-model-lockout branch from ca093bd to 2f359e7 Compare August 22, 2026 19:05
@diegosouzapw
diegosouzapw merged commit 50fc0d7 into diegosouzapw:release/v3.8.50 Aug 22, 2026
5 of 7 checks passed
diegosouzapw added a commit that referenced this pull request Aug 28, 2026
…nc-back step 2/2

The eighteen commits main carries beyond the cycle branch, and what each one
became here:

  already in release/v3.8.51 by its own PR (no-op, verified by content):
    b090b60 / 026e1ca  deps: nanoid 3.3.18 equal, dompurify 3.4.14 newer
    918fba5  .gitignore: /_tasks already anchored
    5f0a394  #10026 hide health-check-excluded models — same helper, 5 call sites
    c68cda7  #11075 shared passthrough providers — superseded by #11071/#11078
  superseded, one piece kept:
    ca23eed  #10055 memoize models.dev pricing — the cycle memoizes on the
                catalog cache version already; only the resetDbInstance() hook is
                ported, wired to that memo
  applied as-is:
    8778ea7  stamp dist/BUILD_SHA before the npm provenance gate (#11721)
    aa52351  decouple the Bun image from the release manifest (#11724)
    925feb2  let the bun digest artifact be absent (#11740)
    b65ef33  size the install-upgrade gate to a measured run
    0ce2123  #11845 converge install/upgrade schemas (migration renumbered in
                the next commit: 163 collides with 163_radar_feed_cache_generated_at)
    b7c07ed  #11855 install-upgrade gate on disk, not tmpfs
    8e2fb04  #11864 drop *.nft.json from the npm tarball (413)
    dea6bb8  #11877 publish npm from a hosted runner (provenance 422)
  handled by the sync script that follows (CHANGELOG protocol):
    b4ec780  Release v3.8.50 — squash of content this branch already carries
    5458026 / c44c0a2  CHANGELOG aggregation, stats and top-25
  applied separately (its own commit, ten files):
    65e8115  #11088 Ollama capability routing — a 5,094-file squash from a
                stale base; only the Ollama files are the change

Every cherry-pick that touched a file this branch had also changed was
resolved by hand and re-run through the tests both sides own for it.
muhamadgalihsaputra pushed a commit to niyatna/NiyatnaRoute that referenced this pull request Sep 27, 2026
…ction model lockout (diegosouzapw#11071) (diegosouzapw#11078)

Cherry-picked the value commit (2c9202e) onto the current tip, dropping the stale base-red sync commits. Focused tests: ollama-404-model-lockout 2/2 + the five sibling lockout suites (combo-provider-cooldown-sibling, 8247-model-unhealthy, vertex-passthrough, nvidia-410, account-fallback-service) 112/112; mutation coverage no-drift. Fixes diegosouzapw#11071 — local/self-hosted 404s now scope to model lockout per the resilience doctrine. Thank you @rqzbeh!
muhamadgalihsaputra pushed a commit to niyatna/NiyatnaRoute that referenced this pull request Sep 27, 2026
…nc-back step 2/2

The eighteen commits main carries beyond the cycle branch, and what each one
became here:

  already in release/v3.8.51 by its own PR (no-op, verified by content):
    7124dd3 / bae33e2  deps: nanoid 3.3.18 equal, dompurify 3.4.14 newer
    ceb8e3e  .gitignore: /_tasks already anchored
    bf87c7d  diegosouzapw#10026 hide health-check-excluded models — same helper, 5 call sites
    3816ade  diegosouzapw#11075 shared passthrough providers — superseded by diegosouzapw#11071/diegosouzapw#11078
  superseded, one piece kept:
    b735371  diegosouzapw#10055 memoize models.dev pricing — the cycle memoizes on the
                catalog cache version already; only the resetDbInstance() hook is
                ported, wired to that memo
  applied as-is:
    a93d123  stamp dist/BUILD_SHA before the npm provenance gate (diegosouzapw#11721)
    dd329d7  decouple the Bun image from the release manifest (diegosouzapw#11724)
    a5e649b  let the bun digest artifact be absent (diegosouzapw#11740)
    e9045c4  size the install-upgrade gate to a measured run
    f5addae  diegosouzapw#11845 converge install/upgrade schemas (migration renumbered in
                the next commit: 163 collides with 163_radar_feed_cache_generated_at)
    a38590e  diegosouzapw#11855 install-upgrade gate on disk, not tmpfs
    8588804  diegosouzapw#11864 drop *.nft.json from the npm tarball (413)
    28bde09  diegosouzapw#11877 publish npm from a hosted runner (provenance 422)
  handled by the sync script that follows (CHANGELOG protocol):
    fc15eef  Release v3.8.50 — squash of content this branch already carries
    2b80128 / 4398260  CHANGELOG aggregation, stats and top-25
  applied separately (its own commit, ten files):
    837b36a  diegosouzapw#11088 Ollama capability routing — a 5,094-file squash from a
                stale base; only the Ollama files are the change

Every cherry-pick that touched a file this branch had also changed was
resolved by hand and re-run through the tests both sides own for it.
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.

fix(resilience): keep Ollama model-not-found failures scoped to one connection and model

2 participants