Vertex Provisioned Throughput Error Policy for 429 and 5XX
Gemini Enterprise Agent Platform changes capacity-error treatment according to pay-as-you-go, Standard Provisioned Throughput and Single Zone Provisioned Throughput. This guide turns 429 and 5XX responses into a route policy with bounded retries, spillover decisions, SLA evidence and distinct final states for authenticated LLM traffic.

A 429 from Gemini Enterprise Agent Platform has different operational meaning under pay-as-you-go and Provisioned Throughput. Purchased capacity adds another wrinkle: capacity faults below the purchased amount can surface as 5XX, with different SLA treatment for Standard and Single Zone Provisioned Throughput. A retry loop that sees only the status code loses the commercial mode and the evidence needed later. I want the route policy to classify the response, choose a bounded action and preserve the original provider facts.
TL;DR
- Classify 429 and 5XX responses with the route's consumption mode, project, model and location. The status alone is incomplete.
- Pay-as-you-go 429 handling can use truncated exponential backoff, traffic smoothing and an approved endpoint strategy.
- Provisioned Throughput overage may spill into pay-as-you-go under Google's default behavior, so cost policy belongs beside retry policy.
- Preserve every attempt and final user outcome, while keeping Standard and Single Zone SLA treatment separate.
One status carries different quota semantics
Google's current error code 429 guide gives two response messages. Pay-as-you-go uses "Resource exhausted, please try again later." Provisioned Throughput uses "Too many requests. Exceeded the Provisioned Throughput." The message is provider evidence, but production code should avoid using mutable prose as its only classifier.
The route already knows its Google Cloud project, model, location and configured consumption mode. Join that configuration with the returned HTTP status, provider error structure and request timestamp. Preserve the raw error safely, then emit a normalized local state such as pay-as-you-go capacity rejection or provisioned overage. Use a separate state for a provisioned under-entitlement service failure.
Google's Provisioned Throughput overview describes the product as a fixed-cost, fixed-term subscription that reserves throughput for supported generative AI models in specified locations. Throughput measurement depends on the model. The exact model and location therefore belong in error classification and on the operations dashboard.
Purchased capacity changes 429 and 5XX treatment
For Standard Provisioned Throughput, Google's 429 guide says errors that might otherwise be 429 are returned as 5XX when actual usage remains below the purchased amount. Those errors count toward the SLA error rate. Single Zone Provisioned Throughput also treats capacity-related 429 errors below purchased usage as 5XX, while the page excludes them from the SLA error rate.
Once usage exceeds the purchased amount, additional requests are processed on demand as pay-as-you-go. Google's Provisioned Throughput remediation section says the default behavior leaves the prediction-request header unset, allowing overages to spill over and be billed as pay-as-you-go. Increasing purchased GSUs is another documented option.
A local policy needs separate states for these cases because the subscription type changes the evidence. Store pay-as-you-go resource exhaustion apart from the reserved-capacity SLA treatment described by Google. The AI SLA worksheet shows how provider definitions and route objectives can coexist without merging their denominators.
Retry policy needs a cost and identity context
Google recommends truncated exponential backoff for pay-as-you-go 429 responses. It also recommends using the global endpoint where possible, smoothing traffic, reducing spikes, gradually ramping sharp traffic increases and requesting more quota where the model uses quotas. Give each option a route owner and expose the selected behavior above the SDK call.
Set a bounded attempt count and elapsed-time budget. Add jitter and a per-attempt timeout. Stop when the caller's deadline expires. Record the original authenticated user or agent across all attempts, along with one logical operation ID. Streaming responses need a separate rule because replay after bytes reach the caller can duplicate content.
Cost policy belongs in the decision. An approved route may permit pay-as-you-go spillover for an interactive support workflow and deny it for a bulk evaluation job. My view is that automatic spillover without an owner and spend condition is a purchasing decision disguised as resilience. The LLM API Retry-After policy covers operation safety, ambiguous outcomes and attempt ledgers in more depth.
Failover must remain an authorized route
A capacity error may tempt a client to change location, model or provider. That choice can cross a residency boundary or bypass a model allowlist. Build fallback destinations into the policy before the incident. Attach caller role and data classification to the route decision, then require the replacement model to meet the use case's evaluation and contractual requirements.
For pay-as-you-go, Google suggests the global endpoint when possible. "When possible" is a design constraint. A workload pinned to a specific location for approved processing should retain that restriction during overload. A visible failure can be the correct final state.
Keep provider retry and fallback decisions distinct. A retry repeats the approved destination under a bounded schedule. A fallback selects another approved route and needs a fresh authorization result. The AI gateway observability guide gives the telemetry context, while the error policy should retain unsampled attempt facts for incident and SLA review.
The attempt record should survive an SLA review
Record the request correlation ID and logical operation ID. Add the authenticated principal, local route, Google Cloud project and location, plus requested and resolved model identifiers. Preserve the consumption mode and Provisioned Throughput subscription type used by local classification.
For each attempt, retain the timestamp and status. Keep the provider error code and sanitized message, latency, chosen delay, retry reason and resulting action. Add the configured backoff version and any fallback destination. Finish with the user-visible outcome and the policy version that produced it.
Google recommends enabling inference request metadata logs and running its error-rate query to identify affected seconds and models. Its guide also points Provisioned Throughput users to a spillover-by-minute query. Join those provider-side results to the client attempt ledger by project, model, location and time. Keep the records separate because a gateway decision and a provider capacity observation prove different events.
A release fixture needs each commercial mode
Run a controllable provider stub behind the deployed route and pin the test clock. On the operations screen, each synthetic attempt should appear as one horizontal row with its mode, status, delay and final action visible without opening a tooltip.
Test a pay-as-you-go 429 followed by success after backoff. Add a sharp burst that exhausts the local retry budget. Test Standard Provisioned Throughput below entitlement with a 5XX classification, then repeat for Single Zone while preserving its different SLA treatment. Add a Provisioned Throughput 429 above the purchased amount with spillover allowed, followed by the same case with spillover denied by local cost policy.
Finish with an unauthorized fallback location and a stream that fails after response bytes begin. The first must end before sending content to the alternate route. The second must avoid a blind full replay. Confirm that every attempt retains the same logical operation ID while each policy decision receives its own record.
DeepInspect
DeepInspect can inspect HTTP responses on deliberately routed traffic between authenticated users or agents and LLM endpoints. For each attempt, it can preserve the supplied identity, destination, policy version and provider status, then apply approved response and fallback policy within that route. Its per-decision record can support correlation with Google inference metadata and the application's retry ledger.
The application or API client still owns retry scheduling, operation deadlines, stream recovery and cost budgets. Google owns Provisioned Throughput measurement, billing and SLA treatment. Direct traffic that bypasses the configured proxy remains outside DeepInspect's boundary.
Book a technical deep dive at deepinspect.ai.
Frequently asked questions
- Should every Gemini 429 be retried?
No. The client should first identify the route's quota framework and operation deadline. Pay-as-you-go 429 handling can use Google's truncated exponential backoff guidance. Provisioned Throughput overage also needs a spillover and cost decision. A bounded final failure protects the provider and the client fleet during sustained overload.
- Why can Provisioned Throughput capacity errors appear as 5XX?
Google documents that capacity errors below purchased throughput can be returned as 5XX. Standard Provisioned Throughput counts those errors toward the SLA error rate. Single Zone treats the capacity-related errors as 5XX but excludes them from that error-rate calculation. Preserve the subscription type in the evidence.
- Does pay-as-you-go spillover happen automatically?
Google's default behavior leaves the relevant prediction-request header unset, so overages can be processed on demand and billed as pay-as-you-go. Your local route policy should decide if that cost behavior is approved for the workload and record the decision.
- Can a gateway prove an SLA breach by itself?
A gateway can preserve request attempts, statuses, timing and route decisions for traffic it handles. Google's SLA calculation and subscription accounting remain provider-side facts. Reconcile gateway records with inference request metadata logs, provider queries, billing evidence and the applicable service terms.