/**
 * CascadeAdapter — composition helper for LLMProviderPort.
 *
 * Tries providers in order. Falls back to the next provider on:
 *   - Timeout (AbortError)
 *   - 500-class errors (mapped to finishReason: "error")
 *   - 429 after all retries (mapped to finishReason: "error")
 *
 * If all providers fail or return finishReason: "error",
 * returns the canonical all-fail response.
 *
 * BYOM: no default model hardcoded.
 */
import type { ChatRequest, ChatResponse, LLMProviderPort, StreamDelta } from "../../ports/llm-provider.js";
export interface CascadeAdapterConfig {
    providers: LLMProviderPort[];
}
export declare class CascadeAdapter implements LLMProviderPort {
    private readonly providers;
    constructor(config: CascadeAdapterConfig);
    estimateCost(req: ChatRequest): {
        usd: number;
    };
    complete(req: ChatRequest): Promise<ChatResponse>;
    stream(req: ChatRequest): AsyncIterable<StreamDelta>;
}
//# sourceMappingURL=cascade.d.ts.map