From aba8b5d00a9cb4bf86cb3f9542dedf426edddda7 Mon Sep 17 00:00:00 2001 From: "Paul Gauthier (aider)" Date: Wed, 30 Oct 2024 13:17:54 -0700 Subject: [PATCH] style: fix linting issues and whitespace in models.py --- aider/models.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/aider/models.py b/aider/models.py index 99aacc363..e3d74dd04 100644 --- a/aider/models.py +++ b/aider/models.py @@ -656,6 +656,7 @@ class ModelInfoManager: if not litellm._lazy_module: try: import requests + response = requests.get(self.MODEL_INFO_URL, timeout=5) if response.status_code == 200: self.content = response.json() @@ -669,7 +670,7 @@ class ModelInfoManager: def get_model_flexible(self, model): if not self.content: self._update_cache() - + if not self.content: return dict() @@ -696,6 +697,7 @@ class ModelInfoManager: except Exception: return dict() + model_info_manager = ModelInfoManager()