From 819f2f400d0123dea2122fab4d7b93a3f2b6e970 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 20 Aug 2026 07:53:58 +0000 Subject: [PATCH] =?UTF-8?q?Item=205:=20Hermes=20context-detection=20fix=20?= =?UTF-8?q?=E2=80=94=20Rule=2014?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - hermes-config-template.prose.md: Add Rule 14 — Hermes reads max_model_tokens (128K), NOT max_input_tokens (64K) - Warning: Using max_input_tokens for Hermes agents causes premature context loss - Crewmates use max_input_tokens (64K cap), Abiba/Hermes use max_model_tokens (128K) --- hermes-config-template.prose.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/hermes-config-template.prose.md b/hermes-config-template.prose.md index 1e99e14..1903d4f 100644 --- a/hermes-config-template.prose.md +++ b/hermes-config-template.prose.md @@ -338,6 +338,17 @@ curl -s -o /dev/null -w 'key_health: %{http_code}\n' -H "Authorization: Bearer $ ### Rule 13: API Key Injection — Two Patterns (UPDATED 2026-07-16, WAL #1300) +### Rule 14: Hermes Context Detection Uses `max_model_tokens`, NOT `max_input_tokens` + +**CRITICAL**: Hermes context detection reads `max_model_tokens` (128K), NOT `max_input_tokens` (64K cap). + +- **Abiba and Hermes agents**: `max_model_tokens: 131072` (128K) — unlimited context +- **Crewmates (ops, tune, verify, auth-keys, build)**: `max_input_tokens: 64000` (64K) — capped +- If you see `max_input_tokens: 64000` in an Abiba/Hermes config, that's a mistake +- Using `max_input_tokens` for Hermes agents causes premature context loss +- Check: `grep -n 'max_model_tokens\|max_input_tokens' ~/.hermes/config.yaml` +- Expected output: `max_model_tokens: 131072` (not max_input_tokens) + Agents inject `LITELLM_API_KEY` via ONE of two mechanisms. Both are valid; the contract requirement is that the key is a **valid LiteLLM virtual key** (HTTP 200 on /v1/models).