Skip to content

fix(gateway): include per-platform ALLOW_ALL and SIGNAL_GROUP in startup allowlist check#3305

Merged
teknium1 merged 1 commit intomainfrom
hermes/hermes-dfd0d467
Mar 27, 2026
Merged

fix(gateway): include per-platform ALLOW_ALL and SIGNAL_GROUP in startup allowlist check#3305
teknium1 merged 1 commit intomainfrom
hermes/hermes-dfd0d467

Conversation

@teknium1
Copy link
Copy Markdown
Contributor

@teknium1 teknium1 commented Mar 27, 2026

Summary

Second piece from PR #3202 by @binhnt92, split into its own PR.

The bug

The startup warning No user allowlists configured only checked GATEWAY_ALLOW_ALL_USERS and per-platform *_ALLOWED_USERS vars. It missed:

  • SIGNAL_GROUP_ALLOWED_USERS
  • Per-platform *_ALLOW_ALL_USERS vars (e.g. TELEGRAM_ALLOW_ALL_USERS)

The actual auth check in _is_user_authorized already recognized these vars, so users got a false warning despite being correctly configured.

Tests

4 new tests covering the warning suppression logic.

@teknium1 teknium1 force-pushed the hermes/hermes-dfd0d467 branch from fd563bd to dabbe29 Compare March 27, 2026 01:03
When _try_activate_fallback() switches to the fallback model, it
updates the agent's model/provider/client but never touches
self.context_compressor. The compressor keeps the primary model's
context_length and threshold_tokens, so compression decisions use
wrong limits — a 200K primary → 32K fallback still uses 200K-based
thresholds, causing oversized sessions to overflow the fallback.

Update the compressor's model, credentials, context_length, and
threshold_tokens after fallback activation using get_model_context_length()
for the new model.

Cherry-picked from PR #3202 by binhnt92.
@teknium1 teknium1 force-pushed the hermes/hermes-dfd0d467 branch from dabbe29 to dfba6c5 Compare March 27, 2026 01:06
@teknium1 teknium1 merged commit 60fdb58 into main Mar 27, 2026
3 of 4 checks passed
@teknium1 teknium1 changed the title fix(agent): update context compressor limits after fallback activation Mar 27, 2026
StreamOfRon pushed a commit to StreamOfRon/hermes-agent that referenced this pull request Mar 29, 2026
NousResearch#3305)

When _try_activate_fallback() switches to the fallback model, it
updates the agent's model/provider/client but never touches
self.context_compressor. The compressor keeps the primary model's
context_length and threshold_tokens, so compression decisions use
wrong limits — a 200K primary → 32K fallback still uses 200K-based
thresholds, causing oversized sessions to overflow the fallback.

Update the compressor's model, credentials, context_length, and
threshold_tokens after fallback activation using get_model_context_length()
for the new model.

Cherry-picked from PR NousResearch#3202 by binhnt92.

Co-authored-by: binhnt92 <binhnt.ht.92@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants