/**
 * src/models/ollama.ts
 *
 * Local-first Ollama provider. Uses Ollama's OpenAI-compatible endpoint
 * at http://localhost:11434/v1/chat/completions — no API key, no quota,
 * no leak risk, works offline. Cross-platform: Ollama installs the same
 * way on macOS, Windows, and Linux and always exposes the same port.
 *
 * Role in the failover chain (see failover.ts):
 *   primary  → bundled NIM (or user-supplied NVIDIA_NIM_API_KEY)
 *   fallback → THIS (Ollama, if a daemon is running locally)
 *
 * Why a fallback and not the primary: NIM is fast and uses big models
 * (qwen3-next-80b). Local Ollama tops out at whatever fits on the user's
 * RAM — 7B/8B models are common. We use it as the "nothing else worked"
 * safety net so the agent never returns a bare E400 to the customer.
 *
 * Model selection: lazy-resolved on first use. We probe /api/tags and
 * pick the best installed model from a preferred list (Arabic-capable
 * + tool-calling first). If none of the preferred models is installed,
 * we fall back to whatever IS installed. If the daemon isn't running,
 * the chat() call throws a ModelError which the failover layer treats
 * as "skip this provider."
 */
import { type ChatMessage, type ChatOptions, type ChatResponse, type ModelProvider } from './provider.js';
export interface OllamaProbeResult {
    /** Daemon is reachable on OLLAMA_HOST. */
    available: boolean;
    /** Best model we found installed, or null if none. */
    model: string | null;
    /** Total models installed (for the banner / debug). */
    installedCount: number;
    /** Recommended pull command if no usable model is installed. */
    suggestedPull: string | null;
}
/**
 * One-shot probe. Result is cached for the process lifetime so failover
 * doesn't re-check on every brain call. Call clearOllamaProbeCache() if
 * you want to re-run (e.g. after the user pulls a new model).
 */
export declare function probeOllama(): Promise<OllamaProbeResult>;
export declare function clearOllamaProbeCache(): void;
export declare class OllamaProvider implements ModelProvider {
    readonly name = "ollama";
    private resolvedModel;
    get model(): string;
    chat(messages: ChatMessage[], options?: ChatOptions): Promise<ChatResponse>;
}
export declare const ollama: OllamaProvider;
//# sourceMappingURL=ollama.d.ts.map