Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 30 additions & 38 deletions api-reference/inference-api/config-object.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -350,44 +350,6 @@ The `config` object is used to configure API interactions with various providers
},
provider: {
type: 'string',
enum: [
'openai',
'anthropic',
'azure-openai',
'azure-ai',
'anyscale',
'cohere',
'palm',
'google',
'together-ai',
'mistral-ai',
'perplexity-ai',
'stability-ai',
'nomic',
'ollama',
'bedrock',
'ai21',
'groq',
'segmind',
'vertex-ai',
'deepinfra',
'novita-ai',
'fireworks-ai',
'deepseek',
'voyage',
'jina',
'reka-ai',
'moonshot',
'openrouter',
'lingyi',
'zhipu',
'monsterapi',
'predibase',
'huggingface',
'github',
'deepbricks',
'siliconflow',
],
},
resource_name: {
type: 'string',
Expand Down Expand Up @@ -452,6 +414,27 @@ The `config` object is used to configure API interactions with various providers
},
required: ['mode'],
},
cb_config: {
type: 'object',
properties: {
failure_threshold: {
type: 'number',
minimum: 1,
},
cooldown_interval: {
type: 'number',
minimum: 30000,
},
failure_status_codes: {
type: 'array',
items: {
type: 'integer',
},
optional: true,
},
},
required: ['failure_threshold', 'cooldown_interval'],
},
retry: {
type: 'object',
properties: {
Expand Down Expand Up @@ -683,6 +666,15 @@ You can find more examples of schemas [below](/api-reference/inference-api/confi
| `on_status_codes` | Status codes to trigger retries | array of strings | No | - | Optional |
| `use_retry_after_headers`| Whether to respect provider's Retry-After and Retry-After-ms headers| boolean| Default: false |

### Circuit Breaker Object Details

| Key Name | Description | Type | Required | Enum Values | Additional Info |
| --- | --- | --- | --- | --- | --- |
| `failure_threshold` | Number of failures after which the circuit opens | number | Yes | - | Minimum value: 1 |
| `cooldown_interval` | Time (in milliseconds) to wait before allowing retries | number | Yes | - | Minimum value: 30000 (30 seconds) |
| `failure_status_codes` | Specific HTTP status codes considered as failures | array of integers | No | - | Optional, defaults to status codes >500 |


### Cloud Provider Params (Azure OpenAI, Google Vertex, AWS Bedrock)

#### Azure OpenAI
Expand Down