tinyhumansai/openhuman · error

memory_hybrid_search: unknown mode '{}'; expected balanced,

Error message

memory_hybrid_search: unknown mode '{}'; expected balanced, semantic, lexical, or graph_first

What it means

WeightProfile::by_name did not recognize the mode string — the schema documents balanced (default), semantic, lexical and graph_first, and anything else (including typos) falls to this arm after a warn log.

Source

Thrown at src/openhuman/memory/tools/search/hybrid_search.rs:116

            .map_err(|e| anyhow::anyhow!("invalid arguments for memory_hybrid_search: {e}"))?;

        if parsed.query.trim().is_empty() {
            return Err(anyhow::anyhow!(
                "memory_hybrid_search: query cannot be empty"
            ));
        }
        if parsed.namespace.trim().is_empty() {
            return Err(anyhow::anyhow!(
                "memory_hybrid_search: namespace cannot be empty"
            ));
        }

        let profile = WeightProfile::by_name(&parsed.mode).ok_or_else(|| {
            log::warn!(
                "[tool][memory_hybrid_search] rejected unknown mode={}",
                parsed.mode
            );
            anyhow::anyhow!(
                "memory_hybrid_search: unknown mode '{}'; expected balanced, semantic, lexical, or graph_first",
                parsed.mode
            )
        })?;
        let limit = parsed.limit.clamp(1, 50);

        log::debug!(
            "[tool][memory_hybrid_search] query_len={} ns={} mode={} limit={}",
            parsed.query.len(),
            parsed.namespace,
            parsed.mode,
            limit,
        );

        // Reads through the bound driver. This used to call
        // `UnifiedMemory::new(&config.workspace_dir, …)` — constructing a
        // *whole second engine* over the workspace the loaded module already
        // owns, the most severe instance of the split brain this port removes.

View on GitHub (pinned to 7491200858)

Solutions

  1. Use one of: balanced, semantic, lexical, graph_first
  2. Omit mode to get the balanced default
  3. Check casing and typos in the mode string
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at src/openhuman/memory/tools/search/hybrid_search.rs:116 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/cd6e9507ffefd7f2. Report an issue: GitHub.