mirror of
https://github.com/nesquena/hermes-webui.git
synced 2026-07-11 10:10:36 +00:00
cba69cd415
The default-only guard corrected context_length to the real per-model cap (e.g. 1M for claude-opus-4.7-1m) but left threshold_tokens pointing at the ContextCompressor's stale value (computed from the global 232K cap → 197.2k @ 85%). UI then showed 'auto-compress at 197.2k / 1M' which is misleading. Rescale threshold_tokens by the real/orig ratio so the displayed trigger reflects the actual window (e.g. ~850k @ 1M). NOTE: this only corrects the SSE display payload. The real auto-compress trigger lives inside ContextCompressor in hermes-agent (agent_init.py:1446 constructs it with the global cap). A full fix requires a parallel change upstream — tracked separately.