export type OpenAIResponseFormat = 'text' | 'json' | 'json_object' | {
    type: string;
    [key: string]: any;
};
export interface OpenAIConfig {
    apiKey: string;
    baseUrl?: string;
    model?: string;
    fallbackModel?: string;
    temperature?: number;
    maxRetries?: number;
    retryDelayMs?: number;
    maxTokens?: number;
    responseFormat?: OpenAIResponseFormat;
}
export interface OpenAIChatOptions {
    timeoutMs?: number;
    responseFormat?: OpenAIResponseFormat;
}
export interface OpenAIUsageSummary {
    inputTokens: number;
    outputTokens: number;
    totalTokens: number;
}
export interface OpenAIChatResult {
    content: string;
    usage?: OpenAIUsageSummary;
    model?: string;
    requestId?: string;
}
export declare class OpenAIClient {
    private readonly config;
    constructor(config: OpenAIConfig);
    chat(messages: Array<{
        role: 'system' | 'user' | 'assistant';
        content: any;
    }>, options?: OpenAIChatOptions): Promise<OpenAIChatResult>;
    private extractContent;
    private extractUsage;
    private normalizeTokenValue;
    private normalizeTokenCount;
    private normalizeRetryCount;
    private normalizeRetryDelay;
    private isRetryableError;
    private sleep;
}
