Hermes Agent

Written for Hermes Agent 0.21.5 (tag v2026.9.24), from its documentation and source. Hermes talks to zdr.sh over Chat Completions, configured as a named OpenAI-compatible provider.

Configure#

Use a named provider in ~/.hermes/config.yaml, with the key in ~/.hermes/.env.

yaml
providers:  zdr:    api: https://api.zdr.sh/v1    key_env: ZDR_API_KEY    transport: chat_completions    models:      deepseek-v4.1-flash:        context_length: 1048576      glm-5.3:        context_length: 1048576      glm-5.3-flash:        context_length: 1048576model:  default: glm-5.3  provider: custom:zdr
bash
hermes config set ZDR_API_KEY duck-...

That writes the key to ~/.hermes/.env and reads it only for api.zdr.sh. hermes chat starts with the default model; /model custom:zdr:glm-5.3 switches for the session, and --global persists the choice.

The parts that matter#

  • context_length is a plain integer, not "1M". Without it, detection falls back to a 256K default, which is wrong for every zdr.sh id.
  • Use key_env, not an inline api_key. The environment variable CUSTOM_BASE_URL outranks model.base_url, and an inline key would be sent wherever that variable points. key_env is released only when the endpoint matches. Keep CUSTOM_BASE_URL unset.
  • Transport. transport: chat_completions is explicit here. Chat Completions is the right protocol for every zdr.sh id.
  • Output. Hermes does not send an output cap; the model's default applies.
  • Bare custom, if you prefer it. provider: custom is required for a remote base_url to be used at all, with context_length next to it.
  • Keys and listing. The named provider avoids sending a key stored for another provider. A request without a usable key is answered 401.