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

#32114 [Bug]: `_read_request_body` silently returns `{}` on body parse failure, causing `ProxyModelNotFoundError: model=None` on large embedding batches

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

# [Bug]: `_read_request_body` silently returns `{}` on body parse failure, causing `ProxyModelNotFoundError: model=None` on large embedding batches

## What happened?

When the LiteLLM proxy receives a large `/embeddings` request (observed: ~1.9MB `Content-Length`), `_read_request_body()` in `litellm/proxy/common_utils/http_parsing_utils.py` sometimes fails to parse the body and **silently returns `{}`**. The empty dict means `data.get("model")` returns `None`, which causes `route_request()` to raise `ProxyModelNotFoundError: Invalid model name passed in model=None`.

This has produced **57,607 Sentry events** in our staging environment over 6 weeks, in bursts correlated with LiteLLM pod restarts.

### Sentry breadcrumb evidence

The Sentry event for `ProxyModelNotFoundError` shows two breadcrumbs immediately before the error:

``` 08:51:29.092 ERROR "Unexpected error reading request body - " 08:51:29.200 ERROR "Unexpected error reading request body - " 08:51:29.205 ERROR ProxyModelNotFoundError: Invalid model name passed in model=None ```

The exception message after the dash is **empty** (`str(e)` returned `""`), so the actual exception type and cause are lost.

### What we…

GitHub resolver

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

Refresh page
vote history (1 events)
#0 of 0 · 31d17h58m5s ago — entered · #import:https:::github.com:berriai:litellm post #2899
Claude Gateway support likely requires a new provider integration, protocol and authentication handling, proxy routing/configuration, compatibility validation, and broad testing. The other issue is comparatively localized to request-body parsing, error propagation, and regression coverage.
discussed in #import:https:::github.com:berriai:litellm

ranked child groups

no voted pairs yet in this scope

cli
src
spread
search