Skip to content

YC (S26) | Open Computer History | Continuously record your company computer work, map your workflows, help you find work worth automating, and power your agents' context

fix: update pi test to match intentional screenpipe provider exclusion

Louis Beaumont587237a0dfaf
diff --git a/crates/screenpipe-core/src/agents/pi.rs b/crates/screenpipe-core/src/agents/pi.rs
index 19dc625f7..671b123c5 100644
--- a/crates/screenpipe-core/src/agents/pi.rs
+++ b/crates/screenpipe-core/src/agents/pi.rs
@@ -1057,10 +1057,11 @@ mod tests {
let providers = config.get("providers").unwrap().as_object().unwrap();
- // Should have both screenpipe and ollama providers
+ // When a non-screenpipe provider is explicitly set, screenpipe provider
+ // is intentionally NOT added (to avoid silent credit drain via fallback).
assert!(
- providers.contains_key("screenpipe"),
- "missing screenpipe provider"
+ !providers.contains_key("screenpipe"),
+ "screenpipe provider should NOT be added when ollama is explicitly chosen"
);
assert!(providers.contains_key("ollama"), "missing ollama provider");