{"record":{"id":"39f2162295b1f071","repo":"can1357/oh-my-pi","slug":"no-stt-model-devices-configured","errorCode":null,"errorMessage":"No stt model devices configured","messagePattern":"No stt model devices configured","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/coding-agent/src/stt/asr-worker.ts","lineNumber":219,"sourceCode":"\t\tconst device = devices[i]!;\n\t\ttry {\n\t\t\treturn {\n\t\t\t\tpipeline: await loadPipelineOnDevice(transformers, spec, modelKey, transport, requestId, device),\n\t\t\t\tdevice,\n\t\t\t};\n\t\t} catch (error) {\n\t\t\tif (i === devices.length - 1) throw error;\n\t\t\tconst fallbackDevice = devices[i + 1]!;\n\t\t\tsendLog(transport, \"warn\", \"stt: accelerated device failed; falling back\", {\n\t\t\t\tmodelKey,\n\t\t\t\trepo: spec.repo,\n\t\t\t\tdevice,\n\t\t\t\tfallbackDevice,\n\t\t\t\terror: errorMessage(error),\n\t\t\t});\n\t\t}\n\t}\n\tthrow new Error(\"No stt model devices configured\");\n}\n\nasync function loadTransformersModel(\n\tspec: TransformersSttModelSpec,\n\tmodelKey: SttModelKey,\n\ttransport: SttTransport,\n\trequestId: string,\n): Promise<LoadedModel> {\n\tconst transformers = await loadTransformersRuntime(\n\t\ttransformersRuntime,\n\t\ttransport,\n\t\trequestId,\n\t\tmodelKey,\n\t\tgetSttRuntimeDir,\n\t);\n\tconst startedAt = performance.now();\n\tconst { pipeline, device } = await loadPipelineWithDeviceFallback(\n\t\ttransformers,","sourceCodeStart":201,"sourceCodeEnd":237,"githubUrl":"https://github.com/can1357/oh-my-pi/blob/969062200754ea02cfac922e5ebb8c608c079e15/packages/coding-agent/src/stt/asr-worker.ts#L201-L237","documentation":"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'.","triggerScenarios":"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.","commonSituations":"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.","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."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":"const devices = tinyModelDeviceLoadOrder(preference);\nif (devices.length === 0) throw new Error(\"no valid stt devices; check tiny-model device config\");","typeGuard":null,"tryCatchPattern":"try { const { pipeline, device } = await loadPipelineWithDeviceFallback(...); } catch (err) { // inspect logged per-device errors; surface guidance to fix drivers or force CPU }","preventionTips":["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."],"tags":["gpu","device","stt","onnx"],"backgroundTag":"no-backend-device-available","analyzedSha":"969062200754ea02cfac922e5ebb8c608c079e15","analyzedAt":"2026-08-31T10:29:35.737Z","schemaVersion":2},"datasetVersion":"2026-08-31T14:17:45.589Z"}