{"record":{"id":"6857d2fd32ed21f8","repo":"mem0ai/mem0","slug":"unknown-llm-provider-providerid","errorCode":null,"errorMessage":"Unknown LLM provider: ${providerId}","messagePattern":"Unknown LLM provider: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"integrations/openclaw/cli/oss-wizard.ts","lineNumber":83,"sourceCode":"  return `mem0_${dims}d`;\n}\n\n// ============================================================================\n// Config builders\n// ============================================================================\n\nexport interface LlmConfigInput {\n  apiKey?: string;\n  model?: string;\n  url?: string;\n}\n\nexport function buildOssLlmConfig(\n  providerId: string,\n  input: LlmConfigInput,\n): { provider: string; config: Record<string, unknown> } {\n  const def = LLM_PROVIDERS.find((p) => p.id === providerId);\n  if (!def) throw new Error(`Unknown LLM provider: ${providerId}`);\n\n  const config: Record<string, unknown> = {\n    model: input.model || def.defaultModel,\n  };\n  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(","sourceCodeStart":65,"sourceCodeEnd":101,"githubUrl":"https://github.com/mem0ai/mem0/blob/001c235229be8795e3834520467bd0d661ed8f34/integrations/openclaw/cli/oss-wizard.ts#L65-L101","documentation":"Thrown by buildOssLlmConfig when the requested LLM provider id is not in the LLM_PROVIDERS catalog used by the open-source (OSS) setup wizard. The wizard maps a fixed set of provider ids (e.g. openai, anthropic, ollama) to defaults (defaultModel, defaultUrl); an unrecognized id cannot be configured, so the build aborts before writing config.","triggerScenarios":"Passing a provider id not present in LLM_PROVIDERS — a typo ('open_ai'), a renamed provider from a newer wizard version, or a custom provider id read from an old config file. Callers that read provider from user input or from openclaw.json and forward it verbatim.","commonSituations":"Upgrading the plugin changes the provider list and an old config refers to a removed/renamed id; user types a provider name at the wizard prompt with different casing or spelling; scripting the wizard with a hardcoded id that drifted.","solutions":["Use one of the ids listed in LLM_PROVIDERS in oss-wizard.ts — check the export for the current catalog before calling.","If wizarding interactively, pick the provider from the prompt list rather than typing free-form.","After a plugin upgrade, re-run the OSS wizard to regenerate config if the stored provider id no longer resolves."],"exampleFix":"// before\nbuildOssLlmConfig('open_ai', { apiKey }); // Unknown LLM provider: open_ai\n\n// after\nbuildOssLlmConfig('openai', { apiKey }); // matches LLM_PROVIDERS entry","handlingStrategy":"validation","validationCode":"import { LLM_PROVIDERS } from './oss-wizard.ts';\nconst knownLlm = LLM_PROVIDERS.map((p) => p.id);\nif (!knownLlm.includes(providerId)) {\n  throw new Error(`provider must be one of: ${knownLlm.join(', ')}`);\n}","typeGuard":"function isKnownLlmProvider(id: string): boolean {\n  return LLM_PROVIDERS.some((p) => p.id === id);\n}","tryCatchPattern":null,"preventionTips":["Source provider ids from the LLM_PROVIDERS export, never hardcode strings.","Re-run the OSS wizard after plugin upgrades to refresh stored provider ids."],"tags":["config","oss-mode","llm","validation","typescript"],"backgroundTag":null,"analyzedSha":"001c235229be8795e3834520467bd0d661ed8f34","analyzedAt":"2026-08-15T01:55:42.685Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}