server: add dedup-cache-models preset option (#27346)

This commit is contained in:
Xuan-Son Nguyen
2026-08-19 11:04:26 +02:00
committed by GitHub
parent 98d1e92c21
commit ee4c505a4f
8 changed files with 132 additions and 2 deletions
+4
View File
@@ -85,6 +85,10 @@ std::vector<std::string> common_download_get_all_parts(const std::string & url);
// returns list of cached models
std::vector<common_cached_model_info> common_list_cached_models();
// resolve the local cached file path for a HF repo without network access (hf_file, if given, must match exactly)
// returns an empty string if the model is not present in the cache
std::string common_download_resolve_path(const std::string & hf_repo_with_tag, const std::string & hf_file = "");
// download single file from url to local path
// returns status code or -1 on error
// skip_etag: if true, don't read/write .etag files (for HF cache where filename is the hash)