import { type ProviderId, type ProviderComplexity, type ProviderRisk } from "./types.js";
export interface ProviderStats {
    provider: ProviderId;
    attempts: number;
    passes: number;
    failures: number;
    fallbacks: number;
    timeouts: number;
    meanLatencyMs: number;
    lastAttemptAt: number;
}
export interface ProviderModelStatsEntry {
    provider: ProviderId;
    tier: string;
    role: string;
    taskType: string;
    complexity: string;
    attempts: number;
    passes: number;
    failures: number;
    fallbacks: number;
    timeouts: number;
    meanLatencyMs: number;
    lastAttemptAt: number;
    evidencePassRate: number;
    fallbackRate: number;
    timeoutRate: number;
}
export interface ProviderModelStats {
    version: number;
    entries: Record<string, ProviderModelStatsEntry>;
    updatedAt: number;
}
export interface ProviderRouteScoreInput {
    role: string;
    risk: ProviderRisk;
    complexity: ProviderComplexity;
    estimatedTokens: number;
    needsMcp: boolean;
    needsToolCalling: boolean;
    readOnly: boolean;
    providerStats?: Record<string, ProviderStats>;
    providerModelStats?: Record<string, ProviderModelStatsEntry>;
    providerContextWindows?: Record<string, number>;
    authorityProvider?: ProviderId;
}
export declare function buildProviderStatsKey(tier: string, role: string, taskType: string, complexity: string): string;
export declare function loadProviderModelStats(filePath?: string): ProviderModelStats;
export declare function saveProviderModelStats(stats: ProviderModelStats, filePath?: string): void;
export declare function flushProviderModelStats(): Promise<void>;
export declare function updateProviderModelStats(stats: ProviderModelStats, key: string, patch: Partial<Omit<ProviderModelStatsEntry, "provider" | "tier" | "role" | "taskType" | "complexity">>): ProviderModelStats;
export declare function computeProviderRouteScore(provider: ProviderId, input: ProviderRouteScoreInput): {
    score: number;
    reason: string;
    confidence: number;
};
