{"record":{"id":"8c040404037761ef","repo":"mem0ai/mem0","slug":"unknown-embedder-provider-providerid","errorCode":null,"errorMessage":"Unknown embedder provider: ${providerId}","messagePattern":"Unknown embedder provider: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"integrations/openclaw/cli/oss-wizard.ts","lineNumber":106,"sourceCode":"  if (input.apiKey) config.apiKey = input.apiKey;\n  if (providerId === \"ollama\") {\n    config.url = input.url || def.defaultUrl;\n  }\n  return { provider: providerId, config };\n}\n\nexport interface EmbedderConfigInput {\n  apiKey?: string;\n  model?: string;\n  url?: string;\n}\n\nexport function buildOssEmbedderConfig(\n  providerId: string,\n  input: EmbedderConfigInput,\n): { provider: string; config: Record<string, unknown>; dims: number | undefined } {\n  const def = EMBEDDER_PROVIDERS.find((p) => p.id === providerId);\n  if (!def) throw new Error(`Unknown embedder provider: ${providerId}`);\n\n  const model = input.model || def.defaultModel;\n  const config: Record<string, unknown> = { model };\n  if (input.apiKey) config.apiKey = input.apiKey;\n  if (providerId === \"ollama\") {\n    config.url = input.url || def.defaultUrl;\n  }\n\n  const dims = KNOWN_EMBEDDER_DIMS[model] ?? def.defaultDims;\n  if (dims) config.embeddingDims = dims;\n  return { provider: providerId, config, dims };\n}\n\nexport interface VectorConfigInput {\n  url?: string;\n  host?: string;\n  port?: string;\n  user?: string;","sourceCodeStart":88,"sourceCodeEnd":124,"githubUrl":"https://github.com/mem0ai/mem0/blob/001c235229be8795e3834520467bd0d661ed8f34/integrations/openclaw/cli/oss-wizard.ts#L88-L124","documentation":"Thrown by buildOssEmbedderConfig when the requested embedder provider id is not in the EMBEDDER_PROVIDERS catalog. Like the LLM counterpart, it resolves provider defaults (defaultModel, defaultDims, defaultUrl) from a fixed list; an unknown id means the embedding model cannot be configured, and vector dimension inference (KNOWN_EMBEDDER_DIMS) would be impossible.","triggerScenarios":"Passing an embedder id absent from EMBEDDER_PROVIDERS: typos, casing mismatches ('OpenAI'), or ids from a different plugin version. The function then cannot look up defaultDims, so it refuses rather than building a config with unknown embedding dimensions (which would corrupt the local vector store).","commonSituations":"Switching embedders during OSS setup and typing the name manually; config generated by an older wizard version referencing a removed embedder; changing the embedder after vectors were already created with different dims.","solutions":["Use an id from EMBEDDER_PROVIDERS in oss-wizard.ts — verify the current catalog first.","If you changed embedder model, expect embedding dims to change; wipe/rebuild the local vector store rather than mixing dimensions.","Re-run the OSS wizard (`openclaw mem0 setup`) to pick a supported embedder from the prompt."],"exampleFix":"// before\nbuildOssEmbedderConfig('huggingface', {}); // Unknown embedder provider: huggingface\n\n// after\nbuildOssEmbedderConfig('ollama', { url: 'http://localhost:11434' });","handlingStrategy":"validation","validationCode":"import { EMBEDDER_PROVIDERS } from './oss-wizard.ts';\nconst knownEmb = EMBEDDER_PROVIDERS.map((p) => p.id);\nif (!knownEmb.includes(providerId)) {\n  throw new Error(`embedder must be one of: ${knownEmb.join(', ')}`);\n}","typeGuard":"function isKnownEmbedderProvider(id: string): boolean {\n  return EMBEDDER_PROVIDERS.some((p) => p.id === id);\n}","tryCatchPattern":null,"preventionTips":["Pick embedders from the wizard's list rather than typing ids.","When changing embedder models, plan to rebuild the vector store (dims may differ)."],"tags":["config","oss-mode","embeddings","validation","typescript"],"backgroundTag":null,"analyzedSha":"001c235229be8795e3834520467bd0d661ed8f34","analyzedAt":"2026-08-15T01:55:42.685Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}