feat(background_review): add configurable background review routing - #15508
feat(background_review): add configurable background review routing#15508hcshen0111 wants to merge 1 commit into
Conversation
Good catch. I checked #13647 and there is real overlap in the background-review runtime routing. I’m happy to rework this so it doesn’t compete with that PR. The useful delta from my side is mostly the |
Thanks again for pointing me at #13647. I’ve updated this PR to incorporate that idea without keeping two competing implementations. The PR now keeps
So users get a simple CLI/config path by default, while advanced users can still route memory and skill review differently. The fallback behavior remains: if the configured review runtime fails, background review retries with the primary runtime. |
b80bb0c to
2153935
Compare
|
Thanks for the background-review routing work. This automated hermes-sweeper review found that current
This supersedes the parallel |
What does this PR do?
Adds configurable runtime routing for background memory/skill review runs.
Hermes currently runs background review using the primary
AIAgentruntime. This PR adds a user-facingagent.review_modelconfiguration and/review-modelcli slash command so users can route background review to a cheaper or specialized model.It also supports advanced scoped overrides via
memory.reviewandskills.review, allowing memory and skill reviews to use different review runtimes when needed. Empty scoped fields inherit fromagent.review_model, which then falls back to the primary agent runtime.Reliability is preserved by falling back to the primary runtime if the configured review runtime fails.
Notes
This incorporates the core routing idea from #13647 while keeping this PR's existing CLI UX and unified
agent.review_modelconfig as the default user-facing path.Related Issue
Fixes #
Type of Change
Changes Made
agent.review_modeldefaults inhermes_cli/config.py./review-modelCLI command inhermes_cli/commands.pyandcli.py.agent.review_model.*.AIAgent._spawn_background_review()inrun_agent.pyto try the configured review runtime first and fall back to the primaryruntime on failure.
/review-modelpersistence, provider validation, and background review fallbackbehavior.
How to Test
test_commands.py tests/hermes_cli/test_config.py
Start Hermes CLI and configure a review model:
/review-model --provider
Reset review routing back to the primary runtime:
/review-model default
Checklist
Code
Documentation & Housekeeping
(https://github.com/NousResearch/hermes-agent/blob/main/CONTRIBUTING.md#cross-platform-compatibility) — or N/A
Screenshots / Logs
Targeted test run:
scripts/run_tests.sh tests/cli/test_review_model_command.py tests/run_agent/test_background_review_summary.py tests/hermes_cli/test_commands.py
tests/hermes_cli/test_config.py
180 passed