import type { Embedder } from './embedder.js'; /** * Quota-class failure (429 / RESOURCE_EXHAUSTED): the one retryable class * where "check your API key and network" is the WRONG recovery hint * (mmnto-ai/totem#2562) — the key works; the per-minute allowance is spent. */ export declare function isQuotaError(err: unknown): boolean; /** * Extract a server-advised retry delay from a Gemini SDK error, if present. * 429s carry google.rpc.RetryInfo either as a structured `errorDetails` entry * (`retryDelay: "18s"`) or embedded in the message JSON. Against a per-minute * quota this is the difference between the retry budget being real and being * decorative — 1–4s exponential backoff never outlives the window. Capped at * MAX_SERVER_RETRY_DELAY_MS; returns null when absent (caller falls back to * exponential backoff). */ export declare function extractRetryDelayMs(err: unknown): number | null; /** Minimal interface for the subset of @google/genai SDK we use. */ interface GeminiAI { models: { embedContent(req: { model: string; contents: { parts: { text: string; }[]; }[]; config: { taskType: string; outputDimensionality: number; }; }): Promise<{ embeddings?: { values?: number[]; }[]; }>; }; } /** * Dynamically import the @google/genai SDK. * It's an optional peer dep in @mmnto/totem — only required when provider is 'gemini'. */ export declare function importGeminiSdk(): Promise<{ GoogleGenAI: new (opts: { apiKey: string; }) => GeminiAI; }>; /** * Gemini embedding via the @google/genai SDK. * Supports task-type awareness for retrieval-optimized embeddings. */ export declare class GeminiEmbedder implements Embedder { readonly dimensions: number; private model; private apiKey; private pace; constructor(model?: string, dimensions?: number, throttleMs?: number); embed(texts: string[]): Promise; private embedWithRetry; } export {}; //# sourceMappingURL=gemini-embedder.d.ts.map