import type { ProviderContext } from '../api/provider-types.js'; import type { ProviderErrorAugmented } from './provider-error-types.js'; export type ProviderErrorClassification = { error: ProviderErrorAugmented; message: string; statusCode?: number; upstreamCode?: string; upstreamMessage?: string; recoverable: boolean; affectsHealth: boolean; forceFatalRateLimit: boolean; isRateLimit: boolean; isDailyLimitRateLimit: boolean; }; export type ProviderErrorClassifierOptions = { error: unknown; context: ProviderContext; detectDailyLimit(messageLower: string, upstreamLower?: string): boolean; registerRateLimitFailure(providerKey?: string, model?: string): boolean; forceRateLimitFailure(providerKey?: string, model?: string): void; authMode?: 'apikey' | 'oauth'; }; export declare function classifyProviderError(options: ProviderErrorClassifierOptions): ProviderErrorClassification; export declare function extractStatusCodeFromError(error: ProviderErrorAugmented): number | undefined; export declare function looksLikeNetworkTransportError(error: ProviderErrorAugmented, msgLower: string): boolean;