mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-02 18:54:59 +00:00
feat: Print error message in red for unavailable models
This commit is contained in:
parent
21cca34392
commit
cdd730e627
1 changed files with 1 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue