Skip to content

OnnxProviderBootstrapOptions

Bootstrap options for the Web ONNX Runtime provider, for a developer-supplied local model.

Web only, like systemModel, and Mode 1 only.

Two caveats worth knowing before reaching for this. The consumer has to install the optional @huggingface/transformers peer dependency — this bridge does not declare it — and supply real model weights, because the web SDK’s runtime seam is a function and so cannot cross the JSON bridge hop: only the default Transformers.js runtime is reachable from here, never the fixture runtime the upstream demos use offline. A registered provider that cannot load turns a clean routing refusal into a provider error, so register it only when the weights are actually there.

optional id?: string


modelPackage: ModelPackage


optional timeoutMs?: number