Purpose#
This guide connects Hermes to AnyRoute through the Anthropic-compatible Messages API and verifies a minimal working setup.1. Before you begin#
You know the exact model ID Hermes should call.
You can edit Hermes's config.yaml.
You intend to use the Anthropic-compatible endpoint, not the OpenAI-compatible endpoint.
2. Supported models#
Common Anthropic-compatible model IDs include:claude-haiku-4-5-20251001
Use the Supported Models page and your AnyRoute console as the current source of truth.The setup has three parts:1.
Define an AnyRoute provider under custom_providers.
2.
Point the default model to that provider.
3.
Disable smart model routing so Hermes does not silently select another model.
Define the provider#
base_url: https://cc.anyroute.io
api_mode: anthropic_messages
Select the provider as the default#
model.provider must match the custom_providers[].name value.Disable smart model routing#
Otherwise, Hermes may route short prompts to a lower-cost model instead of the model selected above.4. Minimal combined configuration#
Replace <your-key> locally. Do not commit the configured file or share it while it contains a real key. Restrict its filesystem permissions on shared systems.To switch models, update both model.default and the matching entry under custom_providers[].models.5. Success checklist#
base_url is https://cc.anyroute.io.
api_mode is anthropic_messages.
model.provider matches the custom provider name.
Smart model routing is disabled.
Hermes receives a normal model response.
Troubleshooting#
Why use the Anthropic-compatible mode?#
This setup uses the Anthropic Messages endpoint:Set api_mode: anthropic_messages; do not mix this guide with an OpenAI Chat Completions configuration.Hermes selected a different model#
Check that smart_model_routing.enabled is false.Can I use api_key_env?#
The source configuration records inconsistent api_key_env behavior in Hermes v0.10.0. If your installed version fails to expand the environment variable and returns HTTP 401, verify the current Hermes documentation or use the direct api_key field temporarily. Protect the resulting configuration file as a secret.HTTP 401#
Check the key, both key fields in the configuration, and whether Hermes loaded the file you edited.HTTP 503#
Confirm that Hermes is using anthropic_messages. If it is, check the AnyRoute service status and try another currently available model.6. Test the AnyRoute endpoint directly#
This request helps distinguish an AnyRoute endpoint issue from a Hermes configuration issue:Run this only in a private terminal. Avoid saving a real API key in shell history.Next steps#

Join AnyRoute WeChat Group
To get support for AnyRoute

scan QR codeModified at 2026-07-24 19:03:41