Files
Minecraft-Server/bot/bot.ts
Paul Kloppers 633a4443c2 ux(redstone): surface AI provider failure instead of silent drop
When both OpenRouter AND Gemini return null (no key / 429 / 503 / network)
and no tool ran during the turn, the handler used to silently return,
leaving the user staring at their unanswered message wondering if the
bot was broken. Real cause is usually the daily free-tier rate-limit
exhausting + Gemini's intermittent 503s lining up.

Now post a one-liner reply explaining:
  "🤖 AI is unreachable right now — both OpenRouter and Gemini just
  declined. Usually the free-tier daily cap resetting around UTC
  midnight. Try again in a few minutes, or use /model to pick a
  different model."

Only fires when ranTool is false — if the model successfully called
a tool earlier in the turn (image already sent, message posted, etc.)
the user has already seen something visible and we keep the silent
return for that case.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-14 00:08:23 +02:00

83 KiB