Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

fix(doctor): handle missing legacy embedding provider migration

Steven Enamakelae0b29c26e8a
diff --git a/crates/openhuman-core/src/config/migrations/migrate_legacy_embedding_provider.rs b/crates/openhuman-core/src/config/migrations/migrate_legacy_embedding_provider.rs
index 34e04f9fce..19f3b6425a 100644
--- a/crates/openhuman-core/src/config/migrations/migrate_legacy_embedding_provider.rs
+++ b/crates/openhuman-core/src/config/migrations/migrate_legacy_embedding_provider.rs
@@ -26,8 +26,10 @@
//! a config carrying it belonged to a user who chose local/offline embeddings.
//! To preserve that intent, the caller (`run_pending`) probes for a reachable
//! local Ollama server and passes `prefer_local`:
-//! - `prefer_local = true` → `"ollama"` + `bge-m3` (1024-dim; Ollama auto-pulls
-//! the model on first embed). Keeps the user local/offline.
+//! - `prefer_local = true` → `"ollama"` + `bge-m3` (1024-dim). Keeps the user
+//! local/offline. OpenHuman does not pull the model: until the user runs
+//! `ollama pull bge-m3`, embeds fail and the doctor / memory health surface
+//! that exact remediation.
//! - `prefer_local = false` → `"managed"` cloud backend + cloud defaults (the
//! fresh-install default), used when no local Ollama is reachable.
//!
@@ -158,7 +160,7 @@ pub fn run(config: &mut Config, prefer_local: bool) -> anyhow::Result<MigrationS
///
/// Invoked by [`super::run_pending`] to choose the [`run`] target — a reachable
/// local Ollama lets former-`fastembed` (i.e. local-embedding) users stay local
-/// (`bge-m3`, auto-pulled on first embed) instead of being forced onto the
+/// (`bge-m3`, which the user pulls themselves) instead of being forced onto the
/// managed cloud backend. Bounded (1.5s) and non-fatal: any client-build error,
/// transport error, timeout, or non-2xx status ⇒ `false`, so the caller falls
/// back to managed. Kept out of [`run`] so the rewrite itself stays pure/sync.
diff --git a/crates/openhuman-core/src/platform/doctor/core/memory_agent_checks.rs b/crates/openhuman-core/src/platform/doctor/core/memory_agent_checks.rs
index 13b50b93b5..0bdeac1c1f 100644
--- a/crates/openhuman-core/src/platform/doctor/core/memory_agent_checks.rs
+++ b/crates/openhuman-core/src/platform/doctor/core/memory_agent_checks.rs
@@ -217,7 +217,8 @@ pub(super) fn check_embedding_model_health(config: &Config, items: &mut Vec<Diag
cat,
format!(
"embedding model `{model}` is NOT installed on Ollama at {base_url}. \
- Run: ollama pull {model}"
+ Run: ollama pull {model} (OpenHuman does not download models; pull it \
+ in your own Ollama)"
),
));
}