[Infra] Hermes Agent local model routing — custom_providers ignored, always routes to Anthropic #950

Closed
opened 2026-03-22 17:36:45 +00:00 by Timmy · 1 comment
Owner

Problem

Hermes agent CLI always routes to Anthropic when an Anthropic API key exists in auth.json, even when:

  • custom_providers is configured in config.yaml with a local Ollama endpoint
  • HERMES_INFERENCE_PROVIDER=custom env var is set
  • OPENAI_BASE_URL=http://localhost:11434/v1 env var is set
  • -m hermes3:latest is passed (a model that only exists locally)

The --provider flag only accepts hardcoded built-in providers, no custom or ollama option.

Impact

Cannot run hermes agent sessions on local models. All development burns Anthropic credits even for tasks a local 8B model could handle. Blocks the two-tier brain architecture where local models handle reflexes and cloud handles strategy.

Benchmark Data (M3 Max, March 22 2026)

Model Latency tok/s Code Quality
hermes3:latest (8B) 4.4s 57 GOOD
llama3.1:latest (8B) 3.6s 54 GOOD
llama3.2:latest (3B) 2.0s 109 GOOD
qwen2.5:14b 6.0s 30 GOOD
qwen3:30b 12.1s 71 EMPTY (thinking mode)

Desired Behavior

  • hermes chat -m hermes3:latest --provider custom routes to configured Ollama endpoint
  • OR: hermes chat -m hermes3:latest --base-url http://localhost:11434/v1 overrides provider
  • OR: when model name matches a custom_providers entry, auto-route there

Workaround Attempted

  • OpenClaw: import errors, depends on CMDOP cloud platform
  • Env vars: ignored when Anthropic auth exists
  • Custom providers config: configured but not used by CLI

Files

  • ~/.hermes/hermes-agent/hermes_cli/runtime_provider.py — resolver logic
  • ~/.hermes/config.yaml — custom_providers section
## Problem Hermes agent CLI always routes to Anthropic when an Anthropic API key exists in auth.json, even when: - `custom_providers` is configured in config.yaml with a local Ollama endpoint - `HERMES_INFERENCE_PROVIDER=custom` env var is set - `OPENAI_BASE_URL=http://localhost:11434/v1` env var is set - `-m hermes3:latest` is passed (a model that only exists locally) The `--provider` flag only accepts hardcoded built-in providers, no `custom` or `ollama` option. ## Impact Cannot run hermes agent sessions on local models. All development burns Anthropic credits even for tasks a local 8B model could handle. Blocks the two-tier brain architecture where local models handle reflexes and cloud handles strategy. ## Benchmark Data (M3 Max, March 22 2026) | Model | Latency | tok/s | Code Quality | |-------|---------|-------|--------------| | hermes3:latest (8B) | 4.4s | 57 | GOOD | | llama3.1:latest (8B) | 3.6s | 54 | GOOD | | llama3.2:latest (3B) | 2.0s | 109 | GOOD | | qwen2.5:14b | 6.0s | 30 | GOOD | | qwen3:30b | 12.1s | 71 | EMPTY (thinking mode) | ## Desired Behavior - `hermes chat -m hermes3:latest --provider custom` routes to configured Ollama endpoint - OR: `hermes chat -m hermes3:latest --base-url http://localhost:11434/v1` overrides provider - OR: when model name matches a custom_providers entry, auto-route there ## Workaround Attempted - OpenClaw: import errors, depends on CMDOP cloud platform - Env vars: ignored when Anthropic auth exists - Custom providers config: configured but not used by CLI ## Files - `~/.hermes/hermes-agent/hermes_cli/runtime_provider.py` — resolver logic - `~/.hermes/config.yaml` — custom_providers section
claude was assigned by Rockachopa 2026-03-22 23:31:28 +00:00
claude added the rejected-direction label 2026-03-23 13:51:25 +00:00
Collaborator

🧹 Closed — Superseded

The custom_providers routing issue is superseded by the new metabolic cascade router (#966, #1075) which implements proper three-tier local model routing.

Ref: Deep Backlog Triage #1076. Reopen if needed.

🧹 **Closed — Superseded** The custom_providers routing issue is superseded by the new metabolic cascade router (#966, #1075) which implements proper three-tier local model routing. Ref: Deep Backlog Triage #1076. Reopen if needed.
Sign in to join this conversation.
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Rockachopa/Timmy-time-dashboard#950