Skip to content

memory_search tool fails with QMD backend: still requires embedding provider API keys #19813

Description

@alexioklini

Bug Description

When memory.backend is set to "qmd" with searchMode: "search" (BM25-only, no embeddings needed), the memory_search agent tool still fails with:

No API key found for provider "openai".
No API key found for provider "google".
No API key found for provider "voyage".

The tool is marked as disabled: true and returns no results.

Expected Behavior

When the memory backend is configured as QMD with BM25-only search, the memory_search tool should route queries through QMD (qmd search) without requiring any embedding provider API keys.

Actual Behavior

The memory_search tool validates embedding provider credentials regardless of the configured memory backend. It checks for OpenAI, Google, and Voyage API keys even though QMD BM25 search does not use embeddings.

Reproduction

  1. Configure openclaw.json:
{
  "memory": {
    "backend": "qmd",
    "qmd": {
      "command": "/path/to/qmd",
      "searchMode": "search",
      "includeDefaultMemory": true
    }
  }
}
  1. Do NOT configure any embedding provider API keys (OpenAI, Google, Voyage)
  2. Restart gateway
  3. Agent calls memory_search tool → fails with "No API key found" errors
  4. Meanwhile, running qmd search "query" via exec works perfectly

Environment

  • OpenClaw: 2026.2.17
  • QMD: installed via bun (@tobilu/qmd)
  • OS: macOS (arm64)
  • Memory config: backend: "qmd", searchMode: "search" (BM25-only)

Workaround

Using exec to call qmd search directly instead of the memory_search tool.

Notes

The 2026.2.17 release note mentions "Memory/Search: add FTS fallback plus query expansion" but this fix appears to be within the builtin memory backend, not the QMD integration path. The memory_search tool seems to unconditionally initialize the embedding provider validation pipeline before checking which backend is configured.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions