import type { CustomRequestConfig } from '../types';
/**
 * 处理自定义请求配置
 */
export declare class CustomRequestHandler {
    private config;
    constructor(config?: CustomRequestConfig);
    /**
     * 构建请求参数
     */
    buildRequestParams(baseParams: any): any;
    /**
     * 构建请求URL
     */
    buildRequestUrl(baseUrl: string, params: any): string;
    /**
     * 构建请求头
     */
    buildRequestHeaders(baseHeaders?: Record<string, string>): Record<string, string>;
    /**
     * 获取请求方法
     */
    getRequestMethod(): string;
    /**
     * 获取请求超时时间
     */
    getTimeout(): number | undefined;
    /**
     * 获取重试配置
     */
    getRetryConfig(): {
        maxRetries: number;
        retryDelay: number;
        retryCondition?: ((error: any) => boolean) | undefined;
    } | undefined;
    /**
     * 执行带重试的请求
     */
    executeWithRetry(url: string, options: RequestInit, retryCount?: number): Promise<Response>;
    /**
     * 判断错误是否可重试
     */
    private isRetryableError;
    /**
     * 延迟函数
     */
    private delay;
}
/**
 * 创建自定义请求处理器
 */
export declare function createCustomRequestHandler(config?: CustomRequestConfig): CustomRequestHandler;
/**
 * 默认请求配置示例
 */
export declare const defaultRequestConfigs: {
    openai: {
        headers: {
            Authorization: string;
            'OpenAI-Organization': string;
        };
        customParams: {
            model: string;
            temperature: number;
            max_tokens: number;
        };
    };
    claude: {
        headers: {
            'x-api-key': string;
            'anthropic-version': string;
        };
        customParams: {
            model: string;
            max_tokens: number;
        };
    };
    business: {
        headers: {
            'X-Business-Key': string;
            'X-User-ID': string;
        };
        customParams: {
            business_type: string;
            version: string;
        };
        requestParamProcessor: (baseParams: any, customParams: any) => any;
    };
};
//# sourceMappingURL=requestUtils.d.ts.map