Skip to content

The agent that grows with you

feat(doctor): resolve every routed auxiliary.<task> block and report the dead ones

teknium115fec561dbef
diff --git a/hermes_cli/doctor_config.py b/hermes_cli/doctor_config.py
index cdf959f0aac..1bc51efe3e5 100644
--- a/hermes_cli/doctor_config.py
+++ b/hermes_cli/doctor_config.py
@@ -267,6 +267,33 @@ def _validate_model_config(config_path, issues: list) -> None:
f"API key in {_DHH}/.env, or switch providers with 'hermes config set model.provider <name>'", issues)
+def _validate_auxiliary_config(config_path, issues: list) -> None:
+ """Resolve every routed ``auxiliary.<task>`` block through the real entry point the tasks use and report
+ the ones that fail — an unresolvable block otherwise silently runs the task on the main model (#116055)."""
+ from hermes_cli.config import read_user_config_raw
+ from hermes_cli.runtime_provider import resolve_runtime_provider
+ from utils import base_url_hostname
+ aux = read_user_config_raw(config_path).get("auxiliary")
+ routed = {name: block for name, block in (aux.items() if isinstance(aux, dict) else ())
+ if isinstance(block, dict) and str(block.get("provider") or "").strip().lower() not in ("", "auto")}
+ ok = []
+ for task, block in sorted(routed.items()):
+ provider, model, base_url, api_key = (str(block.get(k) or "").strip() or None for k in ("provider", "model", "base_url", "api_key"))
+ try:
+ runtime = resolve_runtime_provider(requested=provider, target_model=model, explicit_api_key=api_key, explicit_base_url=base_url)
+ except Exception as exc: # noqa: BLE001 — every resolver error is a finding here
+ _fail_and_issue(f"auxiliary.{task}.provider '{provider}' does not resolve", f"({str(exc).splitlines()[0]})",
+ f"auxiliary.{task}.provider '{provider}' cannot be resolved ({str(exc).splitlines()[0]}); the task "
+ f"silently runs on the main model. Fix the provider name/credentials in auxiliary.{task}.", issues)
+ continue
+ if not runtime.get("api_key") and not runtime.get("command"):
+ check_warn(f"auxiliary.{task}.provider '{provider}' resolved without credentials", f"({runtime.get('provider')} @ {runtime.get('base_url')})")
+ continue
+ ok.append(f"{task}→{runtime.get('provider')}@{base_url_hostname(str(runtime.get('base_url') or '')) or '?'}")
+ if ok:
+ check_ok("auxiliary task routing resolves: " + ", ".join(ok))
+
+
@doctor_check()
def _check_config_file(should_fix: bool, f: Finding) -> None:
"""config.yaml presence (project cli-config.yaml as fallback); model/provider validation."""
@@ -276,6 +303,8 @@ def _check_config_file(should_fix: bool, f: Finding) -> None:
check_ok(f"{_DHH}/config.yaml exists")
with warn_on_error("Could not validate model/provider config"):
_validate_model_config(config_path, f.issues)
+ with warn_on_error("Could not validate auxiliary task routing"):
+ _validate_auxiliary_config(config_path, f.issues)
elif (PROJECT_ROOT / 'cli-config.yaml').exists():
check_ok("cli-config.yaml exists (in project directory)")
elif should_fix:
diff --git a/tests/hermes_cli/test_doctor.py b/tests/hermes_cli/test_doctor.py
index b9e86822355..c026df0d438 100644
--- a/tests/hermes_cli/test_doctor.py
+++ b/tests/hermes_cli/test_doctor.py
@@ -1887,3 +1887,20 @@ def test_docker_daemon_probe_uses_version_not_info(monkeypatch):
doctor_tools._check_docker_backend("docker", False, [])
assert calls == [["/usr/bin/docker", "version"]]
+
+
+def test_doctor_reports_auxiliary_blocks_that_do_not_resolve(tmp_path, monkeypatch):
+ """A routed auxiliary.<task> block that the runtime resolver rejects is a doctor finding, not a
+ silent fall-back to the main model (#116055); a resolvable one is not flagged."""
+ import yaml
+ from hermes_cli import doctor_config
+
+ monkeypatch.setenv("OPENAI_API_KEY", "sk-test")
+ cfg_file = tmp_path / "config.yaml"
+ cfg_file.write_text(yaml.safe_dump({"auxiliary": {
+ "background_review": {"provider": "no-such-provider", "model": "m"},
+ "compression": {"provider": "openai", "model": "gpt-x", "base_url": "https://gateway.example/v1", "api_key": "gw"},
+ }}))
+ issues = []
+ doctor_config._validate_auxiliary_config(cfg_file, issues)
+ assert len(issues) == 1 and "auxiliary.background_review" in issues[0] and "no-such-provider" in issues[0]
diff --git a/website/docs/user-guide/configuration.md b/website/docs/user-guide/configuration.md
index 3b013987925..a9046419248 100644
--- a/website/docs/user-guide/configuration.md
+++ b/website/docs/user-guide/configuration.md
@@ -1472,6 +1472,10 @@ Available providers for auxiliary tasks: `auto`, `main`, plus any provider in th
Local OpenAI-compatible servers work under their own names too: `provider: ollama` (also `vllm`, `llamacpp`, `llama.cpp`) with a `base_url` such as `http://127.0.0.1:11434` and an empty `api_key` routes through the custom endpoint with a placeholder key, and a bare `host:port` base_url gets the `/v1` suffix automatically.
+`provider: openai` is a direct-API alias: it routes through the custom endpoint at the block's `base_url`, else `OPENAI_BASE_URL`, else `https://api.openai.com/v1`, authenticated with `api_key` or `OPENAI_API_KEY`. Every auxiliary task resolves it the same way — `compression`/`vision`/`title_generation` as well as `background_review`, `curator` and MoA slots — so removing `base_url` while keeping `provider: openai` moves that task to the public OpenAI endpoint. A `providers.openai` entry in your `providers:` dict takes precedence and keeps its own endpoint and key.
+
+When a routed `auxiliary.<task>` block cannot be resolved (unknown provider, missing endpoint or credentials), the task runs on the main model and Hermes says so: `background_review` emits a one-time user-visible warning naming the provider and reason (plus a `WARNING` line in `agent.log` per review), and `hermes doctor` resolves every routed `auxiliary.<task>` block through the same resolver and reports the ones that fail.
+
:::tip MiniMax OAuth
`minimax-oauth` logs in via browser OAuth (no API key needed). Run `hermes model` and select **MiniMax (OAuth)** to authenticate. Auxiliary tasks use `MiniMax-M2.7-highspeed` automatically. See the [MiniMax OAuth guide](../guides/minimax-oauth.md).
:::