mirror of
https://github.com/fabro-sh/fabro.git
synced 2026-09-29 01:42:21 +00:00
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) <noreply@anthropic.com>
This commit is contained in:
parent
100b7b4750
commit
ea9a1467a9
1 changed files with 7 additions and 2 deletions
|
|
@ -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.
|
||||
|
||||
<Note>
|
||||
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.
|
||||
</Note>
|
||||
|
||||
## 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.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue