github nesquena/hermes-webui v0.50.282
v0.50.282 — Nous Portal full live catalog + dropdown cache liveness

latest releases: v0.50.287, v0.50.286, v0.50.285...
3 hours ago

v0.50.282 — Nous Portal full live catalog + dropdown cache liveness

Two related dropdown-staleness bugs reported by Deor (Discord, May 03 2026, relayed by @AvidFuturist) — same root shape (model picker showing stale data because the live source of truth was never asked) — fixed in one PR.

Fixed

#1538 — Nous Portal picker stuck at 4 hardcoded models

_PROVIDER_MODELS["nous"] had four hardcoded entries (Claude Opus 4.6 / Sonnet 4.6, GPT-5.4 Mini, Gemini 3.1 Pro Preview) and _build_available_models_uncached() fell through to the generic pid in _PROVIDER_MODELS branch. The actual live Nous catalog has 30 models — Claude Opus 4.7, GPT-5.5, Kimi K2.6, MiniMax M2.7, Gemini 3.1 Pro/Flash, several Xiaomi/Tencent/StepFun entries, and more. Two parallel surfaces showed the stale four: /api/models (composer picker, Settings → Default Model, /model slash) and /api/providers (Settings → Providers card).

Fix: new _format_nous_label() helper in api/config.py that drops the vendor namespace and appends (via Nous) (reusing _format_ollama_label's token rules). New elif pid == "nous": branch in _build_available_models_uncached() mirroring the Ollama Cloud pattern: live-fetch via hermes_cli.models.provider_model_ids("nous"), prefix every id with @nous: (matches the routing convention pinned by tests/test_nous_portal_routing.py), fall back to the curated 4-entry static list when hermes_cli is unavailable so the picker is never empty. Same fix applied to api/providers.py:get_providers() for the parallel card-list path.

#1539 — Removed provider lingered in dropdowns until restart

Server-side cache was correctly flushed (set_provider_key() calls invalidate_models_cache() on both add and remove), but three JS-side caches were never dropped after /api/providers/delete: _slashModelCache/_slashModelCachePromise (commands.js, feeds /model slash suggestions) and _dynamicModelLabels/window._configuredModelBadges (ui.js, populated by populateModelDropdown). Pre-fix, _removeProviderKey() only refreshed the providers card list and never asked any consumer to re-fetch /api/models.

Fix: new _invalidateSlashModelCache() helper in static/commands.js (typeof-window-guarded so the module remains importable in headless vm.runInContext test contexts). New _refreshModelDropdownsAfterProviderChange() helper in static/panels.js that calls the invalidator + populateModelDropdown(), wrapped in try/catch with a fire-and-forget Promise.resolve(...).catch(()=>{}) so a slow /api/models doesn't block the providers panel refresh. Both _saveProviderKey and _removeProviderKey invoke the helper — defense-in-depth, the same staleness shape applies to the add path too.

Verified

  • /api/models Nous group: 30 models (was 4), all @nous:-prefixed, all (via Nous)-suffixed
  • Browser document.getElementById('modelSelect'): 30 options under "Nous Portal"
  • _invalidateSlashModelCache, _refreshModelDropdownsAfterProviderChange, populateModelDropdown all callable in browser; round-trip rebuild keeps the dropdown populated

Tests

  • 4013 passed → was 3990 (+23 from this release)
  • 12 new tests in tests/test_issue1538_nous_live_catalog.py
  • 11 new tests in tests/test_issue1539_provider_removal_dropdown_invalidation.py
  • All 3 CI runs (3.11/3.12/3.13) green; QA harness 31/31 passed; HTTP API sanity 11/11 passed

Reporters

  • Deor (Discord, May 03 2026) — both bug reports
  • @AvidFuturist — relay

Constituent PRs

  • #1544 — fix(providers): Nous Portal full live catalog + dropdown cache invalidation on provider remove (closes #1538, #1539)

Full diff: v0.50.281...v0.50.282

Don't miss a new hermes-webui release

NewReleases is sending notifications on new releases.