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

#35361 [Bug]: GET /v1/files 500s with "argument after ** must be a mapping, not NoneType" when a managed row has a null file_object

  • State: open
  • Author: @sudhanshugupta-p72
  • Labels: bug, proxy, llm translation

### Check for existing issues

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

### What happened?

`GET /v1/files?target_model_names=...` returns a 500 when any row in the caller's result set has a null `file_object` column:

``` OpenAIFileObject() argument after ** must be a mapping, not NoneType ```

The failure takes down the **whole page**, not the offending row — a caller whose files are almost all valid gets no listing at all. A single affected row is enough; the ratio of valid to affected rows makes no difference.

Such rows are created by normal proxy operation, not by anything unusual on the caller's part. The batch cost poller registers a completed batch's `output_file_id` and `error_file_id` as managed IDs, and those registrations carry no `file_object` — so every user who runs a managed batch to completion accumulates rows that break their own file listing.

Note that null appears to be a *supported* state on the write side: the store helper guards its writes of that column on the value being non-null. So the writer permits null and the reader does not.

**Expected:** rows with no `file_object` are skipped, and the caller's parse…

GitHub resolver

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

Refresh page
vote history (1 events)
#0 of 0 · 31d17h55m31s ago — entered · #import:https:::github.com:berriai:litellm post #3152
29588 requires careful protocol-aware error translation, preservation of OAuth semantics, and coverage across upstream failure paths and client compatibility. 35361 is comparatively localized defensive handling 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