Prices and model details on this page may have changed. For current rates, see the OpenLux pricing page.

Home / Gemini 3.6 Flash

gemini-3.6-flash Returns HTTP 400 After Migration: Fix the Checklist Item by Item

If requests started returning HTTP 400 after you changed the model from gemini-3-flash-preview or gemini-3.5-flash to gemini-3.6-flash, check two things first: whether the request ends with a prefilled model turn, and whether it sets both thinking_level and thinking_budget. Google's official page "What's new in Gemini 3.6 Flash and 3.5 Flash-Lite" states that if the last non-empty turn in the request is a model turn, the API returns a 400 error. It also states that temperature, top_p and top_k are deprecated and ignored, and that future model generations will reject them with HTTP 400. The migration checklist further asks you to remove candidate_count, replace thinking_budget with thinking_level, and review your function calling code. This page walks through each item using Google's documentation and ends with a way to verify the fix.

Which code is affected

Google's model deprecations page (https://ai.google.dev/gemini-api/docs/deprecations) lists gemini-3.6-flash as the recommended replacement for gemini-3-flash-preview and gemini-3.5-flash. For gemini-3.5-flash it says the endpoint is not shutting down and automatically routes API requests to gemini-3.6-flash, and that the model is not available to select in Google AI Studio.

In other words, when you call Google's API directly, a request that still names gemini-3.5-flash is served by gemini-3.6-flash, so the rules on this page apply to it as well.

The gemini-3.6-flash model page describes it as a stable, previous-generation Flash model that remains available for production use, and points to Gemini 3.8 Flash as the newest Flash model. The deprecations page lists no shutdown date for gemini-3.6-flash. The official migration guide covers moving to 3.6 Flash from Gemini 3.5 Flash, Gemini 3 Flash (Preview) and Gemini 3.1 Pro.

Google says these API changes apply to Gemini 3.6 Flash, Gemini 3.5 Flash-Lite and all future Gemini model releases, so the changes you make now should stay in place when you move to a newer model later.

Prefilled model turns now return 400

The official guide states that prefilling model turns is no longer supported: if the last non-empty turn in the request is a model turn, the API returns a 400 error. Prefilling means placing a model-role turn at the end of contents, for example the opening of a JSON object, so that the model continues from it.

The rule is about the last non-empty turn. A normal multi-turn history in which user and model turns alternate is fine, as long as the final non-empty turn is not a model turn.

Google gives two replacements: put formatting and tone requirements in system_instruction, or use Structured outputs (https://ai.google.dev/gemini-api/docs/structured-output) to constrain the response format. If you used prefilling to force JSON output, you can switch to Structured outputs.

To diagnose it, log the request body that is actually sent and confirm that the last non-empty turn in contents is not a model turn. If you use a wrapper library, go by the request body it actually sends, not by your own code.

temperature, top_p, top_k and candidate_count

The migration guide states that temperature, top_p and top_k are deprecated and ignored, that supplying them returns an HTTP 400 error in future model generations, and that you should remove them from all requests. On 3.6 Flash they do not cause an error today, but they also have no effect.

The practical impact: code that set temperature to 0 to get more stable output no longer gets that effect on 3.6 Flash. Google's advice is to define a system instruction with explicit rules for your use case when you need more deterministic output.

The checklist also says to remove candidate_count, which it describes as unsupported in Gemini 3 and later.

For context, the older Gemini 3 developer guide (https://ai.google.dev/gemini-api/docs/gemini-3), which is now marked as deprecated and will be removed, recommended keeping temperature at its default of 1.0 and warned that lower values could cause looping or weaker results. The 3.6 Flash migration guide is the newer instruction: simply remove these parameters.

Replace thinking_budget with thinking_level

The checklist asks you to replace thinking_budget with thinking_level, and gives medium or high as the values to use. The table on the official Thinking page (https://ai.google.dev/gemini-api/docs/thinking) lists gemini-3.6-flash as thinking on by default at medium, with minimal, low, medium and high supported. The table does not list an option to turn thinking off; the lowest level is minimal.

Watch the default when migrating from gemini-3-flash-preview: the same table lists its default as high, while gemini-3.6-flash defaults to medium. If your code never set a thinking level and relied on the default, the effective level drops from high to medium after the switch; set high explicitly if you want to keep the previous behavior. Migrating from gemini-3.5-flash does not change the default, because Google states that 3.6 Flash uses the same medium default as 3.5 Flash.

The deprecated Gemini 3 developer guide states that thinking_budget is still supported for backward compatibility, but that using thinking_level and the legacy thinking_budget in the same request returns a 400 error. So remove the old field when you add the new one instead of sending both.

Google's examples use the Interactions API, where the thinking level sits under generation_config as thinking_level. With generateContent, thinking settings go in the thinking configuration inside generationConfig; check the GenerationConfig section of the API reference (https://ai.google.dev/api/generate-content) for the exact field names.

What to check in function calling and thought signatures

The checklist asks you to review function calling code. The first item is to place multimodal assets inside the response payload. The Function calling page (https://ai.google.dev/gemini-api/docs/function-calling) explains that for Gemini 3 series models you can include one or more content blocks in the result field of the function_result step, and each content block must specify its type, such as text or image.

The second item is to format inline instructions using two newline characters (\n\n). The official checklist does not go into more detail.

The third item is Malformed_Function_Call. The Function calling page says that when a prompt asks the model to output structured text (XML, YAML, JSON and so on) just before a tool call, the tool call may occasionally fail with Malformed_Function_Call. The preferred fix is to have the model put its pre-tool notes in a dedicated update function call, declared with four required string parameters: previous_step, plan, next_step and external. The alternatives are to have the model write those notes as Markdown headers, or to stop requiring text before tool calls.

On thought signatures, the Function calling page states that the SDKs handle them automatically. If you manage conversation history yourself (stateless mode), the Thinking page says you must resend all thought blocks exactly as received and must not remove or modify them, including when switching models within a session. In stateful mode (store set to true and previous_interaction_id passed), the server manages them. The API reference also lists a finish reason MISSING_THOUGHT_SIGNATURE, described as the request having at least one thought signature missing; if you see it, check whether thought blocks were dropped from your history.

Behavior changes that do not raise errors

The migration guide notes that 3.6 Flash prefers running diagnostic code scripts before making changes more often than Gemini 3.5 Flash. Google says this improves accuracy on complex tasks but can add extra exploratory steps on routine frontend work.

It also notes that human evaluators preferred earlier models for visual layout and styling, and that providing explicit design guidelines helps.

Google states that 3.6 Flash completes multi-step workflows with fewer reasoning steps, conversational turns and tool calls than Gemini 3.5. Judge any change in usage from your own billing data; for prices, refer to the official pricing page.

How to verify the fix

Step 1: call the /v1/models endpoint and confirm gemini-3.6-flash is in the list, then confirm your application code actually uses the new model name.

Step 2: send a minimal request in which the last non-empty turn is a user turn, with no temperature, top_p, top_k or candidate_count, and with only one thinking parameter (thinking_level). Confirm it returns 200 with text and that the earlier 400 is gone.

Step 3: confirm the thinking level takes effect. In the generateContent response, usageMetadata.thoughtsTokenCount is the number of thinking tokens (the Interactions API reports total_thought_tokens instead). Run the same prompt once with low and once with high and compare the counts to confirm the setting reaches the model.

Step 4: if you replaced prefilling with Structured outputs, test a few real samples and confirm the output parses as expected. If you use function calling, run a full multi-turn tool-calling exchange and confirm that neither Malformed_Function_Call nor MISSING_THOUGHT_SIGNATURE appears.

Notes for calling through the OpenLux relay

The OpenLux pricing endpoint currently lists gemini-3.6-flash for sale, along with gemini-3.5-flash, gemini-3-flash-preview and gemini-3.8-flash.

The automatic routing of gemini-3.5-flash to gemini-3.6-flash described on the deprecations page is the behavior of Google's own API. This page has not verified which version serves gemini-3.5-flash when called through the relay. When migrating, change the model name to gemini-3.6-flash directly and then apply the checklist above, so the behavior is explicit.

With the Gemini native format, the request path is /v1beta/models/gemini-3.6-flash:generateContent; an OpenAI-compatible endpoint is also available. The Interactions API used in Google's examples (/v1beta/interactions) is not among the verified relay endpoints, so do not assume it works. How thinking parameters are passed to the model through the OpenAI-compatible format has not been verified field by field; confirm it with a minimal request and the thinking token count as described in the previous section.

Create your key on the token page of the OpenLux console. For prices, refer to the official pricing page.

Still stuck? Full documentation and support are at visit the site.

More on this site

Get started

Check the current pricing record and validate Gemini 3.6 Flash in your integration.

Get a free API key

Official site: OpenLux official site

Last updated 2026-10-30 | Written and maintained by OpenLux.
Latency and pricing figures come from our own measurements. Where they differ from the vendor's site, the vendor's live page wins.