Google Vertex AI in Practice

Handling 429 RESOURCE_EXHAUSTED: Backoff and Rate Limiting

A 429 from Vertex AI means you hit a quota, not that anything is broken. The fix is a layered one: retry politely, smooth your own traffic, and raise the quota only when the math says so.

Claude 3P 101 · Updated July 2026 · Unofficial guide

When Claude on Vertex AI returns a 429 RESOURCE_EXHAUSTED, Google is telling you that your project has consumed its allotted requests or tokens for the current window. Unlike a 403, there is nothing to fix in IAM — the question is how your application behaves under a limit, and whether the limit itself is right for your workload.

Know which quota you actually hit

Claude quotas on Vertex AI come in two generations. Models launched after May 26, 2026 use shared model-lineage quotas: one quota bucket per model family per location, tracked under base_model dimensions such as anthropic-claude-opus, anthropic-claude-sonnet, anthropic-claude-haiku, and anthropic-claude-fable. All Opus versions draw from the same bucket, so adding a newer Opus needs no new quota request. Older models use per-model quotas measured in queries per minute (QPM) and tokens per minute (TPM).

Two details matter operationally. First, global-endpoint quota and each multi-region-endpoint quota are independent buckets — traffic on one does not consume the other, which also means you can relieve pressure by splitting traffic across endpoint types where your residency posture allows it. Second, the token usage shown on the console Quota page can be inaccurate because of Anthropic's token estimation and refund system; for real numbers, use the token counting API or the token_count metrics in Metrics Explorer.

Layer 1: exponential backoff with jitter

Every production caller should retry 429s with exponentially growing waits and a random jitter so that a fleet of workers doesn't retry in lockstep. Keep the attempt count bounded and surface the failure after that:

import random, time
from anthropic import AnthropicVertex, RateLimitError

client = AnthropicVertex(project_id="my-project", region="global")

def call_with_backoff(messages, attempts=5):
    for i in range(attempts):
        try:
            return client.messages.create(
                model="claude-sonnet-5", max_tokens=1024, messages=messages)
        except RateLimitError:
            if i == attempts - 1:
                raise
            time.sleep(min(2 ** i + random.random(), 60))

Backoff is damage control, not a strategy. If your steady-state traffic triggers backoff constantly, you are paying for it in latency and wasted retries.

Layer 2: a client-side token bucket

The better pattern is to never send the request you know will be rejected. A token bucket is a small counter that refills at your quota rate (say, your per-minute request allowance) and from which each request must withdraw before it is sent. When the bucket is empty, callers wait. This converts random 429 spikes into smooth, predictable queuing inside your own system — where you control prioritization — instead of at Google's front door, where you don't. Because Claude quotas meter both requests and tokens per minute, size the bucket on whichever dimension you exhaust first; long-context workloads almost always hit the token dimension before the request dimension.

Layer 3: raise the quota — or redesign

Quota increases are requested on the Quotas & System Limits page in the Google Cloud console. Maximum quotas can vary by account, and in some cases access may be restricted, so treat an increase as a request, not an entitlement — and file it well before launch day.

Before you file, though, check whether the workload is shaped right:

SymptomBetter move than a bigger quota
Large offline jobs compete with live trafficMove them to Google's Vertex batch prediction (BigQuery or Cloud Storage input) — billed at 50% of on-demand
Token quota exhausted by repeated long promptsEnable prompt caching; cached reads are far cheaper and lighter
Simple tasks running on Opus-class modelsRoute routine work to Haiku 4.5 — a separate lineage bucket
Sustained, predictable high throughputConsider provisioned throughput (fixed-fee, regional endpoints only; provisioned requests are prioritized over pay-as-you-go)
Rule of thumb: retries handle minutes, token buckets handle hours, quota increases handle quarters. If 429s recur weekly, the fix is architectural, not a bigger number.

Where to go next

See Vertex quota types for the full metric names, the quota increase walkthrough for filing requests, and Retries, Timeouts, and Fallbacks for the cross-platform resilience picture.

Sources