Skip to content

Bug: bare model names in init defaults cause silent fallback to mock embeddings #1516

@sparkling

Description

@sparkling

Embedding model defaults across the CLI use bare names (e.g. all-mpnet-base-v2) instead of prefixed names (Xenova/all-mpnet-base-v2). Additionally, ControllerRegistry does not pass embedding config to AgentDB, causing it to fall back to a different default model. Both issues cause @xenova/transformers to silently fail, and all semantic search degrades to hash pseudo-embeddings.

Bug 1: Bare model names in defaults

File Value Should be
init/types.ts FULL_INIT_OPTIONS all-mpnet-base-v2 Xenova/all-mpnet-base-v2
init/types.ts DEFAULT/CODEX_INIT_OPTIONS all-MiniLM-L6-v2 Xenova/all-MiniLM-L6-v2
commands/init.ts wizard choices + CLI flags bare names prefixed names
mcp-tools/embeddings-tools.ts enum + default bare names prefixed names
mcp-tools/hooks-tools.ts status model bare name prefixed name

Bug 2: ControllerRegistry does not pass embedding config to AgentDB

@claude-flow/memory/src/controller-registry.ts line 723:

this.agentdb = new AgentDBClass({ dbPath });  // missing embeddingModel + dimension

The registry reads getEmbeddingConfig() at line 713-715 and caches the dimension, but never passes the model to AgentDB. AgentDB falls back to its own default (MiniLM 384-dim) instead of the configured model (mpnet 768-dim). The bridge then rejects the 384-dim result because config expects 768.

Fix

  1. Prefix all bare model defaults with Xenova/
  2. Pass embeddingModel and dimension from registry to new AgentDBClass()

Verification

After fix: memory store writes 768-dim Xenova/all-mpnet-base-v2 embeddings, memory search returns semantically relevant results.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions