From 8aa7c4c33c75baf03af65095f23ba3458fc79b1c Mon Sep 17 00:00:00 2001 From: Sharang Parnerkar Date: Thu, 26 Feb 2026 19:25:57 +0100 Subject: [PATCH] fix(litellm): gate tests on server feature to fix bare cargo test The litellm test module uses server-only structs (ActivityModelEntry, SpendModelEntry) that are behind #[cfg(feature = "server")]. Gate the test module with #[cfg(all(test, feature = "server"))] so bare cargo test (without --features server) compiles. Co-Authored-By: Claude Opus 4.6 --- src/infrastructure/litellm.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/infrastructure/litellm.rs b/src/infrastructure/litellm.rs index af367b1..622ac20 100644 --- a/src/infrastructure/litellm.rs +++ b/src/infrastructure/litellm.rs @@ -292,7 +292,7 @@ pub async fn get_litellm_usage( }) } -#[cfg(test)] +#[cfg(all(test, feature = "server"))] mod tests { use super::*;