Skip to main content
OpenRouter is an aggregator that fronts hundreds of models behind one OpenAI-compatible API. Fabro ships a disabled openrouter provider entry with a curated model catalog, so you can opt in from settings.toml without changing Fabro code.

Prerequisites

Enable the provider

Fabro runs execute through a Fabro server. Add the provider override to the settings file used by that server. For a local server, this is usually ~/.fabro/settings.toml; for a remote deployment, update the server host’s Fabro settings.
settings.toml

Configure credentials

Store the key in the target Fabro server vault:
Direct SDK usage outside a Fabro server can use an env-backed credential source explicitly:

Included models

The built-in catalog curates frontier and open-weights models under vendor-namespaced IDs: Any other OpenRouter model can be added as a settings model entry with provider = "openrouter" and the OpenRouter slug as api_id:
settings.toml

Use OpenRouter models

When targeting a non-default remote server, pass the same --server value to verification commands:
In workflow stylesheets:
workflow.fabro

Cost telemetry

Every OpenRouter response includes an inline usage.cost with authoritative USD billing. Fabro surfaces it as cost_usd with cost_source = "authoritative" on completion responses. Other providers populate the same fields from catalog price estimates with cost_source = "estimated". The catalog prices on OpenRouter model rows are best-effort estimates used only before the authoritative figure arrives (for example, mid-stream rollups).

Provider routing

OpenRouter’s provider routing preferences pass through verbatim via provider_options.openrouter on API/SDK requests — the keys merge into the top level of the request body:

Attribution headers

Fabro does not send OpenRouter’s optional attribution headers (HTTP-Referer, X-Title) by default, so self-hosted installations stay anonymous on OpenRouter’s public app leaderboard. To opt in:
settings.toml

Troubleshooting

“No API key configured” — Set the key on the target server with fabro provider login --provider openrouter or fabro secret set OPENROUTER_API_KEY .... For direct SDK usage outside a Fabro server, export OPENROUTER_API_KEY in the invoking shell. “provider ‘openrouter’ is not configured in the server model catalog” — Confirm the server host’s settings.toml has [llm.providers.openrouter] with enabled = true. Fabro live-reloads settings.toml within a few seconds; after that, fabro model list --provider openrouter against the same server should show the enabled catalog. 402 / insufficient credits — Paid OpenRouter models require prepaid credit; check your balance at openrouter.ai/credits. Unknown model — Confirm the model’s api_id matches an OpenRouter slug exactly (including the vendor prefix), then run fabro model test --model <fabro-model-id>.

Further reading

Models

How Fabro routes model IDs, providers, and fallbacks.

Settings Configuration

Full reference for [llm.providers.<id>] and [llm.models.<id>].