From 27621ef83690372ba56effee2476a7dc732b1e38 Mon Sep 17 00:00:00 2001 From: Clifford Garwood Date: Sun, 12 Apr 2026 14:13:02 -0400 Subject: [PATCH] feat: add ctx_size to context length keys for Lemonade server support - Adds 'ctx_size' field to _CONTEXT_LENGTH_KEYS tuple - Enables hermes agent to correctly detect context size from custom LLMs running on Lemonade server that use this field name instead of the standard keys (max_seq_len, n_ctx_train, n_ctx) --- agent/model_metadata.py | 1 + 1 file changed, 1 insertion(+) diff --git a/agent/model_metadata.py b/agent/model_metadata.py index 335d02bd6f..11a998862b 100644 --- a/agent/model_metadata.py +++ b/agent/model_metadata.py @@ -203,6 +203,7 @@ _CONTEXT_LENGTH_KEYS = ( "max_seq_len", "n_ctx_train", "n_ctx", + "ctx_size", ) _MAX_COMPLETION_KEYS = (