Skip to content

The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]

test(rust): pin disk counter restart after a fractional value

Yujong Leecf8a21104836
diff --git a/litellm-rust/crates/cache-disk/tests/cache.rs b/litellm-rust/crates/cache-disk/tests/cache.rs
index 1e3e39db0c8..c6cd6006148 100644
--- a/litellm-rust/crates/cache-disk/tests/cache.rs
+++ b/litellm-rust/crates/cache-disk/tests/cache.rs
@@ -231,6 +231,12 @@ fn counters_use_atomic_native_values_and_ignore_invalid_initial_values() {
.unwrap(),
"real"
);
+ assert_eq!(
+ cache
+ .increment_cache("counter", 1.0, ExactCacheContext::default())
+ .unwrap(),
+ 1.0
+ );
}
#[test]