feat(providers): Add comprehensive AWS Bedrock provider integration
๐ AWS Bedrock Provider Implementation
This PR adds comprehensive AWS Bedrock provider support to Task Master, enabling users to leverage Claude models through AWS's Bedrock service.
โจ Features Added
- New AWS Bedrock Provider: Full implementation supporting Claude models via AWS Bedrock
- Comprehensive Authentication: Support for multiple AWS credential methods:
- Static credentials (Access Key ID + Secret Access Key)
- Session tokens for temporary credentials
- Credential provider functions
- AWS SDK default credential chain (environment variables, ~/.aws/credentials, EC2 instance metadata)
- Three Core Functions:
generateBedrockText()- Text generationstreamBedrockText()- Streaming text generationgenerateBedrockObject()- Structured object generation with Zod schemas
๐ง Technical Integration
- Unified AI Services: Seamlessly integrated into existing AI service layer
- Configuration Management: Enhanced config manager to handle AWS credentials
- API Key Management: Integrated with existing API key validation system
- MCP Server Support: Fully compatible with MCP tools and direct functions
- Error Handling: Comprehensive error handling with user-friendly messages
- Telemetry: Full support for cost tracking and usage monitoring
๐งช Testing
- Comprehensive Test Coverage: 12 dedicated provider tests + integration tests
- 100% Pass Rate: All tests passing including existing functionality
- Real-World Validation: Tested with actual AWS credentials and live Bedrock service
- Error Scenarios: Thorough testing of authentication failures and edge cases
๐ฆ Dependencies
- Added
@ai-sdk/amazon-bedrock@^2.2.9for AWS Bedrock integration - Follows semantic versioning with proper changeset
๐ฏ Usage
After merging, users can configure AWS Bedrock by:
- Setting AWS credentials (any method supported)
- Configuring Bedrock as provider:
task-master models --set-main anthropic.claude-3-sonnet-20240229-v1:0 --provider bedrock - Ensuring model access is enabled in AWS Bedrock console
โ Checklist
- [x] New provider follows existing architecture patterns
- [x] Comprehensive test coverage (12/12 tests passing)
- [x] Integration tests updated and passing
- [x] Configuration management enhanced
- [x] Documentation via JSDoc comments
- [x] Error handling and logging implemented
- [x] Changeset created for proper versioning
- [x] No breaking changes to existing functionality
๐ Test Results
- Bedrock Provider: 12/12 tests passing โ
- Unified Services: 12/13 tests passing (1 skipped) โ
- Integration Tests: 14/14 MCP tests passing โ
- All Unit Tests: 271/271 tests passing โ
This implementation provides enterprise-grade AWS Bedrock integration while maintaining the same simple, unified interface users expect from Task Master.
๐ฆ Changeset detected
Latest commit: fc80b4ee965adde5e06d5f0cfc174c6379135b28
The changes in this PR will be included in the next version bump.
This PR includes changesets to release 1 package
| Name | Type |
|---|---|
| task-master-ai | Minor |
Not sure what this means? Click here to learn what changesets are.
Click here if you're a maintainer who wants to add another changeset to this PR
Bedrock has already been implemented and will be a part of 0.16.0, go check out next and see how we implement it.
Feel free to merge next branch, and add the unit tests as you are doing here. They seem pretty valuable
Seems like this is getting stale and is already implementing this, if you find an improvement for the existing bedrock provider is found, please create a new PR.
Thanks for contributing!