Ultimate Harness
Runbooks

OpenRouter — operator setup runbook

Zero-to-passing for the openrouter adapter: the cheapest pay-per-token routing target. API key via OPENROUTER_API_KEY; any OpenRouter model id is reachable.

The openrouter adapter is an OpenAI-compatible HTTP client for openrouter.ai — the cheapest pay-per-token routing target, complementary to the subscription-backed hermes-proxy.

1. Get an API key

Create a key at openrouter.ai/keys and export it (the adapter reads it from the environment — it is never stored in the manifest):

export OPENROUTER_API_KEY="sk-or-..."

Without the key, uh adapter check openrouter reports found: false with a "set OPENROUTER_API_KEY" message (also the CI-skip signal), and uh mission run --runtime openrouter fails fast with a clear plan error.

2. Add the adapter manifest

uh adapter add openrouter

config.runtime_config keys (strict — typos are rejected at load):

KeyRequiredDefaultNotes
endpointnohttps://openrouter.ai/api/v1OpenAI-compat base URL
modelyes—any OpenRouter model id, e.g. openai/gpt-4o-mini, anthropic/claude-3.5-sonnet
request_timeout_msno120000per-request timeout
extra_headersno{}extra request headers (lower-cased)
refererno—sets HTTP-Referer (OpenRouter app ranking)
titleno—sets X-Title (OpenRouter app ranking)

3. Verify + run

uh adapter check openrouter
uh mission dry-run <mission> --runtime openrouter
uh mission run <mission> --runtime openrouter

Per-mission model override via runtime_config_overrides.model.

4. Cost routing

openrouter carries cost_class: cheap, so uh mission run --auto picks it when it's the cheapest installed adapter that satisfies the mission's runtime_requirements. Use --auto --explain to see the decision matrix.

Notes

  • Live smoke is deferred in CI until an OPENROUTER_API_KEY repo secret is set; the adapter's unit tests are fully HTTP-mocked and need no key.

On this page