◉GEMINI LABJP
●ARGON — gemini-4-argon is generally available as of 10/13, aimed at complex coding, agents, math and science●DEEP RES — deep-research-pro-preview-12-2025 shuts down 10/23, 6 days left. Move to deep-research-preview-04-2026●NANO — gemini-nano-banana-2.1 is GA (10/06). gemini-3.1-flash-image is deprecated with no shutdown date yet●MCP — One write-up cut an 85,000-token tool result to 310 tokens by wrapping it in an ADK FunctionTool●FLASH — gemini-3.7-flash and 3.5-flash now route automatically to newer Flash models (10/08)●NEW — Stop Re-Reading Every Crash Report: Gre…●ARGON — gemini-4-argon is generally available as of 10/13, aimed at complex coding, agents, math and science●DEEP RES — deep-research-pro-preview-12-2025 shuts down 10/23, 6 days left. Move to deep-research-preview-04-2026●NANO — gemini-nano-banana-2.1 is GA (10/06). gemini-3.1-flash-image is deprecated with no shutdown date yet●MCP — One write-up cut an 85,000-token tool result to 310 tokens by wrapping it in an ADK FunctionTool●FLASH — gemini-3.7-flash and 3.5-flash now route automatically to newer Flash models (10/08)●NEW — Stop Re-Reading Every Crash Report: Gre…
TAG

Cost Optimization

21 articles
← Back to all tags
Related:
Gemini API16Indie Development5Context Caching4Python3Indie Developer2Gemini 2.5 Flash2production2Image Classification2gemini-embedding-22Batch Processing2operations2Gemini 3.5 Flash2
◈ Gemini API/2026-05-26Intermediate

Running Gemini 3 Pro and Flash in Parallel on AdMob Monthly Reports — Notes from Ten Mornings

Implementation notes from sending the same AdMob monthly report to Gemini 3 Pro and Gemini 3 Flash in parallel for ten days. Cost, latency, and summary quality compared from an indie developer's perspective.

◈ Gemini API/2026-05-06Intermediate

One Month with Gemini 2.5 Flash: An Indie Developer's Honest Cost and Performance Report

Real cost, speed, and quality data from running Gemini 2.5 Flash across three indie apps for a full month. Includes free-tier usage patterns, Flash vs Pro decision criteria, and cost-minimizing Python code.

◉ Gemini Basics/2026-05-04Advanced

Gemini 3.2 in Production: A Playbook for Model Selection, Cost Optimization, and Implementation Patterns

Gemini 3.2 has plenty of feature coverage, but very little material on actually deploying it to production. This playbook covers model selection (Pro/Flash/Nano), API patterns, cost optimization, competitive comparisons, and operations — from day-to-day production use.

⬡ Gemini Advanced/2026-07-15Advanced

A near-miss label won't fix itself on retry — a normalization layer for closed-vocabulary classification

When responseSchema enum returns an out-of-set label, retrying tends to return the same near-miss. From a wallpaper app's 30-category batch, here is the distribution of how labels miss, plus a normalization layer built on an alias table and gemini-embedding-2 nearest-neighbor, with measured results.

◈ Gemini API/2026-07-11Intermediate

When Gemini's Context Cache Quietly Expires Mid-Run: A TTL Guard for Pipelines That Pause

When a nightly batch or a retry backoff pauses your pipeline, Gemini's explicit context cache can expire on the wall clock while nothing errors out, sending later calls back to full-token billing. Here is a small lease guard that decides whether to re-arm or run uncached based on cost.

⬡ Gemini Advanced/2026-07-10Advanced

The Day We Went From 30 Categories to 34 — Reclassifying 1,180 Assets Instead of 8,142

Adding categories to a taxonomy does not require reclassifying everything. Here is how embeddings and confidence margins narrowed a backfill from 8,142 assets to 1,180, with the numbers.

◈ Gemini API/2026-07-06Advanced

When Context Caching Didn't Lower My Gemini Bill — Field Notes on Measuring the Real Hit Rate

When Context Caching is enabled but the Gemini API bill barely drops, this field note measures the real hit rate from usage_metadata, separates TTL churn from fragmentation, and walks through a staged recovery.

⬡ Gemini Advanced/2026-07-03Advanced

Your Tool Results Are Quietly Eating the Conversation — Handle Passing to Keep Gemini Function Calling Contexts Lean

Tool results linger in Function Calling history and compound your input tokens every turn. Two implementations — a token-budgeted compactor and handle passing — cut my measured input by roughly 8x, with the pitfalls I hit along the way.

◈ Gemini API/2026-06-26Advanced

Is Gemini 3.5 Flash Actually Cheaper? Measuring Retry Amplification to Find the Flash vs Pro Break-Even

Now that 3.5 Flash is generally available, it is tempting to route everything to it. But once you measure effective cost per success instead of per-call price, the decision changes. Here is a small harness to measure retry amplification and find the break-even.

⟐ Gemini Dev/2026-06-20Intermediate

Routing Gemini by Pipeline Stage: Draft on Flash, Finish on the Top Tier

A record of reworking which Gemini model handles which stage of an automation pipeline, prompted by the general availability of Gemini 3.5 Flash and the rollout of 3.1 Flash-Lite. Includes a small router that splits work into draft, classify, and finalize stages, how the cost picture changes, and the guardrails I settled on.

◈ Gemini API/2026-06-14Intermediate

Generate With Flash, Escalate to Deep Think Only When Unsure: A Two-Stage Pipeline

With Deep Think opening up on the API, the move is not to route every request through the heavy model but to have Deep Think verify only when Flash's output looks shaky. Here is the cost reasoning and working code.

◈ Gemini API/2026-06-03Advanced

Reconciling Orphaned Gemini Files API Uploads Across a Fleet of Apps

Files API uploads quietly expire after 48 hours. Here's how I keep orphaned files and quota under control across six apps, using reconciliation against my own database and a scheduled cleanup job — written up as production notes from running wallpaper apps.