Expand description
Model download and management system.
This module handles:
- Model manifest with SHA256 checksums
- State machine for download lifecycle
- Resumable downloads with progress reporting
- SHA256 verification
- Atomic installation (temp dir -> rename)
- Model version upgrade detection
Note: The core types (ModelState, ModelFile, ModelManifest) are
structurally identical to those in frankensearch_embed::model_manifest.
They are kept locally for now due to build-system sync constraints.
See frankensearch-embed for the canonical definitions.
Network Policy: No network calls occur without explicit user consent.
The download system is consent-gated via ModelState::NeedsConsent.
Structs§
- Download
Progress - Download progress information.
- Model
Acquisition Policy - Policy inputs that constrain semantic model acquisition.
- Model
Cache Report - Machine-readable report for semantic model cache lifecycle decisions.
- Model
Downloader - Model downloader with resumption and verification.
- Model
File - A file in the model manifest.
- Model
Manifest - Model manifest describing a downloadable model.
Enums§
- Download
Error - Download error types.
- Model
Cache State - Precise on-disk semantic model cache state.
- Model
State - Model state machine for download lifecycle.
Constants§
- PLACEHOLDER_
CHECKSUM - Placeholder checksum value used for unverified manifests.
Functions§
- check_
model_ installed - Check if a model is installed and verified against the given manifest.
- check_
version_ mismatch - Check for model version mismatch.
- classify_
model_ cache - Classify the local semantic model cache without performing network I/O.
- compute_
sha256 - Compute SHA256 hash of a file.
- model_
file_ path - Resolve a manifest file on disk.
- normalize_
mirror_ base_ url - Validate and normalize a mirror base URL for model downloads.
Type Aliases§
- Progress
Callback - Progress callback for downloads.