An AI-powered task-management system you can drop into Cursor, Lovable, Windsurf, Roo, and others.
JavaScript aicursorcursor-aicursorailovablelovable-devroocodetask-managertaskstasks-listwindsurfwindsurf-ai
fix(bedrock): improve AWS credential handling and add model definitions (#826)
Ralph Khreish78112277b3ca
diff --git a/.changeset/modern-cats-pick.md b/.changeset/modern-cats-pick.mdnew file mode 100644index 00000000..056c22f1--- /dev/null+++ b/.changeset/modern-cats-pick.md@@ -0,0 +1,5 @@+---+"task-master-ai": patch+---++Improves Amazon Bedrock supportdiff --git a/scripts/modules/commands.js b/scripts/modules/commands.jsindex b56ae1b7..76bbbd01 100644--- a/scripts/modules/commands.js+++ b/scripts/modules/commands.js@@ -572,9 +572,9 @@ async function runInteractiveSetup(projectRoot) {!process.env.AWS_ACCESS_KEY_ID ||!process.env.AWS_SECRET_ACCESS_KEY) {- console.error(- chalk.red(- 'Error: AWS_ACCESS_KEY_ID and/or AWS_SECRET_ACCESS_KEY environment variables are missing. Please set them before using custom Bedrock models.'+ console.warn(+ chalk.yellow(+ 'Warning: AWS_ACCESS_KEY_ID and/or AWS_SECRET_ACCESS_KEY environment variables are missing. Will fallback to system configuration. (ex: aws config files or ec2 instance profiles)'));setupSuccess = false;diff --git a/scripts/modules/config-manager.js b/scripts/modules/config-manager.jsindex 82959146..515044bd 100644--- a/scripts/modules/config-manager.js+++ b/scripts/modules/config-manager.js@@ -496,7 +496,14 @@ function getParametersForRole(role, explicitRoot = null) {*/function isApiKeySet(providerName, session = null, projectRoot = null) {// Define the expected environment variable name for each provider- if (providerName?.toLowerCase() === 'ollama') {++ // Providers that don't require API keys for authentication+ const providersWithoutApiKeys = [+ CUSTOM_PROVIDERS.OLLAMA,+ CUSTOM_PROVIDERS.BEDROCK+ ];++ if (providersWithoutApiKeys.includes(providerName?.toLowerCase())) {return true; // Indicate key status is effectively "OK"}diff --git a/scripts/modules/supported-models.json b/scripts/modules/supported-models.jsonindex 8a0cb2b2..ef4d78e8 100644--- a/scripts/modules/supported-models.json+++ b/scripts/modules/supported-models.json@@ -1,4 +1,20 @@{+ "bedrock": [+ {+ "id": "us.anthropic.claude-3-7-sonnet-20250219-v1:0",+ "swe_score": 0.623,+ "cost_per_1m_tokens": { "input": 3, "output": 15 },+ "allowed_roles": ["main", "fallback"],+ "max_tokens": 65536+ },+ {+ "id": "us.deepseek.r1-v1:0",+ "swe_score": 0,+ "cost_per_1m_tokens": { "input": 1.35, "output": 5.4 },+ "allowed_roles": ["research"],+ "max_tokens": 65536+ }+ ],"anthropic": [{"id": "claude-sonnet-4-20250514",diff --git a/src/ai-providers/bedrock.js b/src/ai-providers/bedrock.jsindex 3f5b3cae..74912518 100644--- a/src/ai-providers/bedrock.js+++ b/src/ai-providers/bedrock.js@@ -21,18 +21,10 @@ export class BedrockAIProvider extends BaseAIProvider {*/getClient(params) {try {- const {- profile = process.env.AWS_PROFILE || 'default',- region = process.env.AWS_DEFAULT_REGION || 'us-east-1',- baseURL- } = params;-- const credentialProvider = fromNodeProviderChain({ profile });+ const credentialProvider = fromNodeProviderChain();return createAmazonBedrock({- region,- credentialProvider,- ...(baseURL && { baseURL })+ credentialProvider});} catch (error) {this.handleError('client initialization', error);diff --git a/tests/unit/config-manager.test.js b/tests/unit/config-manager.test.jsindex 851818bb..e32f3a37 100644--- a/tests/unit/config-manager.test.js+++ b/tests/unit/config-manager.test.js@@ -266,6 +266,7 @@ describe('Validation Functions', () => {expect(configManager.validateProvider('perplexity')).toBe(true);expect(configManager.validateProvider('ollama')).toBe(true);expect(configManager.validateProvider('openrouter')).toBe(true);+ expect(configManager.validateProvider('bedrock')).toBe(true);});test('validateProvider should return false for invalid providers', () => {