mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-29 08:44:59 +00:00
Add exception handling when retrieving model info in the Model class constructor.
This commit is contained in:
parent
79170839ee
commit
dd000c6147
1 changed files with 5 additions and 1 deletions
|
@ -110,7 +110,11 @@ class Model:
|
|||
|
||||
def __init__(self, model):
|
||||
self.name = model
|
||||
self.info = litellm.get_model_info(model)
|
||||
|
||||
try:
|
||||
self.info = litellm.get_model_info(model)
|
||||
except Exception as err:
|
||||
raise NoModelInfo(str(err))
|
||||
|
||||
dump(model, self.info)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue