Spaces:
Paused

icebear icebear0828 commited on
Commit
56be298
·
unverified ·
1 Parent(s): f25b99c

fix: model list not updating at startup — fast-retry on auth race (#149)

Browse files

Root cause: token refresh and model fetch race at startup. Initial fetch
fires 1s after boot, but accounts may still be refreshing OAuth tokens.
isAuthenticated() returns false → fetch silently skips → next retry is
~1 hour later.

- model-fetcher: fast-retry (10s × 12 attempts) until accounts are ready
- config/models.yaml: add gpt-5.4/5.4-mini/5.3-codex (restored 2026-03-18)
- Export hasFetchedModels() for observability
- 4 new tests covering retry/fallback/immediate-success scenarios

Co-authored-by: icebear0828 <icebear0828@users.noreply.github.com>

4 files changed +245 -17
Files changed (4)
CHANGELOG.md+6
config/models.yaml+46-2
src/models/__tests__/model-fetcher-retry.test.tsAdded+134
src/models/model-fetcher.ts+59-15