diff --git a/api-reference/inference-api/config-object.mdx b/api-reference/inference-api/config-object.mdx index 47b03d5..e7d88ba 100644 --- a/api-reference/inference-api/config-object.mdx +++ b/api-reference/inference-api/config-object.mdx @@ -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', @@ -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: { @@ -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