| title | Automodel Skill |
| name | automodel |
| description | Apply curated OpenRouter model lists (free / balanced / best, 10 models each) by patching the Hermes config file's provider_routing block, or restore stock auto-routing with `default`. Lists are read from a local folder (the cron job's output) or any HTTP host you configure with `/automodel init`. |
Overview
/automodel patches provider_routing.openrouter.models inside the Hermes
config file with a weighted list of models. The list comes from one of three
ranked JSON files (free.json, balanced.json, best.json) generated by the
automodel cron job, OR fetched from any URL you configure.
Subcommands
| Command | What it does |
|---|
/automodel init | Configure where the JSON files come from. Prompts for a base URL (default https://openrouter-hermes-automodel.netlify.app/) and saves URL mode — lists are fetched via HTTP GET <base>/<selection>.json. Pass --mode local for the cron-output fallback. |
/automodel set free | Save selection + apply: top 10 free models with tool-calling. |
/automodel set balanced | Save selection + apply: top 5 free + top 5 paid, ranked by quality-per-dollar. |
/automodel set best | Save selection + apply: top 10 by quality, ignoring price. |
/automodel set default | Remove provider_routing.openrouter entirely; OpenRouter falls back to stock /auto. |
/automodel apply | Re-apply the saved selection (e.g. after the cron job refreshed the JSON). |
Workflow
- One-time setup —
/automodel init. The command prompts for a base URL
(default https://openrouter-hermes-automodel.netlify.app/) and saves it as
URL mode, so lists are fetched from <base>/free.json / balanced.json /
best.json. Re-run /automodel init any time you want to point at a
different host. To use the local cron output instead, run the driver
non-interactively: python3 <skill-dir>/automodel/driver.py init --mode local.
Settings are saved to automodel/data/source.json.
- Apply a list —
/automodel set <selection>. The driver writes a
timestamped backup of the Hermes config (.bak.YYYYMMDD_HHMMSS), then
either patches provider_routing.openrouter.models with weighted entries
(top model gets the highest weight, decaying 10 → 1) or removes the
override for default.
- Pick up the new routing — restart the gateway or
/reset your CLI.
How to invoke from the agent
The driver is a plain CLI under automodel/driver.py. When the user types one of
the slash commands above, run the corresponding subcommand. The driver
auto-detects its own location, so callers don't need to know it.
python3 <skill-dir>/automodel/driver.py init
python3 <skill-dir>/automodel/driver.py init --mode local
python3 <skill-dir>/automodel/driver.py init --mode url --url https://example.com/automodel
python3 <skill-dir>/automodel/driver.py set best
python3 <skill-dir>/automodel/driver.py set free
python3 <skill-dir>/automodel/driver.py set balanced
python3 <skill-dir>/automodel/driver.py set default
python3 <skill-dir>/automodel/driver.py apply
<skill-dir> is Path(__file__).parent from the driver's own perspective; use
the install path Hermes set up when registering the skill (~/.hermes/skills/.../automodel/driver.py).
The driver writes selection and source state under automodel/data/:
automodel/data/selection.json — { "selected": "free|balanced|best|default" }
automodel/data/source.json — { "mode": "local"|"url", "base_url": "..." }
Tell the user
- The skill does not generate the lists. It consumes them. Either run the
cron job (see the repo's README) or point
/automodel init at a URL that
serves them.
- After any
/automodel set, the user must restart the gateway or /reset the
CLI before the new routing takes effect.
Required env
OPENROUTER_API_KEY in the Hermes env file — used by the cron job runner,
not by this driver directly.
The driver itself only needs PyYAML and stdlib. If PyYAML is missing it
tells the user exactly how to install it.
Testing
- Validate
/automodel init writes data/source.json with the right shape.
- Validate
/automodel set best writes data/selection.json and that the
Hermes config gains a provider_routing.openrouter.models block.
- Validate
/automodel set default removes that block; a clean install (no
previous provider_routing) should be a no-op.
- Validate that the timestamped backup file
config.yaml.bak.YYYYMMDD_HHMMSS
is created before any change.