MCPcopy
hub / github.com/Aider-AI/aider / test_rate_limit_error

Function test_rate_limit_error

tests/basic/test_exceptions.py:45–53  ·  view source on GitHub ↗

Test specific handling of RateLimitError

()

Source from the content-addressed store, hash-verified

43
44
45def test_rate_limit_error():
46 """Test specific handling of RateLimitError"""
47 ex = LiteLLMExceptions()
48 from litellm import RateLimitError
49
50 rate_error = RateLimitError(message="Rate limit exceeded", llm_provider="openai", model="gpt-4")
51 ex_info = ex.get_ex_info(rate_error)
52 assert ex_info.retry is True
53 assert "rate limited" in ex_info.description.lower()
54
55
56def test_context_window_error():

Callers

nothing calls this directly

Calls 2

get_ex_infoMethod · 0.95
LiteLLMExceptionsClass · 0.90

Tested by

no test coverage detected