fix (telemetry): stitch oss and platform telemetry identities for python and typescript sdk

Co-authored-by: Younes Slaoui <younes.slaoui@mem0.ai>
This commit is contained in:
Gabriel Stein
2026-05-05 13:48:21 -07:00
committed by GitHub
co-authored by Younes Slaoui
parent 0fdaa29b4a
commit a734e057cf
10 changed files with 1235 additions and 24 deletions
+7 -1
View File
@@ -53,6 +53,7 @@ import {
ScoredResult,
} from "../utils/scoring";
import { getDefaultVectorStoreDbPath } from "../utils/sqlite";
import { getOrCreateMem0UserId } from "../../../client/config";
// Entity params that must be passed via filters - check both snake_case and camelCase
const ENTITY_PARAMS = [
@@ -466,7 +467,12 @@ export class Memory {
this.telemetryId === "anonymous" ||
this.telemetryId === "anonymous-supabase"
) {
this.telemetryId = await this.vectorStore.getUserId();
this.telemetryId =
(await getOrCreateMem0UserId()) ||
(await this.vectorStore.getUserId());
try {
await this.vectorStore.setUserId(this.telemetryId);
} catch {}
}
return this.telemetryId;
} catch (error) {