What the 429 tells you, and what this article could confirm
A 429 with a resource-exhausted status means a request was refused because some capacity limit was reached. It does not say which limit, and on Vertex AI the answer depends on how you buy capacity. Google documents the error on its own page1, the limits on a quotas page2, reserved capacity on a Provisioned Throughput overview3 and retry behavior on a retry strategy page4. The pages now sit under the "Gemini Enterprise Agent Platform" name, and the older Vertex AI URLs redirect to them.
A note on evidence. When these pages were fetched for this article, the Google Cloud ones returned navigation text but not their body. So this guide does not quote Google's exact error strings, quota numbers or retry parameters. Where it describes how to respond, that is engineering reasoning, labelled as such, and the numbers are yours to take from the live pages. The Gemini API's rate-limits page did return in full, so claims about that API are sourced.
The point of the article stands without the strings: read the body of the 429, work out which of the two situations below you are in, and respond to that one.
Cause one: pay-as-you-go, where the pool is shared
On pay-as-you-go you pay per token and you have no reserved capacity. A 429 there means one of two things: your project hit a quota that applies to it, or the shared capacity behind the model was short at that moment. The quotas page is where Google lists the limits that apply2. What you can do about each differs.
- A quota you hit. Your traffic is above a per-project limit. The fix is a quota increase request, lower concurrency, or a second place to send the overflow.
- Shared capacity under pressure. Your usage is under every limit you know of and you still get refused. Nothing in your project is wrong. The request will often succeed a moment later, so the right response is a short, jittered retry, then somewhere else.
Both look identical from the client. That is why the first step is logging the response body and the model, region and project on every 429, so you can later split them in the request log.
Cause two: Provisioned Throughput, where the allocation is full
Provisioned Throughput is the way to reserve capacity for a model on Vertex AI instead of drawing on the shared pool; Google describes it on its Provisioned Throughput overview page3. The commercial terms (what you commit to, for how long, and how it is measured) are on that page and change over time, so confirm them there before you size an order. The operational idea is what matters for a 429: you have bought a fixed amount of throughput, and requests beyond it are no longer the same problem as shared-pool pressure.
That changes the diagnosis. If you hold an allocation and see 429s, the likely causes are:
- Steady traffic above the order. Retrying does nothing, because the allocation is simply full.
- Bursts above the order. Peaks exceed what you reserved even though the average fits.
- Traffic not tied to the allocation. Requests for a model or region the order does not cover are served from the pay-as-you-go path and meet its limits.
The mitigation is therefore about sizing and spillover, not backoff. Look at your peak token and request rate against the order, decide whether to raise it, and decide where the excess goes. A rule of thumb from engineering, not from Google: send a reserved-capacity endpoint only the traffic you have sized it for, and give everything else an explicit second path. For the cost side of that decision, see Provisioned throughput vs pay-as-you-go: when reserved capacity pays.
Telling the two apart in your logs
You do not need to guess. Record four fields on every refused request and the split falls out of the data.
| Field | Pay-as-you-go signal | Provisioned Throughput signal |
|---|---|---|
| Response body | Names a quota or generic shared-capacity pressure | Refers to the reserved allocation |
| Rate vs your limit | Often below every limit you know of | At or above the order's size |
| Retry outcome | Usually succeeds within seconds | Keeps failing while load stays high |
| Time pattern | Scattered, correlated with provider load | Aligned with your own peaks |
If the retry outcome column says "usually succeeds", a short retry plus a fallback is enough. If it says "keeps failing", more retries make it worse, because each one is another request into a full allocation.
Gemini on Vertex AI and the Gemini API are two connections
The same Gemini model family is reachable through two different services with two different credentials and two different limit systems. Treat them as two connections, not one.
The Gemini API enforces limits per project, not per API key, across requests per minute, tokens per minute and requests per day, with daily limits resetting at midnight Pacific time5. It also has spend-based limits that depend on your usage tier, evaluated on a rolling 10-minute window, and exceeding one returns a 429 RESOURCE_EXHAUSTED error5. The page states that specified limits are not guaranteed and actual capacity may vary5. Vertex AI's limits live on a different page and are tied to your Google Cloud project and quota configuration2.
Two consequences follow:
- Exhausting one is not evidence the other is exhausted. A 429 on Vertex is a reason to try the Gemini API, and the reverse.
- Models, features and model ids can differ between the two. A fallback that names a model the second service does not serve fails with a different error, so check the model list on each connection before you rely on it.
The failure rule between them
A route that falls back needs a rule for each kind of failure, not one catch-all. Here is the rule set, written as a table you can turn into configuration. It is an illustration of the design, with no numbers taken from any provider.
Three guardrails keep this safe. Bound the retries so the sum of backoffs stays under your caller's timeout. Do not fall back mid-stream once tokens have started to arrive, because the client has already seen a partial answer; fall back only before the response begins. And cap what the fallback can spend, since the second connection bills against its own account at its own rates. How price gaps and cold caches change that bill is covered in What does failover do to your bill?.
A small client-side version of the first two rows, if you are not behind a gateway:
import random, time
def call_with_fallback(primary, secondary, request, tries=3, base=0.5, cap=8.0):
for attempt in range(tries):
resp = primary(request)
if resp.status != 429:
return resp
delay = min(cap, base * (2 ** attempt))
time.sleep(random.uniform(0, delay)) # full jitter
return secondary(request) # a different connection, different limitsWhere a gateway helps
You can build this in your application, but it ends up duplicated in every service that calls Gemini. A gateway holds it once. With INFRO, you connect your own Vertex AI account and your own Gemini API key as two provider connections, and name a route with the Vertex connection as the first target and the Gemini API as the next. The route's failure rules decide, per failure kind, whether to retry, move on or stop, and if-rules can send particular traffic (say, a streaming or high-priority feature) to its own targets. Automatic failover covers a route that times out or returns a 5xx before the response starts. A connection can also list additional API hosts for the same key, which are tried when the first host cannot be reached; that handles an unreachable host, not a 429, so keep the two ideas apart. Check the routing documentation for how a rate-limit failure maps onto a failure rule before you depend on it. You still pay Google directly on both accounts; INFRO adds no markup to model spend.
A checklist before you ship the fallback
- Log the 429 body, model, region and project on every refusal.
- Decide per connection whether you are on pay-as-you-go or Provisioned Throughput, and write down what a 429 means for each.
- Read the current numbers on Google's quota, retry and Provisioned Throughput pages and put them in your runbook243.
- Confirm the fallback connection serves the same model, and test one request through it.
- Bound retries, forbid fallback after a stream has started, and cap the fallback's spend.
- Alert when the share of requests served by the fallback rises, since that is the early sign your primary is short.
For the wider pattern of deciding which requests deserve the remaining capacity, see Provider quota is short: which AI requests should survive? and Circuit breakers for LLM providers: throttling is not failure.
