Document retry_on_message_patterns option

This commit is contained in:
zengxiaolou
2026-03-10 20:25:01 +08:00
parent 4abbd1fc14
commit b8c16ac070
+2
View File
@@ -566,6 +566,7 @@ Auto-switches to backup models on API errors.
"runtime_fallback": {
"enabled": true,
"retry_on_errors": [400, 429, 503, 529],
"retry_on_message_patterns": ["no\\s+available\\s+accounts?"],
"max_fallback_attempts": 3,
"cooldown_seconds": 60,
"timeout_seconds": 30,
@@ -578,6 +579,7 @@ Auto-switches to backup models on API errors.
| ----------------------- | ------------------- | ------------------------------------------------------------------------------------------------------------------------------ |
| `enabled` | `false` | Enable runtime fallback |
| `retry_on_errors` | `[400,429,503,529]` | HTTP codes that trigger fallback. Also handles classified provider key errors. |
| `retry_on_message_patterns` | `[]` | Regex pattern strings matched against provider messages. Use this for provider-specific retry text that does not include status codes. |
| `max_fallback_attempts` | `3` | Max fallback attempts per session (120) |
| `cooldown_seconds` | `60` | Seconds before retrying a failed model |
| `timeout_seconds` | `30` | Seconds before forcing next fallback. **Set to `0` to disable timeout-based escalation and provider retry message detection.** |