GEMINI LABJP
PRO35 — July 17, the date reports had pointed to, has passed without an official Gemini 3.5 Pro announcement or model card. July 24 is being cited as the fallbackNB2LITE — Nano Banana 2 Lite, otherwise known as Gemini 3.1 Flash-Lite Image, arrives as the fastest of the family: roughly four seconds per image at $0.034 per thousandOMNI — Gemini Omni Flash enters public preview, generating video up to ten seconds long at $0.10 per second of outputEDIT — Omni Flash is built around conversational editing. Swap a character, relight a scene, or change the angle in plain language, and the original audio and video tracks stay intactSYNTHID — Both new models carry SynthID watermarking, so anything they produce can be checked for provenance from inside the Gemini appSHUTDOWN — The older image generation models are deprecated and switch off on August 17. Worth checking your migration windowPRO35 — July 17, the date reports had pointed to, has passed without an official Gemini 3.5 Pro announcement or model card. July 24 is being cited as the fallbackNB2LITE — Nano Banana 2 Lite, otherwise known as Gemini 3.1 Flash-Lite Image, arrives as the fastest of the family: roughly four seconds per image at $0.034 per thousandOMNI — Gemini Omni Flash enters public preview, generating video up to ten seconds long at $0.10 per second of outputEDIT — Omni Flash is built around conversational editing. Swap a character, relight a scene, or change the angle in plain language, and the original audio and video tracks stay intactSYNTHID — Both new models carry SynthID watermarking, so anything they produce can be checked for provenance from inside the Gemini appSHUTDOWN — The older image generation models are deprecated and switch off on August 17. Worth checking your migration window
Articles/API / SDK
API / SDK/2026-06-13Advanced

The Morning Gemini Generated Fine but the Publish Crashed — A 'Generation Outbox' So Expensive Output Is Never Lost

Generation succeeds, then the process dies right before publishing. The expensive output is gone, and you pay for the same generation again. Here is a 'generation outbox' that persists the output first and turns publishing into an idempotent follow-up, plus what it did for me during the June outage.

gemini-api277outboxreliability7automation51production140

Premium Article

It was the morning of that big June 2026 outage (error 1076 / 1099). As an indie developer I run automated publishing pipelines across four sites, and when I read the logs I froze. Gemini's generation itself was going through fine — but the publish step right after it (a git push) was dying along with the network.

The job exited with an error, and the scheduler dutifully retried. A retry starts over from generation. So it threw away the output I had already paid for and was holding in memory, and called Gemini again with the same prompt. During the outage, that happened three times.

I wrote about preventing duplicate generations earlier, in Idempotency Key Design for the Gemini API. Today is about the failure hiding behind it: generation succeeds, but you lose the result before you can publish it. Even in a small indie pipeline, this quietly and reliably burns money.

Why "generated but not published" is the costliest failure

Think of the pipeline as two stages — generate, then publish. There are three ways it can fail.

It crashes before generation. Nothing is lost; a retry simply starts over cleanly.

Both generation and publish succeed. That is the happy path.

The problem is the third case: generation succeeds and the crash lands before publishing. You have already been charged by Gemini. The most valuable intermediate artifact — the output — is sitting in memory, and if you never persisted it, it vanishes when the process exits. The retry regenerates, so you buy the same tokens again.

The longer the input prompt, the more this hurts. My article-generation job carries reference data and prior-article context, so input averages around 11,000 tokens and output around 3,500. If only the publish keeps failing and you retry three times, generation cost roughly triples. Small for one article, but across six sites every day, a few hours of outage adds up fast.

The shift — put the output in an "outbox" before sending

The fix borrows the outbox pattern that backend systems have used for a long time.

Instead of writing an email and sending it immediately, you save it to a drafts folder first, then hand it to the sending process. If sending fails, the draft is still there — you never rewrite the body.

Apply that to the Gemini pipeline. The moment generation succeeds, write the output itself to a durable store before publishing. Publishing becomes a separate, independent step that only pulls items out of the box and ships them.

Now the roles are cleanly split. The generation phase's job ends at "safely place the expensive output into the box." The publish phase's job is "ship each item exactly once." Wherever a crash lands, output that made it into the box is never bought twice.

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
Prevent the most wasteful failure mode — 'generation succeeded, publish failed' — with a single table that durably stores the output first, shown in complete SQLite and Python code
Pass the fingerprint to the publisher as an idempotency key so retries never double-post, with a walk-through of exactly what happens at each crash point
Using real measurements — about 11,000 input and 3,500 output tokens per article — see how three retries triple your generation cost, and how much the outbox claws back
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

API / SDK2026-07-05
Catching only the deprecations that touch you — feeding the official changelog to url-context
I found out an image model was being shut down three days before the deadline. Here is a deprecation radar that reads the official changelog through url-context and surfaces only the models I actually use, with working Python and the over-alerting tuning I had to do in production.
API / SDK2026-06-29
Stop Losing Silently-Failed Jobs in Your Unattended Gemini API Pipeline
When an unattended Gemini API batch drops a single job in silence, you may not notice for days. Here is a minimal dead-letter store and a safe replay flow — with copy-paste code and the operational judgment that makes it work.
API / SDK2026-06-25
When Gemini's Structured Output Quietly Drifts From Your Schema — Field Notes on Measuring Validation and Retries
Even with response_schema set, Gemini's structured output occasionally drifts in production. Stop swallowing failures, measure them, split causes by finish_reason, and feed errors back for a corrected retry. Field notes from stabilizing a validation pipeline.
📚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 →