use thiserror::Error;

pub type Result<T> = std::result::Result<T, ProviderError>;

#[derive(Error, Debug)]
pub enum ProviderError {
    #[error("HTTP request failed: {0}")]
    Http(#[from] reqwest::Error),

    #[error("LLM API request failed: {0}")]
    LlmApi(String),

    #[error("Failed to parse JSON response: {0}")]
    JsonParsing(#[from] serde_json::Error),

    #[error("Configuration error: {0}")]
    Configuration(String),

    // #[error("Persistence client error: {0}")]
    // Persistence(String),

    #[error(transparent)]
    Internal(#[from] anyhow::Error),
}
