-
Couldn't load subscription status.
- Fork 450
Add additional exception information for common bedrock errors #290
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
Add additional exception information for common bedrock errors #290
Conversation
We've received customer confusion regarding some of the errors when attempting to run on bedrock. To help customers understand what's going wrong, add region and model information to exceptions coming out of the bedrock provider & point them to our docs when possible. Semi-related to strands-agents#238
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 is the alternative to add_note? Could we extend the error message with this same information?
Followed up offline - I considered this but given that this is an "extra" thing + we have docs for this, I figured it'd be better not to reinevent the wheel of what python is doing and just to conditionally do this. If we see enough usage of this and still get questions related, we can re-evaluate |
…s#290) We've received customer confusion regarding some of the errors when attempting to run on bedrock. To help customers understand what's going wrong, add region and model information to exceptions coming out of the bedrock provider & point them to our docs when possible. Semi-related to strands-agents#238 Co-authored-by: Mackenzie Zastrow <[email protected]>
…s#290) We've received customer confusion regarding some of the errors when attempting to run on bedrock. To help customers understand what's going wrong, add region and model information to exceptions coming out of the bedrock provider & point them to our docs when possible. Semi-related to strands-agents#238 Co-authored-by: Mackenzie Zastrow <[email protected]>
When add_note is not available (3.10) enhance the default error message with the added notes. In PR strands-agents#290 we started using add_note to provide the bedrock model and region in exceptions to better clarify to customers what model & region were active. The implementation used add_note which is only supported in 3.11+; however, we've had enough customers on 3.10 where they're not seeing the error message that it makes sense to add a shim to do something similar for 3.10.
When add_note is not available (3.10) enhance the default error message with the added notes. In PR #290 we started using add_note to provide the bedrock model and region in exceptions to better clarify to customers what model & region were active. The implementation used add_note which is only supported in 3.11+; however, we've had enough customers on 3.10 where they're not seeing the error message that it makes sense to add a shim to do something similar for 3.10. --------- Co-authored-by: Mackenzie Zastrow <[email protected]>
Description
We've received customer confusion regarding some of the errors when attempting to run on bedrock. To help customers understand what's going wrong, add region and model information to exceptions coming out of the bedrock provider & point them to our docs when possible.
Semi-related to #238
Note: Python's
add_notemethod was added in 3.11 even though we support 3.10 so this is conditional on being on python 3.11+. I figured that's okay since this is an extra feature of strands.Related Issues
#238
Documentation PR
strands-agents/docs/pull/102
Type of Change
New feature
Testing
How have you tested the change? Verify that the changes do not break functionality or introduce warnings in consuming repositories: agents-docs, agents-tools, agents-cli
hatch run prepareManual Testing:
When you don't have access to the model:
When on-demand throughput isn’t supported:
Checklist
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.