mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-10 22:41:41 +00:00
fix(ollama): make session usage limit check case-insensitive
Apply code review suggestion: use error_str.lower() for both checks for consistent case handling. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
5b8fef098d
commit
e9d6137ef3
1 changed files with 1 additions and 1 deletions
|
|
@ -2040,7 +2040,7 @@ def exception_type( # type: ignore # noqa: PLR0915
|
|||
llm_provider="ollama",
|
||||
model=model,
|
||||
)
|
||||
elif "session usage limit" in error_str or "rate limit" in error_str.lower():
|
||||
elif "session usage limit" in error_str.lower() or "rate limit" in error_str.lower():
|
||||
exception_mapping_worked = True
|
||||
raise RateLimitError(
|
||||
message=f"OllamaException: {original_exception}",
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue