/** * kosha-discovery — Ollama (local) provider discoverer. * * Queries the Ollama REST API (`/api/tags`) on localhost to list locally * pulled models. Because Ollama runs without authentication and may not * be installed at all, this discoverer fails gracefully on connection errors. * @module */ import type { CredentialResult, ModelCard } from "../types.js"; import { BaseDiscoverer } from "./base.js"; /** * Discovers locally-pulled models from an Ollama instance. * * Ollama requires no authentication, so the credential is ignored. * If the Ollama daemon is not running, discovery returns an empty array * instead of throwing, making it safe to include in every scan. */ export declare class OllamaDiscoverer extends BaseDiscoverer { readonly providerId = "ollama"; readonly providerName = "Ollama (Local)"; readonly baseUrl: string; /** Set of model names currently loaded in VRAM (warm). */ private runningModels; /** * @param baseUrl - Override the default Ollama URL (default: `http://localhost:11434`). * Useful when Ollama is running on a non-standard port or remote host. */ constructor(baseUrl?: string); /** * List all locally-pulled models from Ollama. * * The `_credential` parameter is ignored — Ollama never requires auth. * Uses a shorter default timeout (5 s) since the server is local. */ discover(_credential: CredentialResult, options?: { timeout?: number; }): Promise; /** * Fetch the list of models currently loaded in VRAM. * Failures are silently ignored since this is purely informational. */ private fetchRunningModels; /** Convert an Ollama model into a normalized {@link ModelCard}. */ private toModelCard; /** * Infer capabilities from the model name and Ollama-provided family metadata. */ private inferCapabilities; /** * Detect embedding models by common naming conventions. * Patterns: "embed", "nomic-embed", "mxbai-embed". */ private isEmbeddingModel; /** Check whether an error represents a network connectivity failure. */ private isConnectionError; } //# sourceMappingURL=ollama.d.ts.map