1use thiserror::Error;
4
5#[derive(Error, Debug)]
7pub enum LLMError {
8 #[error("API error: {0}")]
10 ApiError(String),
11
12 #[error("Connection error: {0}")]
14 ConnectionError(String),
15
16 #[error("Authentication failed: {0}")]
18 AuthenticationError(String),
19
20 #[error("Rate limit exceeded: {0}")]
22 RateLimitError(String),
23
24 #[error("Empty response from LLM")]
26 EmptyResponse,
27
28 #[error("Invalid response format: {0}")]
30 InvalidResponse(String),
31
32 #[error("Request timed out")]
34 Timeout,
35
36 #[error("Model not found: {0}")]
38 ModelNotFound(String),
39
40 #[error("Configuration error: {0}")]
42 ConfigError(String),
43}