Files
nanobot/nanobot
nanobot-contributorandXubin Ren c2c47f7a03 fix(fallback): treat empty API choices as fallbackable error
When the primary model (e.g. DeepSeek during peak hours) returns an empty
choices response with HTTP 200, the error carries no status code or
structured error metadata. The existing _FALLBACK_ERROR_TOKENS had no
matching token, so _should_fallback() returned False and fallback models
were never tried.

Changes:
- Add 'empty' token to _FALLBACK_ERROR_TOKENS so 'Error: API returned
  empty choices.' text matches the fallback path
- Set error_kind='empty' in openai_compat_provider when returning
  the empty-choices error, making the classification explicit
- Add test coverage for both text-only and error_kind matching paths

Fixes: glebov reported primary never falls back when DeepSeek returns
       empty responses
2026-06-19 14:59:44 +08:00
..
2026-06-13 21:59:36 +08:00
2026-06-18 22:38:06 +08:00
2026-06-18 00:03:13 +08:00
2026-02-01 07:36:42 +00:00