export declare const PROVIDER_STATUS_PAGES: Record; /** Public status page for a provider, or null when we don't track one. */ export declare const providerStatusPage: (provider: string) => string | null; export type ProviderErrorInit = { provider: string; message: string; status?: number | null; /** Provider-specific error type, e.g. Anthropic's "overloaded_error". */ type?: string | null; retryable: boolean; cause?: unknown; /** Provider-native structured details, when the response exposes them. */ metadata?: Record; }; export declare class ProviderError extends Error { readonly provider: string; /** HTTP status when the failure carried one; null for connection errors. */ readonly status: number | null; readonly type: string | null; /** Whether retrying the same request later could plausibly succeed. */ readonly retryable: boolean; readonly metadata: Record | undefined; /** Provider status page, when known — for surfacing "is it them?" to users. */ readonly statusPageUrl: string | null; constructor(init: ProviderErrorInit); /** Build from a non-2xx HTTP response (status + body text are known). */ static fromResponse(provider: string, status: number, body: string, type?: string | null): ProviderError; /** * Normalize any thrown value into a ProviderError. Passes existing * ProviderErrors through unchanged; classifies connection errors and * status-bearing message strings; rethrows aborts to the caller (an aborted * request is the caller's intent, never a provider outage). */ static from(err: unknown, provider: string): ProviderError; }