export declare class TransientLlmError extends Error { readonly retryReason: "transient"; readonly status?: number; constructor(args: { message: string; status?: number; }); } export declare class RateLimitLlmError extends Error { readonly retryReason: "rate_limit"; readonly status?: number; constructor(args: { message: string; status?: number; }); } /** * Persistent provider budget exhaustion — surfaced as a 429 whose body * carries an `insufficient_quota` code/type. Distinct from the transient * {@link RateLimitLlmError} throttle: the framework reads the * `quota_exhausted` tag, which is absent from every default `retryOn`, * so the stage fails fast on attempt 1. */ export declare class QuotaExhaustedLlmError extends Error { readonly retryReason: "quota_exhausted"; readonly status?: number; constructor(args: { message: string; status?: number; }); } /** * Thrown when the endpoint rejects our request because the model's * output failed server-side JSON-Schema enforcement (typical 422). * Tagged `transient` so the framework's default retry policy retries — a * single re-roll often produces conforming output. */ export declare class SchemaValidationLlmError extends Error { readonly retryReason: "transient"; readonly status?: number; constructor(args: { message: string; status?: number; }); } export declare class NonRetryableLlmError extends Error { readonly status?: number; constructor(args: { message: string; status?: number; }); } /** * Route an HTTP status family (plus an optional structured provider * error code) into the framework-recognized error class. */ export declare function classifyHttpError(status: number, message: string, providerErrorCode?: string): Error; /** * Map a low-level `fetch` failure (server unreachable, connection reset, * the request timeout firing as a non-Abort transport error) to a * transient error. Talking to a local OpenAI-compatible server that is * down or mid-generation is retryable — a retry after backoff can * succeed once the server is up / a slow generation completes. */ export declare function classifyFetchError(err: unknown): Error; //# sourceMappingURL=errors.d.ts.map