GEMINI LABJP
CHAT — Tomorrow, August 26, Google Chat becomes the Ask Gemini hub: searching, drafting, catching up on threads, and managing tasks and events all land in one place with Workspace context intactSEARCH — AI Mode in Google Search is now sometimes served by Gemini 3.7 Flash. Response characteristics on the search side shift with it, which is worth checking if you watch your traffic mixSTUDIO — Developer logs now cover the Interactions API. Supported calls can be traced from the AI Studio dashboard, which makes triage easier before you have logging of your ownTTS — gemini-3.1-flash-tts-preview now supports streaming speech generation through streamGenerateContent, so playback can start before generation finishesROBOTICS — gemini-robotics-er-1.6-preview shuts down on August 31, six days out. The ER 2 line succeeds it with spatial reasoning, multi-step tool orchestration, and multi-robot coordinationSTUDENT — Gemini added a student hub, study notebooks, interactive visualizations, and Deep Research in Gemini Live, with a free year of Google AI plans for eligible studentsCHAT — Tomorrow, August 26, Google Chat becomes the Ask Gemini hub: searching, drafting, catching up on threads, and managing tasks and events all land in one place with Workspace context intactSEARCH — AI Mode in Google Search is now sometimes served by Gemini 3.7 Flash. Response characteristics on the search side shift with it, which is worth checking if you watch your traffic mixSTUDIO — Developer logs now cover the Interactions API. Supported calls can be traced from the AI Studio dashboard, which makes triage easier before you have logging of your ownTTS — gemini-3.1-flash-tts-preview now supports streaming speech generation through streamGenerateContent, so playback can start before generation finishesROBOTICS — gemini-robotics-er-1.6-preview shuts down on August 31, six days out. The ER 2 line succeeds it with spatial reasoning, multi-step tool orchestration, and multi-robot coordinationSTUDENT — Gemini added a student hub, study notebooks, interactive visualizations, and Deep Research in Gemini Live, with a free year of Google AI plans for eligible students
Articles/Advanced
Advanced/2026-07-12Advanced

Spend Deep Reasoning Only Where It's Needed: Per-Request thinking_level Routing in Gemini

Running every request at high thinking_level bloats latency and cost; forcing low drops accuracy on hard questions. This walks through a router that picks Gemini 3.x thinking_level per request from an inexpensive difficulty estimate, keeping p95 latency inside a mobile budget while reserving deep reasoning for the questions that need it — with measured numbers and working code.

gemini109thinking-levellatency3cost5mobile6

Premium Article

The first feedback on a small advice feature I added to an app wasn't about accuracy. It was: "sometimes it takes forever to come back." The logs showed the response times split into two clusters. Most requests returned in one to two seconds, while a handful took eight or nine.

The odd part was that the slow requests weren't always the hard ones. A light query like "any wallpapers in a similar color?" would have the model deliberating just as long as a genuinely multi-step question. Because I had pinned every request to a single deep setting, easy questions were paying the same reasoning tax as hard ones.

Gemini 3.x lets you set thinking_level per request. Instead of using one fixed value, you vary it with the difficulty of the request: shallow and fast for simple questions, deep only for the ones that earn it. That single change held the median wait time steady while cutting the total amount of deliberation sharply. Below is how I built the router, with the numbers I measured along the way.

Why "all high" and "all low" both break

A fixed thinking_level hurts in either direction. Pin it to high and simple questions over-deliberate, stretching latency and inflating output tokens (which include thinking tokens) so the bill climbs. Pin it to low and you get fast and cheap, but answers to multi-step questions turn shallow and sometimes wrong.

Here are the numbers I measured. I ran a representative 100 requests for one feature through the same prompt and input, varying only thinking_level, and recorded the median completion time (not first token) and the median billed output tokens. The model was gemini-flash-latest (the 3.5 Flash line).

thinking_levellatency p50latency p95median output tokenseasy-question accuracyhard-question accuracy
low~1.3s~2.1s~21098%71%
medium~3.4s~5.2s~54098%86%
high~6.8s~9.1s~1,18099%92%

What the table says is that on easy questions, low and high land at almost the same accuracy while latency spreads about 5x and output tokens about 5.6x. Processing an easy question at high throws away both the wait time and the money. Run a hard question at low, though, and accuracy falls to 71% — missing close to three in ten. That is not a feature you want to put in front of paying members.

The answer is not to pin either extreme. Tell the difficulty apart, route simple ones to low and only hard ones to high, and take the middle at medium. As long as the routing is accurate enough, the median wait time stays at low while hard-question accuracy climbs toward high.

Telling requests apart by difficulty

The heart of routing is the part that, the moment a request arrives, cheaply estimates how much thinking it needs. Putting an expensive judgment here would defeat the purpose, so I made it two-stage: a zero-cost heuristic sorts the bulk, and only the ambiguous ones get a model in the loop.

The heuristic reads difficulty off the shape of the input. As an indie developer, the observations I lean on collapse into three:

  1. Input length and structure. Short single-fact lookups skew low. Requests with several conditions, or phrasing like "compare" or "and explain why," skew high.
  2. The shape of the expected answer. A one-word or one-value answer is low. Anything asking for steps, reasoning, or trade-offs needs deeper thinking.
  3. The cost of being wrong. Anything touching the purchase flow or steering a user's action gets bumped to medium or above, even if slower. Here, not missing beats being fast.

These are not perfect. A short-but-hard question ("which is the better deal, A or B?" is multi-step in ten characters) slips through. That is exactly why only the gray zone the heuristic can't call gets handed to the next stage.

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 two-stage difficulty estimate that maps each request to low / medium / high thinking_level and keeps p95 latency inside a fixed budget
Measured response time and output tokens per thinking_level, plus how to back the ceiling out from a mobile wait-time budget
How mis-routing a hard question to low fails silently, and the cheap signals plus a Flash pre-pass that catch it
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 $15 for lifetime access
View Membership →

Related Articles

Advanced2026-08-25
Rebuilding the CTR Denominator After AI Search Fans Out Your Queries
My top five queries by impressions all had zero clicks, and four of them were not phrases a person would type. Here is how I rebuilt the denominator and where I let Gemini make the call.
Advanced2026-08-24
A Provenance Gate That Never Asks Gemini to Name the Country
How I rebuilt the pre-publish provenance check for a ukiyo-e wallpaper app, moving from asking the model to name a country to asking it only to list the marks physically present on the paper. Includes the working code, the decision table that lives on my side, and why an abstain path had to come before accuracy.
Advanced2026-07-11
A Risk-Tiered Approval Gate for Gemini Function Calling
Handing full autonomy to an agent is unnerving. This walks through a Gemini function-calling loop that routes tool calls into auto-run and hold-for-approval by risk tier, then feeds the result back to the model after a human signs off.
📚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 →