NanoBanana - Thinking Config
The tiny node that turns Gemini's thinking mode into data
- thinking_config_json
ThinkingConfig is the smallest node in the NanoBanana2 config family, and it does exactly one thing: it takes a thinking level and an optional token budget and emits a JSON string describing them. That's it. It's a config-as-data utility, not a magic brain-enhancer - but it's a handy one if you like your settings explicit and inspectable.
Here's the honest context: the pack's generative nodes already expose thinking_level and thinking_budget as direct inputs, so you don't need this node to make a model think. What it gives you is the config as a standalone, wireable STRING - something you can view in a text node, save, paste into your own tooling, or reuse as a documented block in your workflow. Think of it as the pack's canonical "here's what a thinking config is" building block, and as a reminder that thinking is opt-in in this pack: the default is NONE, because thinking costs more and most caption/tagging jobs don't need it.
How it works
You pick a level from NONE / MINIMAL / LOW / MEDIUM / HIGH, optionally set a thinking_budget (max thinking tokens, 0 = model default), and it builds a JSON object:
{"thinking_level": "MEDIUM", "thinking_budget": 2048}
If the budget is left at 0, it's simply omitted from the output. The levels map to the actual Google SDK enum values - worth noting because an earlier version of the pack shipped a NORMAL level that the API rejected outright. If you ever saw thinking-config errors from this pack in the past, that was the bug; current versions only expose values the API accepts.
The inputs
Just two:
- thinking_level - how much the model should reason before answering. Default
NONE. - thinking_budget - cap on thinking tokens;
0leaves it to the model's default.
Output: one thinking_config_json STRING.
Installing it
Same as every node in the pack: ComfyUI Manager → search NanoBanana2, or
cd ComfyUI/custom_nodes
git clone https://github.com/IxMxAMAR/ComfyUI-NanoBanana2
pip install google-genai
Python 3.10+, google-genai >= 0.8.0, and an API key from aistudio.google.com. No model files, no extra dependencies.
Common issues
There's not much to break here. The main trap is expecting it to do something downstream - it just produces a string, so if your workflow doesn't consume that string somewhere, it's documentation. The other practical point: higher thinking levels and bigger budgets cost real tokens, so don't default every text node in a batch workflow to HIGH and then wonder about the bill. If you want to pre-flight the cost, that's what the pack's Cost Estimator node is for.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| thinking_level | COMBO | NONE | How much the model should 'think' before answering. |
| thinking_budgetopt | INT | 00–100000 | Max thinking tokens (0 = model default). |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| thinking_config_json | STRING | — |