9 views
-/https://github.com/berriai/litellm/issues/31284
GitHub · issue

#31284 SSE error codes outside HTTP range (100-599) silently dropped - router fallback/cooldown never triggers

  • State: open
  • Author: @ggzeng
  • Labels: llm translation

## Bug Report

### What happened?

When a provider returns an SSE error chunk with a **vendor-specific error code outside the standard HTTP range (100-599)**, `_parse_event_data_for_error()` silently drops it (returns `None`). This causes the proxy to treat the error-bearing SSE chunk as **normal content**:

1. The error is forwarded to the client as a **200 OK response** with the error embedded in the SSE body 2. Router **fallback never triggers** (the error is not detected) 3. Router **cooldown never triggers** (failure callback is never invoked) 4. Subsequent requests keep hitting the failing/rate-limited deployment

### Root cause

`litellm/proxy/common_request_processing.py`, `_parse_event_data_for_error()`:

```python # Ensure error_code is a valid HTTP status code if error_code is not None and 100 <= error_code <= 599: return error_code # Codes outside 100-599 fall through to None ```

The `100 <= error_code <= 599` guard inadvertently rejects all vendor-specific error codes.

### Affected providers

| Provider | Error Codes | Meaning | |----------|------------|---------| | ZAI / ZhipuAI | 1302, 1305, 1308 | Rate limit / quota exceeded | | DashScope (Aliyun) | 4-digit th…

GitHub resolver

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

Refresh page
vote history (1 events)
#0 of 0 · 31d18h48m45s ago — entered · #import:https:::github.com:berriai:litellm post #2062
31284 requires modifying streaming error classification and validating downstream fallback/cooldown behavior, making it more risk-sensitive than a largely contained provider metadata correction; 29011 is broader data work but comparatively straightforward and low-risk.
discussed in #import:https:::github.com:berriai:litellm

ranked child groups

no voted pairs yet in this scope

cli
src
spread
search