fix(#2885): add model_not_supported to RETRYABLE error patterns

model_not_supported errors from providers (e.g. OpenAI returning
{"error": {"code": "model_not_supported"}}) were not recognized as
retryable. Subagents would silently fail with no response, hanging the
parent session.

Fix:
- Add "model_not_supported", "model not supported", "model is not
  supported" to RETRYABLE_MESSAGE_PATTERNS in model-error-classifier.ts
- Add regex patterns to RETRYABLE_ERROR_PATTERNS in
  runtime-fallback/constants.ts to match "model ... is ... not ...
  supported" with flexible spacing
- Add regression test covering all three variations

Now model_not_supported errors trigger the normal fallback chain instead
of silent failure.
This commit is contained in:
YeonGyu-Kim
2026-03-28 00:42:52 +09:00
parent 1434313bd7
commit c5068d37d2
3 changed files with 22 additions and 0 deletions
+2
View File
@@ -31,6 +31,8 @@ export const RETRYABLE_ERROR_PATTERNS = [
/cool(?:ing)?\s+down/i,
/exhausted\s+your\s+capacity/i,
/usage\s+limit\s+has\s+been\s+reached/i,
/model.{0,20}?not.{0,10}?supported/i,
/model_not_supported/i,
/service.?unavailable/i,
/overloaded/i,
/temporarily.?unavailable/i,