use std::time::Duration;
#[derive(Debug, Clone, thiserror::Error)]
pub enum StreamingError {
#[error("Network error: {message}")]
NetworkError { message: String, is_retryable: bool },
#[error("API error ({status_code}): {message}")]
ApiError {
status_code: u16,
message: String,
is_retryable: bool,
},
#[error("Parse error: {message}")]
ParseError { message: String, raw_response: String },
#[error("Timeout during {operation} after {duration:?}")]
TimeoutError { operation: String, duration: Duration },
#[error("Content error: {message}")]
ContentError { message: String },
#[error("Streaming error: {message}")]
StreamingError {
message: String,
partial_content: Option<String>,
},
}