Abstract routing prism directing amber blue and green pathways through a dark network
Provider routing controls the path behind an aggregator without changing the selected model.

Route OpenRouter and Nous Portal Traffic by Cost, Speed, and Policy

When Hermes connects through OpenRouter or Nous Portal, the selected model may be served by several underlying providers. provider_routing lets operators shape that choice without changing the model name. Use it to prefer lower cost, faster first-token latency, higher throughput, specific vendors, complete parameter support, or a stricter data-collection policy.

Understand the controls

Set routing in ~/.hermes/config.yaml. sort accepts price, latency, or throughput. only is a whitelist, ignore is a blacklist, and order expresses preferred providers while leaving unlisted providers available as fallbacks. require_parameters: true prevents routing to an endpoint that would silently drop requested parameters such as tools or sampling controls. data_collection can be allow or deny.

provider_routing:
  sort: price
  ignore: ["example-provider"]
  require_parameters: true
  data_collection: deny

This configuration applies to OpenRouter and Nous Portal chat requests. It does not affect direct Anthropic, Google, OpenAI, or other direct-provider connections. Auxiliary jobs such as compression or title generation have their own configuration path.

Routing checklist

  • Confirm the active inference provider is OpenRouter or Nous Portal.
  • Choose one primary objective: price, latency, or throughput.
  • Use official lowercase provider slugs in allow, ignore, and order lists.
  • Require parameter support for tool-heavy or structured requests.
  • Set data-collection policy explicitly when privacy requires it.
  • Keep at least one tested fallback unless vendor lock-in is intentional.

Pitfalls

Provider routing is not the same as fallback models. It chooses among sub-providers behind one aggregator; fallback-provider configuration changes to another provider or model when the primary path fails. An overly narrow only list can reduce availability, while conflicting lists can make routing impossible. Sorting by price alone does not guarantee the same latency or feature behavior.

Verification steps

  1. Restart the CLI or gateway after editing configuration.
  2. Run a normal text prompt and a tool-calling prompt.
  3. Confirm tool parameters are honored when require_parameters is enabled.
  4. Exercise a fallback scenario without changing production policy blindly.
  5. Review provider metadata or aggregator logs to confirm the intended route.

See the official Provider Routing guide for the current fields and examples.