claude-task-master icon indicating copy to clipboard operation
claude-task-master copied to clipboard

bug: Invalid provider warnings when using AWS Bedrock

Open fouadgm opened this issue 1 year ago • 14 comments

Description

AWS Bedrock configuration not working as expected.

Steps to Reproduce

For CLI:

  1. Add AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY to the environment (used .zshrc in my case)
  2. Install taskmaster-ai: npm install -g task-master-ai
  3. Initialize taskmaster-ai: task-master init
    1. During initialization, use Custom Bedrock model for all options
    2. Provided these models for bedrock:
      • main: anthropic.claude-opus-4-20250514-v1:0
      • research: cohere.command-r-plus-v1:0
      • fallback: anthropic.claude-3-5-sonnet-20241022-v2:0
  4. Setup completes successfully
  5. Run task-master models
  6. Get warning input indicating bedrock provider + models were not used:
    Fetching current model configuration...
    Warning: Invalid main provider "bedrock" in /path_to_project/.taskmaster/config.json. Falling back to default.
    Warning: Invalid research provider "bedrock" in /path_to_project/.taskmaster/config.json. Falling back to default.
    Warning: Invalid fallback provider "bedrock" in /path_to_project/.taskmaster/config.json. Fallback model configuration will be ignored.
    

Expected Behavior

AWS Bedrock is usable as a supported provider in taskmaster-ai v0.16.1+

Actual Behavior

Bedrock is considered an unsupported provider and config gets overridden with defaults at runtime.

Screenshots or Logs

Image

Environment

  • Task Master version: v0.16.1
  • Node.js version: v20.11.1
  • Operating system: macOS Sequoia v15.4.1
  • IDE (if applicable): VSCode, Terminal (integrated + standalone)

Additional Context

  • Looks like validateProvider is at play. As a result, it also appears to be overwriting the bedrock config with the defaults instead.
  • The supported-models.json file doesn't have Bedrock in it.
  • Supported foundation models: link

fouadgm avatar Jun 05 '25 00:06 fouadgm

Nice catch, thanks for that. Since I don't have bedrock, I wasn't able to test end to end

Crunchyman-ralph avatar Jun 05 '25 13:06 Crunchyman-ralph

I've updated the Additional Context section to include the supported foundation models in Bedrock.

However, I'm curious how the supported_models.json mechanism can be made more dynamic so it doesn't need frequent package updates. Could help reduce your maintenance overhead as well 👀

aws bedrock list-foundation-models responds with the following JSON (truncated):

{
    "modelArn": "arn:aws:bedrock:us-east-1::foundation-model/anthropic.claude-opus-4-20250514-v1:0",
    "modelId": "anthropic.claude-opus-4-20250514-v1:0",
    "modelName": "Claude Opus 4",
    "providerName": "Anthropic",
    "inputModalities": [
        "TEXT",
        "IMAGE"
    ],
    "outputModalities": [
        "TEXT"
    ],
    "responseStreamingSupported": true,
    "customizationsSupported": [],
    "inferenceTypesSupported": [
        "INFERENCE_PROFILE"
    ],
    "modelLifecycle": {
        "status": "ACTIVE"
    }
},
{
    "modelArn": "arn:aws:bedrock:us-east-1::foundation-model/anthropic.claude-sonnet-4-20250514-v1:0",
    "modelId": "anthropic.claude-sonnet-4-20250514-v1:0",
    "modelName": "Claude Sonnet 4",
    "providerName": "Anthropic",
    "inputModalities": [
        "TEXT",
        "IMAGE"
    ],
    "outputModalities": [
        "TEXT"
    ],
    "responseStreamingSupported": true,
    "customizationsSupported": [],
    "inferenceTypesSupported": [
        "INFERENCE_PROFILE"
    ],
    "modelLifecycle": {
        "status": "ACTIVE"
    }
}

Haven't thought through how the allowed_roles (main, research, fallback) aspects could be derived from dynamic model pulls though 🤔

fouadgm avatar Jun 05 '25 16:06 fouadgm

First, a big thank you to all the contributors for your work on this project. I'd also like to thank @fouadgm specifically for raising this issue.

I can confirm that I'm experiencing the same problem and I agree with your analysis in the 'Additional Context' section.

I'd also like to add that for the Bedrock Anthropic models, it seems necessary to use the 'us.' prefix for the model ID, in accordance with the Inference Profile ID rule.

For example: us.anthropic.claude-sonnet-4-20250514-v1:0

Hope this is helpful.

redpsj-dev avatar Jun 07 '25 00:06 redpsj-dev

Sorry if I'm dense here, but is there a workaround for this issue? I was going to try out task-master today and just curious if there was a way around it.

olssonsten avatar Jun 07 '25 13:06 olssonsten

I’m experiencing the same issue. Hope it can be fixed soon. Thank you!

Image

snvtac avatar Jun 12 '25 01:06 snvtac

I took a stab at getting Bedrock working with Claude Sonnet 3.7. I was able to test a run of the prd.txt from the demo script successfully.

raykrueger avatar Jun 13 '25 22:06 raykrueger

I have the same issue with 0.17.0. @raykrueger can you please share what you did to make it work, whats the config? sadly the project has zero documentation for bedrock.

skrabadiloseidon avatar Jun 15 '25 07:06 skrabadiloseidon

To test, you can pull my code from the PR and run npm pack && npm install -g ./task-master-ai-0.16.2.tgz. Then run the task-master init as normal and pick the bedrock models offered.

raykrueger avatar Jun 16 '25 15:06 raykrueger

To test, you can pull my code from the PR and run npm pack && npm install -g ./task-master-ai-0.16.2.tgz. Then run the task-master init as normal and pick the bedrock models offered.

raykrueger avatar Jun 16 '25 15:06 raykrueger

@raykrueger thanks for your PR, I reviewed it and am ready to merge it, just needs some of your attention

Crunchyman-ralph avatar Jun 20 '25 11:06 Crunchyman-ralph

Im traveling right now. I’ll get to it as soon as I can :)On Jun 20, 2025, at 20:08, Ralph Khreish @.***> wrote:Crunchyman-ralph left a comment (eyaltoledano/claude-task-master#672) @raykrueger thanks for your PR, I reviewed it and am ready to merge it, just needs some of your attention

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>

raykrueger avatar Jun 20 '25 11:06 raykrueger

@raykrueger mind if I take it over and get it accross the finish line ?

Crunchyman-ralph avatar Jun 20 '25 12:06 Crunchyman-ralph

That would be great!On Jun 20, 2025, at 21:02, Ralph Khreish @.***> wrote:Crunchyman-ralph left a comment (eyaltoledano/claude-task-master#672) @raykrueger mind if I take it over and get it accross the finish line ?

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>

raykrueger avatar Jun 20 '25 12:06 raykrueger

@raykrueger someone else approached me and we have done a bunch of fixes to be compatible with aws bedrock since, please let me know if the issue persists, closing this for now

Crunchyman-ralph avatar Jul 07 '25 14:07 Crunchyman-ralph