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.
Python agentaianthropicclaude-codecompressioncontext-engineeringcontext-windowcursorfastapilangchainllmmcpopenaiprompt-engineeringproxypythonragtoken-optimizationtokenstypescript
style: fix ruff format in server.py
chopratejas80bfb04dddad
diff --git a/headroom/proxy/server.py b/headroom/proxy/server.pyindex 400e0da0a..e22c32b29 100644--- a/headroom/proxy/server.py+++ b/headroom/proxy/server.py@@ -2411,8 +2411,10 @@ class HeadroomProxy:# Hook: pre_compress — let hooks modify messages before compressionfrom headroom.transforms.query_echo import extract_user_query+if self.config.hooks:from headroom.hooks import CompressContext+_hook_ctx = CompressContext(model=model,user_query=extract_user_query(messages),