Skip to content

Commit 6f5b70e

Browse files
authored
tweak: add additional overflow error patterns (anomalyco#19446)
1 parent ff13524 commit 6f5b70e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

packages/opencode/src/provider/error.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ export namespace ProviderError {
2323
/request entity too large/i, // HTTP 413
2424
/context length is only \d+ tokens/i, // vLLM
2525
/input length.*exceeds.*context length/i, // vLLM
26+
/prompt too long; exceeded (?:max )?context length/i, // Ollama explicit overflow error
27+
/too large for model with \d+ maximum context length/i, // Mistral
28+
/model_context_window_exceeded/i, // z.ai non-standard finish_reason surfaced as error text
2629
]
2730

2831
function isOpenAiErrorRetryable(e: APICallError) {

0 commit comments

Comments
 (0)