bug: Support AWS bedrock - not addressed with v0.14 release #690

Closed
opened 2025-10-14 16:09:00 -06:00 by navan · 0 comments
Owner

Originally created by @mspiegel31 on 5/21/2025

Description

this comment states that #287 should be closed with the release of version 0.14.x. this does not appear to be the case.

There are a few key differences between how the Anthropic API functions and the AWS Bedrock API functions. Notably:

  1. AWS bedrock requires the usage of a either a credentials chain (preferred) or static tokens. These links from the vercel ai-sdk delve into specific examples for consuming these authn techniques
  2. AWS bedrock models do not follow the same naming conventions as the anthropic API (see here for naming conventions). Note that AWS bedrock models use a version suffix (i.e. -v1:0) in their model references

Steps to Reproduce

  1. run task-master init
  2. modify .taskmasterconfig with sample configuration:
{
  "models": {
    "main": {
      "provider": "anthropic",
      "modelId": "claude-3-7-sonnet-20250219-v1:0",
      "maxTokens": 120000,
      "temperature": 0.2,
      "baseUrl": "https://bedrock.us-east-1.amazonaws.com"
    },
    "research": {
      "provider": "openrouter",
      "modelId": "perplexity/sonar-pro",
      "maxTokens": 8700,
      "temperature": 0.1,
      "baseUrl": "https://openrouter.ai/api/v1"
    },
    "fallback": {
      "provider": "anthropic",
      "modelId": "claude-3-5-sonnet-20241022-v2:0",
      "maxTokens": 8192,
      "temperature": 0.1,
      "baseUrl": "https://bedrock.us-east-1.amazonaws.com"
    }
  },
  "global": {
    "logLevel": "info",
    "debug": false,
    "defaultSubtasks": 5,
    "defaultPriority": "medium",
    "projectName": "Taskmaster",
    "ollamaBaseUrl": "http://localhost:11434/api",
    "azureOpenaiBaseUrl": "https://your-endpoint.openai.azure.com/",
    "userId": "1234567890"
  }
}
  1. run task-master parse-prd --input scripts/example_prd.txt

Expected Behavior

PRD parsing behaves as expected

Actual Behavior

observe error:

Parsing PRD file: scripts/example_prd.txt
Generating 10 tasks...
⠋ Parsing PRD and generating tasks...
[INFO] Parsing PRD file: scripts/example_prd.txt, Force: false, Append: false
[INFO] Reading PRD content from scripts/example_prd.txt
[INFO] Calling AI service to generate tasks from PRD...
⠹ Parsing PRD and generating tasks...
[ERROR] Anthropic generateObject ('tasks_data') failed: Invalid JSON response
[WARN] Attempt 1 failed for role main (generateAnthropicObject / anthropic): Invalid JSON response
[ERROR] Something went wrong on the provider side. Max retries reached for role main (generateAnthropicObject / anthropic).
[ERROR] Service call failed for role main (Provider: anthropic, Model: claude-3-7-sonnet-20250219-v1:0): Invalid JSON response
⠸ Parsing PRD and generating tasks...
[ERROR] Anthropic generateObject ('tasks_data') failed: Invalid JSON response

Screenshots or Logs

Provide screenshots, logs, or error messages if applicable.

Environment

  • Task Master version: 0.14.0
  • Node.js version: v22.11.0
  • Operating system: MacOS
  • IDE (if applicable): N/A

Additional Context

A proposed solution would involve:

  1. Adding a new aws-bedrock.js provider in src/ai-providers
  2. Implementing the configuration parsing strategies mentioned above (here and here)
  3. Leveraging import { createAmazonBedrock } from '@ai-sdk/amazon-bedrock'; function, similar to other AI providers
*Originally created by @mspiegel31 on 5/21/2025* ### Description [this comment](https://github.com/eyaltoledano/claude-task-master/issues/287#issuecomment-2842475846) states that #287 should be closed with the release of version `0.14.x`. this does not appear to be the case. There are a few key differences between how the Anthropic API functions and the AWS Bedrock API functions. Notably: 1. AWS bedrock requires the usage of a either a [credentials chain](https://ai-sdk.dev/providers/ai-sdk-providers/amazon-bedrock#using-aws-sdk-credentials-chain-instance-profiles-instance-roles-ecs-roles-eks-service-accounts-etc) (preferred) or [static tokens](https://ai-sdk.dev/providers/ai-sdk-providers/amazon-bedrock#provider-instance). These links from the vercel `ai-sdk` delve into specific examples for consuming these authn techniques 2. AWS bedrock models **do not** follow the same naming conventions as the anthropic API (see [here](https://docs.anthropic.com/en/api/claude-on-amazon-bedrock#api-model-names) for naming conventions). Note that AWS bedrock models use a version suffix (i.e. `-v1:0`) in their model references ### Steps to Reproduce 1. run `task-master init` 1. modify `.taskmasterconfig` with sample configuration: ```json { "models": { "main": { "provider": "anthropic", "modelId": "claude-3-7-sonnet-20250219-v1:0", "maxTokens": 120000, "temperature": 0.2, "baseUrl": "https://bedrock.us-east-1.amazonaws.com" }, "research": { "provider": "openrouter", "modelId": "perplexity/sonar-pro", "maxTokens": 8700, "temperature": 0.1, "baseUrl": "https://openrouter.ai/api/v1" }, "fallback": { "provider": "anthropic", "modelId": "claude-3-5-sonnet-20241022-v2:0", "maxTokens": 8192, "temperature": 0.1, "baseUrl": "https://bedrock.us-east-1.amazonaws.com" } }, "global": { "logLevel": "info", "debug": false, "defaultSubtasks": 5, "defaultPriority": "medium", "projectName": "Taskmaster", "ollamaBaseUrl": "http://localhost:11434/api", "azureOpenaiBaseUrl": "https://your-endpoint.openai.azure.com/", "userId": "1234567890" } } ``` 3. run `task-master parse-prd --input scripts/example_prd.txt` ### Expected Behavior PRD parsing behaves as expected ### Actual Behavior observe error: ```sh Parsing PRD file: scripts/example_prd.txt Generating 10 tasks... ⠋ Parsing PRD and generating tasks... [INFO] Parsing PRD file: scripts/example_prd.txt, Force: false, Append: false [INFO] Reading PRD content from scripts/example_prd.txt [INFO] Calling AI service to generate tasks from PRD... ⠹ Parsing PRD and generating tasks... [ERROR] Anthropic generateObject ('tasks_data') failed: Invalid JSON response [WARN] Attempt 1 failed for role main (generateAnthropicObject / anthropic): Invalid JSON response [ERROR] Something went wrong on the provider side. Max retries reached for role main (generateAnthropicObject / anthropic). [ERROR] Service call failed for role main (Provider: anthropic, Model: claude-3-7-sonnet-20250219-v1:0): Invalid JSON response ⠸ Parsing PRD and generating tasks... [ERROR] Anthropic generateObject ('tasks_data') failed: Invalid JSON response ``` ### Screenshots or Logs Provide screenshots, logs, or error messages if applicable. ### Environment - Task Master version: `0.14.0` - Node.js version: `v22.11.0` - Operating system: MacOS - IDE (if applicable): N/A ### Additional Context A proposed solution would involve: 1. Adding a new `aws-bedrock.js` provider in `src/ai-providers` 1. Implementing the configuration parsing strategies mentioned above ([here](https://ai-sdk.dev/providers/ai-sdk-providers/amazon-bedrock#using-aws-sdk-credentials-chain-instance-profiles-instance-roles-ecs-roles-eks-service-accounts-etc) and [here](https://ai-sdk.dev/providers/ai-sdk-providers/amazon-bedrock#provider-instance)) 1. Leveraging `import { createAmazonBedrock } from '@ai-sdk/amazon-bedrock';` function, similar to other AI providers
Sign in to join this conversation.
No labels
area:ai-models
area:ai-models
area:ai-models
area:ai-models
area:ai-models
area:ai-models
area:ai-models
area:ai-models
area:ai-models
area:ai-models
area:ai-models
area:ai-models
area:cli
area:cli
area:cli
area:cli
area:cli
area:cli
area:cli
area:cli
area:cli
area:cli
area:cli
area:cli
area:cli
area:cli
area:installation
area:installation
area:installation
area:installation
area:installation
area:mcp
area:mcp
area:mcp
area:mcp
area:mcp
area:mcp
area:mcp
area:mcp
area:mcp
area:mcp
area:mcp
area:mcp
area:mcp
area:mcp
area:mcp
area:mcp
area:mcp
area:task-management
area:task-management
area:task-management
area:task-management
area:task-management
area:task-management
area:task-management
area:task-management
area:task-management
area:task-management
area:task-management
area:task-management
area:task-management
area:task-management
area:task-management
area:task-management
area:task-management
area:vscode-extension
area:vscode-extension
area:vscode-extension
area:vscode-extension
area:vscode-extension
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
documentation
documentation
documentation
documentation
documentation
documentation
documentation
documentation
documentation
documentation
documentation
documentation
documentation
documentation
documentation
documentation
documentation
duplicate
duplicate
duplicate
duplicate
duplicate
duplicate
duplicate
duplicate
duplicate
duplicate
duplicate
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
feedback
feedback
feedback
feedback
feedback
feedback
feedback
feedback
feedback
feedback
feedback
feedback
feedback
feedback
feedback
feedback
feedback
feedback
feedback
feedback
feedback
feedback
feedback
feedback
feedback
feedback
feedback
feedback
feedback
feedback
feedback
good first issue
good first issue
good first issue
good first issue
good first issue
good first issue
good first issue
good first issue
good first issue
good first issue
good first issue
good first issue
good first issue
good first issue
good first issue
good first issue
good first issue
good first issue
good first issue
good first issue
good first issue
help wanted
help wanted
help wanted
help wanted
help wanted
high-priority
high-priority
high-priority
high-priority
high-priority
high-priority
high-priority
high-priority
high-priority
high-priority
high-priority
high-priority
high-priority
integration request
integration request
integration request
integration request
invalid
invalid
invalid
invalid
invalid
invalid
invalid
invalid
invalid
invalid
invalid
invalid
invalid
invalid
low-priority
low-priority
medium-priority
medium-priority
medium-priority
medium-priority
medium-priority
medium-priority
medium-priority
medium-priority
medium-priority
medium-priority
medium-priority
medium-priority
medium-priority
medium-priority
medium-priority
medium-priority
medium-priority
medium-priority
medium-priority
medium-priority
medium-priority
medium-priority
medium-priority
medium-priority
provider:anthropic
provider:anthropic
provider:claude-code
provider:claude-code
provider:claude-code
provider:claude-code
provider:claude-code
provider:claude-code
provider:claude-code
provider:claude-code
provider:claude-code
provider:claude-code
provider:claude-code
provider:gemini-cli
provider:openai
provider:perplexity
question
question
question
question
question
question
question
question
question
question
question
question
question
question
refactor
refactor
wontfix
wontfix
wontfix
wontfix
wontfix
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github/claude-task-master#690
No description provided.