Fixed the Qdrant edge dependency

This commit is contained in:
Thorsten Sommer 2026-06-04 14:17:06 +02:00
parent 5b5b6e0b28
commit de55c1602b
Signed by untrusted user who does not match committer: tsommer
GPG Key ID: 371BBA77A02C0108
5 changed files with 2170 additions and 123 deletions

2239
runtime/Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -48,7 +48,10 @@ tempfile = "3.27.0"
strum_macros = "0.28.0"
sysinfo = "0.39.3"
bytes = "1.11.1"
qdrant-edge = "0.6.1"
qdrant-edge = "0.7.2"
[patch.crates-io]
qdrant-edge = { git = "https://github.com/SommerEngineering/qdrant.git", rev = "462c84d82ced126e4a2b7914544bfde16a509eb1" }
[target.'cfg(target_os = "windows")'.dependencies]
windows-registry = "0.6.1"

20
runtime/patches/README.md Normal file
View File

@ -0,0 +1,20 @@
# Runtime Patches
This directory documents temporary patches for third-party Rust dependencies.
## Qdrant Edge
AI Studio temporarily uses a pinned commit from `SommerEngineering/qdrant` for `qdrant-edge`.
The fork commit exposes Qdrant's internal `lib/edge` crate as `qdrant-edge` and applies the
trait-solver fix from Qdrant PR #9312.
When updating to a newer Qdrant Edge version:
1. Sync the Qdrant fork with upstream.
2. Apply `qdrant-edge-ai-studio.patch` to the Qdrant fork if upstream has not released the fix yet.
3. Update the version in `lib/edge/Cargo.toml` in the fork.
4. Update `runtime/Cargo.toml` in AI Studio to use the new `qdrant-edge` version and fork commit.
5. Run `cargo update -p qdrant-edge` from `runtime/`.
Remove the patch and the `[patch.crates-io]` override once Qdrant publishes a fixed `qdrant-edge`
release on crates.io.

View File

@ -0,0 +1,26 @@
diff --git a/lib/edge/Cargo.toml b/lib/edge/Cargo.toml
index 7c2cf6037..d21e3c053 100644
--- a/lib/edge/Cargo.toml
+++ b/lib/edge/Cargo.toml
@@ -1,6 +1,6 @@
[package]
-name = "edge"
-version = "0.1.0"
+name = "qdrant-edge"
+version = "0.7.2"
authors = ["Qdrant Team <info@qdrant.tech>"]
license = "Apache-2.0"
edition = "2024"
diff --git a/lib/segment/src/common/anonymize.rs b/lib/segment/src/common/anonymize.rs
index 6b5d19b12..c73d24433 100644
--- a/lib/segment/src/common/anonymize.rs
+++ b/lib/segment/src/common/anonymize.rs
@@ -105,7 +105,7 @@ where
{
collection_opt
.as_ref()
- .map(|c| anonymize_collection_values(c))
+ .map(|c| anonymize_collection_values::<C, K, V>(c))
}
impl Anonymize for String {

View File

@ -401,7 +401,7 @@ fn remove_obsolete_qdrant_sidecar_files<R: tauri::Runtime>(app_handle: &tauri::A
cfg_if::cfg_if! {
if #[cfg(any(target_os = "windows", target_os = "macos"))]{
if let Ok(current_exe) = std::env::current_exe() && let Some(exe_dir) = current_exe.parent() {
if (exe_dir.to_string_lossy().contains("MindWork AI Studio")) {
if exe_dir.to_string_lossy().contains("MindWork AI Studio") {
paths.push(exe_dir.join("target").join("databases").join("qdrant"));
paths.push(exe_dir.join("qdrant.exe"));
paths.push(exe_dir.join("qdrant"));
@ -452,6 +452,7 @@ fn edge_config(vector_size: usize) -> EdgeConfig {
hnsw_config: hnsw_config(),
quantization_config: None,
optimizers: edge_optimizers_config(),
wal_options: None,
}
}