Back to blog
Trends

Gemini 3.5 Flash Hits Opus 4.7 on Agents at 1/10 the Price: 6 Prompt Rewrites for the Migration (May 2026)

ยท14 min read
Gemini 3.5 Flash Hits Opus 4.7 on Agents at 1/10 the Price: 6 Prompt Rewrites for the Migration (May 2026)

On May 19, 2026, at Google I/O, DeepMind shipped Gemini 3.5 Flash to GA with a model card that does something Flash-tier models were not supposed to do: it tops MCP Atlas at 83.6%, 4.5 points clear of Opus 4.7 and 8.3 points clear of GPT-5.5 [1][2]. Terminal-Bench 2.1 lands at 76.2%, CharXiv Reasoning at 84.2%. None of those are Pro-tier numbers from last year; they are May 2026, the leading frontier scores on agentic benchmarks.

Pricing: 1.50per1Minput,1.50 per 1M input, 9.00 per 1M output, 0.15per1Mcachedinput[1].Thatcachedrateisthelineitemtofocuson.Opus4.7sitsat0.15 per 1M cached input [1]. That cached rate is the line item to focus on. Opus 4.7 sits at 15/$75. On uncached calls the Flash is 10ร— cheaper on input and 8.3ร— cheaper on output. On cached input, the gap stretches to roughly 100ร— if you compare to uncached Opus, or about 60ร— against Opus's own cache pricing. Same 1M context window. About 4ร— faster end to end (>280 tokens/s).

The catch: the prompts you wrote for Opus, GPT-5.5, or even Gemini 3.1 Pro will mostly run, but most of them will not capture the agentic gain or the cache discount. The thinking model changed, the default reasoning budget moved, and chain-of-thought preambles are now actively counterproductive. I ran the migration over a handful of agent workloads I rely on and re-scored the rewritten prompts; the structural rewrites compound and the savings are real.

This article walks through what shipped, the six prompt rewrites that capture the actual gain, and what broke on me during the migration.

Gemini 3.5 Flash migration featured
Gemini 3.5 Flash migration featured

What Actually Shipped on May 19

Three things matter for prompt engineering, in this order:

Thinking model overhaul. The thinking_budget parameter you may have used on Gemini 3.1 is gone. The new parameter is thinking_level with three values: low, medium, high. Default for Gemini 3.5 Flash dropped from high (the de-facto Gemini 3.1 default for agentic) to medium [3]. Existing prompts that did not pass an explicit value now run at a lower reasoning budget than before. Output quality on multi-step prompts can drop quietly if you do not check.

Cache discount as the new center of gravity. Cached input at $0.15/M is a 90% discount on the standard input rate. On every multi-turn agentic workload, the cached prefix (your system prompt plus the stable tool schema plus the conversation prefix) is now responsible for the bulk of your billable tokens. Designing your prompt around a cacheable prefix is no longer a "nice to have"; it is the single biggest cost lever available.

Agentic primitives moved up. Gemini 3.5 Flash advertises parallel sub-agent execution, long-horizon multi-step workflows, and reliable tool calling within a 1M-token context. The MCP Atlas lead is the headline; the practical consequence is that orchestration prompts that treat tool calls as exceptional waste cycles. The model expects to call tools and expects you to let it plan the call order.

The rest of the I/O keynote (Gemini 3.5 Pro in testing, Gemini Omni for video, Gemini Spark) is downstream of these three for an indie dev or small team. The Flash is the workhorse and the line item.


Why Flash Is the Right Target Now

Three migration paths compete for attention right now: DeepSeek V4 (10ร— cheaper than Opus on chat, covered in S9), GPT-5.5 Instant (the new ChatGPT default, covered in S12), and Gemini 3.5 Flash (this article). They are not interchangeable.

TargetStrongest onWeakest onBest for
DeepSeek V4Chat completion, raw costTool calling, frontier agenticOne-shot completions, batch jobs
GPT-5.5 InstantQuality / latency balance, ChatGPT ecosystemTool calling agents (Codex aside), priceUser-facing chat apps
Gemini 3.5 FlashAgentic / tool-use, multimodal, cache pricingBrand-new ecosystem, smaller communityMulti-step agents, MCP servers, doc-heavy pipelines

If your workload is "a tool-using agent that reads documents and calls 3-7 tools per turn," Gemini 3.5 Flash is the new default. If you are running a single-turn classifier or a chat box, DeepSeek V4 still wins on raw cost and GPT-5.5 Instant still wins on integration. Pick by workload shape, not by brand allegiance.

The single fact that swung my own migration decision: Opus 4.7 cached input costs about 1.50/M(101.50/M (10% of 15). Gemini 3.5 Flash cached input costs $0.15/M. Same 90% cache discount on each platform, but Flash starts 10ร— cheaper before the cache. For workloads where 70%+ of monthly tokens are cached system+tool prefix, Flash is roughly 60-100ร— cheaper than running the same workload on uncached Opus, and even against Opus's own cached pricing the gap is around an order of magnitude.

Want to know how effective your prompts are? Prompt Score analyzes them on 6 criteria.

Try it free

The thinking_level Shift, in One Diagram

If you do nothing else from this article, change one parameter and re-run your prompts.

Gemini 3.5 thinking level shift
Gemini 3.5 thinking level shift

The mental model: in the GPT-4 and Gemini 3.1 era, you steered the model's reasoning depth by writing the steps into the prompt ("think step by step", "first do X, then Y"). The model could not plan; you planned for it.

In the Gemini 3.5 Flash era, the model has its own planning budget knob. You set the knob (thinking_level: low|medium|high) and write a shorter prompt that names the mission instead of the recipe. The model spends its budget on its own plan. If you also write the recipe in the prompt, the model spends its budget twice: once on parsing your recipe and once on its own plan. Quality drops, latency rises, cost rises.

The default move from high to medium is the silent regression. Production prompts that previously ran at high by default now run at medium, with no migration warning. If output quality on multi-step prompts looks fine but slightly degraded after the upgrade, this is almost certainly why.


Six Rewrites I Ran During the Migration

These are the six patterns where my old prompts cost the most performance against Gemini 3.5 Flash. Each before/after is illustrative.

Rewrite 1: Drop "think step by step" and set thinking_level explicitly

Before:

Think step by step. First identify the relevant tables. Then write
the SQL. Then explain the result in plain English.

After:

generation_config = {"thinking_level": "high"}
Given the schema in the system prompt, answer the user question with
a SQL query and a one-sentence interpretation of the result.

The model plans the steps. You set the depth. Verbose chain-of-thought preambles compete with the model's own planner and inflate output tokens without adding accuracy.

Rewrite 2: Re-check Every Prompt That Relied on the Old Default

If you never passed thinking_budget or thinking_level explicitly on Gemini 3.1, your prompt was effectively running at high. The Gemini 3.5 Flash default is medium. Prompts where output quality matters more than latency should be bumped to high explicitly. Prompts where latency matters more than the last 5% of quality should be set to low for the savings.

My audit pattern: take the production prompts you call most often, re-score them with thinking_level: low, then medium, then high. Pick the lowest level where the score does not degrade. Three of my workhorses ran fine at low and one needed high. The default of medium was wrong in both directions.

Rewrite 3: Replace Step-by-Step Recipes with Mission Statements

Before:

Your job is to:
1. Read the user's request.
2. Determine which tools are relevant.
3. Call the tools in this exact order: search_docs, then summarize, then format_output.
4. Return JSON with fields: result, confidence, sources.

After:

Mission: answer the user's request using the tools available.

Tools: search_docs, summarize, format_output. Call in whatever order
the request needs.

Output: JSON {result, confidence, sources}.

Gemini 3.5 Flash plans its own tool sequence and now beats GPT-5.5 and Opus 4.7 on agentic benchmarks specifically because of that planning. Hard-coding the order strips out the gain. Hard-code only the order that is a true downstream invariant (a database write that must happen after the validation step).

Rewrite 4: Move the System Prompt Into the Cache Breakpoint

Before: dynamic data and stable identity mixed in the system prompt, regenerated per request.

After: stable identity, role, tool schemas, and shared reference data go in the cached system block. Per-request data (user input, timestamps, session IDs) lives in the first user message after the cache breakpoint.

The techniques you're reading about work. Test your prompts now with Prompt Score and see your score in real time.

Test your prompts

The math: cached input at 0.15/M,uncachedat0.15/M, uncached at 1.50/M. If 70% of your monthly Gemini Flash tokens are cacheable prefix, your bill on that workload drops by about 60% just from this rewrite. If 90% are cacheable, the drop is closer to 80%. This is the single highest-ROI rewrite in the article.

The corollary is byte stability: the cached system prompt has to be exactly the same string across requests, or the cache misses. No f"Current time: {now()}". No per-request UUIDs for tracing. (S11 on Anthropic cache diagnostics covers the same discipline for Claude; the rule is identical here.)

Rewrite 5: Cut Tool Calls That Exist to Defend Against Old Models

Before:

Before answering, always call validate_input to verify the user
request is well-formed. Then proceed.

After: (no validation tool, validation rule moved to a decision in the prompt)

If the request is missing a required parameter, ask the user once
instead of calling tools.

Gemini 3.5 Flash's reliability on tool calling has improved enough that the defensive "validate everything first" pattern, written for the GPT-4 / Gemini 3.1 era when models would call tools with malformed arguments, is now pure overhead. Each unnecessary tool call costs a round trip and a chunk of output tokens. The Google guidance is explicit: reduce unnecessary tool calls by lowering thinking_level first, then by trimming the prompt's "always do X" defenses [3].

Rewrite 6: Bump media_resolution_high for Dense Document Prompts

If your prompt feeds a PDF or a slide deck through the Gemini API, the default media resolution on 3.5 Flash is tuned for general documents. Dense reference material (research papers, financial reports, anything heavy in tables and small text) benefits from media_resolution_high. The cost is more input tokens; the gain is fewer hallucinations and fewer re-extraction loops downstream.

This is workload-specific. Test before flipping it on universally. For my doc-heavy prompts the higher resolution paid for itself; for chat prompts that occasionally cite a PDF, it would have been overkill.


What Broke When I Migrated

Three workloads of mine ran into surprises during the migration. The pattern is worth flagging.

Workload A: a research assistant agent. Worked perfectly on the first run. Quality felt off after a few hours of use. The issue: the prompt had been running at Gemini 3.1's default thinking_budget: high, and the new default thinking_level: medium was just enough to dull the reasoning on the longer questions. Adding thinking_level: "high" explicitly restored the old behavior. Lesson: re-check every prompt that did not pass the parameter explicitly.

Workload B: a contract review pipeline. Throughput dropped by half. Root cause: I had wrapped the tool calls in a "validate first" guard that fired three pre-flight tool calls per turn. On Opus 4.7 those guards were necessary defenses against occasional malformed calls; on Flash they were burning round trips for no benefit. Removing the guards and trusting the model brought throughput back above the old baseline.

Workload C: an inbox triage agent. Cache hit rate at first was near zero. Root cause: I had not moved the dynamic per-request data out of the system prompt. The string was changing every request because of a timestamp baked in for telemetry. Cache was invalidating on every turn. Moving the timestamp into the first user message brought the cache hit rate to about 92% within an hour.

Three different breaks, all of them captured by the rewrites above. None of them looked like a Gemini bug. All of them were assumptions baked into the old prompts that no longer applied.


Decision Matrix: Migrate to Flash, Stay on Opus, or Split

The Flash is not the right target for every workload. The decision rests on agent shape and cache utilization, not on benchmarks alone.

Gemini 3.5 Flash migration decision matrix
Gemini 3.5 Flash migration decision matrix
Migrate to Gemini 3.5 Flash if...Stay on Opus 4.7 or split if...
Workload is multi-turn agentic with 3+ tool calls per sessionWorkload is one-shot completion or single-turn classification
50%+ of monthly tokens fall in a stable cacheable prefixEach request has a new system prompt or rapidly changing tools
You are building MCP servers or document-heavy pipelinesYou need Claude-specific features (artifacts, code execution)
Cost is the binding constraint or latency mattersOutput quality on long-form creative writing is the binding constraint
You can re-test and re-score migrated promptsYou are pinned to an Opus snapshot for compliance

If three or more of the left column apply to a given workload, the migration is an afternoon and the savings compound from day one. If two or fewer, leave it on the current model and only revisit when pricing or quality moves.


What This Means for Solo Devs and Small Teams

Three takeaways from running both versions for a week.

Your Opus bill is now optional. If you have an agentic workload running on Opus 4.7 in May 2026 and you have not yet looked at Gemini 3.5 Flash, you are paying a brand premium of 8 to 10ร— before the cache discount. The migration is the highest-impact hour you will spend this month if your bill on that workload is meaningful.

Cache design is the actual lever. The headline benchmark numbers are nice, but the line that matters on your invoice is $0.15 per 1M cached tokens. Treat the cached prefix as a compiled artifact. Same discipline as S8 and S11 on Claude. The rule generalizes: production prompts in May 2026 are byte-stable by design or they leave money on the table.

Test the thinking level, do not guess. The default moved from high to medium without an upgrade warning. Every prompt that did not pass the parameter explicitly is running at a different reasoning budget than it was last week. Re-score before you ship. The cost of testing three values on your most-used prompts is one short afternoon; the cost of shipping a quietly-degraded agent is a customer report you have to chase.

If your monthly AI bill has any line items above $100, the Flash migration probably pays for itself in the first week. The prompts that get the most out of it are the agentic ones, where the model's own planning replaces the recipe you used to write into the system prompt.


Sources

[1] Google DeepMind, Gemini 3.5 Flash Model Card, deepmind.google/models/model-cards/gemini-3-5-flash. Benchmark scores (MCP Atlas 83.6%, Terminal-Bench 2.1 76.2%, CharXiv Reasoning 84.2%), context window, pricing.

[2] Google, Gemini 3.5: frontier intelligence with action, blog.google/innovation-and-ai/models-and-research/gemini-models/gemini-3-5. I/O 2026 announcement, agentic capabilities, speed comparison.

[3] Google AI for Developers, What's new in Gemini 3.5 Flash, ai.google.dev/gemini-api/docs/whats-new-gemini-3.5. thinking_level parameter, default change from high to medium, tool call reduction guidance, media_resolution_high setting.


Keep Reading

Want to know which of your prompts will score worse on the new defaults before you find out in production? Score them with Keep My Prompts and see the 6 quality criteria that map directly to the mission-first rewrite pattern.

#gemini#gemini-3-5-flash#google#deepmind#agentic#mcp-atlas#prompt-engineering#migration#cache#indie-dev#small-team#2026

Ready to organize your prompts?

Start free, no credit card required.

Start Free

No credit card required

Related articles