mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-31 01:35:00 +00:00
fix: use LiteLLMExceptions class instead of undefined litellm_ex
This commit is contained in:
parent
6aa80d2a4c
commit
a997dd6c49
1 changed files with 2 additions and 2 deletions
|
@ -1563,8 +1563,8 @@ class Coder:
|
|||
# Calculate costs for successful responses
|
||||
self.calculate_and_show_tokens_and_cost(messages, completion)
|
||||
|
||||
except litellm_ex.exceptions_tuple() as err:
|
||||
ex_info = litellm_ex.get_ex_info(err)
|
||||
except LiteLLMExceptions().exceptions_tuple() as err:
|
||||
ex_info = LiteLLMExceptions().get_ex_info(err)
|
||||
if ex_info.name == "ContextWindowExceededError":
|
||||
# Still calculate costs for context window errors
|
||||
self.calculate_and_show_tokens_and_cost(messages, completion)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue