Dashboardopencode-loreortNpmDualPlugin runtime shim

ortNpmDualPlugin runtime shim

Category: architecture
Confidence: 1.00
ID: 01a0a99a-1d03-78f8-8a52-c17652fcb2fd
Project ID: 6f4be9ff-ed84-4cca-a9e7-732a0b0b8677
Cross-project: No
Recalled in other projects: 0
Source session: 0IlNEZeIJziYPH1rR
Created: 2026-09-16 09:44:04
Updated: 2026-09-16 09:44:04

Content

Chose 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.

Move to: