Improve AWS credential loading and configuration handling in BedrockProvider #5699
Improve AWS credential loading and configuration handling in BedrockProvider #5699michaelneale merged 2 commits intoblock:mainfrom
Conversation
|
@DOsinga have you any update ? |
michaelneale
left a comment
There was a problem hiding this comment.
thanks @fbalicchia - devilishly hard to test all the edge cases for bedrock implementations isn't it.
I had some nit/comments in review - but main thing is: have had issues before with it not really refreshing creds and then goose basically crashes/stops working until you close and open, is that likely to be an issue with this with the client at the BedrockProvider level? or will it load things when it needs?
If you think this is ok, then would just love small comments addressed (and also - do we need us-east-1 in there?) and lets get this in, and can see how it goes?
| "us.anthropic.claude-3-7-sonnet-20250219-v1:0", | ||
| "us.anthropic.claude-opus-4-20250514-v1:0", | ||
| "us.anthropic.claude-opus-4-1-20250805-v1:0", | ||
| "anthropic.claude-sonnet-4-20250514-v1:0", |
There was a problem hiding this comment.
odd - it wouldn't work without the prefix here for me, but may be different setup with sso vs not?
There was a problem hiding this comment.
No—this doesn’t depend on SSO here. It depends on which profile we want to use by default, whether the global profile or the inference profile. I’ll revert it
michaelneale
left a comment
There was a problem hiding this comment.
thanks @fbalicchia can you click on the DCO check and sign your commits - then we can get it in. Thank you!
Signed-off-by: fbalicchia <fbalicchia@gmail.com>
Signed-off-by: fbalicchia <fbalicchia@gmail.com>
5398fb8 to
7481b76
Compare
|
@michaelneale Done thanks |
|
thank you @fbalicchia |
…rovider (block#5699) Signed-off-by: fbalicchia <fbalicchia@gmail.com> Signed-off-by: Blair Allan <Blairallan@icloud.com>
…nses-streaming * 'main' of github.com:block/goose: Feat/automatic update installation (#5345) fix: Added "Merged consecutive assistant messages" to the acceptable issues for moim injection check (#5933) fix: anthropic provider model fetching (#5932) [MCP-UI] add CSP for images to proxy HTML (#5931) fix: correct typo in blog post (AIMDOEL -> AIMODEL) (#5902) feat: @goose in terminal (native terminal support) (#5887) docs: adding AI-friendly features (#5918) Blog/advent of ai announcement (#5917) Extension selector behind ALPHA flag (#5892) blog: typo fixes (#5896) blog: fixing img url (#5895) blog: MCPs for Developers (#5884) docs: Extension Manager MCP (#5883) Update cleanup marker logic for Fedora users. (#5868) Improve AWS credential loading and configuration handling in BedrockProvider (#5699)
This PR refactors the BedrockProvider::from_env implementation to make AWS configuration loading more robust and user-friendly, especially for environments using AWS SSO or multiple profiles.
⸻
Key Changes
• Replaced aws_config::load_from_env() with aws_config::defaults(BehaviorVersion::latest()) to support:
• AWS SSO logins (aws sso login --profile )
• Named profiles (AWS_PROFILE)
• Explicit region configuration (AWS_REGION)
• Added explicit handling for:
• AWS_PROFILE → sets the active AWS profile
• AWS_REGION → sets the AWS region dynamically