{"record":{"id":"043e5ad8eea926ff","repo":"cjpais/Handy","slug":"failed-to-load-canary-model","errorCode":null,"errorMessage":"Failed to load canary model {}: {}","messagePattern":"Failed to load canary model (.+?): (.+?)","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"src-tauri/src/managers/transcription.rs","lineNumber":696,"sourceCode":"                            format!(\"Failed to load SenseVoice model {}: {}\", model_id, e);\n                        emit_loading_failed(&error_msg);\n                        anyhow::anyhow!(error_msg)\n                    })?;\n                LoadedEngine::SenseVoice(engine)\n            }\n            EngineType::GigaAM => {\n                let engine = GigaAMModel::load(&model_path, &Quantization::Int8).map_err(|e| {\n                    let error_msg = format!(\"Failed to load gigaam model {}: {}\", model_id, e);\n                    emit_loading_failed(&error_msg);\n                    anyhow::anyhow!(error_msg)\n                })?;\n                LoadedEngine::GigaAM(engine)\n            }\n            EngineType::Canary => {\n                let engine = CanaryModel::load(&model_path, &Quantization::Int8).map_err(|e| {\n                    let error_msg = format!(\"Failed to load canary model {}: {}\", model_id, e);\n                    emit_loading_failed(&error_msg);\n                    anyhow::anyhow!(error_msg)\n                })?;\n                LoadedEngine::Canary(engine)\n            }\n            EngineType::Cohere => {\n                let engine = CohereModel::load(&model_path, &Quantization::Int8).map_err(|e| {\n                    let error_msg = format!(\"Failed to load cohere model {}: {}\", model_id, e);\n                    emit_loading_failed(&error_msg);\n                    anyhow::anyhow!(error_msg)\n                })?;\n                LoadedEngine::Cohere(engine)\n            }\n        };\n\n        // Update the current engine and model ID\n        {\n            let mut engine = self.lock_engine();\n            *engine = Some(loaded_engine);\n        }","sourceCodeStart":678,"sourceCodeEnd":714,"githubUrl":"https://github.com/cjpais/Handy/blob/ba10ce1943ef34e93c09494027fc0b9ced2e8a44/src-tauri/src/managers/transcription.rs#L678-L714","documentation":"Thrown when CanaryModel::load fails to load the Canary ONNX model (Int8 quantization) from model_path. As with the other ONNX engines, the underlying error is chained after the model_id and a \"loading_failed\" model-state event reaches the frontend.","triggerScenarios":"EngineType::Canary branch executes CanaryModel::load(&model_path, &Quantization::Int8) and ONNX Runtime returns an error: missing/truncated files, wrong quantization variant present, or session creation failure on the configured provider.","commonSituations":"Interrupted download; large model hitting disk-space limits mid-write; provider (e.g. CoreML/DirectML/CUDA) unavailable on the machine; app update changed model packaging.","solutions":["Re-download the Canary model","Verify sufficient disk space and that the Int8 files are complete","Check the chained error for provider names; switch ONNX accelerator to CPU and retry","Temporarily select a Whisper model to verify the rest of the pipeline works"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"if let Err(e) = manager.load_model(&model_id, None) {\n    // error text already reached the frontend via loading_failed; decide retry vs fallback engine here\n    log::error!(\"canary load failed: {e:#}\");\n}","preventionTips":["Ensure enough free disk space for the quantized model before downloading","Do not mix model files across app versions","Surface loading_failed events to the user immediately"],"tags":["rust","onnx","canary","model-loading","transcribe-rs"],"backgroundTag":"onnx-model-load-failed","analyzedSha":"ba10ce1943ef34e93c09494027fc0b9ced2e8a44","analyzedAt":"2026-08-17T10:29:55.597Z","contentChangedAt":"2026-08-17T10:29:55.597Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}