spec_drift/llm/null.rs
1use super::{LlmClient, LlmVerdict};
2
3/// LLM client that always returns `None`. Used whenever the `[llm]` block is
4/// disabled, `--no-llm` is set, or a real provider isn't configured. Making
5/// the disabled-by-default path a first-class implementation means analyzers
6/// never need a `if let Some(client) = ...` branch.
7pub struct NullLlmClient;
8
9impl LlmClient for NullLlmClient {
10 fn evaluate(&self, _system_prompt: &str, _user_prompt: &str) -> Option<LlmVerdict> {
11 None
12 }
13}
14
15#[cfg(test)]
16mod tests {
17 use super::*;
18
19 #[test]
20 fn always_returns_none() {
21 assert!(NullLlmClient.evaluate("x", "y").is_none());
22 }
23}