fix: prevent false positive context overflow detection in conversation text (#2078)

This commit is contained in:
Stephen Brian King
2026-02-09 00:22:57 -07:00
committed by GitHub
parent 71b4be8799
commit c984e6d8df
4 changed files with 20 additions and 7 deletions

View File

@@ -24,7 +24,7 @@ export function isContextOverflowError(errorMessage?: string): boolean {
lower.includes("prompt is too long") ||
lower.includes("exceeds model context window") ||
(hasRequestSizeExceeds && hasContextWindow) ||
lower.includes("context overflow") ||
lower.includes("context overflow:") ||
(lower.includes("413") && lower.includes("too large"))
);
}