feat: Add boto3 check for Bedrock models in sanity_check_model

This commit is contained in:
Paul Gauthier (aider) 2025-03-05 16:55:51 -08:00
parent 1156b3f22e
commit ce7e5726e7

View file

@ -769,6 +769,16 @@ def sanity_check_model(io, model):
show = True
io.tool_warning(f"Warning for {model}: Unknown which environment variables are required.")
# Check if this is a Bedrock model and ensure boto3 is installed
if model.name.startswith("bedrock/"):
from aider.utils import check_pip_install_extra
check_pip_install_extra(
io,
"boto3",
"AWS Bedrock models require the boto3 package.",
["boto3"]
)
if not model.info:
show = True
io.tool_warning(