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 test_on_llm_error to pass required run_id argument
chopratejas8c0da95f58ec
diff --git a/tests/test_integrations/langchain/test_chat_model.py b/tests/test_integrations/langchain/test_chat_model.pyindex 987bd78be..f8277f6f9 100644--- a/tests/test_integrations/langchain/test_chat_model.py+++ b/tests/test_integrations/langchain/test_chat_model.py@@ -10,6 +10,7 @@ Tests cover:import jsonfrom datetime import datetimefrom unittest.mock import MagicMock, patch+from uuid import uuid4import pytest@@ -379,7 +380,7 @@ class TestHeadroomCallbackHandler:handler = HeadroomCallbackHandler()handler._current_request = {"start_time": datetime.now()}- handler.on_llm_error(ValueError("Test error"))+ handler.on_llm_error(ValueError("Test error"), run_id=uuid4())assert handler.total_requests == 1assert "error" in handler.requests[0]