From c9c59709710948c327ec0fdc7234d575b746361b Mon Sep 17 00:00:00 2001 From: Sharang Parnerkar Date: Thu, 26 Feb 2026 21:11:12 +0100 Subject: [PATCH] fix(litellm): gate tests on server feature to fix cargo test --features web 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 cargo test --features web compiles without errors. 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::*;