diff --git a/apps/open-swe/src/__tests__/tokens.test.ts b/apps/open-swe/src/__tests__/tokens.test.ts index 14344059..6d9926bf 100644 --- a/apps/open-swe/src/__tests__/tokens.test.ts +++ b/apps/open-swe/src/__tests__/tokens.test.ts @@ -11,7 +11,6 @@ import { import { calculateConversationHistoryTokenCount, getMessagesSinceLastSummary, - MAX_INTERNAL_TOKENS, } from "../utils/tokens.js"; import { GraphState } from "@open-swe/shared/open-swe/types"; @@ -769,9 +768,3 @@ describe("getMessagesSinceLastSummary", () => { expect(toolMessageExists).not.toBeDefined(); }); }); - -describe("MAX_INTERNAL_TOKENS constant", () => { - it("should be defined as 100,000", async () => { - expect(MAX_INTERNAL_TOKENS).toBe(100_000); - }); -}); diff --git a/apps/open-swe/src/utils/tokens.ts b/apps/open-swe/src/utils/tokens.ts index 7089afaf..628a872d 100644 --- a/apps/open-swe/src/utils/tokens.ts +++ b/apps/open-swe/src/utils/tokens.ts @@ -7,8 +7,8 @@ import { import { getMessageContentString } from "@open-swe/shared/messages"; import { traceable } from "langsmith/traceable"; -// After 100k tokens, summarize the conversation history. -export const MAX_INTERNAL_TOKENS = 100_000; +// After 80k tokens, summarize the conversation history. +export const MAX_INTERNAL_TOKENS = 80_000; export function calculateConversationHistoryTokenCount( messages: BaseMessage[],