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).