import type { LLMErrorCode } from '../llm_api/types.js'; /** * Cascade configuration — controls provider failover behavior. * * Precedence (highest to lowest): * 1. per-call `params.providers` * 2. `initialize_llm_api({ cascade })` config * 3. `[llm_cascade]` ini section * 4. no cascade (single primary provider) */ export interface CascadeConfig { /** * Ordered list of provider names to try. First is attempted first. * If empty or unset, no cascade — uses primary provider. */ providers?: string[]; /** * Timeout per individual provider attempt in milliseconds. * No timeout if not set. */ timeout_ms_per_attempt?: number; /** * Error codes that permit cascade to the next provider. * Defaults to: RATE_LIMITED, NETWORK_ERROR, TIMEOUT, API_ERROR. */ cascade_on_codes?: LLMErrorCode[]; } /** * Default error codes that trigger cascade to the next provider. * Only transient / server-side errors are included. * Configuration errors (PROVIDER_NOT_FOUND, CAPABILITY_NOT_SUPPORTED, API_KEY_MISSING) * are intentionally excluded — they won't succeed on retry. */ export declare const DEFAULT_CASCADE_ON_CODES: LLMErrorCode[]; //# sourceMappingURL=types.d.ts.map