import type { EmbedHealth, EmbedProvider } from '../../contracts/embed.js'; /** Default `keep_alive` for embed requests — see OllamaEmbedConfig.keepAlive. * 30m comfortably spans the gaps between distill bursts without pinning the * model forever, which would contend with a locally-served LLM for VRAM. */ export declare const DEFAULT_EMBED_KEEP_ALIVE = "30m"; export interface OllamaEmbedConfig { baseUrl?: string; model?: string; /** FEAT-409: expected output dim — defaults to DEFAULT_EMBED_DIM (1024). * Set from config.embedding.dim by providers/index.ts. */ dim?: number; /** RECALL-S1: query-side embedding instruction prefix — resolved by * providers/index.ts via resolveEmbedQueryPrefix, not this constructor. * See EmbedProvider.queryPrefix (src/contracts/embed.ts) for the full * asymmetry contract. Defaults to '' (no prefix). */ queryPrefix?: string; /** How long Ollama keeps the embed model resident after each call, in its * own duration syntax ('30m', '1h', '-1' for forever, '0' to unload * immediately). Sent as `keep_alive` on every request. * * Ollama's own default is 5 minutes, and the daemon embeds in bursts * separated by long idle gaps — so without this the model is evicted * between bursts and the next call pays a full reload. Measured on the * 2026-08-05 onnx->ollama switch: 26ms warm vs 5,728ms after an idle * unload, and 11,353ms when the reload collided with daemon boot. That * cold path is the whole cost difference against the in-process ONNX * worker, which never unloads. * * mxbai-embed-large's quantized artifact is a few hundred MB, so holding * it resident is cheap next to an 8GB VRAM budget — but it is NOT free if * a local LLM is also loaded, which is why this is configurable rather * than pinned to '-1'. */ keepAlive?: string; } export declare class OllamaEmbedProvider implements EmbedProvider { readonly name: "ollama"; readonly model: string; readonly dim: number; readonly queryPrefix: string; private readonly baseUrl; private readonly keepAlive; constructor(config?: OllamaEmbedConfig); embed(texts: string[], signal?: AbortSignal): Promise; health(): Promise; }