import type { LLMProvider, ChatRequest, ChatResponse, ProviderEmbeddingRequest, ProviderEmbeddingResult, ProviderModelSource, ProviderRuntimeMetadata, ProviderRuntimeMetadataDeps } from './interface.js'; import { type LiveModelDiscoveryResult } from './live-model-discovery.js'; import type { CacheHitTracker } from './cache-strategy.js'; /** * Dated fallback model list, used when no API key is configured (so a live * ListModels call isn't possible) and as the offline baseline when a live * call fails with no prior cache. Docs-verified (no Gemini API key was * available in the environment to live-verify) against ai.google.dev model * pages on 2026-07-12; update this list (and the date below) whenever it is * re-verified against a live key or current docs. */ export declare const GEMINI_DATED_STATIC_MODELS: readonly string[]; export declare const GEMINI_DATED_STATIC_MODELS_AS_OF = "2026-07-12"; /** * GeminiProvider, calls the Gemini generateContent API directly via fetch. * Tools are `functionDeclarations` inside a `tools` array. * Tool calls come as `functionCall` parts; results as `functionResponse` parts. * Uses streamGenerateContent for real-time token delivery when onDelta is provided. */ export declare class GeminiProvider implements LLMProvider { readonly name = "gemini"; readonly credentialAuthority: "resolver"; readonly modelSource: ProviderModelSource; /** Maps function call name → thoughtSignature for the current turn. */ private thoughtSignatures; /** * Populated synchronously with the dated-static baseline at construction * (never empty), then replaced by `refreshModels()` with the live * ListModels result. See `modelSource`. */ private _models; get models(): string[]; private readonly apiKey; private readonly embeddingModel; private readonly cacheHitTracker; private readonly modelsCachePath; /** Active cached content resource name (e.g., "cachedContents/abc123") */ private cachedContentName; /** Hash of the content that was cached (systemPrompt + tools + model) */ private cachedContentHash; /** When the cache expires (epoch ms) */ private cachedContentExpiry; /** Hashes known to be below the 32K cache minimum, skip API call */ private uncacheableHashes; constructor(apiKey: string, cacheHitTracker?: Pick, modelsCachePath?: string); /** * Re-check Gemini's live model list. Called at boot (background, respects * the on-disk TTL cache) and on-demand for a picker-open re-check or an * explicit user refresh (`force: true`, bypasses the TTL cache). Always * resolves, falls back to the on-disk cache, then to the dated-static * list, and reports the honest reason when live discovery fails rather * than silently keeping stale data with no explanation. */ refreshModels(force?: boolean): Promise; private computeCacheHash; private ensureCachedContent; chat(params: ChatRequest): Promise; embed(request: ProviderEmbeddingRequest): Promise; describeRuntime(deps: ProviderRuntimeMetadataDeps): Promise; } //# sourceMappingURL=gemini.d.ts.map