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 gives OpenRouter offerings the same human-facing model slugs used by direct providers. Vendor-namespaced OpenRouter IDs remain opaque api_model values: Any other OpenRouter model can be added under the provider. Choose a stable Fabro model slug as the table key and put OpenRouter’s exact vendor/model string in api_model:
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 the response cost with source provider. Other providers populate the same field from catalog price estimates with source catalog. 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. Workflow runs do send x-session-id: <run-id> for request grouping; an explicit provider default_headers value for that header takes precedence. To opt in to attribution:
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_model 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 provider settings and provider-scoped model offerings.