When Gemini API Quietly Dies on the Edge from Subrequest Limits — Field Notes on Budgeting What's Left
Running Gemini API on Cloudflare Workers is calm until traffic rises or a tool chain deepens, and then it fails on the subrequest limit. Here are the instrumentation patterns I use to measure per-request consumption and treat it as a budget, drawn from the sites I run as an indie developer.
Before Free Users Quietly Eat Your Margin: Tier Design and Cost Ceilings for Gemini API Apps
Protecting the margin on a Gemini-powered app means designing around a per-user monthly cost ceiling, not request counts. Tier-aware model routing, real-cost metering in KV, and the token-bloat traps that drain profit, with working code.
A Lightweight Gemini Backend with Bun and Hono — Reclaiming the Small Tools of Indie Development
Has your Node and Express Gemini backend grown heavy with dependencies and build times? Here is how I moved one to Bun and Hono — folding streaming, rate limiting, cost caps, testing, and self-hosting into a single light runtime — along with the pitfalls I hit in production.
Running an SLO and Error Budget for the Gemini API as an Indie Developer — Guarding Four Sites with Burn-Rate Monitoring
Notes from running the Gemini API inside four production sites as an indie developer. A practical SLO and Error Budget design that fits a single-person operation: Cloudflare Workers and KV for burn-rate calculation, simplified multi-window alerts, and decision rules for what to freeze when the budget runs out.
Idempotency Key Design for the Gemini API: Patterns I Use to Prevent Duplicate Generation Across Six Sites
After five months of running six AI-driven sites in parallel, I built an idempotency layer in front of the Gemini API to neutralize retry storms. This deep dive shares the SHA-256 + Cloudflare Workers KV design, the operational numbers behind it, and the four gotchas that only surface in production.
What I Tried, In Order, When Gemini API Returned User location is not supported in Production
Hitting the Gemini API from Cloudflare Workers or Vercel and getting hit with a sudden 'User location is not supported' error? Here is the exact order I worked through, drawn from a live production incident on my own indie apps.
Ship a Production Gemini Agent in 30 Minutes with Mastra and TypeScript
Mastra keeps the lightness of Vercel AI SDK while adding the agent primitives you actually need in production. This guide walks through building, debugging, and deploying a Gemini-powered Mastra agent end-to-end, including the Cloudflare Workers gotchas that bit me first.