Carmelo Campos
663ba82f00
fix(providers): honor configured fallbacks on "insufficient credits"
...
An OpenAI-compatible gateway can report exhausted credits as HTTP 400 with
the message "You have insufficient credits to make this request". The
arrearage marker lists cover "insufficient_quota", "insufficient balance"
and "out of credits", but not "insufficient credits", so
is_arrearage_response() returned False and _should_fallback() fell through
to its blanket HTTP-400 short-circuit. Configured fallbackModels were then
silently skipped and the raw provider error was returned to the user.
Add the missing phrasing to both the text-marker tuple and the structured
token frozenset. Arrearage detection already runs first inside
_should_fallback(), so recognizing the phrasing is enough to restore
failover; a plain malformed-request 400 keeps its existing non-fallback
behavior.
Refs #5967
2026-09-30 09:55:31 +08:00
..
2026-09-29 17:44:37 +08:00
2026-04-16 23:44:26 +08:00
2026-09-07 10:54:26 +08:00
2026-09-20 16:00:44 +08:00
2026-09-17 22:18:38 +08:00
2026-09-15 16:09:56 +08:00
2026-09-17 22:18:38 +08:00
2026-09-25 14:28:21 +08:00
2026-09-25 14:28:21 +08:00
2026-09-05 23:58:38 +08:00
2026-09-28 13:50:55 +08:00
2026-09-28 13:50:55 +08:00
2026-05-12 11:28:20 +08:00
2026-09-28 13:44:51 +08:00
2026-07-22 01:59:09 +08:00
2026-09-28 13:44:51 +08:00
2026-06-21 13:05:57 +08:00
2026-08-14 10:32:17 +08:00
2026-07-15 00:18:37 +08:00
2026-09-28 13:50:55 +08:00
2026-08-25 01:04:25 +08:00
2026-08-25 14:46:02 +08:00
2026-08-13 03:07:37 +09:00
2026-08-26 16:19:10 +08:00
2026-09-28 13:50:55 +08:00
2026-09-11 13:06:43 +08:00
2026-07-23 12:42:24 +08:00
2026-08-27 23:31:38 +08:00
2026-09-20 16:00:44 +08:00
2026-03-25 22:07:14 +08:00
2026-09-11 13:06:43 +08:00
2026-09-11 13:06:43 +08:00
2026-09-23 18:29:52 +08:00
2026-09-18 18:07:03 +08:00
2026-09-25 14:28:21 +08:00
2026-09-28 14:50:21 +08:00
2026-09-21 15:24:38 +08:00
2026-09-11 13:06:43 +08:00
2026-08-12 17:51:04 +08:00
2026-09-08 10:04:15 +08:00
2026-07-27 12:00:06 +08:00
2026-09-25 14:28:21 +08:00
2026-09-05 23:58:38 +08:00
2026-09-11 13:06:43 +08:00
2026-09-25 14:28:21 +08:00
2026-09-20 22:48:35 +08:00
2026-09-20 16:00:44 +08:00
2026-09-28 15:44:56 +08:00
2026-09-30 09:55:31 +08:00
2026-09-20 16:00:44 +08:00
2026-09-17 22:18:38 +08:00
2026-09-20 16:00:44 +08:00
2026-09-11 13:06:43 +08:00
2026-09-23 14:58:26 +08:00
2026-09-23 14:04:08 +08:00
2026-09-15 11:25:01 +08:00
2026-09-11 13:06:43 +08:00
2026-09-20 16:00:44 +08:00
2026-09-11 13:06:43 +08:00
2026-09-11 13:06:43 +08:00
2026-07-22 22:42:31 +08:00
2026-09-06 02:11:19 +08:00
2026-09-05 23:58:38 +08:00
2026-08-14 10:32:17 +08:00
2026-07-27 13:53:04 +08:00
2026-08-19 01:15:56 +08:00
2026-09-20 10:38:08 +08:00
2026-09-11 13:06:43 +08:00
2026-07-30 19:17:37 +08:00
2026-09-17 22:18:38 +08:00
2026-09-28 13:50:55 +08:00
2026-07-15 00:18:37 +08:00
2026-09-28 13:44:51 +08:00
2026-09-17 22:18:38 +08:00
2026-09-29 15:28:05 +08:00
2026-09-29 15:28:05 +08:00
2026-09-29 15:28:05 +08:00
2026-09-29 15:28:05 +08:00
2026-09-28 13:44:51 +08:00
2026-07-27 12:00:06 +08:00
2026-05-12 11:28:20 +08:00
2026-09-23 14:05:54 +08:00
2026-09-21 15:24:38 +08:00
2026-09-17 22:18:38 +08:00
2026-09-08 13:31:28 +08:00