diff --git a/Cargo.lock b/Cargo.lock index c669a692..ab1e39fd 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -387,7 +387,7 @@ dependencies = [ "bitflags 2.9.0", "cexpr", "clang-sys", - "itertools 0.12.1", + "itertools 0.11.0", "lazy_static", "lazycell", "log", @@ -1607,11 +1607,9 @@ checksum = "cc03dcb0b0a83ae3f3363ec811014ae669f083e4e499c66602f447c4828737a1" dependencies = [ "dirs", "futures", - "http 1.3.1", "indicatif", "libc", "log", - "native-tls", "num_cpus", "rand 0.8.5", "reqwest", @@ -1619,7 +1617,6 @@ dependencies = [ "serde_json", "thiserror 2.0.12", "tokio", - "ureq", "windows-sys 0.59.0", ] @@ -2104,15 +2101,6 @@ dependencies = [ "either", ] -[[package]] -name = "itertools" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" -dependencies = [ - "either", -] - [[package]] name = "itertools" version = "0.13.0" @@ -3220,8 +3208,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "22505a5c94da8e3b7c2996394d1c933236c4d743e81a410bcca4e6989fc066a4" dependencies = [ "bytes", - "heck 0.5.0", - "itertools 0.12.1", + "heck 0.4.1", + "itertools 0.11.0", "log", "multimap 0.10.0", "once_cell", @@ -3254,7 +3242,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "81bddcdb20abf9501610992b6759a4c888aef7d1a7247ef75e2404275ac24af1" dependencies = [ "anyhow", - "itertools 0.12.1", + "itertools 0.11.0", "proc-macro2", "quote", "syn 2.0.100", @@ -5024,7 +5012,6 @@ dependencies = [ "base64 0.22.1", "flate2", "log", - "native-tls", "once_cell", "rustls", "rustls-pki-types", diff --git a/backends/candle/Cargo.toml b/backends/candle/Cargo.toml index ca6dd198..5ee0c730 100644 --- a/backends/candle/Cargo.toml +++ b/backends/candle/Cargo.toml @@ -29,7 +29,7 @@ memmap2 = "^0.9" [dev-dependencies] insta = { git = "https://github.com/OlivierDehaene/insta", rev = "f4f98c0410b91fb5a28b10df98e4422955be9c2c", features = ["yaml"] } is_close = "0.1.3" -hf-hub = "0.4.2" +hf-hub = { workspace = true } anyhow = { workspace = true } tokenizers = { workspace = true } serial_test = { workspace = true } diff --git a/backends/candle/tests/common.rs b/backends/candle/tests/common.rs index ddbd9f0f..f77271fb 100644 --- a/backends/candle/tests/common.rs +++ b/backends/candle/tests/common.rs @@ -107,7 +107,7 @@ pub fn download_artifacts( model_id: &'static str, revision: Option<&'static str>, ) -> Result { - let mut builder = ApiBuilder::new().with_progress(false); + let mut builder = ApiBuilder::from_env().with_progress(false); if let Some(cache_dir) = std::env::var_os("HUGGINGFACE_HUB_CACHE") { builder = builder.with_cache_dir(cache_dir.into()); diff --git a/router/src/lib.rs b/router/src/lib.rs index 7c8968ec..ee9b0e41 100644 --- a/router/src/lib.rs +++ b/router/src/lib.rs @@ -70,7 +70,9 @@ pub async fn run( // Using a local model (model_id_path.to_path_buf(), None) } else { - let mut builder = ApiBuilder::new().with_progress(false).with_token(hf_token); + let mut builder = ApiBuilder::from_env() + .with_progress(false) + .with_token(hf_api_token); if let Some(cache_dir) = huggingface_hub_cache { builder = builder.with_cache_dir(cache_dir.into());