model-release-aliases
Floating model aliases for Hermes. Inspired by opencode-model-aliases.
Declare a stable model id once (glm-latest) in config.yaml and the plugin resolves it to the newest matching provider model. When the provider ships a newer release, no config edits needed.
Contents
- How to configure
- How it works
- What this plugin does
- Install
- Configuration reference
- Setup
- Cache and drift
- How failures are handled
- Contributing
- License
How to configure
- One property under
model_release_aliasesin~/.hermes/config.yaml: each prop inprovider_alias_to_many_model_aliasestargets one provider and holds that provider's model aliases. - The provider prop name under
provider_alias_to_many_model_aliasesis then assigned to any provider prop that has a sibling prop you want to assign a model alias to. - Example:
model:
default: mimo-pro-latest
provider: ocg-alias
base_url: https://opencode.ai/zen/go/v1
api_mode: chat_completions
model_release_aliases:
provider_alias_to_many_model_aliases:
ocg-alias:
provider: opencode-go
mimo-pro-latest:
match: ["mimo-*-pro"]
Where an alias can be applied
Where an alias id can be used in config.yaml:
| Config surface | Resolves | Notes |
|---|---|---|
model.default | yes | Normalized at agent init. |
auxiliary.<task>.model, including vision | yes | The auxiliary builder normalizes the model for the task's provider. |
fallback_providers[].model | yes | Normalized per fallback entry. |
/model picker | yes | The picker lists real ids plus alias ids. |
delegation.model | yes | Delegated children normalize the same way. |
custom_providers[].model | yes | Custom entries are wrapped like bundled providers, so their default model id is normalized too, and an alias slug is resolved through the wrap. |
x_search.model | no | The x_search tool calls xAI directly with the literal id, outside the provider profile seam. Use a concrete xAI model id there. |
Several providers don't normalize model ID's
| Providers | What normalize_model_for_provider() returns |
|---|---|
openrouter, nous, ai-gateway, kilocode | The vendor-prefixed id (z-ai/glm-latest). |
opencode-go, opencode-zen | The name unchanged. (A custom provider whose name starts with a family slug, e.g. opencode-go-bridge, early-returns the same way.) |
anthropic | The name with dots replaced by hyphens. |
Provider alias names to avoid
These provider names won’t resolve because Hermes’ doesn’t resolve them using the same logic as other providers:
| Don't use | Because |
|---|---|
opencode-go, opencode-zen, opencode-* | the OpenCode family is skipped |
openrouter, nous, ai-gateway, kilocode | the aggregator families are skipped |
anthropic | dots become hyphens — the name is rewritten |
local, ollama, vllm | rewritten to custom |
fw, claude, google, kilo | rewritten to fireworks, anthropic, gemini, kilocode |
A group name that is rejected fails the load in both tolerant and strict mode, and the error message names the reason.
Live example
A real configuration uses the group ocg-alias over the opencode-go provider:
model_release_aliases:
provider_alias_to_many_model_aliases:
ocg-alias:
provider: opencode-go
glm-flash-latest:
match: ["glm-*-flash"]
kimi-code-latest:
match: ["kimi-*-code"]
mimo-pro-latest:
match: ["mimo-*-pro"]
How it works
Asterisk is a wildcard match. So, mimo-*-pro matches mimo-V2.6-pro or a later version. The primary logic is in model_release_aliases/resolver.py:
survivors.sort(
key=lambda c: (c.release_date or "", natural_key(c.id), c.id),
reverse=True,
)
return survivors[0].id
| Tier | Key | Decides |
|---|---|---|
| 1 (primary) | release_date DESC | Newest release wins. ISO dates from models.dev; undated candidates get "" → sink to the bottom |
| 2 (tiebreak) | natural_key(id) DESC | When dates are equal/absent: digit runs compare numerically, text runs lexically — glm-4.7 > glm-4.6 > glm-4 (tagged parts so mixed types never raise) |
| 3 (final) | id DESC | Lexicographic, for identical natural keys (tcl-4 vs tcl-04 at the same date) |
What this plugin does
- Network calls: on first resolution, when a cached resolution goes stale, or whenever
/modelpicker is run, the plugin fetches the models.dev catalog (no credentials are sent to it) and each configured target'sGET /modelsendpoint, sending the user's own API key for that target — read from the environment variable that target names (key_env) — as aBearerheader to that target only. Startup fetches are bounded and concurrent, inside Hermes' plugin-load budget. This only occurs whenmodel_release_aliases:section is configured in config.yaml. - Reads:
~/.hermes/config.yamland the API key named by the target'skey_env. - Writes: resolution state and metadata under
~/.hermes/cache/model-release-aliases/(one file per provider; resolved ids, capability metadata, drift history). - No telemetry, usage reporting, shell commands, background processes, or stored credentials (the key is read per fetch and never persisted).
Install
Run hermes plugins install lytcode-llc/model-release-aliases (no third-party dependencies to install)
Configuration reference
Everything lives under the model_release_aliases: key in config.yaml. Edit the file directly to add model-release-aliases.
model_release_aliases:
strict: false # optional - defaults to false, a true value fails the plugin load if a provider or model don't resolve
debug: false # optional - default to false, true logs every resolution
refresh_seconds: 3600 # optional - defaults to 3600 (1 hour) for how long a cached resolution is trusted
provider_alias_to_many_model_aliases:
ocg-alias: # the provider alias you write in your config
provider: opencode-go # reserved: the target's model-slug prefix
glm-latest: # a model alias, a direct sibling of `provider`
match: ["glm-*"]
exclude: ["*-preview"] # optional ex: to filter out model preview releases
filter: # additional optional filters
minContext: 128000 # minimum context window size, valuable for ensuring new releases during long agent runs keep a consistent context size
minAge: 48h # '<n>h' or '<n>d' (if you want a more stable release)
capabilities:
tools: true
input: [text, image] # every listed modality must be present
output: [text]
A ready-to-paste block is in examples/hermes-config.yaml.
Top-level keys
| Key | Type | Default | Meaning |
|---|---|---|---|
provider_alias_to_many_model_aliases | mapping | {} | Developer-named provider-alias groups. |
strict | boolean | false | Turn any resolution failure into a plugin load failure. |
debug | boolean | false | Log each resolution and the list of registered providers. |
refresh_seconds | positive integer | 3600 | Age at which a cached resolution is considered stale. |
Any other top-level key is rejected with the offending key path in the message, so a
typo is logged at load and skips registration instead of being ignored.
provider_alias_to_many_model_aliases
A mapping of group key to group body.
| Key | Type | Required | Meaning |
|---|---|---|---|
| group key | string | yes | The provider alias you choose. Avoid the names listed in provider alias names to avoid. |
provider | string | yes | The model-slug prefix identifying the target provider. Resolved through the slug-prefix ladder. |
| alias slug | mapping | at least one | An alias spec, as a direct sibling of provider. |
A group must declare at least one model alias. provider is reserved: it is never
read as an alias.
The slug-prefix ladder
A group's provider value is the model-slug prefix identifying the target provider.
It is resolved against the config in this order:
- Name join — a
custom_providersentry whosenameequals the group key. The
entry is the alias; its slug prefix is not consulted. - Bundled provider — a provider shipped with Hermes whose name equals the prefix
(opencode-go,fireworks,gemini, …). - Entry slug prefix — a custom entry whose
model(ordefault_model) slug starts
with the prefix. The prefix must end the slug or be followed by/, sogptnever
matchesgptx-9b. If several entries match, the first is used and a warning is logged. - No match — the group fails to register with
slug prefix '…' matches no bundled provider and no custom_providers entry.
alias
| Key | Type | Required | Meaning |
|---|---|---|---|
match | string or list of strings | yes | Glob patterns the candidate id must match. |
exclude | string or list of strings | no | Glob patterns that disqualify a candidate. Wins over match. |
filter.minContext | positive integer | no | Minimum context window. |
filter.minAge | '<n>h' or '<n>d' | no | Minimum age of the release. |
filter.capabilities.tools | boolean | no | Required tool-calling support. |
filter.capabilities.input | string or list of strings | no | Required input modalities. |
filter.capabilities.output | string or list of strings | no | Required output modalities. |
Alias lookup is case-insensitive: normalize_model_id("GLM-LATEST") resolves the same
as glm-latest.
model_release_aliases:
provider_alias_to_many_model_aliases:
fw-alias:
provider: fw-alias # the name join: the entry IS the alias
kimi-code-latest:
match: ["kimi-*-code"]
custom_providers:
- name: fw-alias
api: https://api.fireworks.ai/inference/v1
key_env: FIREWORKS_API_KEY
catalog_provider: fireworks
model: kimi-code-latest # an alias slug, resolved through the wrap
The provider value is still required (the parser rejects a group without it), but in
the name-join case the entry's name decides the target and the prefix is not consulted.
Alias slugs as a custom entry's model. model and default_model may hold an
alias slug. The slug is resolved through the wrap when the route runs, and it is
validated eagerly at registration: a known alias that resolves to nothing on that
provider is reported.
model-release-aliases: custom provider 'fw-alias': model 'kimi-code-latest' is a known alias but matched no models on this provider (check match globs against the catalog)
Under strict: true that report fails the load instead of logging.
A custom entry claims the profile name custom:<name> as well, because Hermes'
generic custom profile declares bare-name aliases (ollama, local, vllm) that
would otherwise intercept the lookup.
Use with Hermes aliases
Hermes has its own model_aliases: section (direct aliases — see the Hermes
configuration docs).
The plugin does not use it for its own config — that's model_release_aliases: — but an
entry there can point at a plugin group, so the alias's model stays on the newest
matching release:
model_aliases: # Hermes' own section — unchanged
glm:
model: glm-latest # a plugin alias slug
provider: ocg-alias # a plugin group name
or the short form:
hermes config set model.aliases.glm ocg-alias/glm-latest
/model glm then selects the group and the alias resolves through the plugin. If the
slug matches nothing on that group, registration reports it (and fails the load under
strict: true); entries naming any other provider are Hermes' business and are never
read or validated by the plugin.
Setup
1. Add the config. Edit ~/.hermes/config.yaml:
model_release_aliases:
debug: true
provider_alias_to_many_model_aliases:
ocg-alias:
provider: opencode-go
glm-latest:
match: ["glm-*"]
exclude: ["*-preview"]
model:
provider: ocg-alias
default: glm-latest
The provider child property under the alias key (org-alias) is the prefix of the model string. The model name alias (glm-latest) is the model ID alias.
2. Restart Hermes. The config is read at plugin import.
3. Check the resolution. With debug: true the plugin logs what it resolved and what it registered:
model-release-aliases: opencode-go resolved {'glm-latest': 'glm-5.3-flash'}
model-release-aliases: registered ['opencode-go']
4. Use it.
In a session, /model shows the provider's real model ids and the alias ids.
5. When the provider ships a new release. The next startup re-resolves and the alias moves with it. When the winner changes, the plugin logs one drift line:
model-release-aliases: opencode-go/glm-latest: glm-5.2 -> glm-5.3-flash (detected 2026-11-24T09:14:22)
The drift is also recorded in the cache file, see Cache and drift.
Cache and drift
The plugin writes one JSON file per target provider under
$HERMES_HOME/cache/model-release-aliases/ (~/.hermes/cache/model-release-aliases/ by default),
named after the target, for example opencode-go.json:
{
"version": 1,
"updated_at": 1764000000.0,
"resolved": {
"glm-latest": "glm-5.3-flash"
},
"history": [
{"alias": "glm-latest", "from": "glm-5.2", "to": "glm-5.3-flash", "at": 1763990000.0}
],
"capabilities": {
"glm-latest": {"id": "glm-5.3-flash", "release_date": "2026-08-26", "limit": {"context": 1000000}}
},
"real_ids": ["glm-5.2", "glm-5.3-flash"]
}
resolvedis the current alias to model id mapping for that target.historyis the drift log, oldest first, capped at 20 entries.capabilitiescaches the models.dev entry of each resolved model, so warm starts keep
picker badges and routing metadata without a network call.real_idsis the provider's real model id list, used to populate the picker.updated_atis the epoch timestamp of the last resolution and drives the
refresh_secondscheck.- A file with an unexpected
versionor malformed JSON is treated as "no cache", so the
next start resolves from scratch.
Warm cache. A cached resolution is reused without any network call when it is
younger than refresh_seconds.
Last-known-good. If a re-resolution fails (network error, endpoint down), the
previous mapping is kept and used. An alias that hasn't resolved is reported as an error.
Drift. When a re-resolution picks a different model for an alias, the change is logged and recorded in the cache history. The same alias can drift at most once per resolution.
To force a re-resolution, delete the cache file, or lower refresh_seconds and wait for
it to expire. The /model picker also forces a live refresh.
How failures are handled
- Tolerant (default). An alias that cannot be resolved is logged as an error to .hermes/log/agent.log.
- Strict (
strict: true). Any failure raises an error during plugin load. Nothing is registered, and Hermes reports the failed import. - Config errors (i.e. unknown key, wrong type, empty pattern list) are always logged in the UI and agent.log.
Contributing
Bugs and pull requests are welcome. By contributing you agree that your contributions
are licensed under the MIT License (see License).
Reporting a bug
Open a GitHub issue and include:
- your OS, Python version and
hermes --versionoutput - the relevant part of your
model_release_aliases:section (redact keys and URLs) - the plugin log lines (
hermes logs, loggermodel-release-aliases) and the full traceback - steps to reproduce
- the resolved map from the cache file, if it exists
A failing match glob against a known catalog is the most useful thing to include.
Check the open and closed issues before opening a new one. For a security vulnerability, report it privately to security@nousresearch.com instead of a public issue.
Submitting a pull request
-
Branch from
mainand name itfix/…,feat/…,docs/…,test/…or
refactor/…followed by a short description. -
Keep the change focused: one logical change per pull request.
-
Run the tests before opening it:
python -m pytest tests/ -q MODEL_ALIASES_SMOKE_HOME=$(mktemp -d) python tests/integration_smoke.py hermes plugins validate .The smoke test imports the installed Hermes, so run it with the interpreter Hermes
itself uses (~/.hermes/hermes-agent/venv/bin/python, or any Python wherehermes_cli
andprovidersare importable). -
Test manually: start Hermes and exercise the path you changed. A code change
only takes effect afterhermes gateway restart, since plugins are discovered once
per process. -
Check cross-platform impact: consider macOS, Linux, WSL2 and native Windows.
Never assume Unix paths. -
New behavior needs a unit test; changes to the Hermes seam need the smoke test
updated too. A new configuration key needs a row in the configuration reference. -
In the description, say what changed and why, how to test it, which platforms you
tested on, and reference any related issue.
Commit messages
Conventional Commits:
<type>(<scope>): <description>
| Type | Use for |
|---|---|
fix | Bug fixes |
feat | New features |
docs | Documentation |
test | Tests |
refactor | Code restructuring |
chore | Build, CI, dependency updates |
Plugin not working? See TROUBLESHOOTING.md.
License
MIT - Copyright (c) 2026 Lytcode LLC.
README from the reviewed commit 131ae21; it updates when the author re-pins.

Lytcode LLC