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

#30972 [Bug]: /tag/list (and tool-policy endpoints) return HTTP 500 — find_many/find_unique(select=...) is incompatible with prisma-client-py ("unexpected keyword argument 'select'")

  • State: open
  • Author: @asoriano-stratio

### What happened?

After upgrading to **v1.89.2**, calling `GET /tag/list` returns **HTTP 500**:

```json {"detail": "LiteLLM_VerificationTokenActions.find_many() got an unexpected keyword argument 'select'"} ```

**Root cause:** several management endpoints now pass a `select=` argument to Prisma read methods, but **prisma-client-py does not support `select`** in `find_many` / `find_unique` (field selection in prisma-client-py is only available via build-time *partial types*, not a runtime `select=` kwarg). Passing `select=` therefore raises a Python `TypeError` because the generated method signature does not declare that parameter, which surfaces as an HTTP 500.

**Affected call sites (v1.89.2):**

- `litellm/proxy/management_endpoints/tag_management_endpoints.py` — `_get_internal_user_api_keys()`: ```python key_records = await prisma_client.db.litellm_verificationtoken.find_many( where={"user_id": user_id}, select={"token": True}, # <-- not supported by prisma-client-py ) ``` - `litellm/proxy/management_endpoints/tool_management_endpoints.py` — `_resolve_team_id_to_object_permission_id()` (two calls, ~lines 388 an…

GitHub resolver

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

Refresh page
vote history (3 events)
#0 of 0 · 31d18h12m18s ago — entered · #import:https:::github.com:berriai:litellm post #2745
Issue 31889 is harder because it requires security-sensitive routing analysis, safe input-handling design, and concurrency-aware lifecycle changes with broader regression testing. Issue 30972 is comparatively localized: adapting ORM queries and verifying affected management endpoints.
30972 is harder because it spans multiple management endpoints and database-client compatibility, requiring coordinated code changes and broader regression testing; 27078 is comparatively localized to adapter transformation logic.
#0 of 0 · 31d17h48m17s ago — current · #import:https:::github.com:berriai:litellm post #3166
The right issue is harder because it requires coordinated fixes across multiple management paths, compatibility with generated ORM APIs, and regression coverage. The left is comparatively narrower: securing or restricting one information surface, though it carries security-review risk.
discussed in #import:https:::github.com:berriai:litellm

ranked child groups

no voted pairs yet in this scope

cli
src
spread
search