chore: Start summarizing at 80k tok instead of 100k (#604)

* chore: Start summarizing at 80k tok instead of 100k

* cr
This commit is contained in:
Brace Sproul 2025-07-30 10:13:21 -07:00 • committed by GitHub
parent f50c4ed124
commit 1b60509aac
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 9 deletions

View file

@ -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);
});
});

View file

@ -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[],