# The AI feature returns errors (402, 429, 503) and the backup

**What you see:** AI calls fail with 402, 429 or 503, or are slow to answer.

**Why it happens:** 402: no credit or a spend cap. 429: too many requests. 503: the provider has no capacity right now.

## How to fix it

1. Check your balance and caps on the provider's website.
2. Ask your agent to confirm the fallback (Vercel AI Gateway) answers when the main provider refuses.

## Message for your agent

```text
My AI feature returns 402/429/503 errors. Check that we fall back to the Vercel AI Gateway on those codes with maxRetries 0 on Tokentide, honour Retry-After, and test the fallback.
```

**How to prevent it:** Test the fallback in a Preview before launch.

---
Source: [Agentic Makers](https://agenticmakers.app/en/help/ai-feature-errors) · License: CC BY 4.0
