Dashboard › opencode-lore › Distillation
4986ed21-1df5-438f-9a75-0dd65e14b47c["lore_tm_v1_dWskjr_slgEzdBJQTva4fsiBzIs_RV2tb0deFzUyVmY","lore_tm_v1_110QWEf44pQ59k3co__g_p0Jhf-FAgKaPXgn-Z6TcAk","lore_tm_v1_P2KIDtWZL4_YaxSCpHuiUnuI8NNa1R3D-4rCkRbzI_4","lore_tm_v1__KbwRsgd7vtGxLqtCQ65F95FNrckmFXu78h8M8nJ0xo","lore_tm_v1_cimNk7MB8JGoYFBtY2sjeOgH8q7W684ysaVUlr4SovY","lore_tm_v1_aDQ3mOF6KbjedLSGyHkW1U0ia4gYzBN_RdPItXDbGTc","lore_tm_v1_1cUPRJRWYPF79Bf2A3Q8j5VhGHtuMEpEqgvIgWcNoY0","lore_tm_v1_OgV0eXirFHWdPrm9fmWBZ6XZRxhj6YH0p5bqALaazYw"]
Date: Sep 16, 2026
vendorModel, native-binding, development, and test paths remain native.packages/core/src/embedding-worker.ts initialization behavior: native ONNX load failure on a non-vendored model posts { type: "init-needs-wasm", error: msg }, sets wasmRespawnRequested = true, and requests a fresh WASM worker; it does not post init-error for that recoverable transition.packages/core/src/embedding-worker.ts corrupt-model recovery distinguishes three paths: 1. structurally intact model plus native binding requests a fresh WASM respawn; 2. structurally intact model already using WASM retries loadPipeline() once without purging; 3. model failing integrity checks calls purgeCachedModel() and, if purged, retries download/load once. Final failures set initFailed, preserve initError, clear initPromise, and post init-error.ensurePipeline() rejects the triggering request with "embedding worker awaiting WASM respawn" after a WASM respawn request so the request settles without generating a duplicate init-error; if initialization completes without a pipeline for any other reason, it throws "pipeline init completed but pipe is null".packages/gateway/test/bundle-exports.test.ts checks both embedding-worker.cjs and embedding-worker.js for the native ORT compatibility resolver: bundles must omit LORE_ORT_NODE_VERSION and contain loreOrtNodeVersion, glibcVersionRuntime, and the gateway’s declared onnxruntime-node version.linux-x64, linux-arm64, darwin-arm64, win32-x64, and win32-arm64: an intercepted onnxruntime_binding.node load throwing "file too short" must yield init-needs-wasm; a malformed native-addon file must be rejected before process.dlopen, after which the WASM probe failure yields init-error containing "lore-wasm-probe-stop".isMissingLocalStackError() to ensure unrelated resolution failures, such as a missing model file, are “never misclassified” as a missing local ML stack.packages/core/src/embedding-worker-types.ts defines isMissingLocalStackError(msg) as requiring both a module-resolution signature (ERR_MODULE_NOT_FOUND, Cannot find module/package, or Could not locate the bindings file) and a reference to @huggingface/transformers, onnxruntime, or sharp.isNativeOrtLoadError(msg) requires both a native-runtime identifier (onnxruntime_binding.node, an ONNX Runtime .so/.dylib/.dll, or OrtGetApiBase) and a loader-failure signature such as ERR_DLOPEN_FAILED, invalid ELF/Mach-O/Win32, file too short, missing shared object/image/module, undefined/missing symbol, or dlopen.shouldRequestWasmRespawn(usedNative, isVendored, errorMessage, fileLooksIntact) returns true only when native was used, the model is not vendored, the file looks intact, and isCorruptModelError(errorMessage) is true; its canonical case is Bun plus npm onnxruntime-node failing InferenceSession.create() with "protobuf parsing failed" on an intact approximately 137 MB model.shouldPostPerRequestError(initFailed, wasmRespawnRequested) returns !initFailed && !wasmRespawnRequested, preventing duplicate reporting after init-error and preventing loss of an embed request that respawnForWasm() will resubmit.resolveNativeOrtBindingPath() to return null and “never throws when native packages are absent.”onnxruntime-node package is eligible only when the nested @loreai/gateway manifest directly declares the dependency.packages/core/test/ort-native.test.ts verifies native resolver boundaries: exact direct and declared hoisted workspace dependencies may resolve; an undeclared ancestor workspace package returns null; package symlinks escaping the declared package are rejected; and files lacking the platform’s native binary format are rejected.nativeIntraOpThreads() leaves ONNX Runtime defaults untouched on unconstrained hosts, caps cgroup-limited parallelism (2/8 → 2, 1/16 → 1), floors fractional values (2.9 → 2), clamps 0, NaN, and -4 to 1, and by default must never throw or return anything except undefined or an integer of at least 1.