/**
 * Enhanced proxy-aware fetch implementation for AI SDK providers
 * Supports HTTP/HTTPS, SOCKS4/5, authentication, and NO_PROXY bypass
 * Lightweight implementation extracted from research of major proxy packages
 */
/**
 * Classify a fetch failure as a transient network error worth retrying.
 *
 * undici's `fetch()` wraps the real failure in `TypeError: fetch failed`
 * with the actionable code (`ECONNRESET`, `UND_ERR_SOCKET`, ...) on
 * `error.cause` — sometimes nested another level (e.g. SocketError inside
 * a ConnectTimeoutError). Walk the cause chain so those are recognized;
 * checking only the top-level error silently classified every undici
 * connection death as non-retryable.
 *
 * Deliberately NOT retried: `UND_ERR_HEADERS_TIMEOUT` / `UND_ERR_BODY_TIMEOUT`
 * — those already waited out undici's own long deadline (default 300s), and
 * replaying them can triple a stall under the caller's wall-clock budget.
 *
 * Exported for direct coverage by the no-API test suite.
 */
export declare function isTransientNetworkError(error: unknown): boolean;
/**
 * Create a proxy-aware fetch function with enhanced capabilities
 * Supports HTTP/HTTPS, SOCKS4/5, authentication, and NO_PROXY bypass
 */
export declare function createProxyFetch(): typeof fetch;
/**
 * Mask credentials in a proxy URL for safe logging/reporting.
 *
 * Exported so provider-side fetch loggers (lmStudio, llamaCpp, deepseek,
 * nvidiaNim) can sanitize upstream URLs before emitting warnings — reverse-
 * proxied deployments can embed credentials or signed query params in the
 * base URL, and those should never reach application logs verbatim.
 */
export declare function maskProxyUrl(url: string | null | undefined): string | null;
/**
 * Get enhanced proxy status information
 */
export declare function getProxyStatus(): {
    enabled: boolean;
    httpProxy: string | null;
    httpsProxy: string | null;
    allProxy: string | null;
    socksProxy: string | null;
    noProxy: string | null;
    method: string;
    capabilities: string[];
};
