October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsSlow PC?RecommendedPC slow today? Run a repair scan before it gets worseResolve common Windows issues and optimize system performance.Scan NowOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
Mountain View desk4 min

Gemini 3.8 Flash Reasoning Effort: Balance Latency and Cost in TypeScript

Configure Gemini 3.8 Flash reasoning in TypeScript with thinking_level. Compare low, medium, and high, avoid output-cap cutoffs, and measure cost and latency on your workload.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Set Gemini 3.8 Flash’s thinking_level to control how much reasoning the API may use: choose low for routine, latency-sensitive requests, keep the default medium for a general starting point, and reserve high for tasks that benefit from deeper reasoning. These levels influence reasoning depth, token use, and response time, but Google publishes no level-by-level latency benchmark, so measure your own workload before choosing a production setting.

What does thinking_level do?

Gemini 3.8 Flash uses dynamic reasoning: the model adjusts its reasoning to the request’s complexity. The thinking_level setting guides that effort. Google documents low, medium, and high; medium is the default. The model reference identifies gemini-3.8-flash as stable and lists a maximum of 1,048,576 input tokens and 65,536 output tokens. See Google’s Gemini 3.8 Flash model reference.

As an Amazon Associate I earn from qualifying purchases.

The setting is a qualitative control, not a promise of a particular response time, answer quality, or token budget. Google’s Gemini thinking guide recommends lowering thinking_level to reduce cost or latency rather than shrinking max_output_tokens.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

How do you set reasoning effort in TypeScript?

Google’s JavaScript documentation demonstrates the native Gemini Interactions API with the @google/genai SDK. The same JavaScript-compatible request shape can be used in a TypeScript project:

import { GoogleGenAI } from "@google/genai";

const client = new GoogleGenAI({});

const interaction = await client.interactions.create({
  model: "gemini-3.8-flash",
  input: "Summarize this incident report and identify its unresolved causes.",
  generation_config: {
    thinking_level: "low",
  },
});

console.log(interaction.output_text);

Change "low" to "medium" or "high" to select another documented level. The example establishes the documented JavaScript request shape, but not a version-specific TypeScript declaration or compiler requirement. Check that your installed SDK version exposes the Interactions API and accepts this configuration in its current typings.

minimal is not a supported level for Gemini 3.8 Flash and returns an error. For the complete request example and guidance, see Google’s thinking guide.

Rank #2
TypeScript Programming Language - Software Engineer & Coder T-Shirt
  • TypeScript implements a superset of syntax for strictly typed development, facilitating deep static analysis and enhanced development environment integration. The compiler translates source into standard script formats, ensuring parity across any runtime.
  • TypeScript is ideal for front-end developers, full-stack engineers, and software architects who build large-scale web applications. It serves those looking to improve code excellence, reduce bugs through static checking, and maintain complex projects more.
  • Lightweight, Classic fit, Double-needle sleeve and bottom hem

Which level should you choose?

Level Good starting point Trade-off to evaluate
low Routine, latency-sensitive tasks such as real-time chat, drafting, or fast data analysis. Google says it reduces time-to-answer for these use cases; verify task success and token use on your own prompts.
medium Most tasks; it is the documented default. Google also recommends it for complex coding and agentic use cases. A general-purpose balance, not a guarantee of a particular latency or cost.
high Difficult multi-step reasoning, mathematics, or work where deeper reasoning and tool orchestration matter. May take longer and use more tokens; weigh that against task success and tool-call reliability.

These are Google’s qualitative recommendations in its Gemini 3.8 Flash update, not comparative accuracy or speed measurements. For consequential tasks, do not select a level solely because its name sounds more thorough; test whether it improves the result enough to justify its time and token use.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

How should you benchmark the trade-off?

Run the same representative prompts at each level, with the same surrounding application and tool setup. Measure end-to-end latency, billed input and output tokens, task success, errors, and tool-call reliability. Include both routine and difficult cases so an average does not hide a failure pattern that matters to your users.

  • Record complete-response latency as well as time to first response if both matter to the application.
  • Compare success against a defined task-specific standard, not just whether the model returned text.
  • Track token use and cost alongside latency; a faster setting is not automatically cheaper for every request.
  • Repeat tests on the workload and service tier you plan to deploy, then choose the lowest effort level that consistently meets your quality and reliability needs.

Google’s documentation describes the qualitative controls but does not publish comparable latency or accuracy results for each level. Any speedup or quality difference for your application therefore needs to come from your own measurements.

Why not lower max_output_tokens instead?

max_output_tokens is a hard cap that includes thought tokens. If it is too small, generation can stop while the model is still reasoning, leaving an incomplete or empty answer; Google says generated thinking tokens are still billed in that case. Lowering thinking_level is the documented way to reduce reasoning-related cost or latency without using a small output cap as a substitute. See the Gemini thinking guide.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

How do reasoning levels affect API cost?

Google’s standard paid-tier rates for Gemini 3.8 Flash are scheduled to change on January 1, 2027. Through December 31, 2026, the listed rates are $0.75 per 1 million input tokens and $3.75 per 1 million output tokens. Starting January 1, 2027, the listed rates are $1.50 per 1 million input tokens and $7.50 per 1 million output tokens. Google states that output pricing includes thinking tokens, so reasoning can affect the bill even when the final answer is short.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

These are published rates, not a per-request estimate. Actual charges depend on tokens consumed and the service tier. Google also lists Batch and Flex at half the standard rates during the introductory period, subject to their terms: Batch is for asynchronous processing, while Flex offers variable latency and best-effort availability. Check the current Gemini Developer API pricing page before deployment, especially around the scheduled rate change.

Can you use reasoning_effort instead?

Google documents reasoning_effort mapping to Gemini’s thinking_level through its OpenAI compatibility interface. That is an alternative integration path; the native Gemini SDK example above uses generation_config.thinking_level. See Google’s OpenAI compatibility guide.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
PC Slower Than It Used to Be?Free scan - under a minute
Outdated Drivers Are Slowing You DownFree scan - exact matches

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.