From ea9a1467a9ade946da3bd06cf3c41570e0697ac7 Mon Sep 17 00:00:00 2001 From: Scott Werner Date: Wed, 27 May 2026 16:51:08 -0400 Subject: [PATCH] docs(openrouter): clarify provider_options is API/SDK only The "Provider routing" section's JSON example was ambiguous about where a user would actually place it. Make explicit that it's a POST /api/v1/completions request body (or constructed via the Rust/TypeScript SDK), and add a note that workflow files do not currently expose provider_options on stage attributes. Co-Authored-By: Claude Opus 4.7 (1M context) --- docs/public/integrations/openrouter.mdx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/docs/public/integrations/openrouter.mdx b/docs/public/integrations/openrouter.mdx index 13e32d64e..a3d049506 100644 --- a/docs/public/integrations/openrouter.mdx +++ b/docs/public/integrations/openrouter.mdx @@ -109,11 +109,12 @@ digraph Example { } ``` -## Provider routing (advanced) +## Provider routing (via API or SDK) -OpenRouter accepts top-level request fields that aren't part of the OpenAI Chat Completions schema, such as `provider` (routing preferences), `models` (fallback list), `transforms`, and `plugins`. Fabro forwards these through the existing `provider_options.openrouter` request field when calling the API directly: +OpenRouter accepts top-level request fields that aren't part of the OpenAI Chat Completions schema — `provider` (routing preferences), `models` (fallback list), `transforms`, `plugins`. Fabro forwards these through the `provider_options.openrouter` field on the request body when calling `POST /api/v1/completions` directly or constructing a `Request` via the Rust/TypeScript SDK: ```json +// POST /api/v1/completions request body { "model": "anthropic/claude-sonnet-4-6", "messages": [...], @@ -128,6 +129,10 @@ OpenRouter accepts top-level request fields that aren't part of the OpenAI Chat See [OpenRouter's provider routing documentation](https://openrouter.ai/docs/features/provider-routing) for the full set of supported fields. + +Workflow files (`workflow.fabro`, `workflow.toml`) don't currently expose `provider_options` — stage attributes can set `model`, `provider`, and `reasoning_effort`, but not provider-specific request fields. Use the API or SDK directly when you need OpenRouter routing controls per call. + + ## Troubleshooting **"No API key configured"** — For server-backed runs, set `vault:OPENROUTER_API_KEY` with `fabro provider login openrouter`. For standalone local usage, export `OPENROUTER_API_KEY` in the invoking shell.