-
Notifications
You must be signed in to change notification settings - Fork 128
Assistant: Support autoconfiguring Bedrock #10537
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Logic updated to support env var configurations, or a more complex custom logic to do the same.
|
E2E Tests 🚀 |
Bedrock autoconfiguration with managed credentials should only work on Workbench (web), not on desktop Positron
| return undefined; | ||
| } | ||
|
|
||
| static override async autoconfigure(): Promise<AutoconfigureResult> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you think about making the LanguageModelAutoconfigureType.Custom more specific to Workbench and refactoring this function so that the environment variables are passed with keys? This would make it straightforward to add autoconfigure functionality for other Workbench creds relying on environment variables.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried to keep this method as agnostic as possible, to allow for the possibility of other autoconfiguration mechanisms in the future (in addition to Managed Creds).
Perhaps a happy medium is a helper function to check for Managed Creds that other providers can use?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That sounds reasonable. Since we're including logic to check if we're running in PWB, can we rename autoconfigure to something that indicates this is only for Workbench?
melissa-barca
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
|
We were able to test this locally by setting the Note: this is faking the setup, so testing also needs to be done in a live PWB instance; however, constraints on running a local PWB build with managed credentials that authenticate to Bedrock makes this difficult to do outside of a true PWB setup. |
This PR adds infrastructure to support autoconfiguring Bedrock as a provider when:
amazon-bedrockis inpositron.assistant.enabledProviders, andAWS_WEB_IDENTITY_TOKEN_FILEcontains the substring 'posit-workbench'TODO:
Addresses #10179
Release Notes
New Features
Bug Fixes
QA Notes
e2e: @:web @:assistant