hermes-model-config
Use when sessions run the wrong model or config regresses.
- License 许可
- MIT
- 最近更新
- 2026-11-14
- Stars
- ★ 4
- Forks
- 1
01 前言 Front Matter
- name
- hermes-model-config
- author
- Titus
- license
- MIT
- version
- 1.0.0
- category
- devops
- platforms
- [ "linux", "macos" ]
- description
- Use when sessions run the wrong model or config regresses.
03 SKILL.md 正文
Hermes Model & Provider Config
Trigger: "sessions use the wrong model", "model is X but should be Y",
deepseek-chat/deepseek-flash questions, ⚠ Deprecated .env settings detected
warning, cron model overrides, model.default regressions after hermes update.
Fleet model convention (verified on the fleet owner's host, 2026-08-18)
- Regular sessions =
deepseek-v4-flash— set inconfig.yamlmodel.default(providerdeepseek, base_urlhttps://api.deepseek.com/v1). This is operator-owned config — set it withhermes config set model.default <model>; no fleet installer writes it (the env-driveninstall-model-default.shwriter was removed 2026-09-09). deepseek-chatis LLM-cron-ONLY. It must never be the session default. Crons pin it per-job:"model": "deepseek-chat"in~/.hermes/cron/jobs.json(seeLLM_CRON_MODEL=deepseek-chatinops/scripts/install-crons.shandops/install/cron-manifest.yaml). A config.yaml default of deepseek-chat is the regression symptom.
Diagnose (in order)
- Truth for NEW sessions = config.yaml, not the banner. Run
hermes config get model.default(+model.provider,model.base_url). The session banner snapshots the model at session START — a mid-sessionhermes updatechanges config underneath it (observed 2026-08-18: banner showed deepseek-v4-flash while config already said deepseek-chat). - If config changed unexpectedly, check
stat -f '%Sm %N' ~/.hermes/config.yamlandtail ~/.hermes/logs/update.log—hermes updaterewrites config.yaml AND ~/.hermes/.env in the same second. To rule out a migration, grep the key in~/.hermes/hermes-agent/hermes_cli/config_migrations.py(model.default had NO migration — it was a stale manual setting). - Cron overrides:
grep -n '"model"' ~/.hermes/cron/jobs.json— per-jobmodelfield;model_snapshotrecords what it actually ran as.no_agentjobs (script-based) ignoremodelentirely. - Check the whole repo for the convention:
grep -rn '<model-id>' ~/steadfaste-fleet --include='*.sh' --include='*.yaml' --include='*.py'— install scripts/manifests show the intended per-role model split.
Fix
hermes config set model.default <model-id>— NEVER hand-edit config.yaml (stray indent breaks the live gateway; hermes-agent hard invariant). Agent file-write tools refuse the file outright (Refusing to write to Hermes config file: … security-sensitive configuration), so the CLI is not just preferred — it is the ONLY path from an agent. Verify by reading back BOTH the resolved value (hermes config get model.default) and the file on disk; the change applies to NEW sessions (the running session keeps its start-of-session model).provider/base_urlare untouched by this command.- No gateway restart needed:
_resolve_gateway_model(gateway/run.py) readsmodel.defaultfresh per session from raw YAML. - Re-anchor the Jev router when the default moves. If the Jev layer is live,
its pricing-list
baselineis the anchor every multiplier and every "cheaper than" claim is measured against, and the doctor's cost guard compares pool heads to the host's actual model.model.defaultchange → update the baseline to the same model, swap the medium pools' in-pool fallback (a cheaper baseline can leave the old fallback above the 1x ceiling), and express hard-tier budget caps in absolute $/M rather than multiples of the baseline so a cheaper baseline cannot evict whitelisted models (see the pricing-list-policy reference of the system-one-judgment skill). The selftest checks EVERY model in a pool and catches the stranded fallback the tests miss.
Verify end-to-end (mandatory)
- Spawn a real one-shot:
hermes chat -q "Reply with exactly: OK"— note theSession:id in output. - Confirm the recorded model:
sqlite3 ~/.hermes/state.db "SELECT id, model, billing_provider, billing_base_url FROM sessions WHERE id='<session-id>';"⚠️ sessions table hasmodel+billing_provider— there is NOprovidercolumn;billing_provideris the provider. - Re-check the cron overrides still pin the cron-only model where intended.
Provider latency / "why is it slow, what should we switch to" triage
When the complaint is model SLOWNESS or a request for better models (not a wrong-model regression), separate the THREE layers before concluding anything:
- Platform health — check the provider's status page first.
OpenRouter:
https://status.openrouter.ai/(Datadog). "All Systems Operational" + no incidents in the recent window means the platform is not the failure; per-endpoint load on the specific model's provider is then the prime suspect. Status pages cover gateway + chat completions, not per-model hosts. - Network latency to the gateway — BOTH the platform and your config could
be fine while the box is far or congested.
A TTFB around 60–100ms is normal for OpenRouter from a home/cloud box; that rules out a routing problem and isolates model-side throughput.curl -s -o /dev/null -w "ttfb=%{time_starttransfer}s total=%{time_total}s http=%{http_code}\n" \ --max-time 60 https://openrouter.ai/api/v1/models - Model-side comparison — for prices/context across candidates, hit the
public model catalog (no auth needed):
curl -s https://openrouter.ai/api/v1/models→jq '.data[] | select(.id=="<id>") | [.id, (.context_length|tostring), .pricing.prompt, .pricing.completion]'. ⚠️ The catalog does NOT expose throughput/latency for these models —top_provider.throughput/.latencycome back null for many ids, so you CANNOT rank candidates by measured speed from that feed. Real per-token latency needs an AUTHENTICATED probe against the live endpoint; do not author a "switch to X it's faster" claim from the catalog alone.
Measuring live latency requires the API key — and it is NOT in config.yaml.
~/.hermes/config.yaml carries provider: openrouter + base_url but
references the key only as the env var OPENROUTER_API_KEY in a comment; it is
not inline and not in the gateway's systemd env file. The actual key lives in
~/.hermes/auth.json (Hermes auth store). Reading a credential file to fire
live probes is a consent-gated action — ask the operator before pulling it, and
report the status/network/catalog findings (all unauth'd) while that's pending
decision.
Deprecated .env settings warning
- The runtime warning comes from
warn_deprecated_cwd_env_vars(hermes_cli/config.py) and checks process env forMESSAGING_CWD/TERMINAL_CWD— it can false-positive on Hermes's own launch-dir bridge (the message says "found in .env" even when the var came from Hermes). - Authoritative check =
hermes doctor, which scans the .env file (hermes_cli/doctor.py_DEPRECATED_ENV_VARS):TERMINAL_CWD→terminal.cwd,MESSAGING_CWD→terminal.cwd,HERMES_TOOL_PROGRESS/HERMES_TOOL_PROGRESS_MODE→display.tool_progress,QQ_HOME_CHANNEL/QQ_HOME_CHANNEL_NAME→QQBOT_HOME_CHANNEL[_NAME]. hermes updateauto-comments deprecated .env entries. Check for ACTIVE leftovers with:grep -nE '^(TERMINAL_CWD|MESSAGING_CWD|HERMES_TOOL_PROGRESS|HERMES_TOOL_PROGRESS_MODE|QQ_HOME_CHANNEL|QQ_HOME_CHANNEL_NAME)=' ~/.hermes/.env- Migration target
terminal.cwdis PER-PROJECT: keepterminal.cwd: .(launch dir) on multi-project hosts. Do NOT set a global project path just to silence the warning.
Pitfalls
-
state.db sessions table:
billing_provider, notprovider(query error). -
The
.envdeprecated entry may already be commented by a recenthermes update— verify before "removing" anything; an empty grep result means the warning is already neutralized. -
model ids evolve: verify the exact id against
grep -n '"model"' ~/.hermes/cron/jobs.jsonand~/steadfaste-fleet/.envbefore assuming a shorthand ("deepseek-flash" =deepseek-v4-flash).2026-08-18 deepseek-chat regression: investigation trail + verification output.
04 同仓库更多 Skills
macbook-linux-maintenance
Legacy MacBook Linux fixes: GPU wedge, reboot hang, thermal.
governance-regression-triage
Triage a host's governance issues: what changed.
enforcement-immutability
Use when enforcement files lose their immutable flag.
steadfaste-fleet-repo-deploy
Use when committing to the steadfaste-fleet repo.
steadfaste-fleet-maintenance
Maintain an installed Steadfaste Fleet instance — update both the upstream Hermes Agent and the fleet repo layer, merge diverged histories, sync skills safely, and troubleshoot common issues. Covers the dual-update workflow (hermes update + fleet-update.sh), encrypted brain data backup, mycortex import, and recovery techniques.
fleet-preflight
DEPRECATED alias — merged into survey-before-action (2026-08-20). Load survey-before-action instead; its "Repo-Specific Pre-Flight" section covers git search, Hermes boundary, and deployment verification.