Assistant: Sign-in errors with Bedrock are ugly and also useless
System details:
Positron and OS details:
Positron Version: 2025.09.0 build 26
Code - OSS Version: 1.102.0
Commit: 44a1d19be2e1cd01c5c6ae6cb37b6b3117f9c203
Date: 2025-08-07T03:42:32.533Z
Electron: 35.6.0
Chromium: 134.0.6998.205
Node.js: 22.15.1
V8: 13.4.114.21-electron.0
OS: Darwin arm64 24.6.0
Session details:
N/A
Describe the issue:
When failing to sign in to Amazon Bedrock, the error shown is confusing and unhelpful.
Steps to reproduce the issue:
Open Configure Language Model Providers. Then, attempt to sign in to Bedrock without setting up any credentials. Click the "Sign in" button. Receive this error:
Error: {"name":"CredentialsProviderError","tryNextLink":false}
This is the error you see when:
- no credentials are set up, OR
- the credentials that it tried to use are expired, OR
- any other sign-in error occurred
This same error appears when Positron tries to re-register Bedrock models after signing in but if e.g. the session expires.
Expected or desired behavior:
- The error message should not be raw JSON. It should explain the sign-in failure in a more human-readable way.
- Ideally, the error message should differentiate between states like 'no credentials', 'wrong credentials', 'expired credentials', 'credentials ok but no model access', etc.
- Ideally, the error message should name the credentials that were used to sign in and where they came from
- Ideally, the error message should contain the actual error from Bedrock
- Same deal for the error when registering the models after initial signin
Related: https://github.com/posit-dev/positron/issues/8489
Also, it would be helpful to be able to configure which AWS_PROFILE should be used in the context of Positron Assistant rather than having to set it in a terminal from which Positron is then launched. For anyone with multiple AWS profiles, this is a must.
Also, it would be helpful to be able to configure which AWS_PROFILE should be used in the context of Positron Assistant rather than having to set it in a terminal from which Positron is then launched. For anyone with multiple AWS profiles, this is a must.
I've split this out to https://github.com/posit-dev/positron/issues/9649
We picked up a new version of the AWS Bedrock plugin for AI-SDK a little bit ago, and it seems to have done most of this work for us. Now attempting to sign in gives you something human readable (this error message comes from ai-sdk, not us):
This could be improved, but is at least human readable. There are multiple ways to provide AWS credentials and it's letting you know that none of them provided any.
If you're signed out, the error is actually helpful now, too:
Putting back to triage to argue that this is, at least, good enough for 2025.10
The missing part for me in that message was that the connection was tried will using the default profile.
I needed to set AWS_PROFILE in terminal before launching (like #9649)
Without this set, I only see the same generic message
I don't see the other message that gives hint that profile=default is always the one used.
Showing this information in the sign in error message would be helpful to have some hint on how to configure.