/**
 * Provider registry + model router.
 *
 * Holds routing rules for task_type → model candidates.
 * Supports auto-fallback on 429/529 (rate-limit / overload).
 * No external HTTP here — just the routing table + receipt accounting.
 * Actual LLM calls stay in callers; they report outcomes via recordOutcome().
 */
import type { TaskType, ProviderName, ModelSpec, RouterRule, CallReceipt } from './types.js';
declare class ProviderRegistry {
    private rules;
    private cooldowns;
    private receipts;
    private readonly receiptCap;
    constructor();
    /** Override routing rule for a task type. */
    setRule(rule: RouterRule): void;
    /**
     * Pick the best available model for a task.
     * Skips models in cooldown (recent 429/529).
     */
    pickModel(taskType: TaskType): ModelSpec | null;
    /**
     * Signal that a model returned 429 or 529.
     * Places it in cooldown for COOLDOWN_MS.
     */
    reportRateLimit(modelId: string): void;
    /** Clear cooldown (e.g., after successful call). */
    clearCooldown(modelId: string): void;
    /** Record a call receipt for observability. */
    recordReceipt(receipt: CallReceipt): void;
    /** Get recent receipts, optionally filtered by task type. */
    getReceipts(taskType?: TaskType, limit?: number): CallReceipt[];
    /** Aggregate cost across all receipts. */
    getTotalCost(): number;
    /** Models currently in cooldown. */
    getCooldowns(): Array<{
        modelId: string;
        expiresIn: number;
    }>;
    /** Compute estimated USD for a call. */
    static estimateCost(spec: ModelSpec, inputTokens: number, outputTokens: number): number;
}
export declare function getProviderRegistry(): ProviderRegistry;
export type { TaskType, ProviderName, ModelSpec, RouterRule, CallReceipt };
