Skip to content

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.

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.py
index 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 json
from datetime import datetime
from unittest.mock import MagicMock, patch
+from uuid import uuid4
import 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 == 1
assert "error" in handler.requests[0]