Hermes Model Configuration Methods | Generated by AI

Home 2026.05

Question: How do I change Hermes Agent’s default model?

Answer:

There are four main ways to change the default model in Hermes Agent (by Nous Research):


Run the interactive model selector from your terminal:

hermes model

This command lets you switch providers and models interactively. It also handles cases where you need to set up a new provider you haven’t configured yet.

You can also set the model directly with a one-liner:

hermes model set anthropic/claude-opus-4.7 --provider openrouter

Method 2: Edit ~/.hermes/config.yaml Directly

When you save via the dashboard or CLI, Hermes writes to ~/.hermes/config.yaml. A typical model configuration looks like this:

model:
  provider: openrouter
  default: anthropic/claude-opus-4.7
  base_url: ''
  api_mode: chat_completions

In the model: config section, you can use either default: or model: as the key name for your model ID — both work identically.

After editing, restart your Hermes session for changes to take effect.


Method 3: Hot-Swap Model in a Running Session (In-chat)

Use /model <name> inside the chat to hot-swap the model for that specific session without restarting. New sessions won’t inherit this change — they read from config.yaml.

You can also use the --global flag to change the model both in the running session and persistently:

hermes model set anthropic/claude-opus-4.7 --global

Method 4: Use Model Aliases

You can define short aliases for models you use often in ~/.hermes/config.yaml, then use /model <alias> in chat or CLI:

model_aliases:
  fav:
    model: claude-sonnet-4.6
    provider: anthropic
  grok:
    model: grok-4
    provider: x-ai

Or set them via CLI:

hermes config set model.aliases.fav anthropic/claude-opus-4.6

Then use /model fav in chat.


Important Notes

References:


Back Donate