/**
 * Retry with exponential backoff for upstream requests.
 * Only retries on 5xx or connection errors. Never retries 4xx or provider
 * timeouts; a timeout has already consumed the wall-clock budget and should
 * be surfaced for an explicit user/operator retry.
 */
export interface RetryOptions {
    maxRetries?: number;
    baseDelayMs?: number;
    maxDelayMs?: number;
    timeoutMs?: number;
    retryableStatuses?: number[];
}
declare const DEFAULT_OPTIONS: Required<RetryOptions>;
export { DEFAULT_OPTIONS as RETRY_DEFAULTS };
/**
 * Execute an async function with retry logic.
 * The function should return a Response object.
 * Supports per-request timeout via AbortSignal.
 */
export declare function withRetry(fn: (signal?: AbortSignal) => Promise<Response>, options?: RetryOptions): Promise<Response>;
