diff --git a/HISTORY.md b/HISTORY.md index eb48e509d..7a5f3e523 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -7,7 +7,8 @@ - Refactored prompting to unify some phrasing across edit formats. - Enhanced the canned assistant responses used in prompts. - Added explicit model settings for `openrouter/anthropic/claude-3-opus`, `gpt-3.5-turbo` -- Added `-show-prompts` debug switch. +- Added `--show-prompts` debug switch. +- Bugfix: catch and retry on all litellm exceptions. ### v0.33.0 diff --git a/tests/test_sendchat.py b/tests/test_sendchat.py index 9ee484724..7f9ce274d 100644 --- a/tests/test_sendchat.py +++ b/tests/test_sendchat.py @@ -2,8 +2,8 @@ import unittest from unittest.mock import MagicMock, patch import httpx -import openai +from aider.litellm import litellm from aider.sendchat import send_with_retries @@ -20,10 +20,11 @@ class TestSendChat(unittest.TestCase): # Set up the mock to raise mock_completion.side_effect = [ - openai.RateLimitError( + litellm.exceptions.RateLimitError( "rate limit exceeded", response=mock, - body=None, + llm_provider="llm_provider", + model="model", ), None, ]