All plugins

model-release-aliases

Floating model aliases for model providers: declare a stable model id once (glm-latest) and the plugin resolves it to the newest matching model the provider actually serves, so the config keeps working when the provider ships a newer release. The alias id stays the model id everywhere (picker, setup, persisted selection) and the resolved id goes on the wire. Disclosure — model provider that re-registers each configured target provider (bundled or custom) under its own name with an alias-resolving copy of that provider's profile; at startup when its cache is stale, and whenever the /model picker refreshes, it fetches the models.dev catalog and each target's GET /models endpoint, sending that provider's API key (read through Hermes' secret scope) as a Bearer header to that target only and refusing redirects to another host. Reads the active profile's config.yaml and writes resolution state and last-known-good metadata under the active profile's cache/model-release-aliases/. No telemetry, shell commands, background processes or stored credentials.

Lytcode LLCModelsv1.0.0Updated 1 hour ago

About

Floating model aliases for model providers: declare a stable model id once (glm-latest) and the plugin resolves it to the newest matching model the provider actually serves, so the config keeps working when the provider ships a newer release. The alias id stays the model id everywhere (picker, setup, persisted selection) and the resolved id goes on the wire. Disclosure — model provider that re-registers each configured target provider (bundled or custom) under its own name with an alias-resolving copy of that provider's profile; at startup when its cache is stale, and whenever the /model picker refreshes, it fetches the models.dev catalog and each target's GET /models endpoint, sending that provider's API key (read through Hermes' secret scope) as a Bearer header to that target only and refusing redirects to another host. Reads the active profile's config.yaml and writes resolution state and last-known-good metadata under the active profile's cache/model-release-aliases/. No telemetry, shell commands, background processes or stored credentials.

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

  • One property under model_release_aliases in ~/.hermes/config.yaml: each prop in provider_alias_to_many_model_aliases targets one provider and holds that provider's model aliases.
  • The provider prop name under provider_alias_to_many_model_aliases is 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 surfaceResolvesNotes
model.defaultyesNormalized at agent init.
auxiliary.<task>.model, including visionyesThe auxiliary builder normalizes the model for the task's provider.
fallback_providers[].modelyesNormalized per fallback entry.
/model pickeryesThe picker lists real ids plus alias ids.
delegation.modelyesDelegated children normalize the same way.
custom_providers[].modelyesCustom 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.modelnoThe 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

ProvidersWhat normalize_model_for_provider() returns
openrouter, nous, ai-gateway, kilocodeThe vendor-prefixed id (z-ai/glm-latest).
opencode-go, opencode-zenThe name unchanged. (A custom provider whose name starts with a family slug, e.g. opencode-go-bridge, early-returns the same way.)
anthropicThe 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 useBecause
opencode-go, opencode-zen, opencode-*the OpenCode family is skipped
openrouter, nous, ai-gateway, kilocodethe aggregator families are skipped
anthropicdots become hyphens — the name is rewritten
local, ollama, vllmrewritten to custom
fw, claude, google, kilorewritten 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
TierKeyDecides
1 (primary)release_date DESCNewest release wins. ISO dates from models.dev; undated candidates get "" → sink to the bottom
2 (tiebreak)natural_key(id) DESCWhen 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 DESCLexicographic, 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 /model picker is run, the plugin fetches the models.dev catalog (no credentials are sent to it) and each configured target's GET /models endpoint, sending the user's own API key for that target — read from the environment variable that target names (key_env) — as a Bearer header to that target only. Startup fetches are bounded and concurrent, inside Hermes' plugin-load budget. This only occurs when model_release_aliases: section is configured in config.yaml.
  • Reads: ~/.hermes/config.yaml and the API key named by the target's key_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

KeyTypeDefaultMeaning
provider_alias_to_many_model_aliasesmapping{}Developer-named provider-alias groups.
strictbooleanfalseTurn any resolution failure into a plugin load failure.
debugbooleanfalseLog each resolution and the list of registered providers.
refresh_secondspositive integer3600Age 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.

KeyTypeRequiredMeaning
group keystringyesThe provider alias you choose. Avoid the names listed in provider alias names to avoid.
providerstringyesThe model-slug prefix identifying the target provider. Resolved through the slug-prefix ladder.
alias slugmappingat least oneAn 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:

  1. Name join — a custom_providers entry whose name equals the group key. The
    entry is the alias; its slug prefix is not consulted.
  2. Bundled provider — a provider shipped with Hermes whose name equals the prefix
    (opencode-go, fireworks, gemini, …).
  3. Entry slug prefix — a custom entry whose model (or default_model) slug starts
    with the prefix. The prefix must end the slug or be followed by /, so gpt never
    matches gptx-9b. If several entries match, the first is used and a warning is logged.
  4. No match — the group fails to register with
    slug prefix '…' matches no bundled provider and no custom_providers entry.

alias

KeyTypeRequiredMeaning
matchstring or list of stringsyesGlob patterns the candidate id must match.
excludestring or list of stringsnoGlob patterns that disqualify a candidate. Wins over match.
filter.minContextpositive integernoMinimum context window.
filter.minAge'<n>h' or '<n>d'noMinimum age of the release.
filter.capabilities.toolsbooleannoRequired tool-calling support.
filter.capabilities.inputstring or list of stringsnoRequired input modalities.
filter.capabilities.outputstring or list of stringsnoRequired 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"]
}
  • resolved is the current alias to model id mapping for that target.
  • history is the drift log, oldest first, capped at 20 entries.
  • capabilities caches the models.dev entry of each resolved model, so warm starts keep
    picker badges and routing metadata without a network call.
  • real_ids is the provider's real model id list, used to populate the picker.
  • updated_at is the epoch timestamp of the last resolution and drives the
    refresh_seconds check.
  • A file with an unexpected version or 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 --version output
  • the relevant part of your model_release_aliases: section (redact keys and URLs)
  • the plugin log lines (hermes logs, logger model-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 main and name it fix/…, 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 where hermes_cli
    and providers are importable).

  • Test manually: start Hermes and exercise the path you changed. A code change
    only takes effect after hermes 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>
TypeUse for
fixBug fixes
featNew features
docsDocumentation
testTests
refactorCode restructuring
choreBuild, 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.

Developer Mode

Explore built-in Hermes toolsets and actions.

HermesAgent

Developer?

Create a Hermes extension for Desktop or agent workflows.

Developer Section