From cdd730e627e7e9f2a18d77e72c96b1600706e6eb Mon Sep 17 00:00:00 2001 From: "Stefan Hladnik (aider)" Date: Tue, 18 Mar 2025 03:54:27 +0700 Subject: [PATCH] feat: Print error message in red for unavailable models --- aider/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aider/models.py b/aider/models.py index fe92e8aa5..f78376948 100644 --- a/aider/models.py +++ b/aider/models.py @@ -248,7 +248,7 @@ class ModelInfoManager: html = response.text import re if re.search(rf'The model\s*.*{re.escape(url_part)}.* is not available', html, re.IGNORECASE): - print(f"Error: Model '{url_part}' is not available") + print(f"\033[91mError: Model '{url_part}' is not available\033[0m") sys.exit(1) text = re.sub(r'<[^>]+>', ' ', html) context_match = re.search(r"([\d,]+)\s*context", text)