Skip to main content
View source

Amazon Bedrock

View as Markdown

A RocketRide LLM node that connects Amazon Bedrock-hosted foundation models to a pipeline.

What it does​

Provides an llm invoke connection backed by Amazon Bedrock. It is used primarily by agents and other nodes that need an LLM, and can also be wired directly via lanes: text arriving on the questions lane is answered on the answers lane.

Uses langchain-aws (ChatBedrock) on top of boto3 / botocore. The chat client is created once per pipeline run with a fixed temperature of 0; the output token cap is taken from the model's configured output-token limit. Token counts are estimated at about four characters a token, so no tokenizer package is needed. The estimate feeds the size warnings and nodes that cut documents to fit the model (such as summarization and preprocessor_llm); text that packs more tokens into fewer characters, such as code, may count low.

The node automatically prepends a cross-region inference prefix to the model ID based on the configured AWS region: eu. for eu* regions, apac. for ap* regions, and us. otherwise (for example, meta.llama3-3-70b-instruct-v1:0 becomes us.meta.llama3-3-70b-instruct-v1:0 in us-east-1). Model IDs that are ARNs or already carry a us. / eu. / apac. prefix are left untouched.

When you save the node configuration, it is validated with a minimal live API call ("Hi") against the selected model, so credential, model, and region problems surface immediately instead of at pipeline runtime.

Lanes​

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

Profiles​

Default: Llama 3.3 70B Instruct (meta_llama3_3-70b).

ProfileModel IDContext tokens
Llama 3.3 70B Instruct (default)meta.llama3-3-70b-instruct-v1:0128,000
Llama 4 Scout 17B Instructmeta.llama4-scout-17b-instruct-v1:03,500,000
Llama 4 Maverick 17B Instructmeta.llama4-maverick-17b-instruct-v1:01,000,000
Nova 2 Liteamazon.nova-2-lite-v1:01,000,000
Claude Sonnet 4.5anthropic.claude-sonnet-4-5-20250929-v1:0200,000
Claude Opus 4.5anthropic.claude-opus-4-5-20251101-v1:0200,000
View 16 more models
ProfileModel IDContext tokens
Custom(user-specified)256,000 (editable)
Claude Haiku 4.5anthropic.claude-haiku-4-5-20251001-v1:0200,000
Jamba 1.5 Largeai21.jamba-1-5-large-v1:0256,000
Jamba 1.5 Miniai21.jamba-1-5-mini-v1:0256,000
Titan Text Expressamazon.titan-text-express-v18,192
Claude Sonnet 3.7anthropic.claude-3-7-sonnet-20250219-v1:0200,000
Claude Haiku 3.5anthropic.claude-3-5-haiku-20241022-v1:0200,000
Claude Opus 4anthropic.claude-opus-4-20250514-v1:0200,000
Command R+cohere.command-r-plus-v1:0128,000
Command Rcohere.command-r-v1:0128,000
Llama 3.1 8B Instructmeta.llama3-1-8b-instruct-v1:0128,000
Llama 3.1 70B Instructmeta.llama3-1-70b-instruct-v1:0128,000
Llama 3.2 1B Instructmeta.llama3-2-1b-instruct-v1:0128,000
Llama 3.2 3B Instructmeta.llama3-2-3b-instruct-v1:0128,000
Llama 3.2 11B Vision Instructmeta.llama3-2-11b-instruct-v1:0128,000
Llama 3.2 90B Vision Instructmeta.llama3-2-90b-instruct-v1:0128,000

All built-in profiles default to region us-east-1.

Configuration​

Choose a built-in profile and the AWS region where that model is available. The profile supplies the model identifier and context limit; most pipelines do not need to edit those values.

Custom models​

Select Custom to use a Bedrock model not listed above. Provide its full provider-prefixed model ID (for example, anthropic.claude-3-7-sonnet-20250219-v1:0) or an ARN for a custom or provisioned model, plus the model's total token limit and its output limit (4,096 by default; raise it for models that reason before answering). Bare model names without a provider prefix produce a save-time warning. See the Bedrock model IDs reference for available identifiers.

Prompt caching​

Claude models on Bedrock can reuse the start of a prompt they have already read, at a tenth of the input price. Bedrock does this on its own, but only as best effort; a cache_control marker makes that start eligible on every call. When a question sets cachePrefix (the RocketRide Wave agent does on every planning call), the node splits the prompt into two text blocks: the start that stays the same between calls (role, instructions, examples, history), marked for caching, and the rest (context, documents, goals, questions). The model reads the same text either way. Questions without the flag are sent as one block, as before.

The marker goes only to Claude models that support it: every Claude from 4 on, Claude 3.7 Sonnet and Claude 3.5 Haiku. Bedrock rejects it for the older Claude models, so they, and models from other providers, get the plain prompt. A prefix shorter than the model's minimum (from 512 to 4,096 tokens depending on the model; see the Bedrock prompt caching guide) is simply not cached, at no extra cost. Nova caches repeated prompt starts on its own (best effort) and gets no marker.

Cache reads and writes are metered separately from fresh input tokens.

Authentication​

Provide an AWS access key ID and secret access key with permission to invoke the chosen Bedrock model in the configured region. Credentials are passed directly to the Bedrock client and are not persisted by the node.

Save-time validation performs a minimal test invocation and reports provider errors verbatim. One gotcha: Bedrock returns a ValidationException (HTTP 400) when the region does not match your account or model availability, while incorrect keys surface as different error types. If you see a ValidationException during validation, verify the AWS region first.


Schema​

FieldTypeDescriptionDefault
bedrock.profilestringModel
LLM model
"meta_llama3_3-70b"
modelstringModel
Bedrock LLM model name or ARN for custom or provisioned models
modelOutputTokensintegerOutput Tokens
Most tokens the model may write in one reply (at least 1,024). Leave it empty to keep the node's default. Reasoning models count their thinking against this limit: set it well above the reply you expect, or they can spend it all thinking and return nothing. It cannot exceed Tokens; a larger value is lowered to it.
modelTotalTokensnumberTokens
Total Tokens

Dependencies​

  • langchain-aws
  • langchain-core
  • langchain
  • packaging
  • boto3
  • botocore