Repository navigation
Commit c298577
committed
fix: classify overloaded 429 responses as overloaded, not rate_limit
When a provider returns HTTP 429 with an overloaded body (e.g. z.ai
code 1305, 'temporarily overloaded'), the error was misclassified as
rate_limit because:
1. In classifyFailoverClassificationFromMessage: isRateLimitErrorMessage
matches the bare '429' pattern before isOverloadedErrorMessage runs.
2. In classifyFailoverClassificationFromHttpStatus: the 429 branch only
checks billing then defaults to rate_limit, unlike 503/499 which
check overloaded first.
Fix: reorder isOverloadedErrorMessage before isRateLimitErrorMessage in
the message classifier, and add an overloaded check in the 429 branch
of the status classifier (matching the existing 503/499 pattern).
Fixes #981011 parent 738b2be commit c298577
2 files changed
Lines changed: 31 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
809 | 809 | | |
810 | 810 | | |
811 | 811 | | |
| 812 | + | |
| 813 | + | |
| 814 | + | |
| 815 | + | |
| 816 | + | |
| 817 | + | |
| 818 | + | |
812 | 819 | | |
813 | 820 | | |
814 | 821 | | |
| |||
1052 | 1059 | | |
1053 | 1060 | | |
1054 | 1061 | | |
1055 | | - | |
1056 | | - | |
1057 | | - | |
1058 | 1062 | | |
1059 | 1063 | | |
1060 | 1064 | | |
| 1065 | + | |
| 1066 | + | |
| 1067 | + | |
1061 | 1068 | | |
1062 | 1069 | | |
1063 | 1070 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
210 | 210 | | |
211 | 211 | | |
212 | 212 | | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
0 commit comments