{"record":{"id":"eb50e92294d86224","repo":"tinyhumansai/openhuman","slug":"memory-vector-search-embedding-provider-failed","errorCode":null,"errorMessage":"memory_vector_search: embedding provider failed: {e}","messagePattern":"memory_vector_search: embedding provider failed: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/openhuman/memory/tools/search/vector_search.rs","lineNumber":139,"sourceCode":"        let config = config_rpc::load_config_with_timeout()\n            .await\n            .map_err(|e| anyhow::anyhow!(\"memory_vector_search: load config failed: {e}\"))?;\n\n        // Chunks are read through the bound driver, not by opening the store\n        // in this process. Before the module port this called\n        // `list_chunks(&config, …)` directly, which resolved the workspace path\n        // and opened the same SQLite database the loaded module already had\n        // open — two engine instances over one file, with the module not\n        // authoritative. See `docs/specs/2026-08-13-memory-module-port.md` §2.1.\n        let guard = active_memory_guard()\n            .await\n            .map_err(|e| anyhow::anyhow!(\"memory_vector_search: {e}\"))?;\n        let chunk_reader = guard.as_chunks().ok_or_else(|| {\n            anyhow::anyhow!(\"memory_vector_search: memory driver does not support the chunk family\")\n        })?;\n\n        let embedder = provider_from_config(&config)\n            .map_err(|e| anyhow::anyhow!(\"memory_vector_search: embedding provider failed: {e}\"))?;\n\n        let query_vec = embedder\n            .embed_one(&parsed.query)\n            .await\n            .map_err(|e| anyhow::anyhow!(\"memory_vector_search: embedding query failed: {e}\"))?;\n\n        let source_kind = match parsed.source_kind.as_deref() {\n            Some(s) => Some(\n                SourceKind::parse(s).map_err(|e| anyhow::anyhow!(\"memory_vector_search: {e}\"))?,\n            ),\n            None => None,\n        };\n\n        let since_ms = parsed.time_window_days.map(|days| {\n            let now_ms = chrono::Utc::now().timestamp_millis();\n            now_ms - (i64::from(days) * 86_400_000)\n        });\n","sourceCodeStart":121,"sourceCodeEnd":157,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/749120085864ce16e0f273c7b86fac7740b39c5b/src/openhuman/memory/tools/search/vector_search.rs#L121-L157","documentation":"Constructing or initializing the embedding provider for the query failed. `memory_vector_search` must embed the query text before comparing it to chunk vectors; this fires when provider resolution or setup errors (missing API key, unknown provider name, unreachable configured endpoint), with `{e}` naming the provider-side cause.","triggerScenarios":"Thrown at src/openhuman/memory/tools/search/vector_search.rs:139 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check `{e}` for the provider-specific cause","Verify embedding provider config (API key, base URL, model) in settings","Confirm network reachability for hosted embedding endpoints","Retry once for transient provider errors"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"749120085864ce16e0f273c7b86fac7740b39c5b","analyzedAt":"2026-08-17T21:21:45.363Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}