All plugins

model-peak-switch

Switches the main model's outgoing requests to a cheaper backup during that model's peak windows, using cost.multipliers from the provider's public /models. Delegates, the model route and delegation.* are never written; a desktop chip shows the real request model. Disclosure — during the current model's peak-price windows this plugin rewrites each outgoing main-agent request to your configured backup model and reasoning level on the same provider (the model shown in Hermes and config.yaml stay unchanged), so every switch into or out of a peak window loses the provider prompt cache for that conversation; /peak windows and /peak check fetch the provider's public model catalog (<provider base URL>/models, or the catalog_url you set) without credentials.

npetroff24Modelsv3.0.4Updated 1 hour ago

About

Switches the main model's outgoing requests to a cheaper backup during that model's peak windows, using cost.multipliers from the provider's public /models. Delegates, the model route and delegation.* are never written; a desktop chip shows the real request model. Disclosure — during the current model's peak-price windows this plugin rewrites each outgoing main-agent request to your configured backup model and reasoning level on the same provider (the model shown in Hermes and config.yaml stay unchanged), so every switch into or out of a peak window loses the provider prompt cache for that conversation; /peak windows and /peak check fetch the provider's public model catalog (<provider base URL>/models, or the catalog_url you set) without credentials.

model-peak-switch

English · Русский

During the provider's peak hours, Hermes' current main model costs more. This plugin sends the
outgoing request to a cheaper backup model instead — without touching the model route in
config.yaml, agent.model or the delegate.

Install:

hermes plugins install npetroff24/hermes-plugin-model-peak-switch

Then set the backup model (required, no default):

hermes config set plugins.entries.model-peak-switch.settings.peak_model <model-id>

How it works

The llm_request middleware is the only mechanism. It reads model, provider, base_url,
platform and session_id from the request context, so it follows whatever model Hermes is
actually using — including /model in chat and fallback switching. When that model has
cost.multipliers with factor > 1 in the provider's public <base_url>/models catalog, the
outgoing model (plus reasoning level and max_tokens) is changed to peak_model. Outside the
windows the request stays on the model Hermes chose.

Delegates are skipped by platform == "subagent", not by comparing model names: a delegate may
inherit the parent's model id. The config/UI bar still shows the configured model — the plugin
does not rewrite it; the real outgoing model is shown in /peak, in the status-bar chip and in
the agent log.

Peak windows come from the public catalog, cached in memory and plugin state for six hours. The
request path never fetches over the network; /peak check and /peak windows refresh it. If the
cache is empty or peak_model is no longer listed by the provider, no rewrite happens.

Statuses

Status: deepseek-v4.1-flash has no peak hours — plugin idle
Status: deepseek-v4.1-flash has peak hours; set peak_model to switch
Status: peak model hy4-flash not found at provider — no switching
Status: peak, Hermes shows deepseek-v4.1-flash, requests go to hy4-flash
Next switch to deepseek-v4.1-flash at 14:00

/peak all adds slots, catalog URL, windows, last switch. /peak check validates both model ids,
reasoning levels and output limits. /peak windows refreshes the catalog. /peak on|off toggles
automatic switching.

Settings

keydefaultmeaning
peak_modelrequiredbackup model on the same provider route
peak_efforthighreasoning level for the backup model (clamped to supported levels)
auto_switchtrueautomatic switching
windows_sourceautoauto = cost.multipliers, manual = the string below
manual_windows""mon-fri 01:00-04:00,06:00-10:00 x2 (UTC)
catalog_url""explicit catalog URL; otherwise <context base_url>/models
languageautoauto follows Hermes display.language; en/ru force

Desktop status bar

The package ships a desktop half (desktop/plugin.js) and a backend route
(dashboard/plugin_api.py + manifest.json). The app copies the desktop half into
desktop-plugins/model-peak-switch/, but a unified package's desktop half ships opt-in: enable
it once in Capabilities → Plugins (the model-peak-switch row's desktop toggle). Until then it
is inventoried but its register() never runs, so there is no chip. The chip shows one short line —
Active: <model the request actually uses> (⚠ prefix when the backup model is missing or not set)
— and the hover title carries the reason. The chip is not available in the terminal CLI — there
/peak and the log are the indicators.

Status bar chip

Upgrading from 2.x → 3.0

base_provider, base_model, base_effort and peak_provider are gone — the main model now
comes from the request context. Set peak_model explicitly; old base_* keys can be deleted from
plugins.entries.model-peak-switch.settings. Run /peak check after upgrading.

Limits

config_schema.required only warns, it does not block installation (there is no public
on_install hook). Immediately after /model, before the first request, /peak may show the
previously recorded model; the status-bar chip uses the live app model. Switching across providers
is refused — the HTTP client and credentials belong to one route.

Disclosure

  • Network: GET <base_url>/models (or an explicit catalog_url, or the opencode defaults) —
    the provider's public model catalog, sent without credentials, only from /peak check and
    /peak windows. The llm_request hot path never makes a network call; the result is cached in
    memory and plugin state for six hours.
  • Reads: display.language and model.default from the Hermes config, to follow the UI
    language and the configured model.
  • Writes: status.json in <hermes home>/plugin-data/model-peak-switch/ (the snapshot the
    desktop chip reads), and the plugin's own auto_switch setting on /peak on|off. The model
    route in config.yaml, agent.model and delegation.* are never written.
  • Desktop: the optional chip polls /api/plugins/model-peak-switch/status every 15 seconds.
  • Not used: .env, auth.json or any credential store, shell commands, background processes,
    telemetry, self-update.

Verify

hermes plugins validate /path/to/hermes-plugin-model-peak-switch --install-deps
python -m pytest tests -q -p no:cacheprovider --rootdir=tests
hermes -z "/peak"

MIT · https://github.com/npetroff24/hermes-plugin-model-peak-switch

README from the reviewed commit 4c9a299; it updates when the author re-pins.

Developer Mode

Explore built-in Hermes toolsets and actions.

HermesAgent

Developer?

Create a Hermes extension for Desktop or agent workflows.

Developer Section