GEMINI LABJP
PRO35 — Gemini 3.5 Pro is reported to target July 17, though the date, context window, and pricing all remain unconfirmed by GoogleREBUILD — The model is said to be a ground-up rebuild after the 2.5 Pro architecture was scrapped over structural failures in recursive tool-calling and SVG generationFLASH35 — Gemini 3.5 Flash is the newest broadly available release, tuned for faster, lower-cost coding, agents, multimodal, and long-document workSAATHI — ATL Saathi, built on Gemini 3.5 Flash, begins piloting in 100 Indian schools as a 24/7 planning and training assistant for Tinkering Lab educatorsSEA — In Southeast Asia, nearly 70% of prompts arrive in native languages — Vietnam 89%, Thailand 87%, Indonesia 84% — and 3 in 4 requests come from mobileSHEETS — From July 15, AI Expanded Access licenses raise the usage limits for Fill with Gemini and the AI function in SheetsPRO35 — Gemini 3.5 Pro is reported to target July 17, though the date, context window, and pricing all remain unconfirmed by GoogleREBUILD — The model is said to be a ground-up rebuild after the 2.5 Pro architecture was scrapped over structural failures in recursive tool-calling and SVG generationFLASH35 — Gemini 3.5 Flash is the newest broadly available release, tuned for faster, lower-cost coding, agents, multimodal, and long-document workSAATHI — ATL Saathi, built on Gemini 3.5 Flash, begins piloting in 100 Indian schools as a 24/7 planning and training assistant for Tinkering Lab educatorsSEA — In Southeast Asia, nearly 70% of prompts arrive in native languages — Vietnam 89%, Thailand 87%, Indonesia 84% — and 3 in 4 requests come from mobileSHEETS — From July 15, AI Expanded Access licenses raise the usage limits for Fill with Gemini and the AI function in Sheets
Articles/Dev Tools
Dev Tools/2026-07-16Advanced

I stopped storing every generation log — three retention tiers and a prompt fingerprint that keeps traceability

I was storing every Gemini API request and response body for debugging. Here is how I moved to three retention tiers plus a prompt fingerprint, and kept the ability to diagnose issues without keeping the text.

Gemini API187LoggingData RetentionOperations8Firestore

Premium Article

My nightly pipeline started returning the same category over and over, so I opened the logs to find out why.

I could scroll back three months. Full request bodies. Full response bodies. All of it, exactly as sent. Convenient. Too convenient.

Sitting there were sentences that people had typed into my app, preserved verbatim. Something I had kept for debugging had quietly become data that nobody had ever decided to delete. I stopped scrolling.

This is not a storage bill story. It is a question about whether I had any reason to hold other people's words indefinitely inside a pipeline I run by myself.

As an indie developer I had never written the deletion side of the design. What you do not write, you keep. That is simply what logs are.

What "keep everything" was actually holding

The logging was naive. My Gemini API wrapper serialized the request and response into JSON and wrote it to Firestore. That was the whole design.

Three months of that produced the following, across wallpaper classification, article metadata generation, and review-reply drafting — indie-scale numbers.

MetricMeasured
Records~41,000 (3 months)
Average size per record~11 KB (with bodies)
Total~450 MB
Records a human actually opened62

41,000 stored. 62 opened. That is 0.15%.

And of those 62, only about 20 genuinely required the body text. For the rest, knowing the model, the timestamp, the token counts, and the finish reason was enough.

The bodies were never the star of an investigation. Context was.

How little do you need to trace a cause?

Before deleting anything, I wrote down what would actually hurt to lose — restricted to investigations that had really happened.

  1. Output drifted — when did it start, and did the model or the prompt change around that point?
  2. Cost spiked — which task grew, and in which part of the token breakdown?
  3. A specific input always fails — what is the shape of that input (length, language, attachments) and the finishReason?
  4. Output gets cut off — what were maxOutputTokens versus actual output tokens?

None of the four needed the text itself. What they needed was the ability to say, unambiguously, whether two calls had sent the same thing.

Same input or different input. Once that is settled, you can reproduce the condition locally and take it from there.

That decided the design: drop the body, keep its identity.

Thank you for reading this far.

Continue Reading

What follows includes implementation code, benchmarks, and practical content we hope you'll find useful. This site runs without ads — server and development costs are supported entirely by members like you. If it's been helpful, we'd be truly grateful for your support.

WHAT YOU'LL LEARN
How to build a prompt fingerprint that identifies a request without storing its text, and what belongs in the hash versus what does not
A Tier 0/1/2 retention model with Firestore TTL policies. Storage dropped roughly 92% while investigations still landed
Stratified sampling at 100% of failures and 3% of successes, plus a real case where the fingerprint alone caught a model swap
Secure payment via Stripe · Cancel anytime

Unlock This Article

Get full access to the rest of this article. Buy once, read anytime. This site is ad-free — your support goes directly toward keeping it running.

or
Unlock all articles with Membership →
Share

Thank You for Reading

Gemini Lab is ad-free, supported entirely by members like you. We publish practical guides daily with implementation code, benchmarks, and production-ready patterns. If you've found it useful, we'd love to have you on board.

  • Copy-paste ready implementation code
  • New advanced guides published daily
  • $5/mo or $10 for lifetime access
View Membership →

Related Articles

Dev Tools2026-07-02
Deleting the Source Isn't Enough — A Ledger Design for Propagating Deletes Through Gemini-Derived Data
When a user deletes their data, the embeddings, caches, and File Search documents you generated from it live on. A provenance ledger written at generation time, per-sink propagation workers, and a verification sweep make deletion actually reach your derived data.
Dev Tools2026-07-09
Closing the Failures That Never Throw: Normalizing Gemini API Responses into a Discriminated Union
An HTTP 200 with an empty body will never reach your catch block. Here is how I normalize finishReason and blockReason into a discriminated union, and let a never check turn missed cases into compile errors.
Dev Tools2026-07-03
Stop Making Listeners Wait for the Whole File — Wiring Gemini TTS Streaming into Your Delivery Path
gemini-3.1-flash-tts-preview now streams audio via streamGenerateContent. A delivery path with 1.8s to first sound, covering PCM boundary handling, sentence-level resume, and a fallback for preview shutdown.
📚RECOMMENDED BOOKS
Build a Large Language Model (From Scratch)
Sebastian Raschka
LLM Dev
Prompt Engineering for LLMs
Berryman & Ziegler
Prompting
AI Engineering
Chip Huyen
AI Eng
* Contains affiliate links
See all →