fix(model-error-classifier): scope forbidden-provider retry to specific phrase
Bare "403" and "forbidden" substring patterns (added in 034744cb to
retry the "Selected provider is forbidden" case from PR #3706) matched
any error message containing those tokens — tool-level 403s, file-perm
"forbidden" messages, unrelated upstream errors that happened to spell
"forbidden". The legacy model-fallback path then armed setPendingModelFallback
on those unrelated errors, jumping Sisyphus to claude-opus-4-7 (first
entry of its fallback chain) regardless of the user's configured model.
Replace the bare patterns with the specific phrases PR #3706 actually
targeted, and add regression tests asserting unrelated 403/forbidden
messages stay non-retryable.
Reported-by: ilove_borshch on Discord (#omo-help)
This commit is contained in:
@@ -72,8 +72,8 @@ const RETRYABLE_MESSAGE_PATTERNS = [
|
||||
"504",
|
||||
"429",
|
||||
"529",
|
||||
"403",
|
||||
"forbidden",
|
||||
"selected provider is forbidden",
|
||||
"provider is forbidden",
|
||||
]
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user