{"record":{"id":"3600115a233e24a8","repo":"mem0ai/mem0","slug":"unsupported-history-store-provider-provider","errorCode":null,"errorMessage":"Unsupported history store provider: ${provider}","messagePattern":"Unsupported history store provider: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"mem0-ts/src/oss/src/utils/factory.ts","lineNumber":294,"sourceCode":"    return LLMFactory.create(llmProvider, llmConfig);\n  }\n}\n\nexport class HistoryManagerFactory {\n  static create(provider: string, config: HistoryStoreConfig): HistoryManager {\n    switch (provider.toLowerCase()) {\n      case \"sqlite\":\n        return new SQLiteManager(config.config.historyDbPath || \":memory:\");\n      case \"supabase\":\n        return new SupabaseHistoryManager({\n          supabaseUrl: config.config.supabaseUrl || \"\",\n          supabaseKey: config.config.supabaseKey || \"\",\n          tableName: config.config.tableName || \"memory_history\",\n        });\n      case \"memory\":\n        return new MemoryHistoryManager();\n      default:\n        throw new Error(`Unsupported history store provider: ${provider}`);\n    }\n  }\n}\n","sourceCodeStart":276,"sourceCodeEnd":298,"githubUrl":"https://github.com/mem0ai/mem0/blob/001c235229be8795e3834520467bd0d661ed8f34/mem0-ts/src/oss/src/utils/factory.ts#L276-L298","documentation":"Thrown by the history store factory when historyDbPath config specifies a provider other than sqlite, supabase, or memory. The history store persists memory update history; the switch only resolves these three provider names, so anything else falls to default and throws.","triggerScenarios":"historyStore: { provider: 'postgres', config: {...} }, or provider: 'sqlite3' instead of 'sqlite', or omitting quotes/types so the value arrives as an unexpected string.","commonSituations":"Wanting history in Postgres/MySQL when only sqlite (file or :memory:), supabase, and in-memory are supported in TS; migrating from Python where history backends differ; typo in provider id.","solutions":["Use 'sqlite', 'supabase', or 'memory' exactly as cased in the factory switch.","For a file-backed history use provider 'sqlite' with config.historyDbPath set to a writable path.","If you need another backend, disable/keep the default history manager or contribute support upstream."],"exampleFix":"// before\nhistoryStore: { provider: 'sqlite3', config: { historyDbPath: './hist.db' } }\n// after\nhistoryStore: { provider: 'sqlite', config: { historyDbPath: './hist.db' } }","handlingStrategy":"validation","validationCode":"const HISTORY_PROVIDERS = ['sqlite','supabase','memory'];\nfunction assertHistoryProvider(provider: string) {\n  if (!HISTORY_PROVIDERS.includes(provider.toLowerCase()))\n    throw new Error(`historyStore.provider must be one of ${HISTORY_PROVIDERS.join(', ')}`);\n}","typeGuard":"const isKnownHistoryProvider = (p: string): boolean => HISTORY_PROVIDERS.includes(p.toLowerCase());","tryCatchPattern":null,"preventionTips":["Default to omitting historyStore unless you specifically need persistent history.","Remember only sqlite (file/:memory:), supabase, and memory exist in the TS SDK."],"tags":["configuration","history-store","typescript","factory"],"backgroundTag":null,"analyzedSha":"001c235229be8795e3834520467bd0d661ed8f34","analyzedAt":"2026-08-15T01:55:42.685Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}