Summary
Hermes Agent incorrectly reports kimi-k2.6 as having a 32,768 token
context window, blocking agent initialization with:
ValueError: Model kimi-k2.6 has a context window of 32,768 tokens,
which is below the minimum 64,000 required by Hermes Agent.
The model actually supports 256K context. The bug is in the resolution
order in agent/model_metadata.py.
Root Cause
get_model_context_length() consults OpenRouter's API metadata before
checking hardcoded defaults. OpenRouter incorrectly reports 32,768 for
the kimi-k2.6 family. Since OpenRouter "succeeds", the correct hardcoded
value of 262,144 is never reached.
Affected Models (verified via OpenRouter API)
| Model |
OpenRouter reports |
Actual |
| kimi-k2.6 |
32,768 |
256K |
| kimi-k2.6-20260420 |
32,768 |
256K |
| kimi-latest |
32,768 |
256K |
Unaffected (OpenRouter correct)
- kimi-k2.5 — reports 262,144 ✓
- kimi-k2-thinking — reports 262,144 ✓
- kimi-k2-0905 — reports 262,144 ✓
Proposed Fix
Add explicit entries to DEFAULT_CONTEXT_LENGTHS in
agent/model_metadata.py:
"kimi-k2.6": 262144,
"kimi-k2.6-20260420": 262144,
"kimi-latest": 262144,
Workaround
Add context_length: 131072 under both model: and
auxiliary.compression: in config.yaml.
Environment
- Hermes Agent v0.13.0 (2026.5.7)
- Provider: kimi-coding
- Model: kimi-k2.6
Summary
Hermes Agent incorrectly reports
kimi-k2.6as having a 32,768 tokencontext window, blocking agent initialization with:
ValueError: Model kimi-k2.6 has a context window of 32,768 tokens,
which is below the minimum 64,000 required by Hermes Agent.
The model actually supports 256K context. The bug is in the resolution
order in
agent/model_metadata.py.Root Cause
get_model_context_length()consults OpenRouter's API metadata beforechecking hardcoded defaults. OpenRouter incorrectly reports 32,768 for
the kimi-k2.6 family. Since OpenRouter "succeeds", the correct hardcoded
value of 262,144 is never reached.
Affected Models (verified via OpenRouter API)
Unaffected (OpenRouter correct)
Proposed Fix
Add explicit entries to
DEFAULT_CONTEXT_LENGTHSinagent/model_metadata.py:Workaround
Add
context_length: 131072under bothmodel:andauxiliary.compression:inconfig.yaml.Environment