provider.only and provider.allow_fallbacks are supported.
Documentation Index
Fetch the complete documentation index at: /docs/llms.txt
Use this file to discover all available pages before exploring further.
provider.only and provider.allow_fallbacks are supported.
import { BatchProviderPreferences } from "@openrouter/sdk/models";
let value: BatchProviderPreferences = {};
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
allowFallbacks | boolean | :heavy_minus_sign: | Whether to allow backup providers to serve requests - true: (default) when the primary provider (or your custom providers in “order”) is unavailable, use the next best provider. - false: use only the primary/custom provider, and return the upstream error if it’s unavailable. | |
only | models.BatchProviderPreferencesOnly[] | :heavy_minus_sign: | List of provider slugs to allow. If provided, this list is merged with your account-wide allowed provider settings for this request. | [ “openai”, “anthropic” ] |