1use crate::routing::reconciler::intent::RejectionReason;
4use thiserror::Error;
5
6#[derive(Debug, Error)]
8pub enum RoutingError {
9 #[error("Model '{model}' not found")]
11 ModelNotFound { model: String },
12
13 #[error("No healthy backend available for model '{model}'")]
15 NoHealthyBackend { model: String },
16
17 #[error("No backend supports required capabilities for model '{model}': {missing:?}")]
19 CapabilityMismatch { model: String, missing: Vec<String> },
20
21 #[error("All backends in fallback chain unavailable: {chain:?}")]
23 FallbackChainExhausted { chain: Vec<String> },
24
25 #[error("Request rejected by reconciliation pipeline")]
27 Reject {
28 rejection_reasons: Vec<RejectionReason>,
29 },
30
31 #[error("All backends at capacity, request queued")]
33 Queue {
34 reason: String,
35 estimated_wait_ms: u64,
36 },
37}