@tanstack/ai-bedrock has 123,275 recorded weekly downloads on npm, a decrease of 20.4% over the past 30 days, ranking #606 of 3,247 tracked listings.
About @tanstack/ai-bedrock
@tanstack/ai-bedrock
Amazon Bedrock adapter for TanStack AI — the native Converse API (default) plus the OpenAI-compatible Chat Completions and Responses APIs, with streaming, tool calling, and reasoning.
Installation
pnpm add @tanstack/ai-bedrock
# or
npm install @tanstack/ai-bedrock
# or
yarn add @tanstack/ai-bedrock
Setup
Get a Bedrock API key from the Amazon Bedrock console and set it as an environment variable:
BEDROCK_API_KEY=your-bedrock-api-key
Alternatively, configure AWS credentials for SigV4 auth (see below).
Usage
import { bedrockText } from '@tanstack/ai-bedrock'
import { chat } from '@tanstack/ai'
const adapter = bedrockText('us.anthropic.claude-haiku-4-5-20251001-v1:0', {
region: 'us-east-1',
})
for await (const chunk of chat({
adapter,
messages: [{ role: 'user', content: 'Hello from Bedrock!' }],
threadId: 'thread-1',
})) {
if (chunk.type === 'TEXT_MESSAGE_CONTENT')
process.stdout.write(chunk.delta ?? '')
}
Responses API
import { bedrockText } from '@tanstack/ai-bedrock'
const adapter = bedrockText('openai.gpt-oss-120b-1:0', {
region: 'us-east-1',
api: 'responses',
})
With Explicit API Key
import { createBedrockText } from '@tanstack/ai-bedrock'
const adapter = createBedrockText(
'us.amazon.nova-pro-v1:0',
'your-bedrock-api-key',
{ region: 'us-west-2' },
)
Reranking
Call rerank() with bedrockRerank() on the server to sort documents by relevance.
First, install @aws-sdk/credential-providers and configure AWS credentials. Bedrock API keys do not work for reranking. See Bedrock reranking for permissions and model configuration.
import { rerank } from '@tanstack/ai'
import { bedrockRerank } from '@tanstack/ai-bedrock'
const { rerankedDocuments } = await rerank({
adapter: bedrockRerank('cohere.rerank-v3-5:0'),
query: 'talk about rain',
documents: ['sunny day at the beach', 'rainy afternoon in the city'],
topN: 2,
})
Authentication
For chat and embeddings, auth is resolved in this order:
- Explicit
apiKeypassed to the factory BEDROCK_API_KEYenvironment variableAWS_BEARER_TOKEN_BEDROCKenvironment variable- SigV4 via the AWS credential chain
SigV4 signing is built in. The AWS credential chain requires
@aws-sdk/credential-providers. On the Converse
(default) path the @aws-sdk/client-bedrock-runtime client signs requests
itself; the OpenAI-compatible chat/responses paths sign via the bundled
@smithy/signature-v4. Set auth: 'sigv4' and provide AWS credentials through
the standard credential chain (env vars, shared config, instance role):
import { bedrockText } from '@tanstack/ai-bedrock'
const adapter = bedrockText('us.anthropic.claude-haiku-4-5-20251001-v1:0', {
auth: 'sigv4',
region: 'us-east-1',
})
Documentation
Full documentation: TanStack AI — Amazon Bedrock adapter
License
MIT
Description from the npm listing.
- ai
- ai-sdk
- typescript
- tanstack
- bedrock
- aws
- adapter
- llm
- chat
- tool-calling
README badge
Show your rank in a README or on your website. The badge updates automatically.
Charts
Images: 30d · 1y · all time · 1600×900 dark
Adoption over time
7/30/90-day growth
Ranking history
Listing placement
Listing placement
Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.
Each band is one page of 20. Weekly downloads on a linear scale. Placement is projected from weekly downloads, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.
Recent observations
Full history (592)Similar npm AI SDKs plugins
All 20 @tanstack/ai-bedrock alternativesData source
Weekly downloads (trailing 7 complete days) come from the official npm downloads API. Downloads include CI and mirrors and are not equivalent to installs or users. npm publishes no ratings.
Listing: https://www.npmjs.com/package/@tanstack/ai-bedrock. First seen Oct 16, 2026; last successful collection Dec 6, 2026. See the methodology.