fix: case-insensitive model family matching + compressor init logging - #2350
Merged
Conversation
Two fixes for local model context detection: 1. Hardcoded DEFAULT_CONTEXT_LENGTHS matching was case-sensitive. 'qwen' didn't match 'Qwen3.5-9B-Q4_K_M.gguf' because of the capital Q. Now uses model.lower() for comparison. 2. Added compressor initialization logging showing the detected context_length, threshold, model, provider, and base_url. This makes turn-1 compression bugs diagnosable from logs — previously there was no log of what context length was detected.
angelburgosrosado
pushed a commit
to angelburgosrosado/hermes-agent
that referenced
this pull request
Apr 27, 2026
…NousResearch#2350) fix: case-insensitive model family matching + compressor init logging
02356abc
pushed a commit
to 02356abc/hermes-agent
that referenced
this pull request
May 14, 2026
…NousResearch#2350) fix: case-insensitive model family matching + compressor init logging
gweeteve
pushed a commit
to gweeteve/hermes-agent
that referenced
this pull request
Jun 2, 2026
…NousResearch#2350) fix: case-insensitive model family matching + compressor init logging
melon-xf
added a commit
to melon-xf/hermes-agent
that referenced
this pull request
Sep 3, 2026
…NousResearch#2350) fix: case-insensitive model family matching + compressor init logging
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.
Investigating a user report where a 65K context llama.cpp model (Qwen3.5-9B-Q4_K_M.gguf) was compressing on turn 1.
Bug found: the hardcoded DEFAULT_CONTEXT_LENGTHS fallback matching was case-sensitive.
"qwen"didn't match"Qwen3.5-9B-Q4_K_M.gguf"because of the capital Q. This meant the model fell through to the 128K default instead of the 131K qwen default — both should prevent turn-1 compression, so the case sensitivity bug is real but may not be the full explanation for the user's issue.Diagnostic added: the compressor now logs its detected context_length, threshold, model, provider, and base_url at initialization. Next time this happens, the logs will immediately show what went wrong.
Ask the user to update and send their gateway logs — the new init log line will tell us exactly what context length was detected.