[GH-ISSUE #17244] issue: Updating Knowlegde Base via API/UI fails with pydantic_core._pydantic_core.ValidationError: validation errors for KnowledgeFilesResponse #33747

Closed
opened 2026-04-25 07:37:58 -05:00 by GiteaMirror · 2 comments
Owner

Originally created by @stelterlab on GitHub (Sep 6, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/17244

Check Existing Issues

  • I have searched the existing issues and discussions.
  • I am using the latest version of Open WebUI.

Installation Method

Docker

Open WebUI Version

v0.6.26-cuda

Ollama Version (if applicable)

na

Operating System

Ubuntu 22.04

Browser (if applicable)

Chrome 139.0.7258.155

Confirmation

  • I have read and followed all instructions in README.md.
  • I am using the latest version of both Open WebUI and Ollama.
  • I have included the browser console logs.
  • I have included the Docker container logs.
  • I have provided every relevant configuration, setting, and environment variable used in my setup.
  • I have clearly listed every relevant configuration, custom setting, environment variable, and command-line option that influences my setup (such as Docker Compose overrides, .env values, browser settings, authentication configurations, etc).
  • I have documented step-by-step reproduction instructions that are precise, sequential, and leave nothing to interpretation. My steps:
  • Start with the initial platform/version/OS and dependencies used,
  • Specify exact install/launch/configure commands,
  • List URLs visited, user input (incl. example values/emails/passwords if needed),
  • Describe all options and toggles enabled or changed,
  • Include any files or environmental changes,
  • Identify the expected and actual result at each stage,
  • Ensure any reasonably skilled user can follow and hit the same issue.

Expected Behavior

Do the update without throwing an error by Pydantic.

Actual Behavior

Update fails due to Pydantic Error.

| pydantic_core._pydantic_core.ValidationError: 20 validation errors for KnowledgeFilesResponse
| files.0
|   Input should be a valid dictionary or instance of FileMetadataResponse [type=model_type, input_value=FileModel(id='4e163130-89..., updated_at=1755356834), input_type=FileModel]

Steps to Reproduce

  1. Go to Workspaces/Knowledge
  2. Create a knowledge base and add files
  3. Select knowledge base after creation
  4. Try to change the Access Control

The errors are coming to the log as soon as the pop up opens.

environment vars set

WEBUI_SECRET_KEY=<REDACTED>
OAUTH_CLIENT_ID=<REDACTED>
OAUTH_CLIENT_SECRET=<REDACTED>
OAUTH_PROVIDER_NAME=<REDACTED>
OPENID_PROVIDER_URL=<REDACTED>
OPENAI_API_BASE_URL=<REDACTED>
OPENAI_API_KEY=<REDACTED>
TITLE_GENERATION_PROMPT_TEMPLATE="Create a concise, 3-5 word title for the prompt in the given language. RESPOND ONLY WITH THE TITLE TEXT. Prompt: {{prompt:middletruncate:8000}}"
DEFAULT_USER_ROLE=user
ENABLE_SIGNUP=False
ENABLE_LOGIN_FORM=False
ENABLE_OAUTH_SIGNUP=True
OAUTH_MERGE_ACCOUNTS_BY_EMAIL=True
ENABLE_OLLAMA_API=False
ENV=dev

Logs & Screenshots

2025-09-05 07:38:42.748 | INFO     | uvicorn.protocols.http.httptools_impl:send:476 - 213.131.233.8:0 - "POST /api/v1/knowledge/52981e40-eeb0-4a00-8b51-202d5c3ec1f5/update HTTP/1.1" 500
Exception in ASGI application
  + Exception Group Traceback (most recent call last):
  |   File "/usr/local/lib/python3.11/site-packages/starlette/_utils.py", line 76, in collapse_excgroups
  |     yield
  |   File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 178, in __call__
  |     async with anyio.create_task_group() as task_group:
  |   File "/usr/local/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 772, in __aexit__
  |     raise BaseExceptionGroup(
  | ExceptionGroup: unhandled errors in a TaskGroup (1 sub-exception)
  +-+---------------- 1 ----------------
    | Traceback (most recent call last):
    |   File "/usr/local/lib/python3.11/site-packages/uvicorn/protocols/http/httptools_impl.py", line 409, in run_asgi
    |     result = await app(  # type: ignore[func-returns-value]
    |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |   File "/usr/local/lib/python3.11/site-packages/uvicorn/middleware/proxy_headers.py", line 60, in __call__
    |     return await self.app(scope, receive, send)
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |   File "/usr/local/lib/python3.11/site-packages/fastapi/applications.py", line 1054, in __call__
    |     await super().__call__(scope, receive, send)
    |   File "/usr/local/lib/python3.11/site-packages/starlette/applications.py", line 112, in __call__
    |     await self.middleware_stack(scope, receive, send)
    |   File "/usr/local/lib/python3.11/site-packages/starlette/middleware/errors.py", line 187, in __call__
    |     raise exc
    |   File "/usr/local/lib/python3.11/site-packages/starlette/middleware/errors.py", line 165, in __call__
    |     await self.app(scope, receive, _send)
    |   File "/usr/local/lib/python3.11/site-packages/starlette/middleware/sessions.py", line 85, in __call__
    |     await self.app(scope, receive, send_wrapper)
    |   File "/usr/local/lib/python3.11/site-packages/starlette/middleware/cors.py", line 93, in __call__
    |     await self.simple_response(scope, receive, send, request_headers=headers)
    |   File "/usr/local/lib/python3.11/site-packages/starlette/middleware/cors.py", line 144, in simple_response
    |     await self.app(scope, receive, send)
    |   File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 177, in __call__
    |     with recv_stream, send_stream, collapse_excgroups():
    |   File "/usr/local/lib/python3.11/contextlib.py", line 158, in __exit__
    |     self.gen.throw(typ, value, traceback)
    |   File "/usr/local/lib/python3.11/site-packages/starlette/_utils.py", line 82, in collapse_excgroups
    |     raise exc
    |   File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 179, in __call__
    |     response = await self.dispatch_func(request, call_next)
    |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |   File "/app/backend/open_webui/main.py", line 1199, in inspect_websocket
    |     return await call_next(request)
    |            ^^^^^^^^^^^^^^^^^^^^^^^^
    |   File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 154, in call_next
    |     raise app_exc
    |   File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 141, in coro
    |     await self.app(scope, receive_or_disconnect, send_no_error)
    |   File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 177, in __call__
    |     with recv_stream, send_stream, collapse_excgroups():
    |   File "/usr/local/lib/python3.11/contextlib.py", line 158, in __exit__
    |     self.gen.throw(typ, value, traceback)
    |   File "/usr/local/lib/python3.11/site-packages/starlette/_utils.py", line 82, in collapse_excgroups
    |     raise exc
    |   File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 179, in __call__
    |     response = await self.dispatch_func(request, call_next)
    |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |   File "/app/backend/open_webui/main.py", line 1178, in check_url
    |     response = await call_next(request)
    |                ^^^^^^^^^^^^^^^^^^^^^^^^
    |   File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 154, in call_next
    |     raise app_exc
    |   File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 141, in coro
    |     await self.app(scope, receive_or_disconnect, send_no_error)
    |   File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 177, in __call__
    |     with recv_stream, send_stream, collapse_excgroups():
    |   File "/usr/local/lib/python3.11/contextlib.py", line 158, in __exit__
    |     self.gen.throw(typ, value, traceback)
    |   File "/usr/local/lib/python3.11/site-packages/starlette/_utils.py", line 82, in collapse_excgroups
    |     raise exc
    |   File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 179, in __call__
    |     response = await self.dispatch_func(request, call_next)
    |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |   File "/app/backend/open_webui/main.py", line 1164, in commit_session_after_request
    |     response = await call_next(request)
    |                ^^^^^^^^^^^^^^^^^^^^^^^^
    |   File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 154, in call_next
    |     raise app_exc
    |   File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 141, in coro
    |     await self.app(scope, receive_or_disconnect, send_no_error)
    |   File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 177, in __call__
    |     with recv_stream, send_stream, collapse_excgroups():
    |   File "/usr/local/lib/python3.11/contextlib.py", line 158, in __exit__
    |     self.gen.throw(typ, value, traceback)
    |   File "/usr/local/lib/python3.11/site-packages/starlette/_utils.py", line 82, in collapse_excgroups
    |     raise exc
    |   File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 179, in __call__
    |     response = await self.dispatch_func(request, call_next)
    |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |   File "/app/backend/open_webui/utils/security_headers.py", line 11, in dispatch
    |     response = await call_next(request)
    |                ^^^^^^^^^^^^^^^^^^^^^^^^
    |   File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 154, in call_next
    |     raise app_exc
    |   File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 141, in coro
    |     await self.app(scope, receive_or_disconnect, send_no_error)
    |   File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 177, in __call__
    |     with recv_stream, send_stream, collapse_excgroups():
    |   File "/usr/local/lib/python3.11/contextlib.py", line 158, in __exit__
    |     self.gen.throw(typ, value, traceback)
    |   File "/usr/local/lib/python3.11/site-packages/starlette/_utils.py", line 82, in collapse_excgroups
    |     raise exc
    |   File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 179, in __call__
    |     response = await self.dispatch_func(request, call_next)
    |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |   File "/app/backend/open_webui/main.py", line 1150, in dispatch
    |     response = await call_next(request)
    |                ^^^^^^^^^^^^^^^^^^^^^^^^
    |   File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 154, in call_next
    |     raise app_exc
    |   File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 141, in coro
    |     await self.app(scope, receive_or_disconnect, send_no_error)
    |   File "/usr/local/lib/python3.11/site-packages/starlette_compress/__init__.py", line 92, in __call__
    |     return await self._zstd(scope, receive, send)
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |   File "/usr/local/lib/python3.11/site-packages/starlette_compress/_zstd_legacy.py", line 100, in __call__
    |     await self.app(scope, receive, wrapper)
    |   File "/usr/local/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 62, in __call__
    |     await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
    |   File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
    |     raise exc
    |   File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app
    |     await app(scope, receive, sender)
    |   File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 715, in __call__
    |     await self.middleware_stack(scope, receive, send)
    |   File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 735, in app
    |     await route.handle(scope, receive, send)
    |   File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 288, in handle
    |     await self.app(scope, receive, send)
    |   File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 76, in app
    |     await wrap_app_handling_exceptions(app, request)(scope, receive, send)
    |   File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
    |     raise exc
    |   File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app
    |     await app(scope, receive, sender)
    |   File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 73, in app
    |     response = await f(request)
    |                ^^^^^^^^^^^^^^^^
    |   File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 301, in app
    |     raw_response = await run_endpoint_function(
    |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |   File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 212, in run_endpoint_function
    |     return await dependant.call(**values)
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |   File "/app/backend/open_webui/routers/knowledge.py", line 314, in update_knowledge_by_id
    |     return KnowledgeFilesResponse(
    |            ^^^^^^^^^^^^^^^^^^^^^^^
    |   File "/usr/local/lib/python3.11/site-packages/pydantic/main.py", line 253, in __init__
    |     validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self)
    |                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    | pydantic_core._pydantic_core.ValidationError: 20 validation errors for KnowledgeFilesResponse
    | files.0
    |   Input should be a valid dictionary or instance of FileMetadataResponse [type=model_type, input_value=FileModel(id='4e163130-89..., updated_at=1755356834), input_type=FileModel]
    |     For further information visit https://errors.pydantic.dev/2.11/v/model_type
    | files.1
    |   Input should be a valid dictionary or instance of FileMetadataResponse [type=model_type, input_value=FileModel(id='310e06e0-47..., updated_at=1755356833), input_type=FileModel]
    |     For further information visit https://errors.pydantic.dev/2.11/v/model_type
    | files.2
    |   Input should be a valid dictionary or instance of FileMetadataResponse [type=model_type, input_value=FileModel(id='508e0117-03..., updated_at=1755356833), input_type=FileModel]
    |     For further information visit https://errors.pydantic.dev/2.11/v/model_type
    | files.3
    |   Input should be a valid dictionary or instance of FileMetadataResponse [type=model_type, input_value=FileModel(id='73f49192-dd..., updated_at=1755356833), input_type=FileModel]
    |     For further information visit https://errors.pydantic.dev/2.11/v/model_type
    | files.4
    |   Input should be a valid dictionary or instance of FileMetadataResponse [type=model_type, input_value=FileModel(id='2692d779-54..., updated_at=1755356832), input_type=FileModel]
    |     For further information visit https://errors.pydantic.dev/2.11/v/model_type
    | files.5
    |   Input should be a valid dictionary or instance of FileMetadataResponse [type=model_type, input_value=FileModel(id='e5e44bf7-5e..., updated_at=1755356832), input_type=FileModel]
    |     For further information visit https://errors.pydantic.dev/2.11/v/model_type
    | files.6
    |   Input should be a valid dictionary or instance of FileMetadataResponse [type=model_type, input_value=FileModel(id='0c9610f9-46..., updated_at=1755356831), input_type=FileModel]
    |     For further information visit https://errors.pydantic.dev/2.11/v/model_type
    | files.7
    |   Input should be a valid dictionary or instance of FileMetadataResponse [type=model_type, input_value=FileModel(id='91feae68-58..., updated_at=1755356831), input_type=FileModel]
    |     For further information visit https://errors.pydantic.dev/2.11/v/model_type
    | files.8
    |   Input should be a valid dictionary or instance of FileMetadataResponse [type=model_type, input_value=FileModel(id='436ecfce-e7..., updated_at=1755356830), input_type=FileModel]
    |     For further information visit https://errors.pydantic.dev/2.11/v/model_type
    | files.9
    |   Input should be a valid dictionary or instance of FileMetadataResponse [type=model_type, input_value=FileModel(id='6448ab9f-65..., updated_at=1755356830), input_type=FileModel]
    |     For further information visit https://errors.pydantic.dev/2.11/v/model_type
    | files.10
    |   Input should be a valid dictionary or instance of FileMetadataResponse [type=model_type, input_value=FileModel(id='7d562ee7-c4..., updated_at=1755356829), input_type=FileModel]
    |     For further information visit https://errors.pydantic.dev/2.11/v/model_type
    | files.11
    |   Input should be a valid dictionary or instance of FileMetadataResponse [type=model_type, input_value=FileModel(id='b329b0c0-7a..., updated_at=1755356829), input_type=FileModel]
    |     For further information visit https://errors.pydantic.dev/2.11/v/model_type
    | files.12
    |   Input should be a valid dictionary or instance of FileMetadataResponse [type=model_type, input_value=FileModel(id='9b5155ad-e9..., updated_at=1755356828), input_type=FileModel]
    |     For further information visit https://errors.pydantic.dev/2.11/v/model_type
    | files.13
    |   Input should be a valid dictionary or instance of FileMetadataResponse [type=model_type, input_value=FileModel(id='348a6b4c-fe..., updated_at=1755356827), input_type=FileModel]
    |     For further information visit https://errors.pydantic.dev/2.11/v/model_type
    | files.14
    |   Input should be a valid dictionary or instance of FileMetadataResponse [type=model_type, input_value=FileModel(id='aa4f8ce9-a0..., updated_at=1755356827), input_type=FileModel]
    |     For further information visit https://errors.pydantic.dev/2.11/v/model_type
    | files.15
    |   Input should be a valid dictionary or instance of FileMetadataResponse [type=model_type, input_value=FileModel(id='7d2cc493-2c..., updated_at=1755356826), input_type=FileModel]
    |     For further information visit https://errors.pydantic.dev/2.11/v/model_type
    | files.16
    |   Input should be a valid dictionary or instance of FileMetadataResponse [type=model_type, input_value=FileModel(id='892644f2-52..., updated_at=1755356826), input_type=FileModel]
    |     For further information visit https://errors.pydantic.dev/2.11/v/model_type
    | files.17
    |   Input should be a valid dictionary or instance of FileMetadataResponse [type=model_type, input_value=FileModel(id='9bc34ddb-e2..., updated_at=1755356825), input_type=FileModel]
    |     For further information visit https://errors.pydantic.dev/2.11/v/model_type
    | files.18
    |   Input should be a valid dictionary or instance of FileMetadataResponse [type=model_type, input_value=FileModel(id='6fe50f66-2f..., updated_at=1755356824), input_type=FileModel]
    |     For further information visit https://errors.pydantic.dev/2.11/v/model_type
    | files.19
    |   Input should be a valid dictionary or instance of FileMetadataResponse [type=model_type, input_value=FileModel(id='f70aec1b-d7..., updated_at=1755356824), input_type=FileModel]
    |     For further information visit https://errors.pydantic.dev/2.11/v/model_type
    +------------------------------------

Additional Information

You don't get any visible errors in the UI. The requested change just isn't saved.

In the chrome dev console you can see the 500. See screenshot.

Image

The problem is also reproducible via API.

FTR - I do not use Ollama. I use vLLM in the background which should make no difference for this issue.

Originally created by @stelterlab on GitHub (Sep 6, 2025). Original GitHub issue: https://github.com/open-webui/open-webui/issues/17244 ### Check Existing Issues - [x] I have searched the existing issues and discussions. - [x] I am using the latest version of Open WebUI. ### Installation Method Docker ### Open WebUI Version v0.6.26-cuda ### Ollama Version (if applicable) na ### Operating System Ubuntu 22.04 ### Browser (if applicable) Chrome 139.0.7258.155 ### Confirmation - [x] I have read and followed all instructions in `README.md`. - [x] I am using the latest version of **both** Open WebUI and Ollama. - [x] I have included the browser console logs. - [x] I have included the Docker container logs. - [x] I have **provided every relevant configuration, setting, and environment variable used in my setup.** - [x] I have clearly **listed every relevant configuration, custom setting, environment variable, and command-line option that influences my setup** (such as Docker Compose overrides, .env values, browser settings, authentication configurations, etc). - [x] I have documented **step-by-step reproduction instructions that are precise, sequential, and leave nothing to interpretation**. My steps: - Start with the initial platform/version/OS and dependencies used, - Specify exact install/launch/configure commands, - List URLs visited, user input (incl. example values/emails/passwords if needed), - Describe all options and toggles enabled or changed, - Include any files or environmental changes, - Identify the expected and actual result at each stage, - Ensure any reasonably skilled user can follow and hit the same issue. ### Expected Behavior Do the update without throwing an error by Pydantic. ### Actual Behavior Update fails due to Pydantic Error. ``` | pydantic_core._pydantic_core.ValidationError: 20 validation errors for KnowledgeFilesResponse | files.0 | Input should be a valid dictionary or instance of FileMetadataResponse [type=model_type, input_value=FileModel(id='4e163130-89..., updated_at=1755356834), input_type=FileModel] ``` ### Steps to Reproduce 1. Go to Workspaces/Knowledge 2. Create a knowledge base and add files 3. Select knowledge base after creation 4. Try to change the Access Control The errors are coming to the log as soon as the pop up opens. environment vars set ``` WEBUI_SECRET_KEY=<REDACTED> OAUTH_CLIENT_ID=<REDACTED> OAUTH_CLIENT_SECRET=<REDACTED> OAUTH_PROVIDER_NAME=<REDACTED> OPENID_PROVIDER_URL=<REDACTED> OPENAI_API_BASE_URL=<REDACTED> OPENAI_API_KEY=<REDACTED> TITLE_GENERATION_PROMPT_TEMPLATE="Create a concise, 3-5 word title for the prompt in the given language. RESPOND ONLY WITH THE TITLE TEXT. Prompt: {{prompt:middletruncate:8000}}" DEFAULT_USER_ROLE=user ENABLE_SIGNUP=False ENABLE_LOGIN_FORM=False ENABLE_OAUTH_SIGNUP=True OAUTH_MERGE_ACCOUNTS_BY_EMAIL=True ENABLE_OLLAMA_API=False ENV=dev ``` ### Logs & Screenshots ``` 2025-09-05 07:38:42.748 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 213.131.233.8:0 - "POST /api/v1/knowledge/52981e40-eeb0-4a00-8b51-202d5c3ec1f5/update HTTP/1.1" 500 Exception in ASGI application + Exception Group Traceback (most recent call last): | File "/usr/local/lib/python3.11/site-packages/starlette/_utils.py", line 76, in collapse_excgroups | yield | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 178, in __call__ | async with anyio.create_task_group() as task_group: | File "/usr/local/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 772, in __aexit__ | raise BaseExceptionGroup( | ExceptionGroup: unhandled errors in a TaskGroup (1 sub-exception) +-+---------------- 1 ---------------- | Traceback (most recent call last): | File "/usr/local/lib/python3.11/site-packages/uvicorn/protocols/http/httptools_impl.py", line 409, in run_asgi | result = await app( # type: ignore[func-returns-value] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | File "/usr/local/lib/python3.11/site-packages/uvicorn/middleware/proxy_headers.py", line 60, in __call__ | return await self.app(scope, receive, send) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | File "/usr/local/lib/python3.11/site-packages/fastapi/applications.py", line 1054, in __call__ | await super().__call__(scope, receive, send) | File "/usr/local/lib/python3.11/site-packages/starlette/applications.py", line 112, in __call__ | await self.middleware_stack(scope, receive, send) | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/errors.py", line 187, in __call__ | raise exc | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/errors.py", line 165, in __call__ | await self.app(scope, receive, _send) | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/sessions.py", line 85, in __call__ | await self.app(scope, receive, send_wrapper) | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/cors.py", line 93, in __call__ | await self.simple_response(scope, receive, send, request_headers=headers) | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/cors.py", line 144, in simple_response | await self.app(scope, receive, send) | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 177, in __call__ | with recv_stream, send_stream, collapse_excgroups(): | File "/usr/local/lib/python3.11/contextlib.py", line 158, in __exit__ | self.gen.throw(typ, value, traceback) | File "/usr/local/lib/python3.11/site-packages/starlette/_utils.py", line 82, in collapse_excgroups | raise exc | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 179, in __call__ | response = await self.dispatch_func(request, call_next) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | File "/app/backend/open_webui/main.py", line 1199, in inspect_websocket | return await call_next(request) | ^^^^^^^^^^^^^^^^^^^^^^^^ | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 154, in call_next | raise app_exc | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 141, in coro | await self.app(scope, receive_or_disconnect, send_no_error) | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 177, in __call__ | with recv_stream, send_stream, collapse_excgroups(): | File "/usr/local/lib/python3.11/contextlib.py", line 158, in __exit__ | self.gen.throw(typ, value, traceback) | File "/usr/local/lib/python3.11/site-packages/starlette/_utils.py", line 82, in collapse_excgroups | raise exc | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 179, in __call__ | response = await self.dispatch_func(request, call_next) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | File "/app/backend/open_webui/main.py", line 1178, in check_url | response = await call_next(request) | ^^^^^^^^^^^^^^^^^^^^^^^^ | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 154, in call_next | raise app_exc | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 141, in coro | await self.app(scope, receive_or_disconnect, send_no_error) | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 177, in __call__ | with recv_stream, send_stream, collapse_excgroups(): | File "/usr/local/lib/python3.11/contextlib.py", line 158, in __exit__ | self.gen.throw(typ, value, traceback) | File "/usr/local/lib/python3.11/site-packages/starlette/_utils.py", line 82, in collapse_excgroups | raise exc | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 179, in __call__ | response = await self.dispatch_func(request, call_next) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | File "/app/backend/open_webui/main.py", line 1164, in commit_session_after_request | response = await call_next(request) | ^^^^^^^^^^^^^^^^^^^^^^^^ | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 154, in call_next | raise app_exc | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 141, in coro | await self.app(scope, receive_or_disconnect, send_no_error) | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 177, in __call__ | with recv_stream, send_stream, collapse_excgroups(): | File "/usr/local/lib/python3.11/contextlib.py", line 158, in __exit__ | self.gen.throw(typ, value, traceback) | File "/usr/local/lib/python3.11/site-packages/starlette/_utils.py", line 82, in collapse_excgroups | raise exc | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 179, in __call__ | response = await self.dispatch_func(request, call_next) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | File "/app/backend/open_webui/utils/security_headers.py", line 11, in dispatch | response = await call_next(request) | ^^^^^^^^^^^^^^^^^^^^^^^^ | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 154, in call_next | raise app_exc | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 141, in coro | await self.app(scope, receive_or_disconnect, send_no_error) | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 177, in __call__ | with recv_stream, send_stream, collapse_excgroups(): | File "/usr/local/lib/python3.11/contextlib.py", line 158, in __exit__ | self.gen.throw(typ, value, traceback) | File "/usr/local/lib/python3.11/site-packages/starlette/_utils.py", line 82, in collapse_excgroups | raise exc | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 179, in __call__ | response = await self.dispatch_func(request, call_next) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | File "/app/backend/open_webui/main.py", line 1150, in dispatch | response = await call_next(request) | ^^^^^^^^^^^^^^^^^^^^^^^^ | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 154, in call_next | raise app_exc | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 141, in coro | await self.app(scope, receive_or_disconnect, send_no_error) | File "/usr/local/lib/python3.11/site-packages/starlette_compress/__init__.py", line 92, in __call__ | return await self._zstd(scope, receive, send) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | File "/usr/local/lib/python3.11/site-packages/starlette_compress/_zstd_legacy.py", line 100, in __call__ | await self.app(scope, receive, wrapper) | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 62, in __call__ | await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send) | File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app | raise exc | File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app | await app(scope, receive, sender) | File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 715, in __call__ | await self.middleware_stack(scope, receive, send) | File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 735, in app | await route.handle(scope, receive, send) | File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 288, in handle | await self.app(scope, receive, send) | File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 76, in app | await wrap_app_handling_exceptions(app, request)(scope, receive, send) | File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app | raise exc | File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app | await app(scope, receive, sender) | File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 73, in app | response = await f(request) | ^^^^^^^^^^^^^^^^ | File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 301, in app | raw_response = await run_endpoint_function( | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 212, in run_endpoint_function | return await dependant.call(**values) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | File "/app/backend/open_webui/routers/knowledge.py", line 314, in update_knowledge_by_id | return KnowledgeFilesResponse( | ^^^^^^^^^^^^^^^^^^^^^^^ | File "/usr/local/lib/python3.11/site-packages/pydantic/main.py", line 253, in __init__ | validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | pydantic_core._pydantic_core.ValidationError: 20 validation errors for KnowledgeFilesResponse | files.0 | Input should be a valid dictionary or instance of FileMetadataResponse [type=model_type, input_value=FileModel(id='4e163130-89..., updated_at=1755356834), input_type=FileModel] | For further information visit https://errors.pydantic.dev/2.11/v/model_type | files.1 | Input should be a valid dictionary or instance of FileMetadataResponse [type=model_type, input_value=FileModel(id='310e06e0-47..., updated_at=1755356833), input_type=FileModel] | For further information visit https://errors.pydantic.dev/2.11/v/model_type | files.2 | Input should be a valid dictionary or instance of FileMetadataResponse [type=model_type, input_value=FileModel(id='508e0117-03..., updated_at=1755356833), input_type=FileModel] | For further information visit https://errors.pydantic.dev/2.11/v/model_type | files.3 | Input should be a valid dictionary or instance of FileMetadataResponse [type=model_type, input_value=FileModel(id='73f49192-dd..., updated_at=1755356833), input_type=FileModel] | For further information visit https://errors.pydantic.dev/2.11/v/model_type | files.4 | Input should be a valid dictionary or instance of FileMetadataResponse [type=model_type, input_value=FileModel(id='2692d779-54..., updated_at=1755356832), input_type=FileModel] | For further information visit https://errors.pydantic.dev/2.11/v/model_type | files.5 | Input should be a valid dictionary or instance of FileMetadataResponse [type=model_type, input_value=FileModel(id='e5e44bf7-5e..., updated_at=1755356832), input_type=FileModel] | For further information visit https://errors.pydantic.dev/2.11/v/model_type | files.6 | Input should be a valid dictionary or instance of FileMetadataResponse [type=model_type, input_value=FileModel(id='0c9610f9-46..., updated_at=1755356831), input_type=FileModel] | For further information visit https://errors.pydantic.dev/2.11/v/model_type | files.7 | Input should be a valid dictionary or instance of FileMetadataResponse [type=model_type, input_value=FileModel(id='91feae68-58..., updated_at=1755356831), input_type=FileModel] | For further information visit https://errors.pydantic.dev/2.11/v/model_type | files.8 | Input should be a valid dictionary or instance of FileMetadataResponse [type=model_type, input_value=FileModel(id='436ecfce-e7..., updated_at=1755356830), input_type=FileModel] | For further information visit https://errors.pydantic.dev/2.11/v/model_type | files.9 | Input should be a valid dictionary or instance of FileMetadataResponse [type=model_type, input_value=FileModel(id='6448ab9f-65..., updated_at=1755356830), input_type=FileModel] | For further information visit https://errors.pydantic.dev/2.11/v/model_type | files.10 | Input should be a valid dictionary or instance of FileMetadataResponse [type=model_type, input_value=FileModel(id='7d562ee7-c4..., updated_at=1755356829), input_type=FileModel] | For further information visit https://errors.pydantic.dev/2.11/v/model_type | files.11 | Input should be a valid dictionary or instance of FileMetadataResponse [type=model_type, input_value=FileModel(id='b329b0c0-7a..., updated_at=1755356829), input_type=FileModel] | For further information visit https://errors.pydantic.dev/2.11/v/model_type | files.12 | Input should be a valid dictionary or instance of FileMetadataResponse [type=model_type, input_value=FileModel(id='9b5155ad-e9..., updated_at=1755356828), input_type=FileModel] | For further information visit https://errors.pydantic.dev/2.11/v/model_type | files.13 | Input should be a valid dictionary or instance of FileMetadataResponse [type=model_type, input_value=FileModel(id='348a6b4c-fe..., updated_at=1755356827), input_type=FileModel] | For further information visit https://errors.pydantic.dev/2.11/v/model_type | files.14 | Input should be a valid dictionary or instance of FileMetadataResponse [type=model_type, input_value=FileModel(id='aa4f8ce9-a0..., updated_at=1755356827), input_type=FileModel] | For further information visit https://errors.pydantic.dev/2.11/v/model_type | files.15 | Input should be a valid dictionary or instance of FileMetadataResponse [type=model_type, input_value=FileModel(id='7d2cc493-2c..., updated_at=1755356826), input_type=FileModel] | For further information visit https://errors.pydantic.dev/2.11/v/model_type | files.16 | Input should be a valid dictionary or instance of FileMetadataResponse [type=model_type, input_value=FileModel(id='892644f2-52..., updated_at=1755356826), input_type=FileModel] | For further information visit https://errors.pydantic.dev/2.11/v/model_type | files.17 | Input should be a valid dictionary or instance of FileMetadataResponse [type=model_type, input_value=FileModel(id='9bc34ddb-e2..., updated_at=1755356825), input_type=FileModel] | For further information visit https://errors.pydantic.dev/2.11/v/model_type | files.18 | Input should be a valid dictionary or instance of FileMetadataResponse [type=model_type, input_value=FileModel(id='6fe50f66-2f..., updated_at=1755356824), input_type=FileModel] | For further information visit https://errors.pydantic.dev/2.11/v/model_type | files.19 | Input should be a valid dictionary or instance of FileMetadataResponse [type=model_type, input_value=FileModel(id='f70aec1b-d7..., updated_at=1755356824), input_type=FileModel] | For further information visit https://errors.pydantic.dev/2.11/v/model_type +------------------------------------ ``` ### Additional Information You don't get any visible errors in the UI. The requested change just isn't saved. In the chrome dev console you can see the 500. See screenshot. <img width="1324" height="153" alt="Image" src="https://github.com/user-attachments/assets/fa16a4a3-5a61-4d39-b2bf-99fe64791fd0" /> The problem is also reproducible via API. FTR - I do not use Ollama. I use vLLM in the background which should make no difference for this issue.
GiteaMirror added the bug label 2026-04-25 07:37:58 -05:00
Author
Owner

@rgaricano commented on GitHub (Sep 6, 2025):

I solved it with this PR: https://github.com/open-webui/open-webui/pull/16734

<!-- gh-comment-id:3262930651 --> @rgaricano commented on GitHub (Sep 6, 2025): I solved it with this PR: https://github.com/open-webui/open-webui/pull/16734
Author
Owner

@tjbck commented on GitHub (Sep 6, 2025):

Addressed with 9aac148908

<!-- gh-comment-id:3263155620 --> @tjbck commented on GitHub (Sep 6, 2025): Addressed with 9aac1489080a5c9441e89b1a56de0d3a672bc5fb
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#33747