
Think Less, Pay Less: Routing Agent Subworkloads by Thinking Level in Gemini 3.7 Flash
Chris Harper
2 min read
Aug 13, 2026 · 20:09 UTC
Gemini 3.7 Flash ships a per-request thinking_level parameter so your agent can dial reasoning up for hard steps and down for cheap lookups — one model, one endpoint, variable cost.
Most agentic pipelines treat every step identically: every tool call, every lookup, and every complex code analysis goes to the same max-reasoning inference tier. Gemini 3.7 Flash (GA today) breaks that pattern with a thinking_level parameter in generation_config that lets you tune per call.
Three levels:
| Level | Best for | Cost profile |
|---|---|---|
low | Quick lookups, file listing, simple tool calls | Lowest |
medium | Default for most agentic steps, code analysis | ~1.5× low |
high | Hard debugging, complex code gen, architectural design | Highest |
Routing pattern:
from google import genai
client = genai.Client()
def step(task: str, thinking_level: str) -> str:
return client.interactions.create(
model="gemini-3.7-flash",
input=task,
generation_config={"thinking_level": thinking_level},
).output_text
# Cheap: simple context-prep steps
file_list = step(
"List all Python files modified in the last 24h",
thinking_level="low",
)
# Balanced: most analytical steps
plan = step(
f"Given these files: {file_list}\n"
"Identify which ones might contain auth logic.",
thinking_level="medium",
)
# Full depth: complex debugging
fix = step(
f"Review this auth module: {plan}\n"
"Find any race conditions and rewrite the transaction lock safely.",
thinking_level="high",
)
Via OpenRouter (OpenAI-compatible client):
import openai
client = openai.OpenAI(
base_url="https://openrouter.ai/api/v1",
api_key="<openrouter-key>",
)
resp = client.chat.completions.create(
model="google/gemini-3.7-flash",
messages=[{"role": "user", "content": task}],
extra_body={"generation_config": {"thinking_level": "high"}},
)
Why this matters for Claude Code workflows: On days when Anthropic quota is under pressure, Gemini 3.7 Flash is a solid background-task model — particularly for the compute-heavy "write a migration plan" or "find the bug" steps where you want real reasoning but don't need Claude's specific strengths. The thinking-level routing keeps those background costs proportional to actual task complexity.
Sources: Gemini 3.7 Flash — ai.google.dev · Gemini thinking guide · Gemini 3 Developer Guide