import { QuotaExhaustedError, RateLimitError, AuthError, TransientError, FatalError, AIMessage, AIRequest, AIContentBlock } from './index.js';

type GoogleGenAIClient = {
    models: {
        generateContent(params: {
            model: string;
            contents: unknown;
            config?: {
                systemInstruction?: string;
                maxOutputTokens?: number;
                temperature?: number;
                stopSequences?: string[];
            };
        }): Promise<unknown>;
    };
};
type GoogleCreds = {
    apiKey: string;
    createClient?: (apiKey: string) => GoogleGenAIClient;
};
type GeminiUsageMetadata = {
    promptTokenCount?: number;
    candidatesTokenCount?: number;
};
type GeminiResponse = {
    text?: string;
    usageMetadata?: GeminiUsageMetadata;
};
declare function extractGeminiSystem(messages: AIMessage[]): string | undefined;
declare function mapContentToGemini(content: string | AIContentBlock[]): string | Array<{
    text?: string;
    inlineData?: {
        mimeType: string;
        data: string;
    };
}>;
type GeminiPart = {
    text?: string;
    inlineData?: {
        mimeType: string;
        data: string;
    };
};
type GeminiContent = {
    role: 'user' | 'model';
    parts: GeminiPart[] | string;
};
declare function mapMessagesToGemini(messages: AIMessage[]): GeminiContent[];
declare function mapGeminiResponse(body: GeminiResponse, provider: string, model: string): {
    content: string;
    model: string;
    provider: string;
    usage: {
        promptTokens: number;
        completionTokens: number;
    };
    finishReason: undefined;
};
declare function classifyGoogleError(status: number | undefined, message: string, provider: string): QuotaExhaustedError | RateLimitError | AuthError | TransientError | FatalError;
declare function makeGoogleAdapter(creds: GoogleCreds): {
    provider: string;
    supportsImage: boolean;
    call(req: AIRequest): Promise<{
        content: string;
        model: string;
        provider: string;
        usage: {
            promptTokens: number;
            completionTokens: number;
        };
        finishReason: undefined;
    }>;
};
/** Register the google adapter factory with core `getAdapter`. */
declare function registerGoogleAdapter(): void;

export { type GoogleCreds, type GoogleGenAIClient, classifyGoogleError, extractGeminiSystem, makeGoogleAdapter, mapContentToGemini, mapGeminiResponse, mapMessagesToGemini, registerGoogleAdapter };
