{"record":{"id":"b7a97cbcd7447757","repo":"mem0ai/mem0","slug":"the-referencedate-parameter-is-not-supported-by-th","errorCode":null,"errorMessage":"The referenceDate parameter is not supported by the OSS Memory SDK.","messagePattern":"The referenceDate 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":1336,"sourceCode":"\n    const result = {\n      ...memoryItem,\n      ...filters,\n      ...(memory.payload.attributedTo && {\n        attributedTo: memory.payload.attributedTo,\n      }),\n    };\n    await this._displayFirstRunNotice(\"get\");\n    return result;\n  }\n\n  async search(\n    query: string,\n    config: SearchMemoryOptions,\n  ): Promise<SearchResult> {\n    if (config?.referenceDate !== undefined) {\n      await this._getNoticeTelemetryId();\n      throw new Error(\n        await getTemporalFeatureErrorMessage(this, {\n          triggerFunction: \"search\",\n          triggerParameter: \"referenceDate\",\n        }),\n      );\n    }\n\n    const temporalUsageNotice = detectTemporalUsageFromSearch(\n      query,\n      config?.filters,\n    );\n\n    // Reject top-level entity params - must use filters instead\n    rejectTopLevelEntityParams(config as Record<string, any>, \"search\");\n\n    // Validate search parameters (before applying defaults)\n    validateSearchParams(config.threshold, config.topK);\n","sourceCodeStart":1318,"sourceCodeEnd":1354,"githubUrl":"https://github.com/mem0ai/mem0/blob/001c235229be8795e3834520467bd0d661ed8f34/mem0-ts/src/oss/src/memory/index.ts#L1318-L1354","documentation":"Thrown by Memory.search() when the config object includes referenceDate. The OSS TypeScript SDK does not implement temporal (time-travel) search; that parameter belongs to the hosted Mem0 platform API. The SDK detects the parameter, emits telemetry, and fails fast with a message built by getTemporalFeatureErrorMessage instead of silently ignoring the date.","triggerScenarios":"Calling memory.search('query', { filters: { user_id: 'u1' }, referenceDate: '2024-01-01' }) on an instance of the OSS Memory class from mem0-ts/src/oss — referenceDate !== undefined triggers it even if the value is null-ish, as long as the key is present with a non-undefined value.","commonSituations":"Porting code from the hosted platform (MemoryClient) to the self-hosted OSS SDK and keeping the temporal parameter; copying examples from platform docs into an OSS deployment.","solutions":["Remove referenceDate from the search config when using the OSS SDK","If time-travel search is required, use the hosted platform client (mem0ai npm client package) instead of the OSS Memory class","Approximate with custom metadata: store dated memories and filter with metadata conditions instead"],"exampleFix":"// before (platform API style)\nawait memory.search('trips', { filters: { user_id: 'u1' }, referenceDate: '2024-01-01' });\n\n// after (OSS SDK)\nawait memory.search('trips', { filters: { user_id: 'u1' } });","handlingStrategy":"validation","validationCode":"const { referenceDate, ...ossConfig } = config ?? {};\nif (referenceDate !== undefined) {\n  // temporal search not supported by the OSS SDK — strip it or switch clients\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Check which client you imported: hosted MemoryClient vs OSS Memory — their search() options differ","Build a thin wrapper around search() that rejects unsupported options per deployment type"],"tags":["oss","temporal","search","api-mismatch"],"backgroundTag":null,"analyzedSha":"001c235229be8795e3834520467bd0d661ed8f34","analyzedAt":"2026-08-15T01:55:42.685Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}