{"record":{"id":"b6eaaf9b6a9858f1","repo":"mem0ai/mem0","slug":"project-updates-are-not-supported-by-the-oss-memor","errorCode":null,"errorMessage":"Project updates are not supported by the OSS Memory SDK.","messagePattern":"Project updates are not supported by the OSS Memory SDK\\.","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"mem0-ts/src/oss/src/memory/index.ts","lineNumber":717,"sourceCode":"  }\n\n  static fromConfig(configDict: Record<string, any>): Memory {\n    try {\n      const config = MemoryConfigSchema.parse(configDict);\n      return new Memory(config);\n    } catch (e) {\n      console.error(\"Configuration validation error:\", e);\n      throw e;\n    }\n  }\n\n  async updateProject(options: UpdateProjectOptions = {}): Promise<never> {\n    if (options?.decay === true) {\n      await this._getNoticeTelemetryId();\n      throw new Error(await getDecayFeatureErrorMessage(this));\n    }\n\n    throw new Error(\"Project updates are not supported by the OSS Memory SDK.\");\n  }\n\n  async add(\n    messages: string | Message[],\n    config: AddMemoryOptions,\n  ): Promise<SearchResult> {\n    if (config?.timestamp !== undefined) {\n      await this._getNoticeTelemetryId();\n      throw new Error(\n        await getTemporalFeatureErrorMessage(this, {\n          triggerFunction: \"add\",\n          triggerParameter: \"timestamp\",\n        }),\n      );\n    }\n\n    // Validate messages input\n    if (messages === undefined || messages === null) {","sourceCodeStart":699,"sourceCodeEnd":735,"githubUrl":"https://github.com/mem0ai/mem0/blob/001c235229be8795e3834520467bd0d661ed8f34/mem0-ts/src/oss/src/memory/index.ts#L699-L735","documentation":"updateProject() in the OSS SDK unconditionally throws this error (return type Promise<never>) because project management exists only in the hosted Mem0 platform. Unlike the decay path, this fires for any call without decay:true and is the SDK's explicit 'feature not available self-hosted' signal.","triggerScenarios":"Calling memory.updateProject() with no options, or options without decay, on a self-hosted Memory instance from 'mem0ai/oss'.","commonSituations":"Copy-pasting hosted-platform sample code into an OSS deployment; abstraction layers that call updateProject generically on any memory handle; IDE autocomplete suggesting the method since it exists on the class.","solutions":["Delete the updateProject call from OSS code — no argument makes it succeed.","Switch to MemoryClient (hosted) if project updates are required.","Guard shared code: check which client type you hold before calling platform-only methods.","Track projects yourself (e.g. store a project id per memory in metadata) when self-hosting."],"exampleFix":"// before\nconst memory = new Memory(config);\nawait memory.updateProject({ name: 'prod' }); // always throws\n\n// after\nconst memory = new Memory(config);\n// project updates: hosted only\n// const client = new MemoryClient({ apiKey: process.env.MEM0_API_KEY });\n// await client.updateProject({ projectId: 'prod', name: 'prod' });","handlingStrategy":"type-guard","validationCode":null,"typeGuard":"type OssMemory = import('mem0ai/oss').Memory;\nfunction isOssMemory(client: unknown): client is OssMemory {\n  return client instanceof Memory; // OSS class, not MemoryClient\n}","tryCatchPattern":"try {\n  await memory.updateProject(options);\n} catch (err) {\n  if (err instanceof Error && /Project updates are not supported by the OSS/.test(err.message)) {\n    return { skipped: true, reason: 'oss-unsupported' }; // degrade gracefully\n  }\n  throw err;\n}","preventionTips":["Check the client type before calling platform-only methods in shared code.","Treat updateProject on OSS as a compile-time avoid: delete it from code paths, don't catch it.","Centralize which features your app uses behind one config so OSS/hosted swaps are explicit."],"tags":["oss-sdk","platform-feature","unsupported","typescript"],"backgroundTag":null,"analyzedSha":"001c235229be8795e3834520467bd0d661ed8f34","analyzedAt":"2026-08-15T01:55:42.685Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}