openrouter provider entry with a curated model catalog, so you can opt in from settings.toml without changing Fabro code.
Prerequisites
- An OpenRouter account with credit for paid models
- An API key from openrouter.ai/keys
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:Included models
The built-in catalog gives OpenRouter offerings the same human-facing model slugs used by direct providers. Vendor-namespaced OpenRouter IDs remain opaqueapi_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
--server value to verification commands:
workflow.fabro
Cost telemetry
Every OpenRouter response includes an inlineusage.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 viaprovider_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 withfabro 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.