mirror of
https://github.com/wassname/openrouter-python-sdk-retry-errors.git
synced 2026-07-29 11:23:49 +08:00
Co-authored-by: speakeasybot <bot@speakeasyapi.dev> Co-authored-by: speakeasy-github[bot] <128539517+speakeasy-github[bot]@users.noreply.github.com>
17 lines
11 KiB
Plaintext
17 lines
11 KiB
Plaintext
---
|
|
title: "ImageGenerationProviderPreferences"
|
|
---
|
|
|
|
Provider routing preferences and provider-specific passthrough configuration.
|
|
|
|
|
|
## Fields
|
|
|
|
| Field | Type | Required | Description | Example |
|
|
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
| `allow_fallbacks` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to allow backup providers to serve requests<br/>- true: (default) when the primary provider (or your custom providers in "order") is unavailable, use the next best provider.<br/>- false: use only the primary/custom provider, and return the upstream error if it's unavailable.<br/> | |
|
|
| `ignore` | List[[components.ImageGenerationProviderPreferencesIgnore](../components/imagegenerationproviderpreferencesignore.mdx)] | :heavy_minus_sign: | List of provider slugs to ignore. If provided, this list is merged with your account-wide ignored provider settings for this request. | [<br/>"openai",<br/>"anthropic"<br/>] |
|
|
| `only` | List[[components.ImageGenerationProviderPreferencesOnly](../components/imagegenerationproviderpreferencesonly.mdx)] | :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. | [<br/>"openai",<br/>"anthropic"<br/>] |
|
|
| `options` | [Optional[components.ImageGenerationProviderPreferencesOptions]](../components/imagegenerationproviderpreferencesoptions.mdx) | :heavy_minus_sign: | N/A | \{<br/>"black-forest-labs": \{<br/>"guidance": 3,<br/>"steps": 40<br/>}<br/>} |
|
|
| `order` | List[[components.ImageGenerationProviderPreferencesOrder](../components/imagegenerationproviderpreferencesorder.mdx)] | :heavy_minus_sign: | An ordered list of provider slugs. The router will attempt to use the first provider in the subset of this list that supports your requested model, and fall back to the next if it is unavailable. If no providers are available, the request will fail with an error message. | [<br/>"openai",<br/>"anthropic"<br/>] |
|
|
| `sort` | [OptionalNullable[components.ImageGenerationProviderPreferencesSort]](../components/imagegenerationproviderpreferencessort.mdx) | :heavy_minus_sign: | The sorting strategy to use for this request, if "order" is not specified. When set, no load balancing is performed. | price | |