Skip to content

Conversation

@shyam-habarakada-smar
Copy link

@shyam-habarakada-smar shyam-habarakada-smar commented Mar 13, 2025

Context

When using the Bedrock provider, and using the AWS Profile method of authentication (vs the AWS Credentials method), if the provided profile is missing, the Roo interface will provide a generic API error. This was particularly problematic (confusing) when opening a Visual Studio remote workspace via SSH. See issue #1600 for more details.

This change adds better error checking and corresponding error details in the UI to make it easier to identify the problem in this scenario.

Implementation

Roo helped me put this togeter :-) But at a high level, we check for the conditions of using the Bedrock provider and the AWS Profile method and when those conditions are true, check to make sure that the specified AWS profile exists in the context of the workspace, and provide an appropriate detailed error message when the necessary conditions are not met.

Screenshots

before after
image image

How to Test

  • In VS Code, with Roo Code installed
  • Switch to the Bedrock provider
  • Specify and AWS Profile that is valid on your local host
  • Pick any one of the models available
  • Use Roo (task: "hello"). Note this works
  • Open a remote SSH workspace in VS Code
  • Install Roo in that workspace, and confirm the same Provider, AWS Profile and model are selected
  • Use Roo (task: "hello"). Note the new more detailed error.

Get in Touch

shyamhabarakada_05400 on Roo Code Discord


Important

Improves error handling for AWS profile issues in remote SSH contexts in the Bedrock provider, adding detailed error messages and utility functions.

  • Behavior:
    • Enhanced error handling in AwsBedrockHandler for missing AWS profiles in remote SSH contexts, providing detailed error messages.
    • Checks if AWS profile exists using doesAwsProfileExist() and shows error using showRemoteProfileError().
  • Utilities:
    • Added isRemoteSSH(), doesAwsProfileExist(), showRemoteProfileError(), and getDetailedRemoteProfileErrorMessage() in profile-utils.ts.
  • Tests:
    • Added tests in bedrock-remote-ssh.test.ts for AwsBedrockHandler to verify error handling.
    • Added tests in profile-utils.test.ts for new utility functions.

This description was created by Ellipsis for 5b32e94575f6303583e7d77ab4d870e83724e7bd. It will automatically update as commits are pushed.

@changeset-bot
Copy link

changeset-bot bot commented Mar 13, 2025

⚠️ No Changeset found

Latest commit: 29137fb

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@dosubot dosubot bot added the size:XL This PR changes 500-999 lines, ignoring generated files. label Mar 13, 2025
@dosubot dosubot bot added the enhancement New feature or request label Mar 13, 2025
Comment on lines 424 to 433
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nitpick, but could you put this into a isErrorRelatedToCredentials(errorMessage) method that you can reuse below?

@hannesrudolph hannesrudolph moved this from New to PR [Greenlit] in Roo Code Roadmap Mar 13, 2025
ipattis pushed a commit to ipattis/roo-code that referenced this pull request Mar 15, 2025
…-mistral-models

feat: Add support for all available Mistral API models
@github-project-automation github-project-automation bot moved this from PR [Greenlit] to Done in Roo Code Roadmap Apr 21, 2025
@dosubot dosubot bot added size:XS This PR changes 0-9 lines, ignoring generated files. and removed size:XL This PR changes 500-999 lines, ignoring generated files. labels Apr 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bedrock provider AWS Profile authentication fails when using VS Code against a remote SSH host

2 participants