ANTIGRAVITY LABJP
Articles/AI Tools
AI Tools/2026-07-14Advanced

Routing Between Local Gemma and Cloud Gemini 3.5 Flash by How Easily You Can Verify the Output

When I split local and cloud work by whether it was sensitive, or by which was faster, my decisions wobbled every time. The axis that finally held was different: if the output is wrong, can I catch it cheaply and undo it cheaply? Here is a router that chooses a model from verifiability and recovery cost, with working code and a measurement ledger.

Antigravity329Gemma4Gemini 3.5 Flash5Local LLM6Routing Designai-tools15

Premium Article

For a while, I could not settle on how to split work between local Gemma and cloud Gemini 3.5 Flash.

At first I drew the line at sensitivity: confidential code stayed local, everything else went to the cloud. Then I switched to speed versus intelligence. Both sounded reasonable, yet in practice my decisions wobbled every time. The same file would land on a different side depending on what I happened to be doing that day.

One night, a code-formatting job I had left to a scheduled run produced a quietly broken diff and sat there unnoticed until morning. The output looked natural, plausible at a glance. That was when it finally clicked. The question I should have been asking was not "is this model smart enough" but "if this output is wrong, can I notice it cheaply and roll it back cheaply?"

This article lays out a design that routes models by verifiability and recovery cost rather than by raw intelligence or latency. I will walk through the decision rule, a working router, and the ledger that tells you afterward whether the routing was actually right, all in the shape I run as an indie developer on my own apps.

Routing by sensitivity is still a valid, separate axis. I covered that in a design for keeping confidential code off the cloud with a local LLM, and it composes cleanly with the verifiability axis here.

Why Speed and Intelligence Alone Do Not Decide It

Gemini 3.5 Flash beats the previous 3.1 Pro on nearly every benchmark while running close to four times faster than other frontier models. On the numbers alone, you want to push everything to the cloud.

But in solo indie operation, raw model performance is rarely the bottleneck. The jam is somewhere else: the time a human spends confirming the output is correct, the effort of reverting when it is wrong, and the cleanup when that mistake has already rippled outward. None of these disappear no matter how capable the model is.

So the routing question needs reframing. Not "which model is better" but "can this task absorb a failure safely?" If it can, a lower-accuracy local Gemma is fine. If it cannot, the task belongs on the cloud side with heavier verification and approval, even when speed argues otherwise.

The hinge is verifiability. A task whose correctness can be checked automatically and cheaply lets you catch mistakes immediately, which means the loss from a weaker model stays bounded. A task that only a human can judge lets mistakes flow downstream.

Scoring a Task on Three Axes

I score each task on three axes. The point is that all three measure the nature of the task, not the nature of the model.

AxisQuestionLow (leans local)High (leans cloud)
VerifiabilityCan correctness be checked automatically?Types, tests, linters decide it instantlyOnly a human reading it can judge meaning
ReversibilityCan a mistake be undone cheaply?Revert at the granularity of a commitExternal sends, billing, irreversible writes
Blast radiusHow far does a failure spread?Single file, stays localProduction, multiple apps, users affected

A task that scores low on all three can absorb a failure silently. That is the territory to hand to local Gemma. Local keeps the round trips fast and spends none of your cloud usage cap.

A task that scores high on even one axis carries a larger penalty for failure. That belongs on the cloud, with a human approval added on top. Keeping the mistake from escaping matters more than being fast.

The important move is to decide this scoring once per task type and then freeze it. Deliberating in the moment is exactly what made my decisions wobble. Moving the judgment into the design is the whole idea.

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
A decision table and Python router that scores each task on whether it can be auto-verified, cheaply reverted, and how far a failure spreads, then picks local or cloud
A logging harness that records realized correction rate, latency, and cost per route so you can retune thresholds from data rather than instinct
The monitoring points for catching a silently degrading local model and a verifier that has quietly gone stale
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

Antigravity 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

AI Tools2026-06-14
Pairing a Local LLM With Antigravity to Keep Sensitive Code Off the Cloud
Should you really let a cloud agent read code that holds your billing keys and revenue logic? For indie developers that worry is concrete. Here I pair Ollama and Gemma as a local LLM with Antigravity, routing sensitive parts to local and general parts to the cloud, with the decision rules and measurements.
AI Tools2026-06-14
Routing thinking_level by Task in Gemini 3.5 Flash — Re-measuring My Token Spend
After Gemini 3.5 Flash became Antigravity's default, my thinking tokens crept up quietly. Here's how I measured thinking_level per task type and landed on a setup that cuts spend without losing accuracy.
Integrations2026-07-09
Calling Local LLMs from Antigravity — Ollama and LM Studio Integration in Practice
Treating Antigravity as a cloud-LLM-only tool? Pairing it with Ollama or LM Studio opens up real options for confidential projects and cost-sensitive workloads. Here's the practical configuration and operational knowledge.
📚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 →