fix(agents): detect Kimi model-token-limit overflows

Co-authored-by: Danilo Falcão <danilo@falcao.org>
This commit is contained in:
Peter Steinberger
2026-02-23 05:15:55 +01:00
parent 3640484e28
commit 9bd04849ed
4 changed files with 19 additions and 0 deletions

View File

@@ -51,6 +51,7 @@ export function isContextOverflowError(errorMessage?: string): boolean {
lower.includes("maximum context length") ||
lower.includes("prompt is too long") ||
lower.includes("exceeds model context window") ||
lower.includes("model token limit") ||
(hasRequestSizeExceeds && hasContextWindow) ||
lower.includes("context overflow:") ||
(lower.includes("413") && lower.includes("too large"))