Skip to content

Bug: memory_search tool uses Gemini instead of local despite provider=local (CLI works correctly) #29318

@brt-h-bot

Description

@brt-h-bot

Summary

When memorySearch.provider: "local" is configured and the CLI (openclaw memory index, openclaw memory status) correctly uses local embeddings, the memory_search tool still uses Gemini embeddings silently.

Environment

  • OpenClaw: 2026.2.26
  • OS: macOS 15.3 (Sequoia) arm64
  • Gateway: local launchctl service

Config

agents: {
  defaults: {
    memorySearch: {
      provider: "local",
      fallback: "none",
      local: {
        modelPath: "/Users/brt-bot/.node-llama-cpp/models/embeddinggemma-300m.gguf"
      },
      query: { hybrid: { enabled: true } }
    }
  }
}

What works (CLI)

  • openclaw memory status shows: Provider: local (requested: local)
  • openclaw memory index --verbose uses local embeddings successfully (multiple "batch start" messages)
  • Manual node-llama-cpp test produces 768-dim embeddings with Metal GPU

What fails (tool)

Calling memory_search returns results with provider: "gemini" and model: "gemini-embedding-001":

{
  "results": [...],
  "provider": "gemini",
  "model": "gemini-embedding-001",
  "mode": "hybrid"
}

This happens even with fallback: "none" set.

Expected behavior

memory_search tool should use local embeddings when memorySearch.provider: "local" is configured.

Actual behavior

The tool appears to bypass the local provider and use Gemini (likely auto-selected from resolved API key).

Difference from #8131

Issue #8131 was about auth errors when using local. That issue is closed. This is different: the tool works but silently uses the wrong provider.

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    staleMarked as stale due to inactivity

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions