litellm - 💡(How to fix) Fix [Bug] POST /project/update with object_permission fails with 500 FieldNotFoundError

Official PRs (…)
ON THIS PAGE

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Setting object_permission on a project via /project/update always returns 500. The same field works correctly on /key/update and /team/update.

Error Message

litellm_enterprise/proxy/management_endpoints/project_endpoints.py:682 await prisma_client.db.litellm_objectpermissiontable.create(data=object_permission_data)

prisma.errors.FieldNotFoundError: Could not find field at createOneLiteLLM_ObjectPermissionTable.data

Root Cause

project_endpoints.py calls litellm_objectpermissiontable.create() directly with a raw payload that contains invalid fields.

/key/update and /team/update go through a shared helper in object_permission_utils.py which sanitizes the payload and handles create/update correctly.

The project endpoint bypasses this helper entirely.

Code Example

curl -X POST http://<litellm-host>/project/update \
  -H "Authorization: Bearer <admin-key>" \
  -H "Content-Type: application/json" \
  -d '{
    "project_id": "<valid-project-id>",
    "object_permission": {
      "mcp_servers": ["<valid-mcp-server-id>"]
    }
  }'

---

{"error":{"message":"Could not find field at `createOneLiteLLM_ObjectPermissionTable.data`","type":"internal_server_error","param":"None","code":"500"}}

---

litellm_enterprise/proxy/management_endpoints/project_endpoints.py:682
await prisma_client.db.litellm_objectpermissiontable.create(data=object_permission_data)

prisma.errors.FieldNotFoundError:
Could not find field at `createOneLiteLLM_ObjectPermissionTable.data`
RAW_BUFFERClick to expand / collapse

Bug Report

Version

Tested on v1.86.0, v1.86.1, v1.87.0-rc.2 — all affected.

Description

Setting object_permission on a project via /project/update always returns 500. The same field works correctly on /key/update and /team/update.

Minimal Repro

curl -X POST http://<litellm-host>/project/update \
  -H "Authorization: Bearer <admin-key>" \
  -H "Content-Type: application/json" \
  -d '{
    "project_id": "<valid-project-id>",
    "object_permission": {
      "mcp_servers": ["<valid-mcp-server-id>"]
    }
  }'

Response:

{"error":{"message":"Could not find field at `createOneLiteLLM_ObjectPermissionTable.data`","type":"internal_server_error","param":"None","code":"500"}}

A plain update without object_permission (e.g. just description) returns 200.

Stack Trace (from pod logs)

litellm_enterprise/proxy/management_endpoints/project_endpoints.py:682
await prisma_client.db.litellm_objectpermissiontable.create(data=object_permission_data)

prisma.errors.FieldNotFoundError:
Could not find field at `createOneLiteLLM_ObjectPermissionTable.data`

Root Cause

project_endpoints.py calls litellm_objectpermissiontable.create() directly with a raw payload that contains invalid fields.

/key/update and /team/update go through a shared helper in object_permission_utils.py which sanitizes the payload and handles create/update correctly.

The project endpoint bypasses this helper entirely.

Expected Behavior

/project/update with object_permission should behave the same as /key/update and /team/update — i.e. use the common helper from object_permission_utils.py.

Note

The UpdateProjectRequest schema in the OpenAPI spec correctly declares object_permission: LiteLLM_ObjectPermissionBase, so the payload is schema-valid. The bug is in the write path, not the API contract.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

litellm - 💡(How to fix) Fix [Bug] POST /project/update with object_permission fails with 500 FieldNotFoundError