# How to disable thinking in Google Gemini Chat Model

**URL:** <https://community.n8n.io/t/how-to-disable-thinking-in-google-gemini-chat-model/309948>\
**Category:** Questions\
**Tags:** gemini, bug:unconfirmed\
**Created:** [August 27, 2026, 7:00pm UTC](https://community.n8n.io/t/how-to-disable-thinking-in-google-gemini-chat-model/309948 "2026-08-27T19:00:42Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![T\_Al](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/t_al/32/187828_2.png) [@T\_Al](https://community.n8n.io/u/T_Al)\
**Post date:** [August 27, 2026, 7:00pm UTC](https://community.n8n.io/t/how-to-disable-thinking-in-google-gemini-chat-model/309948/1 "2026-08-27T19:00:42Z")

</div>

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.

 ![image](https://europe1.discourse-cdn.com/n8n/original/3X/f/a/fa94705c15a0e8bb29696a27151722102bd4b685.png)

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:

```auto
"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!

---

<div class="post-metadata">

**Author:** ![n8n](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/n8n/32/196425_2.png) [@n8n](https://community.n8n.io/u/n8n)\
**Post date:** [August 27, 2026, 7:01pm UTC](https://community.n8n.io/t/how-to-disable-thinking-in-google-gemini-chat-model/309948/2 "2026-08-27T19:01:07Z")

</div>

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

> **Suggested resources**
>
> _Automatically matched to your question._
> 
> **Docs:**
> 
> - [MiniMax Chat Model](https://docs.n8n.io/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.lmchatminimax)
> - [MiniMax](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-langchain.minimax#message-a-model)
> - [Google Vertex Chat Model](https://docs.n8n.io/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.lmchatgooglevertex)
> 
> **Forum:**
> 
> - [AI Agent Node outputs internal “Thinking Process” after upgrading to v1.123.0](https://community.n8n.io/t/231207)
> - [DeepSeek Chat Model got issues with reasoning\_content](https://community.n8n.io/t/298570)
> - [How to enable thinking mode in the Qwen3.6 model and OpenAI Chat Model](https://community.n8n.io/t/309378)

@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](https://community.n8n.io/t/pilot-forum-helper-bot/304669)._

---

<div class="post-metadata">

**Author:** ![Anshul\_Namdev](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/anshul_namdev/32/178229_2.png) [@Anshul\_Namdev](https://community.n8n.io/u/Anshul_Namdev)\
**Post date:** [August 27, 2026, 7:05pm UTC](https://community.n8n.io/t/how-to-disable-thinking-in-google-gemini-chat-model/309948/3 "2026-08-27T19:05:37Z")

</div>

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:

> **[Google Vertex Chat Model | Nodes | n8n Docs](https://docs.n8n.io/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.lmchatgooglevertex)**
>
> Learn how to use the Google Vertex Chat Model node in n8n. Follow technical documentation to integrate Google Vertex Chat Model node into your workflows.

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:

> <https://github.com/langchain-ai/langchainjs/issues/10103>
>
> \## Description
> 
> When using \`ChatGoogleGenerativeAI\` with \`thinkingConfig.include…Thoughts: true\` and tools bound, the first LLM call succeeds but the \*\*second turn crashes\*\* with \`Unknown content type thinking\`.
> 
> The issue is in \`\_convertLangChainContentToPart\` (\`packages/langchain-google-genai/src/utils/common.ts\`). When Gemini returns thinking blocks, they're correctly parsed into LangChain content blocks with \`type: "thinking"\`. However, when the conversation history is sent back to Gemini on the next turn, \`\_convertLangChainContentToPart\` has no case for \`type: "thinking"\` and throws.
> 
> This makes \`thinkingConfig\` \*\*completely unusable\*\* in any multi-turn agent loop with tools (e.g., LangGraph's \`createReactAgent\`).
> 
> \## Reproduction
> 
> \`\`\`typescript
> import { createReactAgent } from "@langchain/langgraph/prebuilt";
> import { ChatGoogleGenerativeAI } from "@langchain/google-genai";
> import { tool } from "@langchain/core/tools";
> import { z } from "zod";
> 
> const getWeather = tool(
> async ({ city }) =\> \`Weather in ${city}: 72°F, sunny\`,
> {
> name: "get\_weather",
> description: "Get weather for a city",
> schema: z.object({ city: z.string() }),
> }
> );
> 
> const model = new ChatGoogleGenerativeAI({
> model: "gemini-2.5-flash", // any thinking-capable model
> thinkingConfig: {
> includeThoughts: true,
> thinkingBudget: 8000,
> },
> });
> 
> const agent = createReactAgent({ llm: model, tools: \[getWeather\] });
> 
> const result = await agent.invoke({
> messages: \[{ role: "user", content: "What's the weather in Tokyo and SF? Compare them." }\],
> });
> // ^ Crashes on second LLM call after tool results are returned
> \`\`\`
> 
> \## Error
> 
> \`\`\`
> Error: Unknown content type thinking
> at \_convertLangChainContentToPart (node\_modules/@langchain/google-genai/src/utils/common.ts:343:13)
> at convertMessageContentToParts (node\_modules/@langchain/google-genai/src/utils/common.ts:406:21)
> at convertBaseMessagesToContent (node\_modules/@langchain/google-genai/src/utils/common.ts:473:21)
> at ChatGoogleGenerativeAI.\_streamResponseChunks (node\_modules/@langchain/google-genai/src/chat\_models.ts:915:20)
> \`\`\`
> 
> \## Root Cause
> 
> In \`src/utils/common.ts\`, \`\_convertLangChainContentToPart\` handles \`text\`, \`image\_url\`, \`media\`, \`tool\_use\`, \`tool\_call\`, and MIME types — but has no case for \`thinking\`:
> 
> \`\`\`typescript
> // Current code (around line 343):
> else if ("type" in content) throw new Error(\`Unknown content type ${content.type}\`);
> \`\`\`
> 
> \## Suggested Fix
> 
> Add a case for \`thinking\` content blocks, converting them back to Gemini's thought part format:
> 
> \`\`\`typescript
> else if (content.type === "thinking") {
> return {
> text: content.text ?? "",
> thought: true,
> ...(content.thoughtSignature ? { thoughtSignature: content.thoughtSignature } : {}),
> };
> }
> \`\`\`
> 
> Per \[Gemini docs\](https://ai.google.dev/gemini-api/docs/thinking), thought signatures must be returned in subsequent turns for Gemini 3+ models, so filtering them out is not a correct fix.
> 
> \## Expected Behavior
> 
> Multi-turn conversations with \`thinkingConfig\` enabled should work without crashing. Thinking content blocks should be properly round-tripped back to Gemini API format.
> 
> \## Environment
> 
> \- \`@langchain/google-genai\`: 2.1.19 (latest)
> \- \`@langchain/core\`: 0.3.x
> \- \`@langchain/langgraph\`: 0.2.x
> \- Node.js: 22.x
> \- Models tested: \`gemini-2.5-flash\`, \`gemini-2.5-pro\`, \`gemini-3.1-pro-preview\`

---

<div class="post-metadata">

**Author:** ![T\_Al](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/t_al/32/187828_2.png) [@T\_Al](https://community.n8n.io/u/T_Al)\
**Post date:** [August 27, 2026, 10:13pm UTC](https://community.n8n.io/t/how-to-disable-thinking-in-google-gemini-chat-model/309948/4 "2026-08-27T22:13:01Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![kjooleng](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/kjooleng/32/184045_2.png) [@kjooleng](https://community.n8n.io/u/kjooleng)\
**Post date:** [August 28, 2026, 2:48am UTC](https://community.n8n.io/t/how-to-disable-thinking-in-google-gemini-chat-model/309948/5 "2026-08-28T02:48:14Z")

</div>

> [@T\_Al](#):
>
> - Gemma 4 31B IT

> [@T\_Al](#):
>
> - Gemma 4 26B A4B IT

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

---

<div class="post-metadata">

**Author:** ![Anshul\_Namdev](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/anshul_namdev/32/178229_2.png) [@Anshul\_Namdev](https://community.n8n.io/u/Anshul_Namdev)\
**Post date:** [August 28, 2026, 6:06am UTC](https://community.n8n.io/t/how-to-disable-thinking-in-google-gemini-chat-model/309948/6 "2026-08-28T06:06:17Z")

</div>

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.

> <https://github.com/langchain-ai/langchainjs/issues/10729>
>
> \### Checked other resources
> 
> \- \[x\] This is a bug, not a usage question. For ques…tions, please use the LangChain Forum (https://forum.langchain.com/).
> \- \[x\] I added a very descriptive title to this issue.
> \- \[x\] I searched the LangChain.js documentation with the integrated search.
> \- \[x\] I used the GitHub search to find a similar question and didn't find it.
> \- \[x\] I am sure that this is a bug in LangChain.js rather than my code.
> \- \[x\] The bug is not resolved by updating to the latest stable version of LangChain (or the specific integration package).
> 
> \### Example Code
> 
> \### Problem
> When using the \*\*Gemma 4\*\* model (\`gemma-4-31b-it\`) from Google AI Studio with \`@langchain/google\` in TypeScript, thinking/reasoning content is frequently mixed into the final response.
> 
> It is difficult to reliably extract a clean text response from the model output.
> 
> \### Model Configuration
> \`\`\`ts
> const model = new ChatGoogle({
> model: 'gemma-4-31b-it',
> apiKey: process.env.GEMINI\_API\_KEY,
> temperature: 0.9,
> });
> \`\`\`
> 
> \### Observed Behavior
> \- The \`content\` field (from the last message after \`agent.invoke()\`) sometimes contains a mix of thinking steps and the actual answer.
> \- The output format is inconsistent (\`content\` can be a string or an array of objects).
> \- There is no straightforward, reliable way to get only the final clean text response.
> 
> In comparison, the same model works cleanly in the Python SDK, where \`response.text\` provides a clean answer without thinking content leaking in.
> 
> \### Environment
> \- \`langchain\`: ^1.3.1
> \- \`@langchain/core\`: ^1.1.39
> \- \`@langchain/google\`: ^0.1.10
> \- \`@google/genai\`: ^1.43.0
> \- \`@langchain/langgraph\`: ^1.2.8
> \- Model: \`gemma-4-31b-it\` (Google AI Studio)
> \- Using LangGraph agent with \`agent.invoke(...)\`
> 
> \### Additional Context
> Gemma 4 is a reasoning model that tends to generate internal thinking steps before producing the final answer. This behavior causes the mixed output in the TypeScript integration.
> 
> This makes it significantly harder to use Gemma 4 reliably in TypeScript compared to Python.
> 
> I can provide raw response examples or more details if needed.
> 
> Thank you!
> 
> \### Error Message and Stack Trace (if applicable)
> 
> \_No response\_
> 
> \### Description
> 
> In langchain TS sdk, when using google models, now i am using \_\_, it is too difficult to get the text response, it seems like there is not realiable way.
> I use the python sdk too, and it has a realiable way, the documentation explicitly says,
> response.content # -\> \[{"type": "text", "text": "Hello!", "extras": {"signature": "EpQFCp..."}}\]
> response.text # -\> "Hello!"
> i follow this and it works well. But for langchain TS, it's messay.
> 
> \### System Info
> 
> {
> "scripts": {
> "bot": "tsx bot/index.ts",
> "voice": "tsx main.mts",
> "test-live": "tsx bot/test-live-audio.ts"
> },
> "dependencies": {
> "@google/genai": "^1.43.0",
> "@langchain/core": "^1.1.39",
> "@langchain/google": "^0.1.10",
> "@langchain/langgraph": "^1.2.8",
> "@langchain/langgraph-checkpoint-sqlite": "^1.0.1",
> "@langchain/xai": "^1.3.16",
> "@types/ws": "^8.18.1",
> "dotenv": "^17.4.1",
> "ffmpeg-static": "^5.3.0",
> "langchain": "^1.3.1",
> "langsmith": "^0.5.17",
> "playwright": "^1.59.1"
> },
> "devDependencies": {
> "@types/node": "^25.3.3",
> "tsx": "^4.21.0",
> "typescript": "^5.9.3"
> }
> }

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.

---

<div class="post-metadata">

**Author:** ![VoltStack](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/voltstack/32/188994_2.png) [@VoltStack](https://community.n8n.io/u/VoltStack)\
**Post date:** [September 13, 2026, 12:29am UTC](https://community.n8n.io/t/how-to-disable-thinking-in-google-gemini-chat-model/309948/7 "2026-09-13T00:29:23Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![pirateprentice](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/pirateprentice/32/48360_2.png) [@pirateprentice](https://community.n8n.io/u/pirateprentice)\
**Post date:** [September 13, 2026, 3:57am UTC](https://community.n8n.io/t/how-to-disable-thinking-in-google-gemini-chat-model/309948/8 "2026-09-13T03:57:16Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![T\_Al](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/t_al/32/187828_2.png) [@T\_Al](https://community.n8n.io/u/T_Al)\
**Post date:** [September 13, 2026, 2:42pm UTC](https://community.n8n.io/t/how-to-disable-thinking-in-google-gemini-chat-model/309948/9 "2026-09-13T14:42:57Z")

</div>

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

 ![image](https://europe1.discourse-cdn.com/n8n/original/3X/4/5/45456375ec9b1183dc16cf415ef36b7fa79f05c3.png)
