From 9507f3c0085f12f5d0378e55c16844428304b274 Mon Sep 17 00:00:00 2001 From: "Paul Gauthier (aider)" Date: Thu, 24 Oct 2024 14:02:35 -0700 Subject: [PATCH] refactor: use main_model.info["supports_vision"] instead of accepts_images --- aider/coders/base_coder.py | 2 +- aider/commands.py | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/aider/coders/base_coder.py b/aider/coders/base_coder.py index 24433bde6..366954ad9 100755 --- a/aider/coders/base_coder.py +++ b/aider/coders/base_coder.py @@ -679,7 +679,7 @@ class Coder: return chat_files_messages def get_images_message(self): - if not self.main_model.accepts_images: + if not self.main_model.info.get("supports_vision"): return None image_messages = [] diff --git a/aider/commands.py b/aider/commands.py index 447334b53..5cf095e1f 100644 --- a/aider/commands.py +++ b/aider/commands.py @@ -748,7 +748,9 @@ class Commands: f"Cannot add {matched_file} as it's not part of the repository" ) else: - if is_image_file(matched_file) and not self.coder.main_model.accepts_images: + if is_image_file(matched_file) and not self.coder.main_model.info.get( + "supports_vision" + ): self.io.tool_error( f"Cannot add image file {matched_file} as the" f" {self.coder.main_model.name} does not support images."