From 004ed83689eaf93836d674c6ade4aee437a97c5e Mon Sep 17 00:00:00 2001 From: diegosouzapw Date: Sat, 18 Apr 2026 00:06:10 -0300 Subject: [PATCH] test: fix integration tests resolving limits from CI environments --- tests/unit/chatcore-compression-integration.test.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/unit/chatcore-compression-integration.test.ts b/tests/unit/chatcore-compression-integration.test.ts index 66bccce02a..a34ee21408 100644 --- a/tests/unit/chatcore-compression-integration.test.ts +++ b/tests/unit/chatcore-compression-integration.test.ts @@ -7,7 +7,7 @@ test("chatCore integration: compressContext called proactively when context exce const provider = "openai"; const model = "gpt-4"; - const contextLimit = getTokenLimit(provider, model); + const contextLimit = 8192; // Hardcoded to 8192 to avoid DB dependency causing 128k evaluation const threshold = Math.floor(contextLimit * 0.85); const history = Array.from({ length: 24 }, (_, index) => [ @@ -53,7 +53,7 @@ test("chatCore integration: compressContext NOT called when context is below 85% const provider = "openai"; const model = "gpt-4"; - const contextLimit = getTokenLimit(provider, model); + const contextLimit = 8192; const threshold = Math.floor(contextLimit * 0.85); const smallMessage = "Hello, how are you?"; @@ -82,7 +82,7 @@ test("chatCore integration: compression preserves message structure", async () = const provider = "claude"; const model = "claude-sonnet-4"; - const contextLimit = getTokenLimit(provider, model); + const contextLimit = 200000; const body = { model, @@ -115,7 +115,7 @@ test("chatCore integration: compression handles tool messages", async () => { const provider = "openai"; const model = "gpt-4"; - const contextLimit = getTokenLimit(provider, model); + const contextLimit = 8192; const longToolOutput = "x".repeat(50000); const body = {