fix(v3): migration crashes + entity linking on OSS (#4836)

Co-authored-by: Soumil Rathi <soumilrathi@gmail.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
soumil-rathi
2026-04-15 14:46:28 +05:30
committed by GitHub
co-authored by Soumil Rathi Claude Opus 4.6
parent a5a688295e
commit d8d776636f
8 changed files with 90 additions and 69 deletions
+3 -6
View File
@@ -993,12 +993,9 @@ export class Memory {
createdAt: payload.createdAt,
updatedAt: payload.updatedAt,
score: scored.score,
metadata: {
...Object.entries(payload)
.filter(([key]) => !excludedKeys.has(key))
.reduce((acc, [key, value]) => ({ ...acc, [key]: value }), {}),
scoreBreakdown: scored.scoreBreakdown,
},
metadata: Object.entries(payload)
.filter(([key]) => !excludedKeys.has(key))
.reduce((acc, [key, value]) => ({ ...acc, [key]: value }), {}),
...(payload.user_id && { user_id: payload.user_id }),
...(payload.agent_id && { agent_id: payload.agent_id }),
...(payload.run_id && { run_id: payload.run_id }),
-10
View File
@@ -59,11 +59,6 @@ export function normalizeBm25(
export interface ScoredResult {
id: string;
score: number;
scoreBreakdown: {
semantic: number;
bm25: number;
entityBoost: number;
};
payload: Record<string, any>;
}
@@ -134,11 +129,6 @@ export function scoreAndRank(
scored.push({
id: memIdStr,
score: combined,
scoreBreakdown: {
semantic: semanticScore,
bm25: bm25Score,
entityBoost: entityBoost,
},
payload: result.payload,
});
}