can1357/oh-my-pi · error · Error
No stt model devices configured
Error message
No stt model devices configured
What it means
When loading a transformers-engine STT model, loadPipelineWithDeviceFallback iterates tinyModelDeviceLoadOrder (the user's preferred device plus fallbacks such as webgpu/metal/cpu) and tries each; failures are logged per device. If every device in the load order fails, or the order itself is empty, it throws 'No stt model devices configured'.
Source
Thrown at packages/coding-agent/src/stt/asr-worker.ts:219
const device = devices[i]!;
try {
return {
pipeline: await loadPipelineOnDevice(transformers, spec, modelKey, transport, requestId, device),
device,
};
} catch (error) {
if (i === devices.length - 1) throw error;
const fallbackDevice = devices[i + 1]!;
sendLog(transport, "warn", "stt: accelerated device failed; falling back", {
modelKey,
repo: spec.repo,
device,
fallbackDevice,
error: errorMessage(error),
});
}
}
throw new Error("No stt model devices configured");
}
async function loadTransformersModel(
spec: TransformersSttModelSpec,
modelKey: SttModelKey,
transport: SttTransport,
requestId: string,
): Promise<LoadedModel> {
const transformers = await loadTransformersRuntime(
transformersRuntime,
transport,
requestId,
modelKey,
getSttRuntimeDir,
);
const startedAt = performance.now();
const { pipeline, device } = await loadPipelineWithDeviceFallback(
transformers,View on GitHub (pinned to 9690622007)
Solutions
- Check the per-device warn/error logs emitted before this throw to see why each device failed.
- Update GPU drivers / ensure WebGPU (browser-grade) or Metal support, or force device=cpu via the tiny-model device preference config.
- Clear the transformers model cache and retry in case a corrupted download caused each device load to fail.
- Update @huggingface/transformers and onnxruntime to compatible versions.
Defensive patterns
Strategy: fallback
Validate before calling
const devices = tinyModelDeviceLoadOrder(preference);
if (devices.length === 0) throw new Error("no valid stt devices; check tiny-model device config"); Try / catch
try { const { pipeline, device } = await loadPipelineWithDeviceFallback(...); } catch (err) { // inspect logged per-device errors; surface guidance to fix drivers or force CPU } Prevention
- Configure a device preference your hardware actually supports; 'cpu' is the safest.
- Check per-device warn logs emitted before this throw to diagnose GPU setup.
- Keep @huggingface/transformers and onnxruntime versions in sync with the GPU requirements.
When it happens
Trigger: Loading a transformers Whisper-tier model when every candidate device (GPU and CPU) fails to create the ASR pipeline, or when tinyModelDeviceLoadOrder returns an empty list for the resolved device preference.
Common situations: GPU runtime unavailable (missing WebGPU/Metal drivers) combined with a broken CPU fallback, an exotic device preference in config that yields no valid devices, or transformers.js unable to load the ONNX backend on any device.
Related errors
- No such device or address
- Unable to resolve ${SHERPA_PACKAGE} in compiled runtime at $
- Unknown stt model: ${modelKey}
- Failed to download speech model (${spec.repo})${detail}
- Speech model download finished without required files (${spe
AI-assisted analysis of can1357/oh-my-pi@9690622007 (2026-08-31).
Data as JSON: /api/errors/39f2162295b1f071.
Report an issue: GitHub.