vault-cli: flip analyze default to Opus, --haiku/--sonnet step down

Opus draws the auto-fix/flag line correctly (Haiku over-fixed on judgment
calls, verified apples-to-apples against the same vault baseline). At ~$0.14/run
it's cheap enough to run nightly. --sonnet/--haiku now step DOWN; --opus kept as
an explicit identity flag; raw -m/--provider still override entirely.

Hermes host defaults (config.yaml default preset, delegation/compression models)
are unchanged — this only affects which model the vault CLI's own hermes -z spawn uses.
This commit is contained in:
Hermes Agent
2026-07-22 13:44:37 -04:00
parent b665413630
commit d81d156b79
+15 -12
View File
@@ -15,11 +15,11 @@ Subcommands:
vault sync-data reconcile /data skeleton to match manifest (create missing dirs) vault sync-data reconcile /data skeleton to match manifest (create missing dirs)
vault manifest regenerate the topology manifest note vault manifest regenerate the topology manifest note
vault report [--pretty] deterministic Librarian report (delegates to vault-librarian.py) vault report [--pretty] deterministic Librarian report (delegates to vault-librarian.py)
vault analyze [--sonnet|--opus] [-m MODEL] [--provider PROVIDER] vault analyze [--haiku|--sonnet|--opus] [-m MODEL] [--provider PROVIDER]
spawn a Hermes Librarian pass. DEFAULT: Haiku/Bedrock spawn a Hermes Librarian pass. DEFAULT: Opus (smart —
(cheap+fast — the nightly/weekly tier). --sonnet / --opus draws the auto-fix/flag line correctly, ~$0.14/run so cheap
step up intelligence & cost for harder judgment calls. enough for nightly). --sonnet / --haiku step DOWN for
-m/--provider override entirely (future/non-Bedrock models). cheaper/faster passes; -m/--provider override entirely.
""" """
import os, re, sys, subprocess import os, re, sys, subprocess
@@ -32,9 +32,9 @@ HERMES = "/run/current-system/sw/bin/hermes"
LIBRARIAN = os.path.join(_SELF_DIR, "vault-librarian.py") LIBRARIAN = os.path.join(_SELF_DIR, "vault-librarian.py")
PROMPT = os.path.join(_SELF_DIR, "vault-librarian-prompt.md") PROMPT = os.path.join(_SELF_DIR, "vault-librarian-prompt.md")
# `vault analyze` model tiers. Default is Haiku — cheap+fast for the nightly/weekly # `vault analyze` model tiers. Default is Opus — smart enough to draw the auto-fix/
# pass. --sonnet / --opus step up intelligence & cost inline. IDs verified against # flag line correctly, and ~$0.14/run so cheap enough for a nightly pass. --sonnet /
# this host's Hermes config + the active Bedrock provisioning. # --haiku step DOWN. IDs verified against this host's Hermes config + Bedrock provisioning.
ANALYZE_TIERS = { ANALYZE_TIERS = {
"haiku": "us.anthropic.claude-haiku-4-5-20251001-v1:0", "haiku": "us.anthropic.claude-haiku-4-5-20251001-v1:0",
"sonnet": "global.anthropic.claude-sonnet-5", "sonnet": "global.anthropic.claude-sonnet-5",
@@ -148,12 +148,15 @@ def main():
sys.exit(subprocess.run([sys.executable, LIBRARIAN] + argv).returncode) sys.exit(subprocess.run([sys.executable, LIBRARIAN] + argv).returncode)
elif cmd == "analyze": elif cmd == "analyze":
prompt = open(PROMPT, encoding="utf-8").read() prompt = open(PROMPT, encoding="utf-8").read()
# Model tier: default Haiku (cheap nightly). --sonnet/--opus step up. # Model tier: default Opus (smart — draws the auto-fix/flag line correctly,
# ~$0.14/run so cheap enough to run nightly). --haiku/--sonnet step DOWN.
# Raw -m/--provider override the tier entirely (escape hatch for future models # Raw -m/--provider override the tier entirely (escape hatch for future models
# or non-Bedrock providers). Tier flags are last-wins if combined. # or non-Bedrock providers). Tier flags are last-wins if combined.
tier = "haiku" tier = "opus"
if "--sonnet" in argv: if "--sonnet" in argv:
tier = "sonnet" tier = "sonnet"
if "--haiku" in argv:
tier = "haiku"
if "--opus" in argv: if "--opus" in argv:
tier = "opus" tier = "opus"
model = ANALYZE_TIERS[tier] model = ANALYZE_TIERS[tier]
@@ -179,8 +182,8 @@ def main():
print(f" model: {model}", file=sys.stderr) print(f" model: {model}", file=sys.stderr)
print(" output is buffered; a full pass can take 1–3 min before you see anything.", print(" output is buffered; a full pass can take 1–3 min before you see anything.",
file=sys.stderr) file=sys.stderr)
if tier == "haiku": if tier == "opus":
print(" step up: vault analyze --sonnet (or --opus) for harder judgment calls", print(" step DOWN: vault analyze --sonnet (or --haiku) for cheaper/faster passes",
file=sys.stderr) file=sys.stderr)
sys.stderr.flush() sys.stderr.flush()
subprocess.run(hcmd) subprocess.run(hcmd)