Skip to content

~95% on SimpleQA (e.g. Qwen3.6-27B on a 3090). Supports all local and cloud LLMs (llama.cpp, Ollama, Google, ...). 10+ search engines - arXiv, PubMed, your private documents. Everything Local & Encrypted.

fix(tests): align missed truncation_ratio assertion in tests/test_token_counter_coverage.py (#3845)

LearningCircuit5d8178ba8102
diff --git a/tests/test_token_counter_coverage.py b/tests/test_token_counter_coverage.py
index 000c72a34b..d4f45dda45 100644
--- a/tests/test_token_counter_coverage.py
+++ b/tests/test_token_counter_coverage.py
@@ -479,7 +479,7 @@ class TestContextOverflowDetection:
assert cb.context_truncated is True
assert cb.tokens_truncated == 40 # 1000 - 960
- assert cb.truncation_ratio == pytest.approx(0.0417, abs=0.001)
+ assert cb.truncation_ratio == pytest.approx(0.04, abs=0.001) # 40/1000
def test_context_not_truncated_when_below_threshold(self):
cb = _make_callback(research_context={"context_limit": 1000})