How to disable thinking in Google Gemini Chat Model

I’m using n8n Cloud (free plan), version 2.36.7, with the native Google Gemini Chat Model and the AI Agent / Agent Tool framework.

My Supervisor uses:

  • Gemma 4 31B IT (models/gemma-4-31b-it)

My sub-agents use:

  • Gemma 4 26B A4B IT (models/gemma-4-26b-a4b-it)

I’m getting this error when the Supervisor calls a sub-agent:

Unknown content type thinking

A normal request without a tool call works fine. The error occurs when the Agent uses a tool, so I suspect it is related to Gemma’s thinking output being passed through the agent/tool-calling loop.

Google AI Studio allows me to configure:

"thinkingConfig": {
  "thinkingLevel": "MINIMAL"
}

but I can’t find an equivalent setting in n8n’s native Google Gemini Chat Model node.

My questions:

  1. Is there a way to disable thinking or set thinkingLevel: MINIMAL in the native Gemini Chat Model node?
  2. If not, is there another way to solve the Unknown content type thinking error while keeping the n8n Supervisor + sub-agent/Agent Tool architecture?

I’d prefer not to replace the Chat Model with an HTTP Request, since I want to keep n8n’s native agent/tool-calling framework.

Thanks!

Hey @T_Al, while you wait for a response, here are some things that might help:

Suggested resources

Automatically matched to your question.

Docs:

Forum:

@wilfridoco, @nguyenthieutoan, @Anshul_Namdev - you’ve helped with similar issues before, can you take a look?

Automatically suggested by n8n’s community bot. It’s a pilot - please share feedback here.

Hi @T_Al Welcome!
The Gemini node has no thinking control, its options stop at max tokens, temperature, Top K, Top P and safety settings. The Vertex node carries the switch you want, Thinking Budget, where 0 disables automatic thinking:

Point the Supervisor and both sub-agents at Google Vertex Chat Model sub-nodes with Thinking Budget set to 0. The agent and Agent Tool wiring stays exactly as it is, only the credential changes, since Vertex uses a Google Cloud service account rather than an AI Studio key.
The error itself is upstream. Gemini’s thinking blocks parse into a content type the converter has no case for when the history is replayed on the next turn, which is why it only fires once a tool is called:

thanks!

i’m wondering : since the issue seems to be solved on langchain github since couple of months and it can be solved in n8n by fixing the underlying code of the Chat Model . Are there versions of n8n where it is already solved? Or are there plans to do so ?
I imagine that it can happen to any chat model that is under any thinking agent that use tool calls and history , not specifically to Gemini

These models are not OpenAI tool call compatible. You need to switch to other model.

Your 2.36.7 already pins @langchain/google-genai 2.1.24, and current n8n master pins that same version, so there is no n8n release to upgrade into that changes this. The 10103 fix you found merged in March and is already in the build you are running.
What is still open is 10729, filed against gemma-4-31b-it on AI Studio: Gemma 4 mixes its thinking blocks into the content field and there is no reliable way to pull the clean text back out, which is what fails once the history is replayed on a tool call.

On your wider point, this is narrower than it looks. Gemma 4 does support native function calling, so the tool wiring is not what breaks. The Gemma content shape is.

The Vertex-node Thinking Budget answer above is the clean fix. If staying on the AI Studio key matters (free plan, no GCP project), two alternatives:

  1. Bypass the node for the Supervisor. Replace just the Supervisor’s model with an HTTP Request node calling the Gemini API directly, where you can pass "thinkingConfig": {"thinkingLevel": "MINIMAL"} — the same payload AI Studio gives you. You lose the native agent wiring on that one model, but the sub-agents keep working as-is.

  2. Pick non-thinking model variants. The Unknown content type thinking error comes from thinking blocks entering the agent/tool loop, so model variants that don’t emit thinking blocks avoid it entirely at the cost of some reasoning quality.

Worth also upvoting/watching the feature request for a thinking toggle on the native Gemini node — the gap between AI Studio’s options and the node’s options is known, and tool-calling + thinking is exactly where it bites.

To disable thinking in the Gemini Chat Model node in n8n, add a Body Parameter via Additional Fields: generationConfig.thinkingConfig.thinkingBudget = 0. This tells Gemini 2.5 to skip the reasoning step entirely, which speeds up responses significantly for straightforward tasks (lookups, simple Q&A).\n\nIf your n8n version exposes Model Parameters directly on the Gemini node, thinking_budget: 0 does the same thing. Note that disabling thinking reduces quality on complex multi-step reasoning, so keep it on for anything that needs careful logic.

thanks but there is no body parameter option in Gemini model node (that is the problem). These are the additional options: