ComfyUI Node

Claude Sonnet 4.6

Claude Sonnet 4.6 — the middle child that usually wins

By Runware·Created 2 years ago·Updated about a month ago· 140
Claude Sonnet 4.6
  • messages
  • images
  • text
numberResults1
includeUsagefalse
settings.maxTokens4096
settings.cache.scopesystem+history
settings.systemPrompt
settings.thinkingLevel(default)
toolChoicefalse
toolChoice.name
toolChoice.type(default)
outputFormatTEXT
settings.cache.ttl5m
advanced_json

Sonnet is Anthropic's "good enough that the flagship rarely earns its premium" tier, and Sonnet 4.6 is no exception. In this pack it's the LLM node you reach for when Haiku is too dumb and Opus is too expensive - which, for most in-graph reasoning (prompt chains, workflow decisions, image-to-text pipelines), is almost always. The thinking range here goes all the way up to adaptive, so it can genuinely reason when asked; it just doesn't cost like Opus when it doesn't.

It runs through Runware's cloud like every node in this pack: no weights, no VRAM, billed per call. The model id (anthropic:[email protected]) stays hidden; you just wire in messages and read out text.

What you set

messages is required (RUNWARE_MESSAGES socket). The settings that matter:

  • settings.systemPrompt - the job definition.
  • settings.thinkingLevel - off / low / medium / high / max / adaptive. adaptive is the interesting one: it lets the model decide how much to think. Great default for mixed workloads; fixed levels for predictable cost.
  • settings.maxTokens - up to 65536, default 4096.
  • images - IMAGE socket for multimodal work (describe, OCR, judge).
  • toolChoice - gated, with type (auto/any/tool/none) and name for forcing a tool; advanced_json carries tools, inputs.documents, settings.stopSequences.
  • settings.cache.scope / settings.cache.ttl - Anthropic prompt caching. In a ComfyUI graph where the same system prompt hits many times, this is the single biggest cost saver.
  • includeUsage - token stats on the response.

Output is text (STRING), feeding straight into downstream nodes.

Installing

Part of the Runware/ComfyUI-Runware pack.

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

Deps are runware-sdk, pillow, soundfile. Runware API key from runware.ai/api-keys (Settings panel or RUNWARE_API_KEY).

Where people get burned

The classic mistake is cranking maxTokens to the max "just in case" - every one of those tokens is billable, and a generation that loops will happily spend them. Set a ceiling appropriate to the task. And if you find yourself reaching for Sonnet for pure tagging, Haiku probably does it for a fraction of the cost; the two nodes sit next to each other for a reason.

CategoryRunware/Text/anthropic

Inputs (14)

NameTypeDefaultDescription
messagesRUNWARE_MESSAGES
imagesoptIMAGE
numberResultsoptINT11–4Number of results to generate. Each result uses a different seed, producing variations of the same parameters.
includeUsageoptBOOLEANfalseInclude token usage statistics in the response.
settings.maxTokensoptINT40961–65536Maximum number of tokens to generate in the response.
settings.cache.scopeoptCOMBOsystem+historyControls which parts of the request are cached.
settings.systemPromptoptSTRINGSystem-level instruction that guides the model's behavior and output style across the entire generation.
settings.thinkingLeveloptCOMBO(default)Controls the depth of internal reasoning the model performs before generating a response.
toolChoiceoptBOOLEANfalseEnable to set toolChoice. Off uses the model's default.
toolChoice.nameoptSTRINGName of the specific tool the model must call. Required when type is `tool`.
toolChoice.typeoptCOMBO(default)Strategy the model uses to decide when and which tools to call.
outputFormatoptCOMBOTEXTOutput format for the generated text.
settings.cache.ttloptCOMBO5mTime-to-live for the cache.
advanced_jsonoptSTRINGOptional JSON merged into the request. For: inputs.documents, settings.stopSequences, tools

Outputs (1)

NameTypeDescription
textSTRING