Skip to main content
View source

Anthropic

View as Markdown

A RocketRide LLM node that connects Anthropic's Claude models to your pipeline.

What it does

Connects Anthropic's Claude models to your pipeline. Used primarily as an llm invoke connection by agents, vector stores, database nodes, and other nodes that need an LLM (classType: ["llm"], capability invoke). Can also be used directly in a pipeline via lanes.

Built on langchain-anthropic (ChatAnthropic) with the anthropic SDK used directly for save-time validation. The configured modelOutputTokens is passed to the model as max_tokens. Token counts for budgeting are estimated at roughly 4 characters per token.

When the selected model is flagged as reasoning-capable, the node enables extended thinking automatically and streams the model's reasoning over the thinking SSE lane; see "Extended thinking" below.


Configuration

Lanes

Lane inLane outDescription
questionsanswersSend a question directly, receive a generated answer

Fields

FieldType / DefaultDescription
profileenum, claude-sonnet-4-6Which Claude model to use (see Profiles below)
apikeystringAnthropic API key. Must start with sk-ant (e.g. sk-ant-... or sk-ant-api03-...)
modelSourcestringWhere the model definition comes from (manual or openrouter)
modelstring (custom profile only)Anthropic model ID, used only when profile is custom
modelTotalTokensnumber (custom profile only)Total context tokens for the custom profile; must be greater than 0

The model ID and token limits for named profiles are fixed by the profile. Only the custom profile exposes model and modelTotalTokens directly.


Profiles

Default profile: Claude Sonnet 4.6.

ProfileModel IDContext tokensOutput tokens
Claude Sonnet 4.6 (default)claude-sonnet-4-61,000,000128,000
Claude Opus 4.7claude-opus-4-71,000,000128,000
Claude Opus 4.6claude-opus-4-61,000,000128,000
Claude Sonnet 4.5claude-sonnet-4-51,000,00064,000
Claude Opus 4.5claude-opus-4-5200,00064,000
Claude Haiku 4.5claude-haiku-4-5200,00064,000
Custom(user-specified)200,000 (editable)(none set)

Extended thinking

Whether thinking is requested is driven by the model's capabilities.reasoning flag in the node configuration (stamped from OpenRouter model sync). When set, the node builds provider-correct thinking parameters based on the model name. Routing prefixes such as openrouter/anthropic/ are stripped before matching.

ModelThinking parameters sent
Any Haiku modelNone. Haiku has no extended thinking; sending parameters would return a 400.
claude-opus-4-7 / claude-opus-4-8thinking: {type: "adaptive", display: "summarized"} (adaptive thinking)
Other Claude modelsthinking: {type: "enabled", budget_tokens: N} plus the interleaved-thinking-2025-05-14 beta header, where N is half the output-token limit (minimum 2,048, always below max_tokens). Skipped entirely if the output window is too small for a valid budget.

When thinking is actually enabled, responses are streamed through the native Anthropic Messages API handler (ai.common.llm_native_stream, provider anthropic) so that thinking deltas (which LangChain drops) are preserved and forwarded on the thinking SSE lane. Non-reasoning models stay on the default LangChain streaming path.


Authentication

Provide an Anthropic API key in the apikey field. The key is validated at startup: it must be non-empty and start with sk-ant (covers both standard sk-ant-... and newer sk-ant-api03-... formats). If the key fails this check, the node raises Invalid Anthropic API key format, please check your API key. The key is read at construction time and not stored by the node.


Save-time validation

When the node configuration is saved, a lightweight validation pass runs before the first pipeline execution:

  • Checks that modelTotalTokens (custom profile) is greater than 0.
  • Sends a minimal one-token probe request (max_tokens: 1) to the configured model using the configured key.

Any failure (bad key, unknown model, rate limit, network error) is surfaced as a concise single-line warning in the form Error <status>: <type> - <message>, extracted from the API's structured error payload when available. Network or SDK errors that carry no structured payload fall back to the raw exception message, collapsed to a single line.


Schema

FieldTypeDescriptionDefault
anthropic.profilestringModel
LLM model
"claude-sonnet-4-6"
modelstringModel
Anthropic model
modelTotalTokensnumberTokens
Total Tokens

Dependencies

  • langchain-anthropic
  • anthropic
  • langchain-core
  • langchain