Skip to content

Commit e96be1a

Browse files
committed
fix(memory): use db.loadExtension() instead of sqliteVec.load() for node:sqlite compat
sqliteVec.load() is a better-sqlite3 API and is incompatible with the node:sqlite DatabaseSync used in 2026.4.26. Both code paths now use db.loadExtension(extensionPath) which node:sqlite supports. Fixes #74401
1 parent 587b537 commit e96be1a

1 file changed

Lines changed: 1 addition & 6 deletions

File tree

‎src/memory-host-sdk/host/sqlite-vec.ts‎

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import { normalizeOptionalString } from "../../shared/string-coerce.js";
44

55
type SqliteVecModule = {
66
getLoadablePath: () => string;
7-
load: (db: DatabaseSync) => void;
87
};
98

109
const SQLITE_VEC_MODULE_ID = "sqlite-vec";
@@ -25,11 +24,7 @@ export async function loadSqliteVecExtension(params: {
2524
const extensionPath = resolvedPath ?? sqliteVec.getLoadablePath();
2625

2726
params.db.enableLoadExtension(true);
28-
if (resolvedPath) {
29-
params.db.loadExtension(extensionPath);
30-
} else {
31-
sqliteVec.load(params.db);
32-
}
27+
params.db.loadExtension(extensionPath);
3328

3429
return { ok: true, extensionPath };
3530
} catch (err) {

0 commit comments

Comments
 (0)