From ce7e5726e74b578f8ad33e48d9dc4700fe368fbe Mon Sep 17 00:00:00 2001 From: "Paul Gauthier (aider)" Date: Wed, 5 Mar 2025 16:55:51 -0800 Subject: [PATCH] feat: Add boto3 check for Bedrock models in sanity_check_model --- aider/models.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/aider/models.py b/aider/models.py index f2abf5f7d..cd530b882 100644 --- a/aider/models.py +++ b/aider/models.py @@ -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(