ModelProvider interface. All models are accessed via the Bedrock Converse API.
For Claude models on Bedrock, use the dedicated
awsClaude() provider instead. It uses the native Anthropic SDK for full Claude feature support (extended thinking, document input, etc.).Setup
- Install
- Environment
Install the AWS Bedrock Runtime SDK:
Factory
The Bedrock model identifier. Find model IDs in the AWS Bedrock model catalog.
Supported Models
Using other Bedrock models
Using other Bedrock models
Pass any valid Bedrock model ID to the factory. Manage model access in the AWS Bedrock console. Not all models support all features — check supported features per model.
Config
AWS session token for temporary credentials (STS, SSO). Falls back to
AWS_SESSION_TOKEN env var.Authentication Methods
Method 1: Access Key + Secret (Explicit)
Method 2: Environment Variables (Recommended)
Method 3: Default Credential Chain (SSO, IAM Roles)
If running on EC2, ECS, Lambda, or usingaws sso login, credentials are resolved automatically via the AWS SDK’s default credential provider chain:
Method 4: Temporary Credentials (STS)
Tool Calling
Tool calling is supported via the Bedrock Converse API. Define tools withdefineTool and they work automatically:
Multi-Modal Support
The Bedrock Converse API supports images and documents for models that have vision capabilities (e.g., Amazon Nova).Images
Documents
Full Example
The tracker preserves reported usage. A missing tariff or billing field makestotal null. Supply a catalog that matches your billing provider, API, model or deployment, tier, and region; see cost accounting.
AWS Bedrock vs Direct API
Environment Variables
Cross-References
- AWS Claude — Claude models on Bedrock with full Anthropic feature support
- Custom Provider — Build your own provider for any LLM
- Cost Tracking — Add custom pricing for Bedrock models