import { AIContentBlock, AIMessage, AIRequest, AuthError, FatalError, QuotaExhaustedError, RateLimitError, TransientError } from "./index.js";
//#region src/google.d.ts
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): RateLimitError | TransientError | QuotaExhaustedError | AuthError | 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;
//#endregion
export { GoogleCreds, GoogleGenAIClient, classifyGoogleError, extractGeminiSystem, makeGoogleAdapter, mapContentToGemini, mapGeminiResponse, mapMessagesToGemini, registerGoogleAdapter };