fix(ai): detect context_length_exceeded overflow

This commit is contained in:
Mario Zechner 2026-01-08 03:16:59 +01:00
parent b1f32b9c8d
commit 946efe4b45
2 changed files with 3 additions and 1 deletions

View file

@ -32,7 +32,7 @@ const OVERFLOW_PATTERNS = [
/exceeds the limit of \d+/i, // GitHub Copilot
/exceeds the available context size/i, // llama.cpp server
/greater than the context length/i, // LM Studio
/context length exceeded/i, // Generic fallback
/context[_ ]length[_ ]exceeded/i, // Generic fallback
/too many tokens/i, // Generic fallback
/token limit exceeded/i, // Generic fallback
];