mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-17 10:05:01 +00:00
fix: Return empty dict instead of exiting on model availability error
This commit is contained in:
parent
7c3d96d0e7
commit
b3d9e0d1b0
1 changed files with 1 additions and 1 deletions
|
@ -249,7 +249,7 @@ class ModelInfoManager:
|
||||||
import re
|
import re
|
||||||
if re.search(rf'The model\s*.*{re.escape(url_part)}.* is not available', html, re.IGNORECASE):
|
if re.search(rf'The model\s*.*{re.escape(url_part)}.* is not available', html, re.IGNORECASE):
|
||||||
print(f"\033[91mError: Model '{url_part}' is not available\033[0m")
|
print(f"\033[91mError: Model '{url_part}' is not available\033[0m")
|
||||||
sys.exit(1)
|
return {}
|
||||||
text = re.sub(r'<[^>]+>', ' ', html)
|
text = re.sub(r'<[^>]+>', ' ', html)
|
||||||
context_match = re.search(r"([\d,]+)\s*context", text)
|
context_match = re.search(r"([\d,]+)\s*context", text)
|
||||||
if context_match:
|
if context_match:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue