/** * Model source normalizer (local-model-lifecycle-design.md, "one panel, three types"): * everything a user can paste — an ollama tag, an hf.co GGUF ref, a full HuggingFace URL, a * copied `ollama pull ...` install command, or an API `provider/model` name — normalizes to ONE * typed source. Pure string work: pasted install commands are PARSED for their reference and * NEVER executed as shell; unknown forms are rejected with the reason. */ export type ModelSource = { type: "api"; ref: string; } | { type: "local"; pullRef: string; } | { type: "transformers"; modelId: string; ref: string; } | { type: "prism-llamacpp"; modelId: string; ref: string; } | { type: "needle"; ref: string; } | { type: "rejected"; reason: string; }; export declare function normalizeModelSource(rawInput: string): ModelSource; /** * Whether an installed-model listing entry (`installedName`, as `OllamaRuntime.list()` reports it) * is the same model as `ref` (a user-typed reference, or a `models.json`-registered id). Ollama * always reports installed models with an explicit tag — a pull with no tag is normalized to * `:latest` server-side — but a `ref` is frequently bare ("llama3"), so an exact string compare * alone misses that pairing. Exact match always counts; otherwise treat a bare ref against its * `:latest`-tagged listing as the same model, and the reverse (a `ref` explicitly pinned to * `:latest` against a bare listing), since the local-runtime interface is kept runtime-agnostic * (see local-runtime.ts's module docstring) and a future/alternate runtime could list bare names. * Shared by every ref-vs-installed-list comparison — see `AgentSession._warnIfManualModelChoiceIsRisky` * and `removeLocalModel` in interactive-mode.ts, which had the identical bug independently. */ export declare function matchesInstalledLocalModel(ref: string, installedName: string): boolean; //# sourceMappingURL=model-ref.d.ts.map