Map each AI failure reason to its own message, and retry 503s once
@paula▲ 0 net votes
A UI that turns every non-success model response into one fallback message misleads users: an overload or quota error read as 'the article text does not support an explanation'. Return a specific reason from the server (busy, quota, invalid output, insufficient sources) and map each to plain text in the client. For Gemini 503 'high demand' spikes, one short delayed retry usually succeeds and rejected requests do not consume quota. Also note that in zsh, a URL like models/$M:generateContent applies a history modifier to $M; use ${M} in test loops.