Crush currently supports Anthropic models through Bedrock with caching disabled.
Prerequisites
Before using Bedrock with Crush, you need:- An AWS account with Bedrock access
- AWS credentials configured locally
- Model access enabled in your AWS region
- The AWS CLI installed (for
aws configuremethod)
Configuration Methods
There are two ways to configure AWS credentials for Bedrock:Method 1: AWS CLI Configuration
The recommended approach is to use the AWS CLI to configure your credentials:- AWS Access Key ID
- AWS Secret Access Key
- Default region name
- Default output format
Method 2: Environment Variables
Alternatively, you can set environment variables directly:Required Environment Variables
Crush expects the following AWS configuration:AWS Region
You must set eitherAWS_REGION or AWS_DEFAULT_REGION:
us-east-1(US East - N. Virginia)us-west-2(US West - Oregon)eu-central-1(Europe - Frankfurt)ap-southeast-1(Asia Pacific - Singapore)
Using AWS Profiles
If you have multiple AWS profiles configured, you can specify which one to use with theAWS_PROFILE environment variable:
- You work with multiple AWS accounts
- You need different permissions for different projects
- You want to separate personal and work credentials
Example: Multiple Profiles
Alternative: Bearer Token Authentication
As an alternative toaws configure, you can use the AWS_BEARER_TOKEN_BEDROCK environment variable:
- CI/CD pipelines
- Temporary credentials
- Service-to-service authentication
Bearer tokens are temporary credentials that expire. Ensure you refresh them as needed.
Enabling Bedrock in Crush
Once you have AWS configured, Crush will automatically detect your credentials and show Bedrock as an available provider. You can verify this by:- Running Crush:
crush - Checking the list of available models
- Looking for Bedrock/Anthropic models in the provider list
crush.json is required for basic Bedrock usage.
Available Models
Through Bedrock, you can access Anthropic Claude models, including:- Claude 3.5 Sonnet
- Claude 3 Opus
- Claude 3 Sonnet
- Claude 3 Haiku
Current Limitations
Pricing
Bedrock pricing is separate from Anthropic’s direct API pricing. Key differences:- No prompt caching discount (since caching is disabled in Crush)
- Region-specific pricing varies by AWS region
- On-demand pricing based on input/output tokens
- Provisioned throughput available for dedicated capacity
Troubleshooting
Bedrock Not Appearing
If Bedrock doesn’t show up as a provider:- Verify AWS credentials are configured:
aws sts get-caller-identity - Ensure
AWS_REGIONorAWS_DEFAULT_REGIONis set - Check that your AWS account has Bedrock access enabled
Access Denied Errors
If you see permission errors:- Verify your IAM user/role has Bedrock permissions
- Request model access in the AWS Bedrock console
- Check that your region supports Bedrock
Region Not Supported
If your region doesn’t support Bedrock:- Switch to a supported region (e.g.,
us-east-1) - Update
AWS_REGIONenvironment variable - Restart Crush
IAM Permissions
Your AWS IAM user or role needs the following permissions:Next Steps
Vertex AI
Learn about using Google Cloud Vertex AI with Crush
Custom Providers
Configure custom API providers