fix: reset model picker on session switch#1779
Conversation
ba33778 to
6ff1ac6
Compare
…1778, nesquena#1779) Constituent PRs: - nesquena#1768 (@franksong2702) serialize Anthropic env fallback reads. Closes nesquena#1736. - nesquena#1778 (@Michaelyklam) preserve CLI session tool metadata. Closes nesquena#1772. - nesquena#1779 (@Michaelyklam) reset model picker on session switch. Closes nesquena#1771. AUTO-FIX: Opus stage-310 caught a regression in the new !hasSessionModel branch — it dropped the deferModelCorrection guard that the parallel else-branch keeps. Fired spurious /api/session/update POSTs against imported/read-only CLI sessions whose model field reads 'unknown' (the exact surface nesquena#1778 introduces in this same release). Wrapped the new branch's _persistSessionModelCorrection call + state mutation in if(!deferModelCorrection). Added test_sync_topbar_does_not_persist_correction_while_model_resolution_deferred regression test covering both empty and 'unknown' fast-path interaction. Tests: 4694 → 4702 collected (+8). 4695 passed, 4 skipped, 3 xpassed, 0 failed in 141.29s. Pre-release verification: - All 3 PRs CI-green individually. - node -c clean on static/ui.js. - 11/11 browser API endpoints PASS. - Pre-stamp re-fetch: all PR heads match local rebases. - Opus advisor: SHIP nesquena#1768 + nesquena#1778, nesquena#1779 SHOULD-FIX before merge — auto-fix applied at stage with regression test, re-verified clean. Closes nesquena#1736, nesquena#1771, nesquena#1772.
|
Thanks @Michaelyklam — this shipped in v0.51.16 (commit A small auto-fix was applied at stage time per the Opus stage-310 SHOULD-FIX: the new GitHub didn't auto-close because the merge commit only references the squash-merged stage branch, not your fork's commit directly — closing manually for hygiene. Live now on existing installs after Release notes: https://github.com/nesquena/hermes-webui/releases/tag/v0.51.16 |
v0.51.16 — 3-PR batch (nesquena#1768, nesquena#1778, nesquena#1779) # Conflicts: # CHANGELOG.md
Thinking Path
syncTopbar()to restore per-session model metadata.unknown, or stale session model metadata could leave the hidden select and visible picker on the previously viewed chat's model.What Changed
static/ui.jsthat treats missing/unknown/stale session model metadata as needing an explicit reset instead of keeping the previous selection.unknownmodel metadata, and visible dropdown rerendering.Why It Matters
Fixes #1771
Verification
origin/master: copied the new regression test into a cleanorigin/masterworktree and confirmed 3 failures where the select stayed on@expensive:gpt-5.5instead of the safe default./home/michael/.hermes/hermes-agent/venv/bin/python -m pytest tests/test_issue1771_session_model_switch_sync.py -q→ 3 passed./home/michael/.hermes/hermes-agent/venv/bin/python -m pytest tests/test_issue1771_session_model_switch_sync.py tests/test_provider_mismatch.py tests/test_session_metadata_fast_path.py -q→ 68 passed.git diff --check→ passed.@expensive:gpt-5.5; switching to session B with missing model metadata immediately changed the visible composer model picker toGPT-4o minibefore sending.env -u HERMES_CONFIG_PATH -u HERMES_WEBUI_HOST /home/michael/.hermes/hermes-agent/venv/bin/python -m pytest tests/ -qreached 4501 passed / 4 skipped / 3 xfailed but failed after the test HTTP server on port 26676 stopped responding, causing 189 connection-refused/remote-disconnected failures across unrelated endpoint tests. No issue bug(model): switching chats does not switch the active model — silent fall-through to dropdown's last value can route messages to wrong (potentially expensive) model #1771 targeted tests failed.Evidence / UI media
Risks / Follow-ups
Model Used
gpt-5.5via Hermes Agent.