AWS Bedrock
Configure AWS Bedrock — Converse API translation with SigV4 request signing.
The bedrock provider translates requests to the AWS Bedrock Converse API with SigV4 request signing. No AWS SDK dependency — signing is handled internally.
Feature flag
Bedrock support requires the provider-bedrock cargo feature:
cargo install crabllm --features provider-bedrockConfiguration
[providers.bedrock]
kind = "bedrock"
region = "us-east-1"
access_key = "${AWS_ACCESS_KEY_ID}"
secret_key = "${AWS_SECRET_ACCESS_KEY}"
models = ["anthropic.claude-3-5-sonnet-20241022-v2:0"]Translation
- System messages — mapped to the Bedrock
systemfield. - Tool calling — tool definitions mapped to
toolConfig.tools[].toolSpec, tool results totoolResultcontent blocks. - Stop reasons —
end_turntostop,tool_usetotool_calls,max_tokenstolength. - Streaming — uses ConverseStream with AWS event-stream binary framing.
Usage
curl http://localhost:8080/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{
"model": "anthropic.claude-3-5-sonnet-20241022-v2:0",
"messages": [{"role": "user", "content": "Hello!"}]
}'Limitations
Embeddings, image generation, and audio endpoints are not supported.