mirror of
https://github.com/nesquena/hermes-webui.git
synced 2026-07-04 22:51:32 +00:00
1fe8950022
## Release v0.51.238 — Release HF (stage-q9) Phase 3 MEDIUM-ring pick (3-factor: contributor×impact×mitigated-risk) — high-impact perf fix to the most-clicked affordance from a regular contributor (@franksong2702 ★★★), small code surface, CI-green. ### Fixed | PR | Author | Fix | |----|--------|-----| | #2518 follow-up | @franksong2702 | Clicking **New Conversation** on a cold start no longer hangs 3–4s on a catalog rebuild. `newSession()` fills `model_provider` from `window._activeProvider` (then prev-session) when the dropdown carries none, so `POST /api/session/new` takes the fast path on the first click too. | ### Pre-release dual gate caught a wrong-backend routing bug (fixed + regression-tested) The server fast path passes `(model, provider)` through **without validating the pair**, so naively attaching the active provider to *any* bare model could silently route to the wrong backend (e.g. bare `claude-opus-4.8` + active `openrouter`). **Codex** flagged this; **Opus** had judged it acceptable ("respect the selection over silent swap"). I took the stricter, empirically-grounded path and added a **family-mismatch guard** mirroring the server's own bare-prefix→provider map (`gpt`→openai, `claude`→anthropic, `gemini`→google): when the model's known family differs from the fallback provider, `model_provider` stays `null` so the server slow-path's family repair runs. This keeps the perf win for the common matching case while closing the mis-route. Backend behavioral tests confirm fast-path-on-match + slow-path-on-mismatch. (Also re-anchored the source-shape test assertions on the real `reqBody.model_provider=` assignment per Codex's 2nd note.) ### Gate results - **Full pytest suite**: 7495 passed, 9 skipped, 3 xpassed, **0 failed** - **ESLint runtime gate**: CLEAN · **ruff**: CLEAN · **browser-smoke**: CLEAN - **Codex (regression)**: SHIP ONLY WITH FIXES → guard + test-anchor applied → re-reviewed **SAFE TO SHIP** - **Opus (correctness)**: reviewed the original (judged acceptable); the shipped version is strictly safer (adds the family guard) Note: `docs/pr-media/2518/{PR_BODY.md,bench.py}` are the contributor's review aids, included per the tracked `docs/pr-media/` convention (157 files already tracked) — not app code. Closes #2518. Co-authored-by: franksong2702 <franksong2702@users.noreply.github.com>