Fix HTTP 429 LLM Rate Limits: TPM vs RPM in OpenAI, Claude & Gemini
Resolve HTTP 429 rate_limit_exceeded and RESOURCE_EXHAUSTED errors across OpenAI, Anthropic, and Gemini with header-aware token buckets and jitter.
Every runbook pairs exact error telemetry and billing formulas with verified configuration fixes and links directly to its companion break-even calculator.
Resolve HTTP 429 rate_limit_exceeded and RESOURCE_EXHAUSTED errors across OpenAI, Anthropic, and Gemini with header-aware token buckets and jitter.
Fix finish_reason: length, stop_reason: max_tokens, and MAX_TOKENS JSON parse retry loops when reasoning tokens starve structured output budgets.
Eliminate cached_tokens: 0 and cache_read_input_tokens: 0 bugs caused by JSON key drift, dynamic timestamps, tool reordering, and min-token floors.
Fix Cloudflare D1 rows_read spikes from full table scans: inspect meta.rows_read, add SQLite covering indexes, replace OFFSET pagination, and batch writes.
Fix Cloudflare Workers Error 1102 (Worker exceeded resource limits): separate 10ms/30s CPU caps from 128 MB V8 OOMs with limits.cpu_ms and streaming.
Fix Next.js output: 'export' trailing slash 404s and 308 redirect loops on Cloudflare Workers Static Assets with wrangler.jsonc and zero-bill routing.
Stop runaway Firestore Blaze bills ($0.06/100k multi-region reads). Fix unbounded onSnapshot queries, React useEffect loops, and Security Rules get().
Cut Supabase Pro $0.09/GB uncached egress bills past 250 GB. Audit heavy PostgREST select('*') queries, fix Storage cacheControl, and offload video to R2.
Fix FATAL: MaxClientsInSessionMode and 42P05 prepared statement errors on Vercel and Workers using Supavisor port 6543 with Prisma and Drizzle.
Fix AdMob ad serving limits on new iOS and Android apps: gate SDK init on UMP canRequestAds, isolate test IDs, stop banner CLS, and verify app-ads.txt.
Trace why a $9.99 or $2.99 IAP nets $6.65 or less after pre-split EU/UK/KR/JP VAT, 15%/30% store fees, expired W-8BEN 30% withholding, and 2% FX spreads.
Stop Guideline 3.1.1 rejections and Play Billing v8 3-day auto-refunds using AppStore.sync(), acknowledgePurchase, and offline-safe IAP caching.
Stop scrapers from spiking Vercel Fluid Compute and Worker bills while keeping Googlebot, GPTBot, ClaudeBot, and PerplexityBot indexing at $0 CDN egress.
Stop burning 10x GitHub Actions macOS runner minutes ($0.08/min). Gate iOS builds behind Linux checks, cache SwiftPM safely, and skip DerivedData bloat.
Stop runaway /_next/image transformation and Fast Origin Transfer bills on Vercel Pro ($0.06/1k) using Next.js 16 qualities, sharp WebP, or Cloudflare.