import OpenAI from 'openai';
import type { Config } from '../../../config/config.js';
import type { ContentGeneratorConfig } from '../../contentGenerator.js';
import type { OpenAICompatibleProvider, DashScopeRequestMetadata } from './types.js';
export declare class DashScopeOpenAICompatibleProvider implements OpenAICompatibleProvider {
    private contentGeneratorConfig;
    private cliConfig;
    constructor(contentGeneratorConfig: ContentGeneratorConfig, cliConfig: Config);
    static isDashScopeProvider(contentGeneratorConfig: ContentGeneratorConfig): boolean;
    buildHeaders(): Record<string, string | undefined>;
    buildClient(): OpenAI;
    buildRequest(request: OpenAI.Chat.ChatCompletionCreateParams, userPromptId: string): OpenAI.Chat.ChatCompletionCreateParams;
    buildMetadata(userPromptId: string): DashScopeRequestMetadata;
    /**
     * Add cache control flag to specified message(s) for DashScope providers
     */
    private addDashScopeCacheControl;
    /**
     * Helper method to add cache control to a specific message
     */
    private addCacheControlToMessage;
    /**
     * Find the index of the target message (system or last)
     */
    private findTargetMessageIndex;
    /**
     * Add cache control to message content, handling both string and array formats
     */
    private addCacheControlToContent;
    /**
     * Normalize content to array format
     */
    private normalizeContentToArray;
    /**
     * Add cache control to the content array
     */
    private addCacheControlToContentArray;
    /**
     * Check if cache control should be disabled based on configuration.
     *
     * @returns true if cache control should be disabled, false otherwise
     */
    private shouldDisableCacheControl;
}
