Skip to content

Commit b8cb3a8

Browse files
feat: Moves to public CDN. (#2506)
* feat: Moves to public CDN. * Points to Hosted CDN published models * Adds new client hosted_model_client to download artifacts from CDN. * Updates Candle to remove references to HF client. and fix issues if any with hooks * feat: Migrate to hosted CDN model system and fix compilation issues This commit implements a comprehensive migration from Hugging Face to a hosted CDN model distribution system, along with several bug fixes and improvements: ## Core Changes: - **Cargo.toml**: Update version to 1.13.2 and adjust dependencies - **Cargo.lock**: Update dependency versions and remove unused packages ## Semantic Search Client Updates: - **hosted_model_client.rs**: Enhanced CDN client with better error handling, retry logic, and comprehensive test coverage for model downloads - **async_implementation.rs**: Improved async model loading with better error propagation and resource management - **config.rs**: Streamlined configuration by removing unused imports - **candle.rs**: - Remove Hugging Face client dependencies and related code - Fix compilation error by removing undefined ensure_model_files() function - Replace with direct file existence checks in tests - Simplify model loading logic for CDN-based artifacts ## CLI Updates: - **knowledge.rs**: Remove unused imports and clean up code ## Key Benefits: - Faster model downloads from CDN vs Hugging Face - Better reliability with retry mechanisms - Simplified dependency management - Fixed compilation issues - Enhanced test coverage Files changed: 8 files, 314 insertions(+), 356 deletions(-) --------- Co-authored-by: Kenneth S. <[email protected]>
1 parent 23331b8 commit b8cb3a8

File tree

13 files changed

+518
-177
lines changed

13 files changed

+518
-177
lines changed

Cargo.lock

Lines changed: 64 additions & 89 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ r2d2_sqlite = "0.25.0"
8181
rand = "0.9.0"
8282
rayon = "1.10.0"
8383
regex = "1.7.0"
84-
reqwest = { version = "0.12.14", default-features = false, features = ["http2", "charset", "rustls-tls", "rustls-tls-native-roots", "gzip", "json", "socks", "cookies"] }
84+
reqwest = { version = "0.12.14", default-features = false, features = ["http2", "charset", "rustls-tls", "rustls-tls-native-roots", "gzip", "json", "socks", "cookies", "stream"] }
8585
ring = "0.17.14"
8686
rusqlite = { version = "0.32.1", features = ["bundled", "serde_json"] }
8787
rustls = "0.23.23"

crates/chat-cli/src/cli/chat/tools/knowledge.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@ use super::{
1313
InvokeOutput,
1414
OutputKind,
1515
};
16-
17-
1816
use crate::cli::agent::{
1917
Agent,
2018
PermissionEvalResult,

crates/semantic-search-client/Cargo.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,16 @@ bm25 = { version = "2.2.1", features = ["language_detection"] }
3333

3434
# Common dependencies for all platforms
3535
anyhow = "1.0"
36+
reqwest = { workspace = true }
37+
zip = { version = "4.3.0", default-features = false, features = ["deflate", "time"] }
38+
tokio-stream = "0.1.17"
3639

3740
# Candle dependencies - not used on Linux ARM
3841
[target.'cfg(not(all(target_os = "linux", target_arch = "aarch64")))'.dependencies]
3942
candle-core = { version = "0.9.1", features = [] }
4043
candle-nn = "0.9.1"
4144
candle-transformers = "0.9.1"
4245
tokenizers = "0.21.1"
43-
hf-hub = { version = "0.4.2", default-features = false, features = ["rustls-tls", "tokio", "ureq"] }
4446

4547
# Conditionally enable Metal on macOS
4648
[target.'cfg(all(target_os = "macos", not(all(target_os = "linux", target_arch = "aarch64"))))'.dependencies.candle-core]

0 commit comments

Comments
 (0)