mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-08 12:58:11 -05:00
[GH-ISSUE #23101] issue: API call "list files" produces 500 Internal Server Error #35416
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @wsomm on GitHub (Mar 26, 2026).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/23101
Check Existing Issues
Installation Method
Pip Install
Open WebUI Version
0.8.11
Ollama Version (if applicable)
No response
Operating System
Mac Tahoe 26.4
Browser (if applicable)
No response
Confirmation
README.md.Expected Behavior
Call api/v1/files/ to get a list of all stored files in the OWUI database.
Actual Behavior
HTTP Error 500: Internal Server Error.
Steps to Reproduce
Just call
curl -X GET "http://$OPENWEBUI_BASE_MACHINE:8080/api/v1/files/?page=1&content=true" -H "accept: application/json" -H "Authorization: Bearer $OPENWEBUI_API_KEY"
with the correct $OPENWEBUI_BASE_MACHINE and $OPENWEBUI_API_KEY set in the environment.
Or call from the Swagger interface "list files".
Logs & Screenshots
One call give 50K log files... Not sure if it helps.
Additional Information
New in 0.8.11. 0.8.10 works.
@yang1002378395-cmyk commented on GitHub (Mar 26, 2026):
Investigation Needed
This is a regression in v0.8.11. The
/api/v1/files/endpoint returns HTTP 500.Likely causes:
Debug steps:
docker logs <container> --tail 100content=falseto isolate the problemCould you share the error traceback from the server logs? That would help pinpoint the exact failure point.
@Classic298 commented on GitHub (Mar 26, 2026):
@yang1002378395-cmyk please refrain from "likely causes" ai generated comments. These are not helpful. If you're using AI to analyze issues at least analyze the code or refrain from commenting please
@wsomm commented on GitHub (Mar 26, 2026):
If it helps: This is what claude code gave me as a hint:
0.8.10 — correct:
models/files.py
class FileListResponse(BaseModel):
items: list[FileModel] # ← FileModel: meta: Optional[dict] = None
total: int
FileListResponse holds FileModel objects. FileModel.meta is Optional[dict] — NULL in the database is fine. No coercion happens.
0.8.11 — broken:
models/files.py
class FileListResponse(BaseModel):
items: list[FileModelResponse] # ← changed to FileModelResponse
total: int
class FileModelResponse(BaseModel):
meta: FileMeta # ← required, NOT Optional
get_file_list() still creates list[FileModel] and passes them into FileListResponse(items=...). Pydantic v2 now coerces each FileModel → FileModelResponse at construction time. Since FileModelResponse.meta is required and
FileMeta.sanitize_meta() returns None unchanged when the DB value is NULL, Pydantic raises ValidationError → HTTP 500.
If you need addiitonal information, I cannot provide them the next 24 hours.
But I think the error itself is clear.
@tjbck commented on GitHub (Mar 26, 2026):
Addressed in dev.
@Classic298 commented on GitHub (Mar 26, 2026):
16335f866e