<!-- BusyBot node reference — https://busybot.net/tools/gemini-thinking/ -->

> Node: Gemini Thinking (`gemini_thinking`) · Action · v1
> Category: AI · Credentials: Google AI (`googleAi`)
> Updated: 2026-08-16

# Gemini Thinking

> Use Gemini thinking mode for complex reasoning with visible thought process.

## Overview

Gemini Thinking runs a Gemini model in thinking mode, so the model deliberates before it answers and the reasoning trace can be kept alongside the final response. It suits math, logic, code analysis, multi-step planning and any task where transparent deliberation improves accuracy. The thinking budget is configurable: set it to `0` to turn thinking off entirely, or `-1` to let the model decide how much to spend. Optional file references can be sent as multimodal context alongside the message.

**Category:** AI  
**Tool Name:** `gemini_thinking`  
**Version:** 1

**Appearance:** Icon: `gemini` | Color: `#ffffff`

## Node Type

**Action** — processes input items and produces output

## Input / Output

| Direction | Port(s) |
|-----------|--------|
| Input | `Input` |
| Output | `Output`, `Error` |

## Credentials

This tool requires **Google AI** credentials.
See the [Credentials Guide](https://busybot.net/credentials/google-ai/) for setup instructions.

### Parameters

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| Model | `options` | No | — | The Gemini model to use for thinking. Pick a specific version — labels are pinned, not aliased to "latest". The dropdown lists the models currently available for this node; leave it unset to use the default. |
| System Prompt | `string` | No | `You are a helpful assistant.` | System instruction that sets the behavior and persona of the model. Defaults to a generic helpful-assistant prompt — override per workflow as needed. |
| User Message | `string` | Yes | — | The message or question for Gemini to think about and answer. Supports expressions like {{ $json.prompt }}. |
| File URIs | `string` | No | — | Optional. fileUri value(s) from the Gemini File Upload tool. Pass a single URI or a JSON array for multiple files. Files are sent as multimodal context alongside the message. Falls back to item.fileUris if empty. Gemini File API retains uploads for 48 hours. |
| Thinking Budget | `number` | No | `8192` | Token budget for the thinking phase. Set 0 to disable thinking, -1 for dynamic budget (model decides). |
| Options | `collection` | No | `{}` | Optional output and sampling settings. |
| — Max Output Tokens | `number` | No | `16384` | Maximum number of output tokens for the response. |
| — Temperature | `number` | No | `1` | Sampling temperature (0-2). Lower values are more deterministic. |
| — Response Field Name | `string` | No | `response` | The key name under which the response text will be stored in the output item. |
| — Include Thinking | `boolean` | No | `true` | Whether to include the thinking trace text in the output item. |
| Include Input | `boolean` | No | `false` | Whether to merge the input item's JSON fields into the output item. |
| Max Concurrency | `number` | No | `10` | Maximum number of items to process concurrently. |

## Output Data

One output item per input item. Binary data arriving from upstream is forwarded untouched.

The output item's JSON contains only the fields below. The input item's JSON is merged in **only** when Include Input is on:

| Field | Description |
|-------|-------------|
| `response` | The model's final answer, with the thinking parts stripped out. Renamed by **Response Field Name**. |
| `thinking` | The reasoning trace, joined into one string. Present only when Include Thinking is on *and* the model actually returned thoughts — a Thinking Budget of `0` produces no trace. |
| `model` | The model that produced the response. |
| `finishReason` | Why generation stopped. |
| `usage` | Token usage metadata reported by the model. Thinking tokens are billed like any other. |

Reference the result downstream by expression, e.g. `{{ $json.response }}`.

## Usage Examples

- Solve a complex math problem step by step
- Analyze code and explain the reasoning
- Break down a multi-step logic puzzle
- Generate a detailed analysis with visible reasoning
- Answer a complex question with chain-of-thought

## Example Configuration

Ask one question with the defaults:

```json
{
  "type": "gemini_thinking",
  "parameters": {
    "userMessage": "What are the key differences between TCP and UDP? When would you choose each?"
  }
}
```

Deep architectural reasoning with a large budget and the trace retained for review:

```json
{
  "type": "gemini_thinking",
  "parameters": {
    "systemPrompt": "You are a senior distributed systems architect. Think through all failure modes and trade-offs before giving your recommendation.",
    "userMessage": "Design a fault-tolerant event sourcing system that must handle 100k events/sec with exactly-once delivery guarantees.",
    "thinkingBudget": 20000,
    "maxConcurrency": 2,
    "options": {
      "maxOutputTokens": 16384,
      "temperature": 0.4,
      "responseFieldName": "architectureRecommendation",
      "includeThinking": true
    }
  }
}
```

High-volume Q&A with thinking switched off and short answers:

```json
{
  "type": "gemini_thinking",
  "parameters": {
    "userMessage": "{{ $json.faqQuestion }}",
    "thinkingBudget": 0,
    "includeInput": true,
    "maxConcurrency": 20,
    "options": {
      "maxOutputTokens": 256,
      "temperature": 0.5,
      "responseFieldName": "answer",
      "includeThinking": false
    }
  }
}
```

Let the model choose its own depth when item complexity varies across a batch:

```json
{
  "type": "gemini_thinking",
  "parameters": {
    "systemPrompt": "Answer concisely and accurately.",
    "userMessage": "{{ $json.prompt }}",
    "thinkingBudget": -1,
    "includeInput": true,
    "maxConcurrency": 8,
    "options": {
      "temperature": 0.5,
      "responseFieldName": "geminiAnswer",
      "includeThinking": false
    }
  }
}
```

### Error Handling

| Mode | Behavior |
|------|----------|
| **stop** | Halts workflow on first error |
| **continue** | Skips failed items, passes successful ones through |
| **errorPort** | Routes failed items to Error output port |

## Tips

Gemini Thinking uses the Gemini 2.5 Pro or Flash model in thinking mode to solve complex problems through a visible chain-of-thought reasoning process. Use it when math, logic, code analysis, or multi-step reasoning tasks require transparent deliberation to improve accuracy over standard single-pass generation. It outputs sequenced thought parts marked with a thinking flag followed by final response parts, with a configurable thinking budget controlling reasoning depth.