Commit Graph

4656 Commits

Author SHA1 Message Date
nesquena-hermes 85e3be6a42 fix(#4555): preserve /api/models aliases contract on disk-cache fallback
Codex ship-gate (SILENT): both disk loaders dropped `aliases` (the save path
never persisted them), so a disk-cache hit — strict cold-path OR the new stale
fallback — served /api/models with empty aliases, silently breaking `/model
<alias>` slash-command resolution (static/commands.js resolves slash aliases
only from /api/models.aliases). Add _model_aliases_from_config() helper and
reconstruct aliases from current config in BOTH loaders (fixes the pre-existing
strict-loader gap too). Adds a regression test.

Co-authored-by: starship-s <starship-s@users.noreply.github.com>
2026-06-20 19:25:51 +00:00
nesquena-hermes fbafe1e623 harden(#4555): isolate stale-cache path in test fixture + enforce schema-version equality on stale fallback
Applies Opus ship-gate findings: (1) the autouse fixture now points
_get_models_cache_path at an isolated temp file so the over-budget static-fallback
test can't read a real ~/.../models_cache.json and become an order-dependent flake;
(2) _load_stale_models_cache_from_disk rejects a cross-schema cache (its groups/badge
shape may be incompatible with the current picker). Adds a cross-schema-rejection test.

Co-authored-by: starship-s <starship-s@users.noreply.github.com>
2026-06-20 19:19:52 +00:00
nesquena-hermes 3d9487cbaf docs(release): stamp v0.51.541 — stale models cache fallback on catalog timeout (#3928) 2026-06-20 19:11:56 +00:00
Hermes Agent 3d8f3a1f7b fix(models): use stale disk cache on catalog timeout 2026-06-20 19:11:17 +00:00
nesquena-hermes d053b29308 Merge pull request #4558 from nesquena/stage-540
Release v0.51.540 — cross-provider model selection + gateway reasoning effort (#4554, #4552)
v0.51.540
2026-06-20 11:55:35 -07:00
nesquena-hermes a46c368854 docs(release): stamp v0.51.540 — cross-provider model selection + gateway reasoning effort 2026-06-20 18:44:43 +00:00
Rod Boev ee588ba70e fix(#4550): harden gateway reasoning forwarding follow-up 2026-06-20 18:44:25 +00:00
Rod Boev 26c55404a5 fix(#4550): forward gateway reasoning effort 2026-06-20 18:44:25 +00:00
jja881 53affd6936 fix: address review feedback — remove redundant clause, add guard and tests
- Remove the redundant 4th OR clause from _catalog_has_provider() — the
  existing C1–C3 already handle compound provider IDs correctly (C2 IS
  a normalized-vs-raw comparison; the 4th clause was a strict subset).
- Add && _activeProvider guard to _isCrossProviderPick in messages.js
  to prevent spurious True when the profile has no configured default
  provider (reviewer's optional hardening suggestion).
- Add test_catalog_has_provider_compound_ids.py verifying that compound
  provider IDs like 'custom:glm-free-relay' are correctly recognized by
  the existing C1–C3 clauses.
2026-06-20 18:44:25 +00:00
jja881 42fedaf780 test: update explicit-pick regex for broadened _explicitPick inference
The consume-clear guard now checks _pendingPickMatch (the pending onchange
marker match) instead of the broadened _explicitPick, which may also be
true from the new _isCrossProviderPick inference without a pending marker
to consume.
2026-06-20 18:44:25 +00:00
jja881 96265f6ae4 fix: preserve cross-provider model selection across conversation turns
Two-part fix for the model selector jumping back to the profile default
after the first message when a cross-provider model (e.g. a custom relay
like custom:glm-free-relay) is selected.

Backend (api/routes.py):
- _catalog_has_provider() now matches compound provider IDs (e.g.
  custom:zenmux-relay) whose normalized form (custom) is a raw
  catalog provider_id.  Previously the three existing checks missed
  normalized-vs-raw comparison for compound hints, causing the catalog
  lookup to fail and the fallback branch to silently revert the model
  to the profile default on every non-explicit turn.

Frontend (static/messages.js):
- The explicit_model_pick marker was consumed after the first send(),
  so subsequent sends lost the signal and the server repaired the
  model back to the profile default (#3737 regression).
- Now, when the session has a non-default model from a different
  provider than the profile's active provider, every send() sends
  explicit_model_pick=true so the server honors the user's choice
  across the entire conversation.
- The pending onchange marker is still consumed after the first send
  (unchanged behavior); only the explicit_pick inference is broadened.
2026-06-20 18:44:25 +00:00
nesquena-hermes c6ac31b71e Merge pull request #4556 from nesquena/stage-538b
Release v0.51.539 — gateway session continuity + local slash-model routing (#4548, #4547)
v0.51.539
2026-06-20 11:40:18 -07:00
nesquena-hermes 1ee5666870 docs(release): stamp v0.51.539 — gateway session_id + slash-model routing 2026-06-20 17:42:42 +00:00
MinhoJJang 630fd26eec fix configured provider slash model routing 2026-06-20 17:42:18 +00:00
Rod Boev 6ae0ecca0a fix(#4535): include session_id in Runs API request body 2026-06-20 17:42:18 +00:00
nesquena-hermes 84a8932210 Merge pull request #4551 from rodboev/pr/4549-approval-legacy
fix: relay approval SSE events on the legacy gateway chat/completions path
v0.51.538
2026-06-20 10:39:43 -07:00
nesquena-hermes 79bb2a9a34 docs(release): stamp v0.51.538 — gateway legacy approval relay (#4549) 2026-06-20 17:36:45 +00:00
nesquena-hermes 5020f8de9a fix: record gateway run_id on legacy approval event for response relay
The legacy /v1/chat/completions approval handler (added for #4549) rendered
the approval card but never populated _STREAM_RUN_IDS, so /api/approval/respond
could not relay the user's choice back to the gateway to resume the parked run
— it fell through to the local approval path and returned {ok: false}. Record
the run_id from the approval payload (no-op when absent), mirroring the runs-API
path. Adds a behavioral regression test that fails on the pre-fix head.

Codex ship-gate finding (CORE). Co-authored-by: rodboev <rodboev@users.noreply.github.com>
2026-06-20 17:26:46 +00:00
Rod Boev 172ca592b6 Add behavioral regression test for legacy approval relay 2026-06-20 09:14:26 -04:00
Rod Boev 0435dddda1 Move approval handler before tool.progress per GPT-5.5 spec review 2026-06-20 08:59:52 -04:00
Rod Boev 9bc84dcad5 Unify approval handler blocks and add debug logging per review 2026-06-20 08:48:55 -04:00
Rod Boev 39d18b39c7 fix: remove unused imports flagged by ruff 2026-06-20 08:40:44 -04:00
Rod Boev f19b0ffc67 fix: relay approval SSE events on the legacy gateway chat/completions path 2026-06-20 08:32:02 -04:00
nesquena-hermes c1a24171e8 Merge pull request #4545 from nesquena/stage-4540
Release v0.51.537 — queued card clears on session switch (#4533)
v0.51.537
2026-06-20 00:16:00 -07:00
nesquena-hermes 0a30790689 ci: re-trigger (shard 3.11/2 flake — shard-2 isolation run green locally) 2026-06-20 07:12:51 +00:00
nesquena-hermes 2f3abb00be stage #4540 + CHANGELOG 2026-06-20 07:12:51 +00:00
nesquena-hermes 3d91defb66 Merge pull request #4546 from nesquena/stage-4542
Release v0.51.536 — transparent-stream tool-call rows persist after settle (#4539)
v0.51.536
2026-06-20 00:09:30 -07:00
nesquena-hermes 348381bda3 stage #4542 @696bf798 (incl perf: pre-scan burst IDs) + CHANGELOG 2026-06-20 06:56:34 +00:00
nesquena-hermes 5b96d28139 Merge pull request #4541 from nesquena/stage-4537
Release v0.51.535 — keep open model picker stable during stream sync (#4531)
v0.51.535
2026-06-19 23:21:37 -07:00
nesquena-hermes 2b398bb2b1 stage #4537: keep open model picker stable during stream sync (#4531, head 92de7615 incl duplicate-rebuild fix) + v0.51.535 CHANGELOG 2026-06-20 06:10:04 +00:00
nesquena-hermes 9988f0a3f6 Merge pull request #4538 from nesquena/stage-4524b
Release v0.51.534 — clarify prompt no longer bricks the session on expiry (#4504)
v0.51.534
2026-06-19 22:48:27 -07:00
nesquena-hermes 15fe6add30 stage #4524: clarify 409-terminal (id-guarded, loading-cleared) + SSE-notify on expiry (#4504) + v0.51.534 CHANGELOG 2026-06-20 05:36:56 +00:00
nesquena-hermes 3433c7d6a1 Merge pull request #4532 from nesquena/stage-3285
Release v0.51.533 — restart gateway from the agent-health alert (#3285)
v0.51.533
2026-06-19 21:52:32 -07:00
nesquena-hermes 90505c0a8e stage #3285: gateway restart from agent-health alert (POST /api/health/restart) + v0.51.533 CHANGELOG 2026-06-20 04:40:49 +00:00
nesquena-hermes 07174e06b3 docs(changelog): correct v0.51.530 attribution to @MinhoJJang (#4522) (#4528)
PR #4522 (fix /api/profiles UnboundLocalError 500) was authored by
@MinhoJJang, not @TomBanksAU. The wrong handle was carried forward from
the immediately preceding release (v0.51.529 / #4518, which IS TomBanksAU).
Corrects the credit on the v0.51.530 entry only.

Co-authored-by: nesquena-hermes <agent@nesquena-hermes>
2026-06-19 21:16:03 -07:00
nesquena-hermes 500a91a4d5 Merge pull request #4529 from nesquena/stage-4516
Release v0.51.532 — built-in personalities on non-default profiles (#4465/#4513)
v0.51.532
2026-06-19 21:09:13 -07:00
nesquena-hermes e1e2bbc7ef fix(config): order ghost-home guard after ambient short-circuit (#4516 Codex gate)
Codex SILENT finding: the new 'if not target.exists(): return {}' guard ran
BEFORE the ambient-resolver short-circuit, so a matching ambient profile home
whose directory does not physically exist (fresh install / monkeypatched cfg)
returned {} instead of deferring to get_config() — breaking in-memory overrides
and changing the default-profile missing-home path. Move the guard below the
ambient short-circuit; add a regression test (matching-but-nonexistent ambient
home still defers to get_config()).
2026-06-20 03:57:56 +00:00
nesquena-hermes acd2c186ef stage #4516: apply config defaults to non-default profile reads (#4465 / #4513) + v0.51.532 CHANGELOG 2026-06-20 03:51:55 +00:00
nesquena-hermes 673b364c53 Merge pull request #4526 from nesquena/stage-4517
Release v0.51.531 — plugins panel active-provider badge (#4496)
v0.51.531
2026-06-19 20:49:49 -07:00
nesquena-hermes a60ba78298 stage #4517: plugins panel active-provider badge via is_active_provider (#4496) + v0.51.531 CHANGELOG 2026-06-20 03:35:44 +00:00
nesquena-hermes 163a805813 Merge pull request #4525 from nesquena/stage-4522
Release v0.51.530 — fix /api/profiles 500 (UnboundLocalError regression)
v0.51.530
2026-06-19 20:32:19 -07:00
nesquena-hermes 51e2fce823 stage #4522: fix /api/profiles UnboundLocalError 500 (regression from v0.51.528) + v0.51.530 CHANGELOG 2026-06-20 03:18:33 +00:00
nesquena-hermes 897d3832dd Merge pull request #4523 from nesquena/stage-4518
Release v0.51.529 — per-response jump button matches session jump pill (#2246)
v0.51.529
2026-06-19 20:09:28 -07:00
nesquena-hermes 6592416b35 stage #4518: match per-response jump button to session jump pill (#2246) + v0.51.529 CHANGELOG 2026-06-20 02:07:44 +00:00
nesquena-hermes 0dddca5b6b Merge pull request #4519 from nesquena/release-v0.51.528-4454
Release v0.51.528 — isolated HERMES_HOME single-profile mode (#2698)
v0.51.528
2026-06-19 19:03:01 -07:00
nesquena-hermes 078fb99589 test(#2698): stub hermes_cli.profiles via sys.modules, not mock.patch (CI shard-2 fix)
CI failed on shard 2 across ALL python versions (deterministic, not a flake):
test_list_profiles_prefers_matching_isolated_default_home did
mock.patch('hermes_cli.profiles.list_profiles', ...), whose string target forces
a REAL import of hermes_cli — not installed on the WebUI CI path (bundled agent
absent) -> ModuleNotFoundError. Passed locally only because hermes_cli is
importable here. Per the never-import-agent/hermes_cli-in-a-WebUI-test rule:
inject a stub hermes_cli + hermes_cli.profiles into sys.modules so
list_profiles_api()'s internal
resolves to the stub at the WebUI boundary. Verified: all 24 tests pass with
hermes_cli import BLOCKED (CI simulation).
2026-06-20 01:47:22 +00:00
nesquena-hermes 7cd464efa6 test(#4449): isolate state-dir contract tests via subprocess (fix suite-ordering leak)
The reload-based state-dir tests (importlib.reload(api.config) with mutated env)
leaked recomputed STATE_DIR/SESSION_DIR globals + stale references into later
tests in the full sequential run -> 17 spurious failures in cancel/stream/
health/state-isolation suites (all green in isolation). Restoring env + reloading
couldn't fully undo it (fixture/monkeypatch teardown ordering + other modules
holding by-value STATE_DIR refs). Rewrite the 3 tests to import api.config in a
fresh SUBPROCESS under the target env and read STATE_DIR from stdout — truly
isolated, can't pollute the test process. Same assertions (HERMES_HOME-derived
default, unset->platform default w/ cross-check, STATE_DIR override precedence).
2026-06-20 01:22:26 +00:00
nesquena-hermes 4d4b11b43c test+docs(#4449): backward-compat state-dir tests + upgrade migration note (Opus gate)
Opus flagged a real upgrade gap on the #4449 state-dir contract folded into
#4454: a deployment that relocated HERMES_HOME to a non-default base WITHOUT
setting HERMES_WEBUI_STATE_DIR sees WebUI state move to $HERMES_HOME/webui on
upgrade (empty app at the new address). Add (1) README note documenting the
move + how to keep the old location, and (2) two backward-compat regression
tests pinning the invariants: HERMES_HOME-unset stays at the platform default
(normal installs don't relocate), and HERMES_WEBUI_STATE_DIR takes precedence.
2026-06-20 00:51:08 +00:00
nesquena-hermes 8b598ac133 changelog: stamp v0.51.528 (Release SM) for #2698 isolated HERMES_HOME mode 2026-06-20 00:49:06 +00:00
nesquena-hermes 0952fcc606 fix(routes): drop redundant local _is_isolated_profile_mode import (#4454 gate)
The /api/profiles handler re-imported _is_isolated_profile_mode locally inside
handle_get, which made the name function-local for the ENTIRE handle_get scope
-> the earlier use at the /api/projects branch (routes.py:8000) hit
UnboundLocalError (F823), failing 6 test shards + lint. It's already a
module-level re-export (routes.py:429), so the local re-import is redundant;
removing it lets every in-function use resolve to the module global. Also drop
an unused 'from pathlib import Path' in the new #4449 state-dir test.

Co-authored-by: rodboev <rodboev@users.noreply.github.com>
2026-06-20 00:48:20 +00:00