mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-05-01 01:51:44 +00:00
fix(cli): narrow Nous Hermes non-agentic warning to actual hermes-3/-4 models
The startup warning that Nous Research Hermes 3 & 4 models are not agentic fired on any model whose name contained "hermes" anywhere, via a plain substring check. That false-positived on unrelated local Modelfiles such as `hermes-brain:qwen3-14b-ctx16k` — a tool-capable Qwen3 wrapper that happens to live under a custom "hermes" tag namespace — making the warning noise for legitimate setups. Replace the substring check with a narrow regex anchored on `^`, `/`, or `:` boundaries that only matches the real Hermes-3 / Hermes-4 chat family (e.g. `NousResearch/Hermes-3-Llama-3.1-70B`, `hermes-4-405b`, `openrouter/hermes3:70b`). Consolidate into a single helper `is_nous_hermes_non_agentic()` in `hermes_cli.model_switch` so the CLI and the canonical check don't drift, and route the duplicate inline site in `cli.HermesCLI._print_warnings()` through the helper. Add a parametrized test covering positive matches (real Hermes-3/-4 names) and a broad set of negatives (custom Modelfiles, Qwen/Claude/GPT, older Nous-Hermes-2 families, bare "hermes", empty string, and the "brain-hermes-3-impostor" boundary case).
This commit is contained in:
parent
3e99964789
commit
e77f135ed8
3 changed files with 116 additions and 3 deletions
4
cli.py
4
cli.py
|
|
@ -2999,8 +2999,10 @@ class HermesCLI:
|
|||
)
|
||||
|
||||
# Warn if the configured model is a Nous Hermes LLM (not agentic)
|
||||
from hermes_cli.model_switch import is_nous_hermes_non_agentic
|
||||
|
||||
model_name = getattr(self, "model", "") or ""
|
||||
if "hermes" in model_name.lower():
|
||||
if is_nous_hermes_non_agentic(model_name):
|
||||
self.console.print()
|
||||
self.console.print(
|
||||
"[bold yellow]⚠ Nous Research Hermes 3 & 4 models are NOT agentic and are not "
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue