Dashboard › opencode-lore › ortNpmDualPlugin runtime shim
01a0a99a-1d03-78f8-8a52-c17652fcb2fdChose ortNpmDualPlugin’s native-or-web onnxruntime-node shim over the SEA throwing-binding patch because transformers eagerly imports onnxruntime-node, whose module initialization calls listSupportedBackends(). The shim keeps transformers on its Node CPU branch, loads real native ORT only when __LORE_ORT_BINDING_PATH__ exists, and otherwise exports bundled onnxruntime-web. Guarded regex patches for ORT binding.js and transformers CDN wasmPaths must fail the build when upstream shapes change rather than silently ship a broken loader.