Gemini 3.1 Pro
The thinking model for the hard parts of your workflow
- messages
- images
- text
Gemini 3.1 Pro is the heavyweight of the pack's text nodes: Google's flagship reasoning model, hosted by Runware, dropped into your ComfyUI graph as a node. You reach for it when the task actually deserves a thinking model - complex multi-step planning, debugging a prompt that keeps going sideways, structured reasoning over a long context. It's the most expensive text call in the pack and it's worth every cent of the difference on the jobs where the cheap models hand you nonsense.
The tell-tale dial is settings.thinkingLevel (low/medium/high, defaulting to high): this model reasons before it answers, and you're paying for those reasoning tokens. If your task doesn't need them, you're overspending - that's the workflow discipline this node demands. Use high thinking for the hard jobs and drop it to low for the mechanical ones, and the per-call cost follows.
What you set
messages(required) - from the Runware Messages builder:role+contentpairs, chained for multi-turn reasoning.images- optional IMAGE input; Pro vision is genuinely strong at describing complex scenes.settings.thinkingLevel- the headline knob:low/medium/high.settings.maxTokens- up to 128000, the biggest cap in the text family.settings.systemPrompt- long-context instructions land well here.settings.temperature(0–2, default 1) - andsettings.topP, which is gated on this node (enable the toggle, then set the value).toolChoice- gated tool-calling for structured automation.includeUsage- token stats in the response.
Output is text, a STRING. advanced_json covers extra inputs, stop sequences, and tools.
How it works
Standard pack flow: taskType: textInference over REST via the Runware SDK, reply back as a string, cost on the title bar. What's different is what happens before the reply: the thinking pass. With high thinking enabled the model internally reasons through the problem, and those tokens are part of what you're billed for. That's the feature and the budget line item - plan your thinking level per task, not per workflow.
Installing
ComfyUI Manager → search Runware → install → restart. Manual:
cd ComfyUI/custom_nodes
git clone https://github.com/Runware/ComfyUI-Runware
pip install -r ComfyUI-Runware/requirements.txt
No model downloads; deps are runware-sdk, pillow, soundfile. API key via Settings → Runware API key, RUNWARE_API_KEY, or runware auth login.
Troubleshooting
The classic mistake is leaving thinkingLevel on high for every call and watching the bill climb - dial it per task. Slow responses? High thinking takes time by design; drop to low when latency matters more than reasoning. And if the model over-explains in its answer, that's the systemPrompt's job to fix: "answer in one sentence, no preamble." When you need cheaper throughput instead of brains, Gemini 3.1 Flash Lite is the counterweight.
Inputs (16)
| Name | Type | Default | Description |
|---|---|---|---|
| messages | RUNWARE_MESSAGES | — | |
| imagesopt | IMAGE | — | |
| seedopt | INT | 00–4294967295 | Random seed for reproducible generation. When not provided, a random seed is generated in the unsigned 32-bit range. |
| numberResultsopt | INT | 11–4 | Number of results to generate. Each result uses a different seed, producing variations of the same parameters. |
| includeUsageopt | BOOLEAN | false | Include token usage statistics in the response. |
| settings.maxTokensopt | INT | 40961–128000 | Maximum number of tokens to generate in the response. |
| settings.systemPromptopt | STRING | System-level instruction that guides the model's behavior and output style across the entire generation. | |
| settings.temperatureopt | FLOAT | 1.000–2 | Controls randomness in generation. Lower values produce more deterministic outputs, higher values increase variation and creativity. |
| settings.thinkingLevelopt | COMBO | high | Controls the depth of internal reasoning the model performs before generating a response. |
| toolChoiceopt | BOOLEAN | false | Enable to set toolChoice. Off uses the model's default. |
| toolChoice.nameopt | STRING | Name of the specific tool the model must call. Required when type is `tool`. | |
| toolChoice.typeopt | COMBO | (default) | Strategy the model uses to decide when and which tools to call. |
| settings.topPopt | BOOLEAN | false | Enable to set settings.topP. Off uses the model's default. |
| settings.topP_valueopt | FLOAT | 0.000–1 | Nucleus sampling parameter that controls diversity by limiting the probability mass. Lower values make outputs more focused, higher values increase diversity. |
| outputFormatopt | COMBO | TEXT | Output format for the generated text. |
| advanced_jsonopt | STRING | Optional JSON merged into the request. For: inputs.audios, inputs.documents, inputs.videos, settings.stopSequences, tools |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| text | STRING | — |