SRE playbook // provider throttles

How to Fix LLM Rate Limits (429) and Latency Without Buying a Bigger Tier

TPM and RPM ceilings are symptoms of obese prompts, parallel agent fan-out, and cache misses—not just “we need Enterprise.” This guide shows how to diagnose 429 storms, shrink time-in-queue, and stabilize p95 latency with local intake tuning.

Platform engineers first encounter LLM rate limiting as mysterious 429 responses scattered through application logs. Retries with exponential backoff help briefly, then cascade into hour-long incidents where customer-facing features stall because every microservice shares one org-level tokens-per-minute quota. Sales teams respond by upselling committed spend tiers. Sometimes that is necessary—but in our audits, sixty percent of throttle events disappear when teams halve prompt size and serialize agent tools without touching the contract tier.

Rate limits measure how fast you feed the provider’s inference cluster. Latency measures how long each request waits in queue plus model runtime. The two metrics correlate: fatter prompts consume more TPM per call, so fewer concurrent requests fit under the cap, and the queue depth grows. Polycracker attacks the problem at intake: prune AST noise locally with Polycracker ECU, measure before/after with Polydyno, and codify backoff-safe concurrency in The Tuning House orchestration maps.

Decode the 429: TPM, RPM, and hidden concurrency

OpenAI documents requests-per-minute (RPM) and tokens-per-minute (TPM) per model/deployment. Anthropic and Azure expose similar fields with different header names. A single user-facing chat may spawn six parallel tool calls—grep repository, read file, run tests, fetch docs—each issuing an LLM request. To the provider, that is six RPM in one second. If each call carries 30k input tokens, you also burn 180k TPM in a burst. Enterprise quotas that sound generous on paper evaporate under agentic fan-out.

Instrument your proxy layer to log x-ratelimit-remaining-tokens (or vendor equivalent) on every response. Plot remaining tokens over time; sawtooth patterns indicate you are rhythmically hitting the ceiling. Flat lines at zero with retries mean your backoff is too aggressive and your queue is starved.

SignalLikely causeFirst fix
429 on first attempt, small bodyRPM-only limitSerialize tool calls; jitter starts
429 mid-batch, large promptsTPM burstAST prune; split attachments
Rising TTFT, no 429Queue depthReduce input tokens; change region
429 after cache deployCache key churnSee RAG caching guide

Worked example: taming a 450k TPM ceiling

A fintech team runs GitHub Copilot Workspace plus an internal LangGraph agent on GPT-4.1 with a 450k TPM org limit. Peak afternoon load: 22 developers, average 4 concurrent agent sessions each, 26k tokens per request after “helpful” copy-paste of entire services.

MetricBefore tuningAfter ECU prune + fan-in
Avg input tokens/request26,4009,100
Parallel LLM calls per agent62 (batched tools)
Effective TPM demand (peak)~690k~218k
429 rate (5 min window)14.2%0.4%
p95 time-to-first-token8.4s2.1s

Savings did not require a new SKU. Engineers installed Polycracker ECU as the localhost proxy, applied a TypeScript pruning map, and changed the agent executor to batch read-only tools into one structured message. Polydyno verified token counts on staging before rollout—methodology detailed in How to Test LLM Token Usage.

Latency anatomy: where seconds hide

Time-to-first-token (TTFT) includes client serialization, TLS, API gateway auth, queue wait, prefill compute, and first decode step. Input token count linearly affects prefill on most transformer stacks. Cutting 60% of input tokens often cuts TTFT more than 60% because queue pressure drops concurrently.

Local preprocessing adds milliseconds of AST work on a modern laptop—far less than shipping an extra twenty thousand tokens over WAN. The ECU’s three-phase pipeline (intake, map apply, exhaust) is tuned for sub-200ms prune times on median JavaScript repos. Profile with Polydyno’s timeline view; if prune latency exceeds 500ms, your map is probably doing pathological glob walks—narrow globs in Tuning House.

curl -s http://127.0.0.1:8000/health
# healthy ECU proxy — forward provider API here

export OPENAI_BASE_URL=http://127.0.0.1:8000/v1
# IDE or SDK picks up trimmed bodies transparently

Retry policy that does not make things worse

Naive infinite retries synchronize thundering herds: every client backs off, wakes up together, and slams TPM again. Cap retries at three, multiply backoff by full jitter, and downgrade model tier on repeated 429 for non-critical paths. For agent frameworks, persist partial tool results so retries do not re-send identical pruned context—otherwise prompt caching benefits erode.

Coordinate with agent thrashing mitigation: halting loops when the model repeats failed edits prevents runaway RPM even when quotas allow more traffic.

Organizational levers beyond code

Split production and experimentation API keys so research notebooks cannot exhaust customer quotas. Schedule heavy batch jobs off-peak. Negotiate burst TPM with your account team using before/after graphs—vendors prefer customers who self-limit intake to predictable shapes over chaotic megaprompts.

Security reviewers often ask whether local proxies exfiltrate data. Point them to SHA-256 verified Polycracker_Setup.exe and the architecture notes in Zero-Telemetry Local LLM Proxy. Reducing tokens is also a privacy win: less content crosses the wire per request.

Operational checklist

  1. Log TPM/RPM headers per model deployment; alert when remaining < 15% for five minutes.
  2. Measure agent fan-out; batch or serialize tool LLM calls.
  3. Deploy local AST pruning; confirm median input drop ≥ 40%.
  4. Re-test p95 TTFT and 429 rate weekly.
  5. Only then evaluate tier upgrades with finance.

Capacity planning without guesswork

Translate developer behavior into TPM budgets using simple algebra. Let D be active developers, S concurrent sessions per developer, R LLM round trips per minute per session, and T average input+output tokens per round. Required TPM approximates D × S × R × T. A staff of 30 with 2 sessions, 3 rounds/min, and 18k tokens per round demands ~3.24M TPM if everyone peaks simultaneously—well beyond many default enterprise quotas. Pruning that cuts T from 18k to 7k immediately rewrites the inequality; batching tools to reduce R provides the second lever.

Publish an internal “TPM weather report” each sprint: Polydyno exports CSV, finance receives a one-page chart, and teams see which repos regressed. Tie regression to commits that added unpruned OpenAPI clients or disabled map versions. This operational rhythm prevents the sudden 429 winter mornings when a single hotfix branch doubles attach size.

Multi-provider routing and failover

Organizations increasingly split workloads across OpenAI, Anthropic, and private vLLM endpoints. A localhost ECU can tag requests with X-Polycracker-Map headers and route to different upstreams while applying the same prune policy—avoiding divergent prompt shapes that confuse A/B tests. When one provider throttles, shift shadow traffic to another model family only after confirming map compatibility (type hints, tool JSON). Never duplicate full prompts to two clouds for “race” completions; that doubles spend and worsens egress review findings.

Observability headers worth charting

Most providers return ratelimit reset timestamps. Build a Grafana panel that plots time-to-reset against concurrent agent jobs. Correlate spikes with deploys that added new MCP tools or increased default retrieval k. SRE teams that treat LLM quotas like Kubernetes CPU limits—with explicit requests and limits per namespace—see fewer surprise outages during hack weeks.

429 errors are feedback, not fate. Treat TPM like CPU: you can buy more, but you should first stop wasting cycles serializing entire monorepos into every turn. Local intake control is the fastest lever engineering owns outright.

Deploy Polycracker ECU locally Polydyno telemetry hooks Tune intake maps Enterprise rollout