use thiserror::Error;
#[derive(Debug, Error)]
pub enum LlmrixError {
#[error("HTTP transport error: {0}")]
Transport(#[from] reqwest::Error),
#[error("JSON error: {0}")]
Json(#[from] serde_json::Error),
#[error("API error {status}: {message}")]
Api {
status: u16,
message: String,
body: String,
},
#[error("Authentication error {status}: {message}")]
Auth { status: u16, message: String },
#[error("SSE stream error: {0}")]
Stream(String),
#[error("{0}")]
Other(String),
}
pub type Result<T> = std::result::Result<T, LlmrixError>;