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
Merge remote-tracking branch 'origin/main' into realign-F4-trust-forwarded-only-gateway
Tejas Chopra827461c59340
diff --cc headroom/proxy/handlers/anthropic.pyindex 477ec8c96,df05de481..3a1d1bebc--- a/headroom/proxy/handlers/anthropic.py+++ b/headroom/proxy/handlers/anthropic.py@@@ -24,8 -24,12 +24,13 @@@ if TYPE_CHECKINGimport httpxfrom headroom.pipeline import PipelineStage, summarize_routing_markers- from headroom.proxy.auth_mode import classify_auth_mode+ from headroom.proxy.auth_mode import classify_auth_mode, classify_client+from headroom.proxy.forwarded_headers import resolve_client_ip+ from headroom.proxy.compression_decision import CompressionDecision+ from headroom.proxy.helpers import extract_tags+ from headroom.proxy.memory_decision import MemoryDecision+ from headroom.proxy.memory_query import MemoryQuery+ from headroom.proxy.outcome import RequestOutcomelogger = logging.getLogger("headroom.proxy")