feat(agent): make MINIMUM_CONTEXT_LENGTH configurable via HERMES_MIN_CONTEXT_LENGTH - #44932
Closed
divnjl2 wants to merge 1 commit into
Closed
feat(agent): make MINIMUM_CONTEXT_LENGTH configurable via HERMES_MIN_CONTEXT_LENGTH#44932divnjl2 wants to merge 1 commit into
divnjl2 wants to merge 1 commit into
Conversation
divnjl2
force-pushed
the
feat/configurable-min-context-length
branch
from
June 12, 2026 13:44
9fcc481 to
112e3c7
Compare
The agent_init hard-rejects any model whose context window is below 64K, and the compression floor (context_compressor) also pins to the same constant. The rejection message advises 'set model.context_length in config.yaml to override', but an explicit context_length below 64K is still rejected, so there is no real override. Operators running local GGUF backends (llama.cpp / llama-swap) where the effective per-request context is -c / --parallel can legitimately have 8-43K slots. Hard-coding 64K bricks every such deployment at init. Make the floor read HERMES_MIN_CONTEXT_LENGTH (default 64000, behaviour unchanged) so these operators can lower it to match their real slot size. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
divnjl2
force-pushed
the
feat/configurable-min-context-length
branch
from
June 12, 2026 13:45
112e3c7 to
f25a5f0
Compare
Contributor
|
Thanks for identifying the real lower-context startup constraint and for keeping the patch narrow. This automated hermes-sweeper review is closing the PR under the project's standing configuration policy:
The issue is not the local-model use case; it is the user-facing environment-variable configuration surface. Closed as not-planned per standing maintainer policy ( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
agent/agent_init.pyhard-rejects any model whose context window is belowMINIMUM_CONTEXT_LENGTH = 64_000:But the advertised override does not work: an explicit
model.context_lengthbelow 64K is still rejected (the same constant is also thecontext_compressorfloor). So there is no real escape hatch.Who this hurts
Operators running local GGUF backends (llama.cpp / llama-swap / ik_llama) where the effective per-request context =
-c / --parallel. A 256K model split into 6 slots is a 43K slot; that is a perfectly usable agent context, but it is hard-rejected at init, bricking the whole deployment.Change
Read the floor from
HERMES_MIN_CONTEXT_LENGTH(default64000— behaviour unchanged for everyone who doesn't set it). One line, backward-compatible. Lets small-slot operators lower the floor to match their real slot size.Test
Local llama-swap fleet (35B/9B/4B split across two GPUs, slots 8-43K). Before: every cell dies at init with the 64K refusal. After (
HERMES_MIN_CONTEXT_LENGTH=8000): 35B and 9B cells initialize and complete tool-calling turns normally.