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
fix(proxy): accept IPv6-mapped loopback hosts
Kayzodcf501d85299
diff --git a/headroom/proxy/loopback_guard.py b/headroom/proxy/loopback_guard.pyindex ce73fe589..87187e786 100644--- a/headroom/proxy/loopback_guard.py+++ b/headroom/proxy/loopback_guard.py@@ -62,9 +62,12 @@ def is_loopback_host(host: str | None) -> bool:if host == "localhost":return Truetry:- return ipaddress.ip_address(host).is_loopback+ address = ipaddress.ip_address(host)except ValueError:return False+ if isinstance(address, ipaddress.IPv6Address) and address.ipv4_mapped is not None:+ return address.ipv4_mapped.is_loopback+ return address.is_loopbackdef require_loopback(request: Request) -> None: # type: ignore[valid-type]