7 views
-/https://github.com/berriai/litellm/issues/29283
GitHub · issue

#29283 [Bug]: AllowedFailsPolicy.InternalServerErrorAllowedFails is silently ignored in get_allowed_fails_from_policy

  • State: open
  • Author: @s-okayama
  • Labels: bug, proxy

### Check for existing issues

- [x] I have searched the existing issues and checked that my issue is not a duplicate.

### What happened?

AllowedFailsPolicy defines InternalServerErrorAllowedFails as a field in litellm/types/router.py, but get_allowed_fails_from_policy() in litellm/router.py (line ~11652) does not have a branch for InternalServerError.

The method handles 5 error types (AuthenticationError, Timeout, RateLimitError, ContentPolicyViolationError, BadRequestError) but is missing InternalServerError. As a result, the setting is accepted in config but silently ignored at runtime, falling back to the global allowed_fails value.

Expected behavior: When InternalServerErrorAllowedFails: 2 is configured, a deployment should be cooled down after 2 InternalServerError failures.

Actual behavior: The InternalServerErrorAllowedFails value is never read. get_allowed_fails_from_policy returns None for InternalServerError, so the router falls back to the global allowed_fails (e.g. 10000), effectively disabling cooldown for this error type.

Expected fix: Add the missing branch in get_allowed_fails_from_policy:

if isinstance(exception, litellm.InternalServerError) and allowed_…

GitHub resolver

Import GitHub neighbors on demand. Results are saved as system ingests.

Refresh page
vote history (1 events)
#0 of 0 · 31d17h42m54s ago — entered · #import:https:::github.com:berriai:litellm post #3171
The right issue is harder because it requires tracing and extending a provider-specific multipart request path, validating parameter mappings and upstream compatibility, and adding integration coverage. The left issue is a localized conditional fix with focused regression tests.
discussed in #import:https:::github.com:berriai:litellm

ranked child groups

no voted pairs yet in this scope

cli
src
spread
search