Skip to content

Compress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agents, 60-95% fewer tokens for JSON, same answers. Library, proxy, MCP server.

feat: export CompressionCache from cache package

chopratejasc125939a9e3e
diff --git a/headroom/cache/__init__.py b/headroom/cache/__init__.py
index 65fa912fc..d92c16b47 100644
--- a/headroom/cache/__init__.py
+++ b/headroom/cache/__init__.py
@@ -36,6 +36,7 @@ from .base import (
CacheStrategy,
OptimizationContext,
)
+from .compression_cache import CompressionCache
from .dynamic_detector import (
DetectorConfig,
DynamicCategory,
@@ -74,6 +75,8 @@ __all__ = [
# Semantic caching
"SemanticCacheLayer",
"SemanticCache",
+ # Compression cache (token headroom mode)
+ "CompressionCache",
# Prefix cache tracking
"PrefixCacheTracker",
"PrefixFreezeConfig",