Summary
createEmbeddingService() (src/core/store/embedding.ts) fully supports LocalEmbeddingService (node-llama-cpp + embeddinggemma-300m, offline, 768-dim), but two layers block it in practice:
- config.ts rewrites
provider=local to provider=none and sets embeddingEnabled=false: "Local embedding provider is not available in user config."
- store/factory.ts (sqlite branch) only creates an embedding service when
config.embedding.enabled && config.embedding.provider !== "local" && config.embedding.apiKey.
Additionally, after a local service is created, nothing ever calls startWarmup() — the GGUF model is never downloaded and embed() throws EmbeddingNotReadyError. Grep shows zero call sites for startWarmup outside the class itself.
Impact
Users who want fully-offline embedding (no external API key) cannot enable it via config; and if they force it, recall silently degrades because the model never loads.
Suggested fix
- Allow
provider=local in config parsing (or expose an explicit enable flag),
- Create the service for
provider=local in the sqlite store factory,
- Call
embeddingService.startWarmup() once during core/gateway startup (it is a safe no-op for remote providers).
Verified on main @ 0.3.6 with Standalone Gateway (src/gateway/server.ts).
Summary
createEmbeddingService()(src/core/store/embedding.ts) fully supportsLocalEmbeddingService(node-llama-cpp + embeddinggemma-300m, offline, 768-dim), but two layers block it in practice:provider=localtoprovider=noneand setsembeddingEnabled=false: "Local embedding provider is not available in user config."config.embedding.enabled && config.embedding.provider !== "local" && config.embedding.apiKey.Additionally, after a local service is created, nothing ever calls
startWarmup()— the GGUF model is never downloaded andembed()throwsEmbeddingNotReadyError. Grep shows zero call sites forstartWarmupoutside the class itself.Impact
Users who want fully-offline embedding (no external API key) cannot enable it via config; and if they force it, recall silently degrades because the model never loads.
Suggested fix
provider=localin config parsing (or expose an explicit enable flag),provider=localin the sqlite store factory,embeddingService.startWarmup()once during core/gateway startup (it is a safe no-op for remote providers).Verified on main @ 0.3.6 with Standalone Gateway (src/gateway/server.ts).