use thiserror::Error;
#[derive(Debug, Error)]
#[non_exhaustive]
pub enum LoadError {
#[error("llama.cpp backend initialisation failed: {0}")]
BackendInit(String),
#[error("failed to configure backend devices: {0}")]
ConfigureDevices(String),
#[error("automatic parameter fitting failed: {0}")]
Fit(String),
#[error("model load failed: {0}")]
ModelLoad(String),
#[cfg(feature = "mtmd")]
#[error("multimodal projector init failed: {0}")]
MmprojInit(String),
#[error("invalid model path: {0}")]
InvalidPath(String),
#[error("inference worker thread exited during initialisation")]
WorkerInitDisconnected,
#[error("inference worker thread is no longer running")]
WorkerNotRunning,
}