-
Notifications
You must be signed in to change notification settings - Fork 19
Open
Description
Describe the bug - a clear and concise description of what the bug is.
Calling the GET /v1/admin/providers endpoint returns a 500 Internal Server Error. The issue appears to be related to a Pydantic validation error when serializing the response.
This error started occurring in version 0.4.1post1, after introducing support for the vLLM provider type for reranking models.
The issue is also visible on the frontend, where it results in a red error box displaying an “Internal Server Error 500”.
To Reproduce
Steps to reproduce the behavior:
- Go to /docs
- Execute the GET /v1/admin/providers endpoint with query parameters (e.g. offset=0&limit=10&order_by=id&order_direction=asc)
- Send the request
- Observe a 500 error in the response and logs
- Open the frontend admin providers page
- See a red error box with “Internal Server Error 500”
Expected behavior
The endpoint should return a 200 response with a properly serialized list of providers, and the frontend should display the providers list without errors.
Screenshots
Additional context
[2026-03-23 13:14:54][13][INFO] 10.2.7.65:56340 - "GET /docs HTTP/1.1" 200
/.venv/lib/python3.12/site-packages/fastapi/openapi/utils.py:255: UserWarning: Duplicate Operation ID delete_provider_v1_admin_providers__provider__delete for function delete_provider at /api/endpoints/admin/providers.py
warnings.warn(message, stacklevel=1)
/.venv/lib/python3.12/site-packages/fastapi/openapi/utils.py:255: UserWarning: Duplicate Operation ID update_provider_v1_admin_providers__provider__patch for function update_provider at /api/endpoints/admin/providers.py
warnings.warn(message, stacklevel=1)
/.venv/lib/python3.12/site-packages/fastapi/openapi/utils.py:255: UserWarning: Duplicate Operation ID get_provider_v1_admin_providers__provider__get for function get_provider at /api/endpoints/admin/providers.py
warnings.warn(message, stacklevel=1)
/.venv/lib/python3.12/site-packages/fastapi/openapi/utils.py:255: UserWarning: Duplicate Operation ID get_providers_v1_admin_providers_get for function get_providers at /api/endpoints/admin/providers.py
warnings.warn(message, stacklevel=1)
[2026-03-23 13:14:57][13][INFO] 10.2.7.65:56340 - "GET /openapi.json HTTP/1.1" 200
[2026-03-23 13:15:03][12][INFO] 51.210.167.83:44698 - "GET /health HTTP/1.1" 200
[2026-03-23 13:15:03][13][INFO] 51.210.167.83:44688 - "GET /health HTTP/1.1" 200
[2026-03-23 13:15:12][13][INFO] 10.2.7.65:56340 - "GET /v1/admin/providers?offset=0&limit=10&order_by=id&order_direction=asc HTTP/1.1" 500
[2026-03-23 13:15:12][13][ERROR] Exception in ASGI application
Traceback (most recent call last):
File "/.venv/lib/python3.12/site-packages/uvicorn/protocols/http/h11_impl.py", line 403, in run_asgi
result = await app( # type: ignore[func-returns-value]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/.venv/lib/python3.12/site-packages/uvicorn/middleware/proxy_headers.py", line 60, in __call__
return await self.app(scope, receive, send)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/.venv/lib/python3.12/site-packages/fastapi/applications.py", line 1160, in __call__
await super().__call__(scope, receive, send)
File "/.venv/lib/python3.12/site-packages/starlette/applications.py", line 107, in __call__
await self.middleware_stack(scope, receive, send)
File "/.venv/lib/python3.12/site-packages/starlette/middleware/errors.py", line 186, in __call__
raise exc
File "/.venv/lib/python3.12/site-packages/starlette/middleware/errors.py", line 164, in __call__
await self.app(scope, receive, _send)
File "/.venv/lib/python3.12/site-packages/prometheus_fastapi_instrumentator/middleware.py", line 174, in __call__
raise exc
File "/.venv/lib/python3.12/site-packages/prometheus_fastapi_instrumentator/middleware.py", line 172, in __call__
await self.app(scope, receive, send_wrapper)
File "/.venv/lib/python3.12/site-packages/starlette/middleware/base.py", line 191, in __call__
with recv_stream, send_stream, collapse_excgroups():
^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/contextlib.py", line 158, in __exit__
self.gen.throw(value)
File "/.venv/lib/python3.12/site-packages/starlette/_utils.py", line 87, in collapse_excgroups
raise exc
File "/.venv/lib/python3.12/site-packages/starlette/middleware/base.py", line 193, in __call__
response = await self.dispatch_func(request, call_next)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/api/app.py", line 62, in set_request_context
return await call_next(request)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/.venv/lib/python3.12/site-packages/starlette/middleware/base.py", line 168, in call_next
raise app_exc from app_exc.__cause__ or app_exc.__context__
File "/.venv/lib/python3.12/site-packages/starlette/middleware/base.py", line 144, in coro
await self.app(scope, receive_or_disconnect, send_no_error)
File "/.venv/lib/python3.12/site-packages/starlette/middleware/sessions.py", line 85, in __call__
await self.app(scope, receive, send_wrapper)
File "/.venv/lib/python3.12/site-packages/starlette/middleware/exceptions.py", line 63, in __call__
await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
File "/.venv/lib/python3.12/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
raise exc
File "/.venv/lib/python3.12/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app
await app(scope, receive, sender)
File "/.venv/lib/python3.12/site-packages/fastapi/middleware/asyncexitstack.py", line 18, in __call__
await self.app(scope, receive, send)
File "/.venv/lib/python3.12/site-packages/starlette/routing.py", line 716, in __call__
await self.middleware_stack(scope, receive, send)
File "/.venv/lib/python3.12/site-packages/starlette/routing.py", line 736, in app
await route.handle(scope, receive, send)
File "/.venv/lib/python3.12/site-packages/starlette/routing.py", line 290, in handle
await self.app(scope, receive, send)
File "/.venv/lib/python3.12/site-packages/fastapi/routing.py", line 130, in app
await wrap_app_handling_exceptions(app, request)(scope, receive, send)
File "/.venv/lib/python3.12/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
raise exc
File "/.venv/lib/python3.12/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app
await app(scope, receive, sender)
File "/.venv/lib/python3.12/site-packages/fastapi/routing.py", line 116, in app
response = await f(request)
^^^^^^^^^^^^^^^^
File "/.venv/lib/python3.12/site-packages/fastapi/routing.py", line 670, in app
raw_response = await run_endpoint_function(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/.venv/lib/python3.12/site-packages/fastapi/routing.py", line 324, in run_endpoint_function
return await dependant.call(**values)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/api/infrastructure/fastapi/endpoints/admin/providers.py", line 196, in get_providers
return JSONResponse(status_code=200, content=Providers(data=providers).model_dump())
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/.venv/lib/python3.12/site-packages/pydantic/main.py", line 250, in __init__
validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
pydantic_core._pydantic_core.ValidationError: 3 validation errors for Providers
data.0
Input should be a valid dictionary or instance of Provider [type=model_type, input_value=Provider(object='provider...363, updated=1772117363), input_type=Provider]
For further information visit https://errors.pydantic.dev/2.12/v/model_type
data.1
Input should be a valid dictionary or instance of Provider [type=model_type, input_value=Provider(object='provider...364, updated=1772117364), input_type=Provider]
For further information visit https://errors.pydantic.dev/2.12/v/model_type
data.2
Input should be a valid dictionary or instance of Provider [type=model_type, input_value=Provider(object='provider...684, updated=1772447684), input_type=Provider]
For further information visit https://errors.pydantic.dev/2.12/v/model_type
[2026-03-23 13:15:18][10][INFO] 51.210.167.83:37414 - "GET /health HTTP/1.1" 200
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels