From 3714f9fdbdf59380a80a9cdac7125d236c06f563 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Thu, 6 Feb 2025 09:49:37 -0800 Subject: [PATCH] refactor: Add dump import and debug output in LiteLLMExceptions --- aider/exceptions.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/aider/exceptions.py b/aider/exceptions.py index 27ab3e13f..e3401c209 100644 --- a/aider/exceptions.py +++ b/aider/exceptions.py @@ -1,3 +1,4 @@ +from aider.dump import dump # noqa: F401 from dataclasses import dataclass @@ -62,6 +63,7 @@ class LiteLLMExceptions: continue ex_info = None + # collect these names into a set once, above ai! for exi in EXCEPTIONS: if var == exi.name: ex_info = exi @@ -71,6 +73,7 @@ class LiteLLMExceptions: raise ValueError(f"{var} is in litellm but not in aider's exceptions list") ex = getattr(litellm, var) + dump(var, ex) self.exceptions[ex] = ex_info def exceptions_tuple(self):