Skip to main content

Module install

Module install 

Source
Expand description

Installing models: resolving a user-typed reference to a provider, and the provider-facing error/identity types. The Hugging Face / Ollama fetch providers and the install service build on this foundation.

Re-exports§

pub use catalog::InstallCatalogEntry;
pub use catalog::InstallCategory;
pub use catalog::recommended;
pub use catalog::recommended_for_ram;
pub use error::InstallError;
pub use event::InstallEvent;
pub use event::InstallProgress;
pub use event::InstallStreamEvent;
pub use file_selection::HFSibling;
pub use file_selection::file_extension;
pub use file_selection::is_weight_path;
pub use file_selection::select;
pub use plan::ActiveInstall;
pub use plan::InstallBrowseResult;
pub use plan::InstallPlan;
pub use plan::InstallPlanFile;
pub use plan::InstallSearchHit;
pub use provider::InstallAvailability;
pub use provider::InstallProviderId;
pub use pulls::PullControl;
pub use pulls::PullError;
pub use pulls::PullEvent;
pub use pulls::PullEventKind;
pub use pulls::PullJob;
pub use pulls::PullJobDir;
pub use pulls::PullLock;
pub use pulls::PullState;
pub use pulls::PullStatus;
pub use pulls::PullStore;
pub use pulls::take_lock;

Modules§

catalog
A curated catalog of models worth installing, grouped by task and filtered by how well they fit the machine’s memory.
error
Install failures.
event
The progress and event types an install emits.
file_selection
Choosing which files of a Hugging Face repo to download. A repo lists many siblings; this picks the model weights (preferring one GGUF quantization, or the safetensors set, dropping duplicate/converted formats) plus the small companion config/tokenizer files, and drops docs, images, and non-model directories.
ollama_pull
Folding an Ollama /api/pull ndjson stream into install progress. Each line is a status object; digest lines carry per-layer byte totals that aggregate into overall progress, and a success line ends the pull.
plan
The plan for installing a model: which files will be fetched, and where.
provider
The install-provider identity and availability types.
pulls
The record a pull keeps on disk, so a download outlives the process that started it.
reference
Parsing a user-typed model reference — a bare id, a hf.co/... or ollama.com/... link — into a Hugging Face repo (org/name) or an Ollama tag (name:version). Pure string work; the ambiguity is resolved consistently so the CLI and gateway accept identical inputs.