tweak: add additional overflow error patterns (#19446)

pull/19457/head
Aiden Cline 2026-03-27 15:19:51 -05:00 committed by GitHub
parent ff13524a53
commit 6f5b70e681
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 0 deletions

View File

@ -23,6 +23,9 @@ export namespace ProviderError {
/request entity too large/i, // HTTP 413
/context length is only \d+ tokens/i, // vLLM
/input length.*exceeds.*context length/i, // vLLM
/prompt too long; exceeded (?:max )?context length/i, // Ollama explicit overflow error
/too large for model with \d+ maximum context length/i, // Mistral
/model_context_window_exceeded/i, // z.ai non-standard finish_reason surfaced as error text
]
function isOpenAiErrorRetryable(e: APICallError) {