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
test: add missing type hints to FakeProvider in test_utils (#631)
marko1olo0d458e5d453b
diff --git a/tests/test_utils.py b/tests/test_utils.pyindex 7d78bb27d..ecf36f17f 100644--- a/tests/test_utils.py+++ b/tests/test_utils.py@@ -6,13 +6,13 @@ from headroom import utilsclass FakeProvider:- def __init__(self, result):+ def __init__(self, result: str | None) -> None:self.result = resultself.calls: list[tuple[int, int, str, int]] = []def estimate_cost(self, input_tokens: int, output_tokens: int, model: str, cached_tokens: int = 0- ):+ ) -> str | None:self.calls.append((input_tokens, output_tokens, model, cached_tokens))return self.result