export interface ModelError { /** HTTP status when the provider reported one. */ status?: number; /** The provider's own message, without the JSON around it. */ message: string; /** How long the provider asked to wait, when it said so. */ retryAfterMs?: number; } export declare function parseModelError(error: unknown): ModelError; /** Too many requests, or the provider is overloaded / briefly down: the same call can succeed a little later. */ export declare const isTransient: (e: ModelError) => boolean; /** * The error as the chat shows it: what happened in plain words and what to do, then the provider's own message. * Unknown errors pass through unchanged. */ export declare function explainModelError(e: ModelError, tried?: number): string;