Menu

How to configure Hermes on WSL2 to use OpenRouter models

2 min read Manuel

Because the Hermes agent on WSL2 manages providers through flexible configurations, to use a model via OpenRouter you have to explicitly change the provider in the Hermes configuration command. Please note: the Ox Alpha model (stealth/ox-alpha) has been retired and shut down by OpenRouter, but you can apply the very same procedure to any other model available on OpenRouter (including its official successor, Zhipu ZAI GLM-5.3-Flash).

Procedure for configuring OpenRouter on Hermes (WSL2)

To configure the Hermes agent so that it routes requests through OpenRouter rather than to the native Nous portal, you can act directly from the terminal inside your WSL2 environment:

1. Interactive model configuration: Run the Hermes model configuration command:

hermes model

During the guided procedure, select OpenRouter as the provider, enter your OpenRouter API key when prompted and select the desired model from the catalogue.

2. Change on the fly during a chat session: If you already have an active Hermes session, you can force the switch of provider and model directly via the slash command:

/model z-ai/glm-5.3-flash --provider openrouter

If you want the change to become permanent for future sessions too, add the --global flag.

3. Manual configuration via the configuration file (config.yaml): Alternatively, you can open the Hermes configuration file (usually located in the user directory within WSL2, e.g. ~/.hermes/config.yaml) and update the main model section by entering OpenRouter:

model:
  provider: openrouter
  default: z-ai/glm-5.3-flash
  api_mode: chat_completions

Relationship diagram for routing on Hermes CLI

graph TD
    A[Hermes Agent in WSL2] -->|Comando /model o hermes model| B{Scelta Provider}
    B -->|Nous Portal| C[Modelli nativi Nous]
    B -->|OpenRouter| D[Gateway OpenRouter]
    D --> E[Modelli di terze parti / Flash / Coding]


TAG: #wsl2 #openrouter #ai