Repository navigation
Conversation
sdwilsh
marked this pull request as ready for review
November 13, 2026 17:18
sdwilsh
marked this pull request as draft
November 13, 2026 17:20
## Why
Hermes runs every delegate on one model unless the user installs the
official `advanced-delegation` plugin. Upstream pstack lets each role
run on its own model. Setup now offers the plugin. When the user
accepts, setup maps pstack roles to named model routes.
## What changed
- Setup offers to enable or install `advanced-delegation`, based on its
state. It asks before it enables a plugin the user disabled, and it
continues with routes only when the plugin reports `enabled`.
- With routes, setup writes `pstack-worker`, `pstack-strongest`, and
none or two or more `pstack-panel-*` routes. It drops other routes
whose names start with `pstack-` and leaves every other route as it
is.
- When setup turns routes on and no default route is set, it sets the
default to `pstack-worker`. When routes were already on, it leaves
the default alone.
- When `model_map` or `profile_routes` is on but the plugin is
disabled or absent, Hermes refuses every subagent. Setup asks whether
to turn the plugin on. If the user says no, setup switches the backend
back to `default` and writes one delegate model, as before.
- Without routes, setup writes one delegate model, as before.
- The README and the setup guide describe both modes. The plugin
version is 0.4.0.
## Scope
- This PR changes setup only. Later PRs make `poteto-mode` and the
panel skills pick these routes. Until then, a delegate runs on the
default route.
- With the plugin enabled, setup changes nothing for a user on
`profile_routes`.
- Model detection no longer runs `hermes model`, an interactive picker
that changes the default model. Setup uses the models in config and
asks the user for others.
## Blast Radius
Setup rewrites the whole route list. One script reads the list from
`config.yaml` with PyYAML, merges it in memory, and writes it back. A
merge from `hermes config get` would replace `api_key` values with
masked placeholders, or with `--raw`, write `${VAR}` keys out of `.env`
into `config.yaml`.
Command output goes into the model's context, so no setup command
prints a key, even when `security.redact_secrets` is off.
## Verification
- In a scratch `HERMES_HOME` with redaction off and opaque keys, I ran
the skill's step 1 commands and step 6 script. No output showed a
key.
- First setup set `pstack-worker` as the default and turned routes on.
- With routes already on, the script kept a user route and its key,
dropped a stale `pstack-old` route, and did not add a default.
- An empty default and a user default `fast` stayed as they were.
- An empty route list stopped the script before any write, and so did
a missing PyYAML.
- A user route with `api_key: ${MY_ROUTE_KEY}` kept the reference.
- With routes on and the plugin declined, setup switched the backend to
`default` and kept the user's routes in config.
- `python3 scripts/check_refs.py` passes.
sdwilsh
force-pushed
the
setup-pstack-model-routes
branch
from
November 13, 2026 17:31
70d8552 to
0d617b4
Compare
sdwilsh
marked this pull request as ready for review
November 13, 2026 19:11
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hermes runs every delegate on one model unless the user installs the official
advanced-delegationplugin. Upstream pstack lets each role run on its own model and this change has setup offer to install the plugin. When the user accepts, setup will map pstack roles to named model routes, allowing for a diversity of models that the upstream pstack desires.What changed
advanced-delegation, based on its state.pstack-worker,pstack-strongest, and two or morepstack-panel-*routes intodelegation.backends.model_map.options(or none if the plugin isn't installed/enabled). Thepstack-prefix keeps these routes apart from the user's routes.pstack-worker. When routes were already on, it leaves the default alone (trying to avoid surprise to the user).Scope
poteto-modeand the panel skills pick these routes (until then, every delegate runs on the default route). Setup fillspstack-workerfrom the current delegate model, or from the parent model when no delegate model is set. I can include the other changes here if desired.hermes model, an interactive picker that changes the default model. Setup uses the models in config and asks the user for others.Blast Radius
Setup rewrites the whole route list, but it (should) only change only routes with the prefix
pstack-. It is instructed to do this carefully to avoid leaking any sensitive config information to the model.Verification
All runs used a scratch
HERMES_HOMEwith redaction off, opaque keys in config and.env, and the skill's own code blocks.pstack-workeras the default and turned routes on. With routes already on, the script kept a user route and its key, dropped a stalepstack-oldroute, and did not add a default.faststayed as they were.api_key: ${MY_ROUTE_KEY}kept the reference.defaultand kept the user's routes in config.python3 scripts/check_refs.pypasses.