tinyhumansai/openhuman · error

memory_vector_search: embedding query failed: {e}

Error message

memory_vector_search: embedding query failed: {e}

What it means

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}`.

Source

Thrown at src/openhuman/memory/tools/search/vector_search.rs:144

        // in this process. Before the module port this called
        // `list_chunks(&config, …)` directly, which resolved the workspace path
        // and opened the same SQLite database the loaded module already had
        // open — two engine instances over one file, with the module not
        // authoritative. See `docs/specs/2026-08-13-memory-module-port.md` §2.1.
        let guard = active_memory_guard()
            .await
            .map_err(|e| anyhow::anyhow!("memory_vector_search: {e}"))?;
        let chunk_reader = guard.as_chunks().ok_or_else(|| {
            anyhow::anyhow!("memory_vector_search: memory driver does not support the chunk family")
        })?;

        let embedder = provider_from_config(&config)
            .map_err(|e| anyhow::anyhow!("memory_vector_search: embedding provider failed: {e}"))?;

        let query_vec = embedder
            .embed_one(&parsed.query)
            .await
            .map_err(|e| anyhow::anyhow!("memory_vector_search: embedding query failed: {e}"))?;

        let source_kind = match parsed.source_kind.as_deref() {
            Some(s) => Some(
                SourceKind::parse(s).map_err(|e| anyhow::anyhow!("memory_vector_search: {e}"))?,
            ),
            None => None,
        };

        let since_ms = parsed.time_window_days.map(|days| {
            let now_ms = chrono::Utc::now().timestamp_millis();
            now_ms - (i64::from(days) * 86_400_000)
        });

        // Fetch candidate chunks with metadata filters. The per-profile
        // memory-source gate is applied inside the driver's query (before the
        // row limit), so disallowed-source chunks can't starve permitted ones.
        //
        // `None` for the scope is not "unrestricted": the guard intersects it

View on GitHub (pinned to 7491200858)

Solutions

  1. Read `{e}` for the HTTP/model error detail
  2. Retry with backoff for rate limits or transient 5xx
  3. Verify the embedding provider credentials are still valid
  4. Shorten the query if the provider rejects it on size limits
Defensive patterns

Strategy: retry

When it happens

Trigger: Thrown at src/openhuman/memory/tools/search/vector_search.rs:144 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of tinyhumansai/openhuman@7491200858 (2026-08-17). Data as JSON: /api/errors/952adab37cf586cf. Report an issue: GitHub.