-
Notifications
You must be signed in to change notification settings - Fork 2.7k
feat(goose): add support for AWS_BEARER_TOKEN_BEDROCK environment variable #6739
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
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.
Pull request overview
Adds bearer token authentication support for the Amazon Bedrock provider via AWS_BEARER_TOKEN_BEDROCK, with a fallback to the existing AWS credentials flow when the token is not set.
Changes:
- Add bearer-token-based Bedrock client construction and runtime region validation when a bearer token is used.
- Update Bedrock provider metadata/config keys to include
AWS_BEARER_TOKEN_BEDROCK(secret) and makeAWS_PROFILE/AWS_REGIONoptional in metadata. - Update provider integration tests to improve env handling and add a bearer-token Bedrock test case.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| crates/goose/src/providers/bedrock.rs | Implements bearer token auth path, conditional region validation, updates provider metadata, and adds metadata-focused unit tests. |
| crates/goose/tests/providers.rs | Refines env handling in the shared provider test helper and adds an integration test for bearer-token Bedrock auth. |
|
thanks @andreswebs - just wanted to confirm as a little hard to look at just diffs, but this will be fine for non bearer token cases as before - and the new stuff only kick in when there is a bearer token variable configured? is that right? |
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.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
156322a to
7489ebf
Compare
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.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
michaelneale
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.
Looks good - the one copilot comment on potentially filtering out AWS_BEARER_TOKEN_BEDROCK is a nice to have I think @andreswebs if you wanted to include that and test it, but otherwise LGTM
|
Awesome, thanks @michaelneale |
|
thanks for seeing this through @andreswebs and appreciate all the permutation testing and patience! |
Signed-off-by: Andre Silva <[email protected]>
* 'main' of github.com:block/goose: (62 commits) Swap canonical model from openrouter to models.dev (#6625) Hook thinking status (#6815) Fetch new skills hourly (#6814) copilot instructions: Update "No prerelease docs" instruction (#6795) refactor: centralize audience filtering before providers receive messages (#6728) update doc to remind contributors to activate hermit and document minimal npm and node version (#6727) nit: don't spit out compaction when in term mode as it fills up the screen (#6799) fix: correct tool support detection in Tetrate provider model fetching (#6808) Session manager fixes (#6809) fix(desktop): handle quoted paths with spaces in extension commands (#6430) fix: we can default gooseignore without writing it out (#6802) fix broken link (#6810) docs: add Beads MCP extension tutorial (#6792) feat(goose): add support for AWS_BEARER_TOKEN_BEDROCK environment variable (#6739) [docs] Add OSS Skills Marketplace (#6752) feat: make skills available in codemode (#6763) Fix: Recipe Extensions Not Loading in Desktop (#6777) Different approach to determining final confidence level of prompt injection evaluation outcomes (#6729) fix: read_resource_tool deadlock causing test_compaction to hang (#6737) Upgrade error handling (#6747) ...
…sion-session * 'main' of github.com:block/goose: (78 commits) copilot instructions: Update "No prerelease docs" instruction (#6795) refactor: centralize audience filtering before providers receive messages (#6728) update doc to remind contributors to activate hermit and document minimal npm and node version (#6727) nit: don't spit out compaction when in term mode as it fills up the screen (#6799) fix: correct tool support detection in Tetrate provider model fetching (#6808) Session manager fixes (#6809) fix(desktop): handle quoted paths with spaces in extension commands (#6430) fix: we can default gooseignore without writing it out (#6802) fix broken link (#6810) docs: add Beads MCP extension tutorial (#6792) feat(goose): add support for AWS_BEARER_TOKEN_BEDROCK environment variable (#6739) [docs] Add OSS Skills Marketplace (#6752) feat: make skills available in codemode (#6763) Fix: Recipe Extensions Not Loading in Desktop (#6777) Different approach to determining final confidence level of prompt injection evaluation outcomes (#6729) fix: read_resource_tool deadlock causing test_compaction to hang (#6737) Upgrade error handling (#6747) Fix/filter audience 6703 local (#6773) chore: re-sync package-lock.json (#6783) upgrade electron to 39.3.0 (#6779) ...
* main: docs: usage data collection (#6822) feat: platform extension migrator + code mode rename (#6611) feat: CLI flag to skip loading profile extensions (#6780) Swap canonical model from openrouter to models.dev (#6625) Hook thinking status (#6815) Fetch new skills hourly (#6814) copilot instructions: Update "No prerelease docs" instruction (#6795) refactor: centralize audience filtering before providers receive messages (#6728) update doc to remind contributors to activate hermit and document minimal npm and node version (#6727) nit: don't spit out compaction when in term mode as it fills up the screen (#6799) fix: correct tool support detection in Tetrate provider model fetching (#6808) Session manager fixes (#6809) fix(desktop): handle quoted paths with spaces in extension commands (#6430) fix: we can default gooseignore without writing it out (#6802) fix broken link (#6810) docs: add Beads MCP extension tutorial (#6792) feat(goose): add support for AWS_BEARER_TOKEN_BEDROCK environment variable (#6739)
Summary
Add support for bearer token authentication in the AWS Bedrock provider via the
AWS_BEARER_TOKEN_BEDROCKenvironment variable.This change allows users to authenticate with Amazon Bedrock using a bearer token as an alternative to standard AWS credentials (IAM/SSO). When
AWS_BEARER_TOKEN_BEDROCKis set, the provider uses bearer token authentication; otherwise, it falls back to the existing credential-based authentication flow.Changes:
AWS_BEARER_TOKEN_BEDROCKas a new optional secret config keyAWS_PROFILEoptional (since bearer token auth doesn't require it)AWS_REGIONrequired at runtime whenAWS_BEARER_TOKEN_BEDROCKis usedType of Change
AI Assistance
Testing
AWS_PROFILEmarked as optionaltest_bedrock_provider_bearer_tokenthat validates authentication flow with bearer token (requires -AWS_BEARER_TOKEN_BEDROCKandAWS_REGIONenv vars)Related Issues
Relates to #6577