Skip to main content

Module model_download

Module model_download 

Source
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§

DownloadProgress
Download progress information.
ModelAcquisitionPolicy
Policy inputs that constrain semantic model acquisition.
ModelCacheReport
Machine-readable report for semantic model cache lifecycle decisions.
ModelDownloader
Model downloader with resumption and verification.
ModelFile
A file in the model manifest.
ModelManifest
Model manifest describing a downloadable model.

Enums§

DownloadError
Download error types.
ModelCacheState
Precise on-disk semantic model cache state.
ModelState
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§

ProgressCallback
Progress callback for downloads.