Amazon Bedrock: Gracefully fail if model isn't supported
under review
John Tyra
When a model isn't enabled or supported in given region, don't generate the pictured error "ValidationException (properties: AWSBedrockRuntime.ValidationException.Properties(.." in the GUI. Instead, provide an error that describes the problem "Model not supported/enabled in this region". Alternatively, you could perform a "ListFoundationModels" followed by a "GetFoundationModel" API call to see what models are actually available for that specific IAM user and/or region. Then you could filter the model list accordingly in the GUI.
Daniel Nguyen
under review
Hmm strange. I'm using ListFoundationModels to fetch the model list. I thought it would return the supported models? 🤔
John Tyra
Daniel Nguyen the API reference page isn't clear to me if the ListFoundationalModels API call is listing supported models or authorized models. You may have to test the output and see which API call type is required to verify access.