{"record":{"id":"3006aeb2344b6d04","repo":"mem0ai/mem0","slug":"the-timestamp-parameter-is-not-supported-by-the-os","errorCode":null,"errorMessage":"The timestamp parameter is not supported by the OSS Memory SDK.","messagePattern":"The timestamp parameter is 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":726,"sourceCode":"    }\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) {\n      throw new Error(\n        \"messages is required and cannot be undefined or null. Provide a string or array of messages.\",\n      );\n    }\n    if (Array.isArray(messages)) {\n      if (messages.length === 0) {\n        throw new Error(\n          \"messages array cannot be empty. Provide at least one message with non-empty content.\",\n        );","sourceCodeStart":708,"sourceCodeEnd":744,"githubUrl":"https://github.com/mem0ai/mem0/blob/001c235229be8795e3834520467bd0d661ed8f34/mem0-ts/src/oss/src/memory/index.ts#L708-L744","documentation":"Memory.add() rejects the timestamp option because temporal memory features are platform-only; when config.timestamp !== undefined the SDK fetches a notice id and throws a feature-gate message (which contains this base text) explaining the parameter is not supported by the OSS SDK. This prevents silently ignoring temporal data you intended to store.","triggerScenarios":"Calling memory.add(text, { timestamp: 1710000000 }) or { timestamp: new Date().toISOString() } on an OSS Memory instance — anything where the timestamp key is present and not undefined.","commonSituations":"Backfilling memories with historical event times, porting hosted-client code that supports timestamp, or adding createdAt-style metadata via the timestamp option in self-hosted deployments.","solutions":["Remove the timestamp option from add() calls; rely on the SDK's internal recording of when memories were created.","If you need custom temporal data self-hosted, store it in the memory's own content/metadata you control rather than the timestamp param.","Use the hosted MemoryClient (which accepts timestamp) if temporal memory is a requirement.","Check other temporal parameters in the same feature family before shipping — they are gated identically."],"exampleFix":"// before\nawait memory.add('moved to Berlin', { filters: { userId: 'u1' }, timestamp: 1672531200 }); // throws\n\n// after\nawait memory.add('moved to Berlin in Jan 2023', { filters: { userId: 'u1' } }); // time expressed in content","handlingStrategy":"validation","validationCode":"function stripUnsupportedOssOptions<T extends Record<string, any>>(options: T): T {\n  const { timestamp, ...rest } = options;\n  return rest as T; // OSS add() rejects timestamp\n}","typeGuard":"function hasOssUnsupportedTemporalParams(options: Record<string, unknown>): boolean {\n  return options?.timestamp !== undefined;\n}","tryCatchPattern":"try {\n  await memory.add(text, opts);\n} catch (err) {\n  if (err instanceof Error && /timestamp parameter is not supported by the OSS/.test(err.message)) {\n    const { timestamp, ...rest } = opts as any;\n    await memory.add(text, rest);\n    return;\n  }\n  throw err;\n}","preventionTips":["Don't port hosted-client option objects to OSS calls wholesale — strip platform params.","Encode temporal facts in memory content text when self-hosting.","Write one adapter layer that translates hosted options to OSS options for shared code."],"tags":["oss-sdk","platform-feature","temporal","timestamp","typescript"],"backgroundTag":null,"analyzedSha":"001c235229be8795e3834520467bd0d661ed8f34","analyzedAt":"2026-08-15T01:55:42.685Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}