pub fn ensure_file_with_progress(
model_id: &str,
file: &WeightFile,
on_progress: &mut dyn FnMut(u64, u64),
) -> Result<PathBuf, DownloadError>Expand description
Like ensure_file, but reports download progress via on_progress(downloaded, total) (bytes). total is the registry-declared size (WeightFile::bytes),
falling back to the response Content-Length. Not called on a cache hit.
Resolution: $QSM_MODEL_DIR / cache hit (checksum-validated) → return;
otherwise download from WeightFile::url, verify, and cache.