{"record":{"id":"952adab37cf586cf","repo":"tinyhumansai/openhuman","slug":"memory-vector-search-embedding-query-failed-e","errorCode":null,"errorMessage":"memory_vector_search: embedding query failed: {e}","messagePattern":"memory_vector_search: embedding query failed: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/openhuman/memory/tools/search/vector_search.rs","lineNumber":144,"sourceCode":"        // 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\n        // Fetch candidate chunks with metadata filters. The per-profile\n        // memory-source gate is applied inside the driver's query (before the\n        // row limit), so disallowed-source chunks can't starve permitted ones.\n        //\n        // `None` for the scope is not \"unrestricted\": the guard intersects it","sourceCodeStart":126,"sourceCodeEnd":162,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/749120085864ce16e0f273c7b86fac7740b39c5b/src/openhuman/memory/tools/search/vector_search.rs#L126-L162","documentation":"The embedding provider was initialized but the actual embed call for the query text failed. This is the network/model invocation step of `memory_vector_search`, after chunks were listed and the embedder built — so provider config resolved, and the failure is at request time (HTTP error, rate limit, auth rejection), detailed by `{e}`.","triggerScenarios":"Thrown at src/openhuman/memory/tools/search/vector_search.rs:144 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Read `{e}` for the HTTP/model error detail","Retry with backoff for rate limits or transient 5xx","Verify the embedding provider credentials are still valid","Shorten the query if the provider rejects it on size limits"],"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-14T05:17:10.506Z"}