/** Default base URL for the local Ollama server (OpenAI-compat endpoint lives under /v1). */ export declare const DEFAULT_OLLAMA_BASE_URL = "http://localhost:11434"; export interface CustomBackend { /** Base URL (no trailing /v1/chat/completions — run.ts normalizes that). */ url: string; /** True when this resolved from the `ollama` alias (enables model auto-pick). */ isOllama: boolean; } /** * Resolve a custom (keyless, OpenAI-compatible) LLM backend from env + persisted * config, or null when none applies (a cloud provider or nothing is configured). * * - http(s):// URL in WIGOLO_LLM_PROVIDER → { url, isOllama: false } * - `ollama` in WIGOLO_LLM_PROVIDER or config.json llmProvider * → { url: WIGOLO_LLM_BASE_URL ?? http://localhost:11434, isOllama: true } * - anything else (provider id, unset) → null * * Env wins over persisted config: a URL or cloud-provider id in * WIGOLO_LLM_PROVIDER is authoritative and short-circuits the config.json check. */ export declare function resolveCustomBackend(env?: Record): CustomBackend | null; /** * Synthesis models known to produce decent prose, highest priority first. The * runner picks the first installed prefix match from /api/tags before falling * back to the first installed model, then to RECOMMENDED_OLLAMA_MODEL. */ export declare const OLLAMA_MODEL_PRIORITY: readonly string[]; /** Fallback model name when /api/tags is unreachable or returns nothing. */ export declare const RECOMMENDED_OLLAMA_MODEL = "llama3.1"; /** * Pick an Ollama model for synthesis from the running server's installed list. * 1. first installed model whose name starts with a priority prefix * 2. else the first installed model * 3. else (tags query fails / empty) the recommended fallback name * * `fetchImpl` is injected for testability; defaults to global fetch. */ export declare function pickOllamaModel(baseUrl: string, fetchImpl?: typeof fetch, signal?: AbortSignal): Promise; //# sourceMappingURL=custom-backend.d.ts.map