Despite having set up fallback for the model with this configuration:
"models": {
"google-vertex/gemini-3-flash-preview": {"alias": "flash3"},
"google-vertex/gemini-2.5-flash": {"alias": "flash2"}
},
"model": {
"primary": "google-vertex/gemini-2.5-flash",
"fallbacks": [
"google-vertex/gemini-3-flash-preview"
]
}
I am still getting random failures and responses from my agent over telegram saying:
⚠️ API provider returned a billing error — your API key has run out of credits or has an insufficient balance. Check your provider's billing dashboard and top up or switch to a different API key.
How can I configure the agent to better handle this error conditions to retry?
NOTE: The API KEY has NOT run out of credits or insufficient balance. Subsequent messages are handled correctly.