https://discord.gg/botpress logo
Intermittent Gemini API HTTP tool failures in Botp...
# šŸ¤help
w
Hi everyone! I’m building a Telegram bot in Botpress Vibe that identifies mushrooms from photos using Google Gemini 3.1 Flash-Lite via a custom HTTP tool. The problem: The integration works intermittently. • At 23:49 on November 3, the tool successfully analyzed a Telegram photo. • At 23:52, the same photo triggered three failed HTTP tool calls. • Botpress Logs show execution_error, Tool: http_uzhojl — failed, and an internal agent runtime error. • The Gemini API works when tested directly with curl (HTTP 200). • I’m using Botpress Free and the Gemini API free tier. My questions: 1. How can I see the actual HTTP status code and error response for a failed tool call? 2. Could this be caused by image URL accessibility, the HTTP tool, or Gemini API errors? 3. What is the recommended way to handle intermittent HTTP failures? I’ve attached screenshots of the logs. Thank you for your help!
n
Hi @white-journalist-83385 Your logs point to Gemini rejecting some calls rather than a Botpress bug. The failures ended in 4-5 s while the success ran for 19 s, which usually means free-tier rate limits (429) or overload (503). The image URL format is the other suspect. To see the real error, open the full Trace for the turn, or have the tool return the status and body instead of throwing. Then check Google AI Studio's metrics for 23:52. The lasting fix is retries with backoff on 429/5xx, capped agent retries (yours looped 3 times, costing tokens), and a friendly fallback message. I've set this up on similar bots and can sort yours quickly. DM me your tool config (key removed) and the failed trace, and I'll tell you the exact cause and fix. Happy to implement it for you too.