Gemini 3.8 Flash for Agent Stacks: Thinking Levels, Cost, and When to Use It
Google priced Gemini 3.8 Flash like a workhorse. On agent jobs it still thinks first, talks a lot, and can wait more than a second before the first token. Here is how we would wire it, and when we would not.

You are about to drop a model into an agent loop: n8n, a review queue, maybe a repo that has to compile. Gemini 3.8 Flash looks cheap on the rate card. On the job it thinks first, then writes a lot. That is the trade. Ignore it and you will call the model fast when the user is still staring at a spinner.
Google launched it on 2 September 2026, with a gated sibling, Gemini 3.8 Flash Cyber, for defenders. Official writeup: Introducing Gemini 3.8 Flash and 3.8 Flash Cyber. Specs live on the Gemini 3.8 Flash model page. This article is the wiring guide: which thinking level, which jobs, which gates. If you still mix up rule steps and model steps, read deterministic workflows versus large language model (LLM) agents first.
What actually shipped
This is the third Flash drop in about six weeks. Google kept 3.7 Flash around for efficiency-first jobs and pointed 3.8 at longer coding and agent runs. Same introductory token price as 3.7. More diligence on hard tasks: extra reasoning steps, more tool calls, more tokens when you ask it to try harder.
| Knob | Value | What it means on a job |
|---|---|---|
| Model code | gemini-3.8-flash | Stable production id. Pin it. Do not chase a preview alias in a live workflow. |
| Input window | 1,048,576 tokens | A repo plus tickets plus a PDF brief can sit in one request. You still pay for what you send. |
| Output ceiling | 65,536 tokens | Enough for a long patch. Not an excuse to skip a file-by-file plan. |
| Inputs | Text, image, video, audio, PDF | Native multimodal. Output is text only. |
| Thinking | low, medium, high | minimal returns an API error. High is the lab default and the slow, verbose one. |
| List price (to 31 Dec 2026) | $0.75 in / $3.75 out per 1M tokens | Google's footnote: $1.50 / $7.50 from 1 January 2027. |
| Not in this endpoint | Image gen, audio gen, Live API | Those stay on other models. Do not design a voice agent on Flash and discover it at demo time. |
Capabilities that do matter for agents: function calling, code execution, structured JSON, URL context, search and Maps grounding, file search, prompt caching, computer use (preview). Batch, Flex, and Priority inference are there if you are doing bulk, not one chat turn.
Thinking is a budget, not a personality
The useful new lever is not "smarter Flash." It is an explicit thinking level. Low for classify-and-route. Medium for a draft with a schema. High for a multi-file patch you will still review. Google says 3.8 works harder on complex tasks. That is a cost and a latency choice you make in the request, not a vibe.
- low: Intent, labels, "is this a lead or spam." Cap tokens. Fail closed if the JSON is wrong.
- medium: Drafts that a person will edit. Emails, briefs, ticket summaries.
- high: Repo work, long PDFs, multi-step tool loops. Queue it. Do not put it on the contact form's thank-you page.
Once tokens start, Flash is quick. Artificial Analysis's high-thinking profile sits around 305 tokens per second, with a 90% cache discount on the rate card. The same suite scored 59 on their Intelligence Index (16th of 195 in that snapshot), well above the class median of 36. It also used about 120 million output tokens across that suite versus a 71 million median. Cheap per token. Not cheap if every job is high thinking and you never cache the system prompt. Numbers: Artificial Analysis on Gemini 3.8 Flash (high).
For a studio stack that means: cache the policy preamble. Keep tools named and boring. Do not resend the same 40-page brand PDF on every turn. A 13-second think before the first answer token is fine on a overnight coding job. It is a failed live chat.
The observe, tool, think loop
Google has been pushing agentic video and long jobs where the model does not swallow the whole file at once. It observes a slice (frames, transcript, audio), calls a tool, thinks, then observes again. You should copy that shape even when the input is a Git repo, not a film.

flowchart LR
Q["Query"] --> O["Observe slice"]
O --> T["Tool call"]
T --> K{"Need more?"}
K -->|yes| O
K -->|no| Think["Think"]
Think --> Out["Text output"]
In n8n that is a loop with a hard cap, not an infinite agent. Schema check after every model node. If the step can email a client or write production, it waits. That operations layer is human-in-the-loop review for n8n and LLM jobs.
Coding scores, read as an operator
Google's headline for 3.8 Flash is long-horizon software engineering. On DeepSWE v1.1 they say it beats most larger frontier models at Flash prices. A public DeepSWE 1.1 board snapshot in early September 2026 had Gemini 3.8 Flash at 0.737, a hair above GPT-5.6 Sol at 0.730, with Claude Fable 5 and GPT-5.6 Terra clustered around 0.700. Leaderboards move. Treat the snapshot as "cheap model in the same band," not a permanent trophy.
| Signal | What Google or labs published | How we use it |
|---|---|---|
| DeepSWE v1.1 | Flash in the top band of autonomous multi-file engineering | Good for a queued coding agent with tests. Not a substitute for review. |
| Humanity's Last Exam Verified (HLE-Verified) | 54.9% | Hard multi-step questions. Useful if your jobs look like research memos, not FAQ chat. |
| Vals Finance Agent V2 / Harvey Legal Agent | Google claims Flash beats 3.7 and some frontier models | Domain agent demos. Re-run on your own docs before you trust a vertical. |
| Antigravity demos | Single-prompt games, DOS Maps toys, USGS topo, Three.js teardowns | Proof of long loops and UI synthesis. Not your client's production app. |
The failure mode is taking a demo as a deploy. A playable 3D sketch in Google Antigravity is not a branded, accessible, crawlable site. If the output has to live on a domain people search, you still need structure, performance, and HTML a crawler can read. That is ordinary website design and development, not a model upgrade.
Token math that actually moves the invoice
Unit price is not the bill. The bill is (uncached input + cached input + thinking/output) times how often the job runs, times how often you retry because the JSON was garbage.
- Pin the intro price in the spreadsheet: $0.75 / $3.75 per million through the end of 2026. Put a 1 January 2027 line at $1.50 / $7.50 so nobody is surprised.
- Cache the static block: system prompt, tool schemas, brand rules. Artificial Analysis lists a 90% cache discount on this model. If you resend 20k tokens of policy every turn, you threw the discount away.
- Cap high thinking: one coding or research job at a time, with a token ceiling. Do not default the whole workspace to high.
- Count retries as spend: a schema miss that re-runs high thinking twice is three invoices. Validate, then retry once with a stricter prompt, then dead-letter.
Artificial Analysis's weighted cost per Intelligence Index task is $0.58 on the high profile. That is a lab average, not your n8n bill. Use it as "this is not a $30-per-million output model." Then measure your own jobs for a week.
A decision rule for this studio's stack
| Job | Model setting | Gate |
|---|---|---|
| Classify inbound mail | low, JSON schema, 300 output tokens | None if labels are in a closed set. HITL if it can change CRM owner. |
| Draft a reply | medium, cached brand voice | Always review before send. See HITL queues. |
| Summarize a 40-page PDF | high, file in context or file search | Human skims the summary against two random pages. |
| Multi-file code change | high, tools, tests in CI | Pull request. Never push to main from the model. |
| Visitor chat on the marketing site | Not 3.8 high | Use a faster, smaller model or a form. Spinners lose leads. |
| Overnight research pack | high, Batch or Flex if the API offers it | Arrive in the morning as a draft, not as an email to the client. |
If the process is still messy, do not pick a model. Write the standard operating procedure (SOP) first. That playbook is SOPs before automation.
Flash Cyber is not the public default
Gemini 3.8 Flash Cyber is the same family, tuned for defensive vulnerability discovery and patching. Google published a Common Weakness Enumeration (CWE) bench pass@1 of 47.2% against a leading frontier model at 47.8%, at Flash cost. Chrome Security said it produced 2.6 times more correct patches than much larger commercial models on their codebase. Wiz reported 7.5 to 9.7 percent higher recall on an internal pentest bench at 2.3 to 5.2 times lower cost. An internal Google eval across 20 languages cleared 70 percent success on discovery.
Access is the Fairwind Program, not a checkbox in AI Studio. Trusted defenders, maintainers, critical infrastructure, government. Apply at deepmind.google/fairwind-program. Guardrails on Cyber are looser for security payloads and tighter on the usual Chemical, Biological, Radiological, and Nuclear (CBRN) and offensive-cyber refusals. If you are not in that program, do not paste exploit code into standard Flash and assume it will help you patch production.
A 14-day trial that does not touch production
- Days 1 to 2: Pin gemini-3.8-flash. Log thinking level, input tokens, output tokens, cache hits, and wall time to first token on every call.
- Days 3 to 5: Rebuild one existing classify job at low. Compare accuracy and cost to whatever you use now.
- Days 6 to 9: One high-thinking coding job against a throwaway branch. Tests must pass. A person merges or rejects.
- Days 10 to 12: Turn on prompt cache for the system block. Recheck the invoice. If cache hit rate is under 50 percent, the prompt is not actually static.
- Days 13 to 14: Write the rule: which n8n nodes may call high, which may not, and the kill switch if daily spend exceeds N. Then stop. Do not "roll it out to all agents" because a DeepSWE number looked good.
What we are not claiming
- We did not re-run DeepSWE or CyberGym in this studio. Scores above are Google's, Artificial Analysis's, or a public board snapshot. They will drift.
- Flash will not replace a senior engineer, a lawyer, or a brand designer. It will draft faster inside a gate.
- Antigravity toys are not a client website. Search, accessibility, and conversion still have to be built.
- Flash Cyber is not "the same model with a prompt." It is a gated distribution. Plan for the public endpoint unless Fairwind said yes.
Use 3.8 Flash where the job can wait, the prompt can be cached, and a person still owns send. Keep 3.7 or a smaller model where the visitor is watching the clock. Keep rules where the answer must be the same twice. That split is the whole AI business automation stack. The model name on the invoice is the least interesting part.
Frequently asked questions
What is Gemini 3.8 Flash?
Gemini 3.8 Flash is Google's September 2026 Flash-tier model for long-horizon coding and agent work. The production model code is gemini-3.8-flash. It takes text, images, video, audio, and PDFs. It outputs text only.
How much does Gemini 3.8 Flash cost?
Launch list price is $0.75 per 1 million input tokens and $3.75 per 1 million output tokens through 31 December 2026. Google says that rises to $1.50 / $7.50 on 1 January 2027. Cached prompts are billed at a steep discount (Artificial Analysis lists a 90% cache discount on this model).
What thinking levels does the API support?
low, medium, and high. The Gemini API documents that minimal is not supported and returns an error. High thinking is the setting most lab scores use. It also burns more output tokens and waits longer before the first answer token.
Should I put Gemini 3.8 Flash on a live chat widget?
Not if the visitor needs an answer in under a second. Once tokens start, Artificial Analysis measured about 305 tokens per second on the high-thinking profile. The wait is the thinking phase before that. Use a faster model for greeting chat. Use Flash on jobs that can sit in a queue.
What is Gemini 3.8 Flash Cyber?
A gated sibling trained for defensive vulnerability discovery and patching. Access is through Google's Fairwind Program for trusted defenders, maintainers, and government operators. It is not the public API default. Do not send exploit payloads to the standard Flash endpoint and expect the same behavior.