6 views
-/https://github.com/berriai/litellm/issues/35597
GitHub · issue

#35597 [Bug]: /model/block and /model/unblock return HTTP 500 after applying the database update

  • State: open
  • Author: @samzong
  • Labels: proxy, llm translation

## Check for existing issues

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

Search note: as of 2026-08-02, no standalone issue or open fix PR was found for these routes and this exception. Merged PR #34118 independently records the same bug

## What happened?

`POST /model/block` and `POST /model/unblock` return HTTP 500 for a valid proxy-admin request against an existing DB-stored model. The requested database mutation completes before response serialization fails

After `/model/block` returns 500, `/model/info` and `/v2/model/info` show `blocked=true`. After `/model/unblock` returns 500, the same read shows `blocked=false`

Expected behavior: both routes return a 2xx response containing the updated `LiteLLM_ProxyModelTable`

Actual behavior: both routes return HTTP 500 after applying the state change

The HTTP response is:

```text HTTP/1.1 500 Internal Server Error {"error":{"message":"Internal server error","type":"internal_server_error"}} ```

The route calls `ModelRepository(prisma_client).table.update(...)`, which returns a Prisma-generated Pydantic row, while the route declares `LiteLLM_ProxyModelTable | None` as its response type. …

GitHub resolver

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

Refresh page
vote history (1 events)
#0 of 0 · 31d17h50m55s ago — entered · #import:https:::github.com:berriai:litellm post #3016
The right issue spans provider-specific streaming conversion, response-model compatibility, and callback serialization behavior, requiring broader tracing and regression coverage. The left issue is a localized route response-schema mismatch with a comparatively direct fix and focused tests.
discussed in #import:https:::github.com:berriai:litellm

ranked child groups

no voted pairs yet in this scope

cli
src
spread
search