hermes: enforce maximum quality floor

This commit is contained in:
jenkins 2026-08-15 12:45:54 -03:00
parent 053a9fb6b2
commit 427c68fa59
2 changed files with 21 additions and 21 deletions

View File

@ -563,7 +563,7 @@ data:
classifier_target = "classifier"
# Switchyard falls through this list after a request-local target failure.
# Keep both xhigh providers first so recovery can escalate, never downgrade.
targets = ["codex_sol_xhigh", "claude_opus_xhigh", "claude_fable_xhigh", "codex_sol_high", "claude_opus_high", "claude_sonnet_high", "claude_fable_high", "codex_terra_high", "codex_sol_medium", "claude_sonnet_medium", "claude_fable_medium", "codex_terra_medium"]
targets = ["codex_sol_xhigh", "claude_opus_xhigh", "claude_fable_xhigh", "codex_sol_high", "claude_opus_high", "claude_sonnet_high", "claude_fable_high", "codex_terra_high"]
default_target = "codex_sol_high"
session_affinity = false
recent_turn_window = 6
@ -575,19 +575,14 @@ data:
model-call boundary. Strongly favor intelligence, verification, and task
completion, then apply these rules in order.
1. Set a mandatory minimum effort floor from the whole current objective,
recent context, and tool evidence: xhigh for critical security work, risky
production migrations, destructive or data-loss risk, or consequential
independent final/release review; high for difficult debugging,
consequential implementation, adversarial review, major architectural
tradeoffs, or uncertain production work; medium for ordinary
implementation, tests, tool use, analysis, or bounded architecture; low
only for lookup or truly mechanical reversible work. Never choose below the
floor or above xhigh.
If tools are present or the boundary may emit a tool call, the floor is
medium even when the user's wording is short. Filesystem, shell,
repository, cluster, browser, and image-generation/edit operations are
tool work; never route those boundaries to Luna or Haiku.
1. This maximum-quality route has an absolute high effort floor for every
boundary, including ordinary implementation, tests, tool use, analysis,
bounded architecture, lookup, and mechanical work. Raise the floor to
xhigh for critical security work, risky production migrations, destructive
or data-loss risk, or consequential independent final/release review.
Those xhigh triggers are mandatory: never answer one with a high target.
Medium and low targets are intentionally unavailable on this route.
Never choose below the floor or above xhigh.
2. Treat "think hard", "deeply", "carefully", and equivalent intent as a
request to raise capability by at least one tier when the safety floor is
@ -605,15 +600,15 @@ data:
unavailable, failed, exhausted, rate-limited, or out of capacity; use the
other provider at the same floor.
4. Choose across Codex Terra/SOL and Claude Fable/Sonnet/Opus at medium
through xhigh. Prefer Fable for writing and compact synthesis where it
clears the quality floor; use Sonnet or Opus for deeper analysis and
independent review. Low-tier targets are intentionally unavailable on
this route. Re-evaluate every boundary and resolve "continue" or "do it"
from recent context.
4. Choose across Codex Terra/SOL and Claude Fable/Sonnet/Opus at high or
xhigh only. Prefer Fable for writing and compact synthesis where it clears
the quality floor; use Sonnet or Opus for deeper analysis and independent
review. Medium and low targets are intentionally unavailable on this
route. Re-evaluate every boundary and resolve "continue" or "do it" from
recent context.
"""
response_schema = '''
{"type":"object","properties":{"decision":{"type":"object","properties":{"target":{"type":"string","enum":["codex_sol_high","claude_opus_high","claude_sonnet_high","claude_fable_high","codex_terra_high","codex_sol_xhigh","claude_opus_xhigh","claude_fable_xhigh","codex_terra_medium","claude_sonnet_medium","claude_fable_medium","codex_sol_medium"]}},"required":["target"],"additionalProperties":false}},"required":["decision"],"additionalProperties":false}
{"type":"object","properties":{"decision":{"type":"object","properties":{"target":{"type":"string","enum":["codex_sol_high","claude_opus_high","claude_sonnet_high","claude_fable_high","codex_terra_high","codex_sol_xhigh","claude_opus_xhigh","claude_fable_xhigh"]}},"required":["target"],"additionalProperties":false}},"required":["decision"],"additionalProperties":false}
'''
[routes.auto_maximum.policy]

View File

@ -1483,6 +1483,11 @@ def test_local_flux_runtime_and_gpu_handoff_are_flux_managed():
selector_targets = routes[route_name]["response_schema"]
assert not any(target.endswith("_low") for target in targets)
assert "_low" not in selector_targets
maximum_targets = routes["auto_maximum"]["targets"]
maximum_selector_targets = routes["auto_maximum"]["response_schema"]
assert not any(target.endswith("_medium") for target in maximum_targets)
assert "_medium" not in maximum_selector_targets
assert "absolute high effort floor" in routes["auto_maximum"]["prompt"]
assert any(
target.startswith("local_")
for target in routes["manual_local_qwen"]["targets"]