[GH-ISSUE #16228] Reranker API integration sends incorrect document format to external backend #56497

Closed
opened 2026-05-05 19:32:13 -05:00 by GiteaMirror · 2 comments
Owner

Originally created by @frost19k on GitHub (Aug 2, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/16228

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

0.6.18

Ollama Version (if applicable)

No response

Operating System

Manjaro Linux

Browser (if applicable)

Firefox

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

Open WebUI should POST a JSON object with model, query, documents (list of strings), and top_n fields to the reranker endpoint, matching the OpenAI style API, ensuring compatibility with external reranking backends like LocalAI or llama.cpp.

Actual Behavior

The reranker endpoint receives a different format (such as a list of tuples or an unexpected structure), causing it to return a server error. Manual requests with the correct JSON succeed, but Open WebUI's requests fail due to a data shape mismatch.

Steps to Reproduce

  1. Configure Open WebUI to use an external reranking API (e.g., LocalAI with a reranker model).
  2. Run a query that triggers reranking.
  3. Observe 500 Server Error in logs from the reranker backend.
  4. Manually POST the correct JSON (as above) to the reranker endpoint and observe that it succeeds.

Logs & Screenshots

See attached server logs from both Open WebUI and embeddings-api containers. Example error: 500 Server Error: Internal Server Error for url: http://embeddings-api:8080/v1/rerank

Open WebUI Logs
2025-08-02 12:27:40.550 | INFO     | uvicorn.protocols.http.httptools_impl:send:476 - 172.18.0.1:50258 - "POST /api/v1/chats/new HTTP/1.1" 200 - {}
2025-08-02 12:27:40.619 | INFO     | uvicorn.protocols.http.httptools_impl:send:476 - 172.18.0.1:50258 - "GET /api/v1/chats/?page=2 HTTP/1.1" 200 - {}
2025-08-02 12:27:40.638 | INFO     | uvicorn.protocols.http.httptools_impl:send:476 - 172.18.0.1:50264 - "GET /api/v1/folders/ HTTP/1.1" 200 - {}
2025-08-02 12:27:40.648 | INFO     | uvicorn.protocols.http.httptools_impl:send:476 - 172.18.0.1:50258 - "POST /api/v1/chats/9fca9d9c-5c51-4754-a450-b47a94c82f1c HTTP/1.1" 200 - {}
2025-08-02 12:27:40.658 | INFO     | uvicorn.protocols.http.httptools_impl:send:476 - 172.18.0.1:50258 - "GET /api/v1/chats/?page=1 HTTP/1.1" 200 - {}
2025-08-02 12:27:40.671 | INFO     | uvicorn.protocols.http.httptools_impl:send:476 - 172.18.0.1:50258 - "GET /api/v1/folders/ HTTP/1.1" 200 - {}
2025-08-02 12:27:41.124 | INFO     | open_webui.routers.openai:get_all_models:392 - get_all_models() - {}
2025-08-02 12:27:42.803 | INFO     | open_webui.retrieval.utils:query_collection_with_hybrid_search:352 - Starting hybrid search for 3 queries in 1 collections... - {}
/usr/local/lib/python3.11/site-packages/langchain/__init__.py:30: UserWarning: Importing debug from langchain root module is no longer supported. Please use langchain.globals.set_debug() / langchain.globals.get_debug() instead.
  warnings.warn(
/usr/local/lib/python3.11/site-packages/langchain/__init__.py:30: UserWarning: Importing debug from langchain root module is no longer supported. Please use langchain.globals.set_debug() / langchain.globals.get_debug() instead.
  warnings.warn(
2025-08-02 12:27:44.085 | INFO     | open_webui.retrieval.models.external:predict:40 - ExternalReranker:predict:model bge-reranker-v2-m3 - {}
2025-08-02 12:27:44.086 | INFO     | open_webui.retrieval.models.external:predict:41 - ExternalReranker:predict:query Cross Site Scripting vulnerabilities exploit mechanisms - {}
2025-08-02 12:27:44.101 | INFO     | open_webui.retrieval.models.external:predict:40 - ExternalReranker:predict:model bge-reranker-v2-m3 - {}
2025-08-02 12:27:44.101 | INFO     | open_webui.retrieval.models.external:predict:41 - ExternalReranker:predict:query Cross Site Scripting prevention techniques - {}
2025-08-02 12:27:44.108 | INFO     | open_webui.retrieval.models.external:predict:40 - ExternalReranker:predict:model bge-reranker-v2-m3 - {}
2025-08-02 12:27:44.108 | INFO     | open_webui.retrieval.models.external:predict:41 - ExternalReranker:predict:query XSS attack examples with code - {}
2025-08-02 12:27:47.053 | ERROR    | open_webui.retrieval.models.external:predict:73 - Error in external reranking: 500 Server Error: Internal Server Error for url: http://embeddings-api:8080/v1/rerank - {}
Traceback (most recent call last):

  File "/usr/local/lib/python3.11/threading.py", line 1002, in _bootstrap
    self._bootstrap_inner()
    │    └ <function Thread._bootstrap_inner at 0x7f50889d49a0>
    └ <Thread(ThreadPoolExecutor-3_0, started 139980247848640)>
  File "/usr/local/lib/python3.11/threading.py", line 1045, in _bootstrap_inner
    self.run()
    │    └ <function Thread.run at 0x7f50889d4680>
    └ <Thread(ThreadPoolExecutor-3_0, started 139980247848640)>
  File "/usr/local/lib/python3.11/threading.py", line 982, in run
    self._target(*self._args, **self._kwargs)
    │    │        │    │        │    └ {}
    │    │        │    │        └ <Thread(ThreadPoolExecutor-3_0, started 139980247848640)>
    │    │        │    └ (<weakref at 0x7f4fb2ac3330; to 'ThreadPoolExecutor' at 0x7f4fc0cd9fd0>, <_queue.SimpleQueue object at 0x7f4fb067d760>, None,...
    │    │        └ <Thread(ThreadPoolExecutor-3_0, started 139980247848640)>
    │    └ <function _worker at 0x7f50878e7d80>
    └ <Thread(ThreadPoolExecutor-3_0, started 139980247848640)>
  File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 83, in _worker
    work_item.run()
    │         └ <function _WorkItem.run at 0x7f50878e7ec0>
    └ <concurrent.futures.thread._WorkItem object at 0x7f4fb2b52450>
  File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             │    │   │    │       │    └ {}
             │    │   │    │       └ <concurrent.futures.thread._WorkItem object at 0x7f4fb2b52450>
             │    │   │    └ ('03ab71f2-4a00-453e-8a03-227ae510d540', 'Cross Site Scripting vulnerabilities exploit mechanisms')
             │    │   └ <concurrent.futures.thread._WorkItem object at 0x7f4fb2b52450>
             │    └ <function query_collection_with_hybrid_search.<locals>.process_query at 0x7f4fb06ea2a0>
             └ <concurrent.futures.thread._WorkItem object at 0x7f4fb2b52450>

  File "/app/backend/open_webui/retrieval/utils.py", line 358, in process_query
    result = query_doc_with_hybrid_search(
             └ <function query_doc_with_hybrid_search at 0x7f5024cac400>

  File "/app/backend/open_webui/retrieval/utils.py", line 165, in query_doc_with_hybrid_search
    result = compression_retriever.invoke(query)
             │                     │      └ 'Cross Site Scripting vulnerabilities exploit mechanisms'
             │                     └ <function BaseRetriever.invoke at 0x7f5024e78ea0>
             └ ContextualCompressionRetriever(base_compressor=RerankCompressor(embedding_function=<function chat_completion_files_handler.<l...

  File "/usr/local/lib/python3.11/site-packages/langchain_core/retrievers.py", line 259, in invoke
    result = self._get_relevant_documents(
             │    └ <function ContextualCompressionRetriever._get_relevant_documents at 0x7f5024e78720>
             └ ContextualCompressionRetriever(base_compressor=RerankCompressor(embedding_function=<function chat_completion_files_handler.<l...
  File "/usr/local/lib/python3.11/site-packages/langchain/retrievers/contextual_compression.py", line 44, in _get_relevant_documents
    compressed_docs = self.base_compressor.compress_documents(
                      │    │               └ <function RerankCompressor.compress_documents at 0x7f5024cacd60>
                      │    └ RerankCompressor(embedding_function=<function chat_completion_files_handler.<locals>.<lambda>.<locals>.<lambda> at 0x7f4fb06e...
                      └ ContextualCompressionRetriever(base_compressor=RerankCompressor(embedding_function=<function chat_completion_files_handler.<l...

  File "/app/backend/open_webui/retrieval/utils.py", line 946, in compress_documents
    scores = self.reranking_function(
             │    └ <function chat_completion_files_handler.<locals>.<lambda>.<locals>.<lambda> at 0x7f4fb06eb9c0>
             └ RerankCompressor(embedding_function=<function chat_completion_files_handler.<locals>.<lambda>.<locals>.<lambda> at 0x7f4fb06e...

  File "/app/backend/open_webui/utils/middleware.py", line 657, in <lambda>
    lambda sentences: request.app.state.RERANKING_FUNCTION(
           │          │       └ <property object at 0x7f5084eceac0>
           │          └ <starlette.requests.Request object at 0x7f4fb068f0d0>
           └ [('Cross Site Scripting vulnerabilities exploit mechanisms', 'In some cases it is possible that signature-based filters can b...

  File "/app/backend/open_webui/retrieval/utils.py", line 452, in <lambda>
    return lambda sentences, user=None: reranking_function.predict(
                  │                     │                  └ <function ExternalReranker.predict at 0x7f501d132ac0>
                  │                     └ <open_webui.retrieval.models.external.ExternalReranker object at 0x7f4fc0484f10>
                  └ [('Cross Site Scripting vulnerabilities exploit mechanisms', 'In some cases it is possible that signature-based filters can b...

> File "/app/backend/open_webui/retrieval/models/external.py", line 62, in predict
    r.raise_for_status()
    │ └ <function Response.raise_for_status at 0x7f50852d0860>
    └ <Response [500]>

  File "/usr/local/lib/python3.11/site-packages/requests/models.py", line 1026, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
          │         │                        └ <Response [500]>
          │         └ '500 Server Error: Internal Server Error for url: http://embeddings-api:8080/v1/rerank'
          └ <class 'requests.exceptions.HTTPError'>

requests.exceptions.HTTPError: 500 Server Error: Internal Server Error for url: http://embeddings-api:8080/v1/rerank
2025-08-02 12:27:47.064 | ERROR    | open_webui.retrieval.utils:query_doc_with_hybrid_search:191 - Error querying doc 03ab71f2-4a00-453e-8a03-227ae510d540 with hybrid search: 'NoneType' object has no attribute 'tolist' - {}
Traceback (most recent call last):

  File "/usr/local/lib/python3.11/threading.py", line 1002, in _bootstrap
    self._bootstrap_inner()
    │    └ <function Thread._bootstrap_inner at 0x7f50889d49a0>
    └ <Thread(ThreadPoolExecutor-3_0, started 139980247848640)>
  File "/usr/local/lib/python3.11/threading.py", line 1045, in _bootstrap_inner
    self.run()
    │    └ <function Thread.run at 0x7f50889d4680>
    └ <Thread(ThreadPoolExecutor-3_0, started 139980247848640)>
  File "/usr/local/lib/python3.11/threading.py", line 982, in run
    self._target(*self._args, **self._kwargs)
    │    │        │    │        │    └ {}
    │    │        │    │        └ <Thread(ThreadPoolExecutor-3_0, started 139980247848640)>
    │    │        │    └ (<weakref at 0x7f4fb2ac3330; to 'ThreadPoolExecutor' at 0x7f4fc0cd9fd0>, <_queue.SimpleQueue object at 0x7f4fb067d760>, None,...
    │    │        └ <Thread(ThreadPoolExecutor-3_0, started 139980247848640)>
    │    └ <function _worker at 0x7f50878e7d80>
    └ <Thread(ThreadPoolExecutor-3_0, started 139980247848640)>
  File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 83, in _worker
    work_item.run()
    │         └ <function _WorkItem.run at 0x7f50878e7ec0>
    └ <concurrent.futures.thread._WorkItem object at 0x7f4fb2b52450>
  File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             │    │   │    │       │    └ {}
             │    │   │    │       └ <concurrent.futures.thread._WorkItem object at 0x7f4fb2b52450>
             │    │   │    └ ('03ab71f2-4a00-453e-8a03-227ae510d540', 'Cross Site Scripting vulnerabilities exploit mechanisms')
             │    │   └ <concurrent.futures.thread._WorkItem object at 0x7f4fb2b52450>
             │    └ <function query_collection_with_hybrid_search.<locals>.process_query at 0x7f4fb06ea2a0>
             └ <concurrent.futures.thread._WorkItem object at 0x7f4fb2b52450>

  File "/app/backend/open_webui/retrieval/utils.py", line 358, in process_query
    result = query_doc_with_hybrid_search(
             └ <function query_doc_with_hybrid_search at 0x7f5024cac400>

> File "/app/backend/open_webui/retrieval/utils.py", line 165, in query_doc_with_hybrid_search
    result = compression_retriever.invoke(query)
             │                     │      └ 'Cross Site Scripting vulnerabilities exploit mechanisms'
             │                     └ <function BaseRetriever.invoke at 0x7f5024e78ea0>
             └ ContextualCompressionRetriever(base_compressor=RerankCompressor(embedding_function=<function chat_completion_files_handler.<l...

  File "/usr/local/lib/python3.11/site-packages/langchain_core/retrievers.py", line 259, in invoke
    result = self._get_relevant_documents(
             │    └ <function ContextualCompressionRetriever._get_relevant_documents at 0x7f5024e78720>
             └ ContextualCompressionRetriever(base_compressor=RerankCompressor(embedding_function=<function chat_completion_files_handler.<l...
  File "/usr/local/lib/python3.11/site-packages/langchain/retrievers/contextual_compression.py", line 44, in _get_relevant_documents
    compressed_docs = self.base_compressor.compress_documents(
                      │    │               └ <function RerankCompressor.compress_documents at 0x7f5024cacd60>
                      │    └ RerankCompressor(embedding_function=<function chat_completion_files_handler.<locals>.<lambda>.<locals>.<lambda> at 0x7f4fb06e...
                      └ ContextualCompressionRetriever(base_compressor=RerankCompressor(embedding_function=<function chat_completion_files_handler.<l...

  File "/app/backend/open_webui/retrieval/utils.py", line 959, in compress_documents
    zip(documents, scores.tolist() if not isinstance(scores, list) else scores)
        │          │                                 │                  └ None
        │          │                                 └ None
        │          └ None
        └ [Document(metadata={'created_by': 'ce2468e4-7c9c-45e6-9c40-5f916effa88c', 'embedding_config': '{"engine": "openai", "model": ...

AttributeError: 'NoneType' object has no attribute 'tolist'
2025-08-02 12:27:47.066 | ERROR    | open_webui.retrieval.utils:process_query:371 - Error when querying the collection with hybrid_search: 'NoneType' object has no attribute 'tolist' - {}
Traceback (most recent call last):

  File "/usr/local/lib/python3.11/threading.py", line 1002, in _bootstrap
    self._bootstrap_inner()
    │    └ <function Thread._bootstrap_inner at 0x7f50889d49a0>
    └ <Thread(ThreadPoolExecutor-3_0, started 139980247848640)>
  File "/usr/local/lib/python3.11/threading.py", line 1045, in _bootstrap_inner
    self.run()
    │    └ <function Thread.run at 0x7f50889d4680>
    └ <Thread(ThreadPoolExecutor-3_0, started 139980247848640)>
  File "/usr/local/lib/python3.11/threading.py", line 982, in run
    self._target(*self._args, **self._kwargs)
    │    │        │    │        │    └ {}
    │    │        │    │        └ <Thread(ThreadPoolExecutor-3_0, started 139980247848640)>
    │    │        │    └ (<weakref at 0x7f4fb2ac3330; to 'ThreadPoolExecutor' at 0x7f4fc0cd9fd0>, <_queue.SimpleQueue object at 0x7f4fb067d760>, None,...
    │    │        └ <Thread(ThreadPoolExecutor-3_0, started 139980247848640)>
    │    └ <function _worker at 0x7f50878e7d80>
    └ <Thread(ThreadPoolExecutor-3_0, started 139980247848640)>
  File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 83, in _worker
    work_item.run()
    │         └ <function _WorkItem.run at 0x7f50878e7ec0>
    └ <concurrent.futures.thread._WorkItem object at 0x7f4fb2b52450>
  File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             │    │   │    │       │    └ {}
             │    │   │    │       └ <concurrent.futures.thread._WorkItem object at 0x7f4fb2b52450>
             │    │   │    └ ('03ab71f2-4a00-453e-8a03-227ae510d540', 'Cross Site Scripting vulnerabilities exploit mechanisms')
             │    │   └ <concurrent.futures.thread._WorkItem object at 0x7f4fb2b52450>
             │    └ <function query_collection_with_hybrid_search.<locals>.process_query at 0x7f4fb06ea2a0>
             └ <concurrent.futures.thread._WorkItem object at 0x7f4fb2b52450>

> File "/app/backend/open_webui/retrieval/utils.py", line 358, in process_query
    result = query_doc_with_hybrid_search(
             └ <function query_doc_with_hybrid_search at 0x7f5024cac400>

  File "/app/backend/open_webui/retrieval/utils.py", line 192, in query_doc_with_hybrid_search
    raise e

  File "/app/backend/open_webui/retrieval/utils.py", line 165, in query_doc_with_hybrid_search
    result = compression_retriever.invoke(query)
             │                     │      └ 'Cross Site Scripting vulnerabilities exploit mechanisms'
             │                     └ <function BaseRetriever.invoke at 0x7f5024e78ea0>
             └ ContextualCompressionRetriever(base_compressor=RerankCompressor(embedding_function=<function chat_completion_files_handler.<l...

  File "/usr/local/lib/python3.11/site-packages/langchain_core/retrievers.py", line 259, in invoke
    result = self._get_relevant_documents(
             │    └ <function ContextualCompressionRetriever._get_relevant_documents at 0x7f5024e78720>
             └ ContextualCompressionRetriever(base_compressor=RerankCompressor(embedding_function=<function chat_completion_files_handler.<l...
  File "/usr/local/lib/python3.11/site-packages/langchain/retrievers/contextual_compression.py", line 44, in _get_relevant_documents
    compressed_docs = self.base_compressor.compress_documents(
                      │    │               └ <function RerankCompressor.compress_documents at 0x7f5024cacd60>
                      │    └ RerankCompressor(embedding_function=<function chat_completion_files_handler.<locals>.<lambda>.<locals>.<lambda> at 0x7f4fb06e...
                      └ ContextualCompressionRetriever(base_compressor=RerankCompressor(embedding_function=<function chat_completion_files_handler.<l...

  File "/app/backend/open_webui/retrieval/utils.py", line 959, in compress_documents
    zip(documents, scores.tolist() if not isinstance(scores, list) else scores)
        │          │                                 │                  └ None
        │          │                                 └ None
        │          └ None
        └ [Document(metadata={'created_by': 'ce2468e4-7c9c-45e6-9c40-5f916effa88c', 'embedding_config': '{"engine": "openai", "model": ...

AttributeError: 'NoneType' object has no attribute 'tolist'
2025-08-02 12:27:47.077 | ERROR    | open_webui.retrieval.models.external:predict:73 - Error in external reranking: 500 Server Error: Internal Server Error for url: http://embeddings-api:8080/v1/rerank - {}
Traceback (most recent call last):

  File "/usr/local/lib/python3.11/threading.py", line 1002, in _bootstrap
    self._bootstrap_inner()
    │    └ <function Thread._bootstrap_inner at 0x7f50889d49a0>
    └ <Thread(ThreadPoolExecutor-3_1, started 139979485341376)>
  File "/usr/local/lib/python3.11/threading.py", line 1045, in _bootstrap_inner
    self.run()
    │    └ <function Thread.run at 0x7f50889d4680>
    └ <Thread(ThreadPoolExecutor-3_1, started 139979485341376)>
  File "/usr/local/lib/python3.11/threading.py", line 982, in run
    self._target(*self._args, **self._kwargs)
    │    │        │    │        │    └ {}
    │    │        │    │        └ <Thread(ThreadPoolExecutor-3_1, started 139979485341376)>
    │    │        │    └ (<weakref at 0x7f4fb2ac3880; to 'ThreadPoolExecutor' at 0x7f4fc0cd9fd0>, <_queue.SimpleQueue object at 0x7f4fb067d760>, None,...
    │    │        └ <Thread(ThreadPoolExecutor-3_1, started 139979485341376)>
    │    └ <function _worker at 0x7f50878e7d80>
    └ <Thread(ThreadPoolExecutor-3_1, started 139979485341376)>
  File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 83, in _worker
    work_item.run()
    │         └ <function _WorkItem.run at 0x7f50878e7ec0>
    └ <concurrent.futures.thread._WorkItem object at 0x7f4fc0088550>
  File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             │    │   │    │       │    └ {}
             │    │   │    │       └ <concurrent.futures.thread._WorkItem object at 0x7f4fc0088550>
             │    │   │    └ ('03ab71f2-4a00-453e-8a03-227ae510d540', 'XSS attack examples with code')
             │    │   └ <concurrent.futures.thread._WorkItem object at 0x7f4fc0088550>
             │    └ <function query_collection_with_hybrid_search.<locals>.process_query at 0x7f4fb06ea2a0>
             └ <concurrent.futures.thread._WorkItem object at 0x7f4fc0088550>

  File "/app/backend/open_webui/retrieval/utils.py", line 358, in process_query
    result = query_doc_with_hybrid_search(
             └ <function query_doc_with_hybrid_search at 0x7f5024cac400>

  File "/app/backend/open_webui/retrieval/utils.py", line 165, in query_doc_with_hybrid_search
    result = compression_retriever.invoke(query)
             │                     │      └ 'XSS attack examples with code'
             │                     └ <function BaseRetriever.invoke at 0x7f5024e78ea0>
             └ ContextualCompressionRetriever(base_compressor=RerankCompressor(embedding_function=<function chat_completion_files_handler.<l...

  File "/usr/local/lib/python3.11/site-packages/langchain_core/retrievers.py", line 259, in invoke
    result = self._get_relevant_documents(
             │    └ <function ContextualCompressionRetriever._get_relevant_documents at 0x7f5024e78720>
             └ ContextualCompressionRetriever(base_compressor=RerankCompressor(embedding_function=<function chat_completion_files_handler.<l...
  File "/usr/local/lib/python3.11/site-packages/langchain/retrievers/contextual_compression.py", line 44, in _get_relevant_documents
    compressed_docs = self.base_compressor.compress_documents(
                      │    │               └ <function RerankCompressor.compress_documents at 0x7f5024cacd60>
                      │    └ RerankCompressor(embedding_function=<function chat_completion_files_handler.<locals>.<lambda>.<locals>.<lambda> at 0x7f4fb06e...
                      └ ContextualCompressionRetriever(base_compressor=RerankCompressor(embedding_function=<function chat_completion_files_handler.<l...

  File "/app/backend/open_webui/retrieval/utils.py", line 946, in compress_documents
    scores = self.reranking_function(
             │    └ <function chat_completion_files_handler.<locals>.<lambda>.<locals>.<lambda> at 0x7f4fb06eb9c0>
             └ RerankCompressor(embedding_function=<function chat_completion_files_handler.<locals>.<lambda>.<locals>.<lambda> at 0x7f4fb06e...

  File "/app/backend/open_webui/utils/middleware.py", line 657, in <lambda>
    lambda sentences: request.app.state.RERANKING_FUNCTION(
           │          │       └ <property object at 0x7f5084eceac0>
           │          └ <starlette.requests.Request object at 0x7f4fb068f0d0>
           └ [('XSS attack examples with code', '|ID          |\n|------------|\n|WSTG-INPV-02|\n\n## Summary\n\nStored [Cross-site Script...

  File "/app/backend/open_webui/retrieval/utils.py", line 452, in <lambda>
    return lambda sentences, user=None: reranking_function.predict(
                  │                     │                  └ <function ExternalReranker.predict at 0x7f501d132ac0>
                  │                     └ <open_webui.retrieval.models.external.ExternalReranker object at 0x7f4fc0484f10>
                  └ [('XSS attack examples with code', '|ID          |\n|------------|\n|WSTG-INPV-02|\n\n## Summary\n\nStored [Cross-site Script...

> File "/app/backend/open_webui/retrieval/models/external.py", line 62, in predict
    r.raise_for_status()
    │ └ <function Response.raise_for_status at 0x7f50852d0860>
    └ <Response [500]>

  File "/usr/local/lib/python3.11/site-packages/requests/models.py", line 1026, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
          │         │                        └ <Response [500]>
          │         └ '500 Server Error: Internal Server Error for url: http://embeddings-api:8080/v1/rerank'
          └ <class 'requests.exceptions.HTTPError'>

requests.exceptions.HTTPError: 500 Server Error: Internal Server Error for url: http://embeddings-api:8080/v1/rerank
2025-08-02 12:27:47.079 | ERROR    | open_webui.retrieval.utils:query_doc_with_hybrid_search:191 - Error querying doc 03ab71f2-4a00-453e-8a03-227ae510d540 with hybrid search: 'NoneType' object has no attribute 'tolist' - {}
Traceback (most recent call last):

  File "/usr/local/lib/python3.11/threading.py", line 1002, in _bootstrap
    self._bootstrap_inner()
    │    └ <function Thread._bootstrap_inner at 0x7f50889d49a0>
    └ <Thread(ThreadPoolExecutor-3_1, started 139979485341376)>
  File "/usr/local/lib/python3.11/threading.py", line 1045, in _bootstrap_inner
    self.run()
    │    └ <function Thread.run at 0x7f50889d4680>
    └ <Thread(ThreadPoolExecutor-3_1, started 139979485341376)>
  File "/usr/local/lib/python3.11/threading.py", line 982, in run
    self._target(*self._args, **self._kwargs)
    │    │        │    │        │    └ {}
    │    │        │    │        └ <Thread(ThreadPoolExecutor-3_1, started 139979485341376)>
    │    │        │    └ (<weakref at 0x7f4fb2ac3880; to 'ThreadPoolExecutor' at 0x7f4fc0cd9fd0>, <_queue.SimpleQueue object at 0x7f4fb067d760>, None,...
    │    │        └ <Thread(ThreadPoolExecutor-3_1, started 139979485341376)>
    │    └ <function _worker at 0x7f50878e7d80>
    └ <Thread(ThreadPoolExecutor-3_1, started 139979485341376)>
  File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 83, in _worker
    work_item.run()
    │         └ <function _WorkItem.run at 0x7f50878e7ec0>
    └ <concurrent.futures.thread._WorkItem object at 0x7f4fc0088550>
  File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             │    │   │    │       │    └ {}
             │    │   │    │       └ <concurrent.futures.thread._WorkItem object at 0x7f4fc0088550>
             │    │   │    └ ('03ab71f2-4a00-453e-8a03-227ae510d540', 'XSS attack examples with code')
             │    │   └ <concurrent.futures.thread._WorkItem object at 0x7f4fc0088550>
             │    └ <function query_collection_with_hybrid_search.<locals>.process_query at 0x7f4fb06ea2a0>
             └ <concurrent.futures.thread._WorkItem object at 0x7f4fc0088550>

  File "/app/backend/open_webui/retrieval/utils.py", line 358, in process_query
    result = query_doc_with_hybrid_search(
             └ <function query_doc_with_hybrid_search at 0x7f5024cac400>

> File "/app/backend/open_webui/retrieval/utils.py", line 165, in query_doc_with_hybrid_search
    result = compression_retriever.invoke(query)
             │                     │      └ 'XSS attack examples with code'
             │                     └ <function BaseRetriever.invoke at 0x7f5024e78ea0>
             └ ContextualCompressionRetriever(base_compressor=RerankCompressor(embedding_function=<function chat_completion_files_handler.<l...

  File "/usr/local/lib/python3.11/site-packages/langchain_core/retrievers.py", line 259, in invoke
    result = self._get_relevant_documents(
             │    └ <function ContextualCompressionRetriever._get_relevant_documents at 0x7f5024e78720>
             └ ContextualCompressionRetriever(base_compressor=RerankCompressor(embedding_function=<function chat_completion_files_handler.<l...
  File "/usr/local/lib/python3.11/site-packages/langchain/retrievers/contextual_compression.py", line 44, in _get_relevant_documents
    compressed_docs = self.base_compressor.compress_documents(
                      │    │               └ <function RerankCompressor.compress_documents at 0x7f5024cacd60>
                      │    └ RerankCompressor(embedding_function=<function chat_completion_files_handler.<locals>.<lambda>.<locals>.<lambda> at 0x7f4fb06e...
                      └ ContextualCompressionRetriever(base_compressor=RerankCompressor(embedding_function=<function chat_completion_files_handler.<l...

  File "/app/backend/open_webui/retrieval/utils.py", line 959, in compress_documents
    zip(documents, scores.tolist() if not isinstance(scores, list) else scores)
        │          │                                 │                  └ None
        │          │                                 └ None
        │          └ None
        └ [Document(metadata={'created_by': 'ce2468e4-7c9c-45e6-9c40-5f916effa88c', 'embedding_config': '{"engine": "openai", "model": ...

AttributeError: 'NoneType' object has no attribute 'tolist'
2025-08-02 12:27:47.081 | ERROR    | open_webui.retrieval.utils:process_query:371 - Error when querying the collection with hybrid_search: 'NoneType' object has no attribute 'tolist' - {}
Traceback (most recent call last):

  File "/usr/local/lib/python3.11/threading.py", line 1002, in _bootstrap
    self._bootstrap_inner()
    │    └ <function Thread._bootstrap_inner at 0x7f50889d49a0>
    └ <Thread(ThreadPoolExecutor-3_1, started 139979485341376)>
  File "/usr/local/lib/python3.11/threading.py", line 1045, in _bootstrap_inner
    self.run()
    │    └ <function Thread.run at 0x7f50889d4680>
    └ <Thread(ThreadPoolExecutor-3_1, started 139979485341376)>
  File "/usr/local/lib/python3.11/threading.py", line 982, in run
    self._target(*self._args, **self._kwargs)
    │    │        │    │        │    └ {}
    │    │        │    │        └ <Thread(ThreadPoolExecutor-3_1, started 139979485341376)>
    │    │        │    └ (<weakref at 0x7f4fb2ac3880; to 'ThreadPoolExecutor' at 0x7f4fc0cd9fd0>, <_queue.SimpleQueue object at 0x7f4fb067d760>, None,...
    │    │        └ <Thread(ThreadPoolExecutor-3_1, started 139979485341376)>
    │    └ <function _worker at 0x7f50878e7d80>
    └ <Thread(ThreadPoolExecutor-3_1, started 139979485341376)>
  File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 83, in _worker
    work_item.run()
    │         └ <function _WorkItem.run at 0x7f50878e7ec0>
    └ <concurrent.futures.thread._WorkItem object at 0x7f4fc0088550>
  File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             │    │   │    │       │    └ {}
             │    │   │    │       └ <concurrent.futures.thread._WorkItem object at 0x7f4fc0088550>
             │    │   │    └ ('03ab71f2-4a00-453e-8a03-227ae510d540', 'XSS attack examples with code')
             │    │   └ <concurrent.futures.thread._WorkItem object at 0x7f4fc0088550>
             │    └ <function query_collection_with_hybrid_search.<locals>.process_query at 0x7f4fb06ea2a0>
             └ <concurrent.futures.thread._WorkItem object at 0x7f4fc0088550>

> File "/app/backend/open_webui/retrieval/utils.py", line 358, in process_query
    result = query_doc_with_hybrid_search(
             └ <function query_doc_with_hybrid_search at 0x7f5024cac400>

  File "/app/backend/open_webui/retrieval/utils.py", line 192, in query_doc_with_hybrid_search
    raise e

  File "/app/backend/open_webui/retrieval/utils.py", line 165, in query_doc_with_hybrid_search
    result = compression_retriever.invoke(query)
             │                     │      └ 'XSS attack examples with code'
             │                     └ <function BaseRetriever.invoke at 0x7f5024e78ea0>
             └ ContextualCompressionRetriever(base_compressor=RerankCompressor(embedding_function=<function chat_completion_files_handler.<l...

  File "/usr/local/lib/python3.11/site-packages/langchain_core/retrievers.py", line 259, in invoke
    result = self._get_relevant_documents(
             │    └ <function ContextualCompressionRetriever._get_relevant_documents at 0x7f5024e78720>
             └ ContextualCompressionRetriever(base_compressor=RerankCompressor(embedding_function=<function chat_completion_files_handler.<l...
  File "/usr/local/lib/python3.11/site-packages/langchain/retrievers/contextual_compression.py", line 44, in _get_relevant_documents
    compressed_docs = self.base_compressor.compress_documents(
                      │    │               └ <function RerankCompressor.compress_documents at 0x7f5024cacd60>
                      │    └ RerankCompressor(embedding_function=<function chat_completion_files_handler.<locals>.<lambda>.<locals>.<lambda> at 0x7f4fb06e...
                      └ ContextualCompressionRetriever(base_compressor=RerankCompressor(embedding_function=<function chat_completion_files_handler.<l...

  File "/app/backend/open_webui/retrieval/utils.py", line 959, in compress_documents
    zip(documents, scores.tolist() if not isinstance(scores, list) else scores)
        │          │                                 │                  └ None
        │          │                                 └ None
        │          └ None
        └ [Document(metadata={'created_by': 'ce2468e4-7c9c-45e6-9c40-5f916effa88c', 'embedding_config': '{"engine": "openai", "model": ...

AttributeError: 'NoneType' object has no attribute 'tolist'
2025-08-02 12:27:47.102 | ERROR    | open_webui.retrieval.models.external:predict:73 - Error in external reranking: 500 Server Error: Internal Server Error for url: http://embeddings-api:8080/v1/rerank - {}
Traceback (most recent call last):

  File "/usr/local/lib/python3.11/threading.py", line 1002, in _bootstrap
    self._bootstrap_inner()
    │    └ <function Thread._bootstrap_inner at 0x7f50889d49a0>
    └ <Thread(ThreadPoolExecutor-3_2, started 139980097713856)>
  File "/usr/local/lib/python3.11/threading.py", line 1045, in _bootstrap_inner
    self.run()
    │    └ <function Thread.run at 0x7f50889d4680>
    └ <Thread(ThreadPoolExecutor-3_2, started 139980097713856)>
  File "/usr/local/lib/python3.11/threading.py", line 982, in run
    self._target(*self._args, **self._kwargs)
    │    │        │    │        │    └ {}
    │    │        │    │        └ <Thread(ThreadPoolExecutor-3_2, started 139980097713856)>
    │    │        │    └ (<weakref at 0x7f4fb2ac3ce0; to 'ThreadPoolExecutor' at 0x7f4fc0cd9fd0>, <_queue.SimpleQueue object at 0x7f4fb067d760>, None,...
    │    │        └ <Thread(ThreadPoolExecutor-3_2, started 139980097713856)>
    │    └ <function _worker at 0x7f50878e7d80>
    └ <Thread(ThreadPoolExecutor-3_2, started 139980097713856)>
  File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 83, in _worker
    work_item.run()
    │         └ <function _WorkItem.run at 0x7f50878e7ec0>
    └ <concurrent.futures.thread._WorkItem object at 0x7f4fc0089450>
  File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             │    │   │    │       │    └ {}
             │    │   │    │       └ <concurrent.futures.thread._WorkItem object at 0x7f4fc0089450>
             │    │   │    └ ('03ab71f2-4a00-453e-8a03-227ae510d540', 'Cross Site Scripting prevention techniques')
             │    │   └ <concurrent.futures.thread._WorkItem object at 0x7f4fc0089450>
             │    └ <function query_collection_with_hybrid_search.<locals>.process_query at 0x7f4fb06ea2a0>
             └ <concurrent.futures.thread._WorkItem object at 0x7f4fc0089450>

  File "/app/backend/open_webui/retrieval/utils.py", line 358, in process_query
    result = query_doc_with_hybrid_search(
             └ <function query_doc_with_hybrid_search at 0x7f5024cac400>

  File "/app/backend/open_webui/retrieval/utils.py", line 165, in query_doc_with_hybrid_search
    result = compression_retriever.invoke(query)
             │                     │      └ 'Cross Site Scripting prevention techniques'
             │                     └ <function BaseRetriever.invoke at 0x7f5024e78ea0>
             └ ContextualCompressionRetriever(base_compressor=RerankCompressor(embedding_function=<function chat_completion_files_handler.<l...

  File "/usr/local/lib/python3.11/site-packages/langchain_core/retrievers.py", line 259, in invoke
    result = self._get_relevant_documents(
             │    └ <function ContextualCompressionRetriever._get_relevant_documents at 0x7f5024e78720>
             └ ContextualCompressionRetriever(base_compressor=RerankCompressor(embedding_function=<function chat_completion_files_handler.<l...
  File "/usr/local/lib/python3.11/site-packages/langchain/retrievers/contextual_compression.py", line 44, in _get_relevant_documents
    compressed_docs = self.base_compressor.compress_documents(
                      │    │               └ <function RerankCompressor.compress_documents at 0x7f5024cacd60>
                      │    └ RerankCompressor(embedding_function=<function chat_completion_files_handler.<locals>.<lambda>.<locals>.<lambda> at 0x7f4fb06e...
                      └ ContextualCompressionRetriever(base_compressor=RerankCompressor(embedding_function=<function chat_completion_files_handler.<l...

  File "/app/backend/open_webui/retrieval/utils.py", line 946, in compress_documents
    scores = self.reranking_function(
             │    └ <function chat_completion_files_handler.<locals>.<lambda>.<locals>.<lambda> at 0x7f4fb06eb9c0>
             └ RerankCompressor(embedding_function=<function chat_completion_files_handler.<locals>.<lambda>.<locals>.<lambda> at 0x7f4fb06e...

  File "/app/backend/open_webui/utils/middleware.py", line 657, in <lambda>
    lambda sentences: request.app.state.RERANKING_FUNCTION(
           │          │       └ <property object at 0x7f5084eceac0>
           │          └ <starlette.requests.Request object at 0x7f4fb068f0d0>
           └ [('Cross Site Scripting prevention techniques', '## Related Test Cases\n\n- [Testing for HTTP Parameter Pollution](../07-Inpu...

  File "/app/backend/open_webui/retrieval/utils.py", line 452, in <lambda>
    return lambda sentences, user=None: reranking_function.predict(
                  │                     │                  └ <function ExternalReranker.predict at 0x7f501d132ac0>
                  │                     └ <open_webui.retrieval.models.external.ExternalReranker object at 0x7f4fc0484f10>
                  └ [('Cross Site Scripting prevention techniques', '## Related Test Cases\n\n- [Testing for HTTP Parameter Pollution](../07-Inpu...

> File "/app/backend/open_webui/retrieval/models/external.py", line 62, in predict
    r.raise_for_status()
    │ └ <function Response.raise_for_status at 0x7f50852d0860>
    └ <Response [500]>

  File "/usr/local/lib/python3.11/site-packages/requests/models.py", line 1026, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
          │         │                        └ <Response [500]>
          │         └ '500 Server Error: Internal Server Error for url: http://embeddings-api:8080/v1/rerank'
          └ <class 'requests.exceptions.HTTPError'>

requests.exceptions.HTTPError: 500 Server Error: Internal Server Error for url: http://embeddings-api:8080/v1/rerank
2025-08-02 12:27:47.104 | ERROR    | open_webui.retrieval.utils:query_doc_with_hybrid_search:191 - Error querying doc 03ab71f2-4a00-453e-8a03-227ae510d540 with hybrid search: 'NoneType' object has no attribute 'tolist' - {}
Traceback (most recent call last):

  File "/usr/local/lib/python3.11/threading.py", line 1002, in _bootstrap
    self._bootstrap_inner()
    │    └ <function Thread._bootstrap_inner at 0x7f50889d49a0>
    └ <Thread(ThreadPoolExecutor-3_2, started 139980097713856)>
  File "/usr/local/lib/python3.11/threading.py", line 1045, in _bootstrap_inner
    self.run()
    │    └ <function Thread.run at 0x7f50889d4680>
    └ <Thread(ThreadPoolExecutor-3_2, started 139980097713856)>
  File "/usr/local/lib/python3.11/threading.py", line 982, in run
    self._target(*self._args, **self._kwargs)
    │    │        │    │        │    └ {}
    │    │        │    │        └ <Thread(ThreadPoolExecutor-3_2, started 139980097713856)>
    │    │        │    └ (<weakref at 0x7f4fb2ac3ce0; to 'ThreadPoolExecutor' at 0x7f4fc0cd9fd0>, <_queue.SimpleQueue object at 0x7f4fb067d760>, None,...
    │    │        └ <Thread(ThreadPoolExecutor-3_2, started 139980097713856)>
    │    └ <function _worker at 0x7f50878e7d80>
    └ <Thread(ThreadPoolExecutor-3_2, started 139980097713856)>
  File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 83, in _worker
    work_item.run()
    │         └ <function _WorkItem.run at 0x7f50878e7ec0>
    └ <concurrent.futures.thread._WorkItem object at 0x7f4fc0089450>
  File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             │    │   │    │       │    └ {}
             │    │   │    │       └ <concurrent.futures.thread._WorkItem object at 0x7f4fc0089450>
             │    │   │    └ ('03ab71f2-4a00-453e-8a03-227ae510d540', 'Cross Site Scripting prevention techniques')
             │    │   └ <concurrent.futures.thread._WorkItem object at 0x7f4fc0089450>
             │    └ <function query_collection_with_hybrid_search.<locals>.process_query at 0x7f4fb06ea2a0>
             └ <concurrent.futures.thread._WorkItem object at 0x7f4fc0089450>

  File "/app/backend/open_webui/retrieval/utils.py", line 358, in process_query
    result = query_doc_with_hybrid_search(
             └ <function query_doc_with_hybrid_search at 0x7f5024cac400>

> File "/app/backend/open_webui/retrieval/utils.py", line 165, in query_doc_with_hybrid_search
    result = compression_retriever.invoke(query)
             │                     │      └ 'Cross Site Scripting prevention techniques'
             │                     └ <function BaseRetriever.invoke at 0x7f5024e78ea0>
             └ ContextualCompressionRetriever(base_compressor=RerankCompressor(embedding_function=<function chat_completion_files_handler.<l...

  File "/usr/local/lib/python3.11/site-packages/langchain_core/retrievers.py", line 259, in invoke
    result = self._get_relevant_documents(
             │    └ <function ContextualCompressionRetriever._get_relevant_documents at 0x7f5024e78720>
             └ ContextualCompressionRetriever(base_compressor=RerankCompressor(embedding_function=<function chat_completion_files_handler.<l...
  File "/usr/local/lib/python3.11/site-packages/langchain/retrievers/contextual_compression.py", line 44, in _get_relevant_documents
    compressed_docs = self.base_compressor.compress_documents(
                      │    │               └ <function RerankCompressor.compress_documents at 0x7f5024cacd60>
                      │    └ RerankCompressor(embedding_function=<function chat_completion_files_handler.<locals>.<lambda>.<locals>.<lambda> at 0x7f4fb06e...
                      └ ContextualCompressionRetriever(base_compressor=RerankCompressor(embedding_function=<function chat_completion_files_handler.<l...

  File "/app/backend/open_webui/retrieval/utils.py", line 959, in compress_documents
    zip(documents, scores.tolist() if not isinstance(scores, list) else scores)
        │          │                                 │                  └ None
        │          │                                 └ None
        │          └ None
        └ [Document(metadata={'created_by': 'ce2468e4-7c9c-45e6-9c40-5f916effa88c', 'embedding_config': '{"engine": "openai", "model": ...

AttributeError: 'NoneType' object has no attribute 'tolist'
2025-08-02 12:27:47.106 | ERROR    | open_webui.retrieval.utils:process_query:371 - Error when querying the collection with hybrid_search: 'NoneType' object has no attribute 'tolist' - {}
Traceback (most recent call last):

  File "/usr/local/lib/python3.11/threading.py", line 1002, in _bootstrap
    self._bootstrap_inner()
    │    └ <function Thread._bootstrap_inner at 0x7f50889d49a0>
    └ <Thread(ThreadPoolExecutor-3_2, started 139980097713856)>
  File "/usr/local/lib/python3.11/threading.py", line 1045, in _bootstrap_inner
    self.run()
    │    └ <function Thread.run at 0x7f50889d4680>
    └ <Thread(ThreadPoolExecutor-3_2, started 139980097713856)>
  File "/usr/local/lib/python3.11/threading.py", line 982, in run
    self._target(*self._args, **self._kwargs)
    │    │        │    │        │    └ {}
    │    │        │    │        └ <Thread(ThreadPoolExecutor-3_2, started 139980097713856)>
    │    │        │    └ (<weakref at 0x7f4fb2ac3ce0; to 'ThreadPoolExecutor' at 0x7f4fc0cd9fd0>, <_queue.SimpleQueue object at 0x7f4fb067d760>, None,...
    │    │        └ <Thread(ThreadPoolExecutor-3_2, started 139980097713856)>
    │    └ <function _worker at 0x7f50878e7d80>
    └ <Thread(ThreadPoolExecutor-3_2, started 139980097713856)>
  File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 83, in _worker
    work_item.run()
    │         └ <function _WorkItem.run at 0x7f50878e7ec0>
    └ <concurrent.futures.thread._WorkItem object at 0x7f4fc0089450>
  File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             │    │   │    │       │    └ {}
             │    │   │    │       └ <concurrent.futures.thread._WorkItem object at 0x7f4fc0089450>
             │    │   │    └ ('03ab71f2-4a00-453e-8a03-227ae510d540', 'Cross Site Scripting prevention techniques')
             │    │   └ <concurrent.futures.thread._WorkItem object at 0x7f4fc0089450>
             │    └ <function query_collection_with_hybrid_search.<locals>.process_query at 0x7f4fb06ea2a0>
             └ <concurrent.futures.thread._WorkItem object at 0x7f4fc0089450>

> File "/app/backend/open_webui/retrieval/utils.py", line 358, in process_query
    result = query_doc_with_hybrid_search(
             └ <function query_doc_with_hybrid_search at 0x7f5024cac400>

  File "/app/backend/open_webui/retrieval/utils.py", line 192, in query_doc_with_hybrid_search
    raise e

  File "/app/backend/open_webui/retrieval/utils.py", line 165, in query_doc_with_hybrid_search
    result = compression_retriever.invoke(query)
             │                     │      └ 'Cross Site Scripting prevention techniques'
             │                     └ <function BaseRetriever.invoke at 0x7f5024e78ea0>
             └ ContextualCompressionRetriever(base_compressor=RerankCompressor(embedding_function=<function chat_completion_files_handler.<l...

  File "/usr/local/lib/python3.11/site-packages/langchain_core/retrievers.py", line 259, in invoke
    result = self._get_relevant_documents(
             │    └ <function ContextualCompressionRetriever._get_relevant_documents at 0x7f5024e78720>
             └ ContextualCompressionRetriever(base_compressor=RerankCompressor(embedding_function=<function chat_completion_files_handler.<l...
  File "/usr/local/lib/python3.11/site-packages/langchain/retrievers/contextual_compression.py", line 44, in _get_relevant_documents
    compressed_docs = self.base_compressor.compress_documents(
                      │    │               └ <function RerankCompressor.compress_documents at 0x7f5024cacd60>
                      │    └ RerankCompressor(embedding_function=<function chat_completion_files_handler.<locals>.<lambda>.<locals>.<lambda> at 0x7f4fb06e...
                      └ ContextualCompressionRetriever(base_compressor=RerankCompressor(embedding_function=<function chat_completion_files_handler.<l...

  File "/app/backend/open_webui/retrieval/utils.py", line 959, in compress_documents
    zip(documents, scores.tolist() if not isinstance(scores, list) else scores)
        │          │                                 │                  └ None
        │          │                                 └ None
        │          └ None
        └ [Document(metadata={'created_by': 'ce2468e4-7c9c-45e6-9c40-5f916effa88c', 'embedding_config': '{"engine": "openai", "model": ...

AttributeError: 'NoneType' object has no attribute 'tolist'
2025-08-02 12:27:47.116 | INFO     | open_webui.routers.openai:get_all_models:392 - get_all_models() - {}
2025-08-02 12:27:48.017 | INFO     | uvicorn.protocols.http.httptools_impl:send:476 - 172.18.0.1:50258 - "POST /api/chat/completions HTTP/1.1" 200 - {}
2025-08-02 12:27:48.047 | INFO     | uvicorn.protocols.http.httptools_impl:send:476 - 172.18.0.1:50258 - "GET /api/v1/chats/?page=1 HTTP/1.1" 200 - {}
2025-08-02 12:27:48.056 | INFO     | uvicorn.protocols.http.httptools_impl:send:476 - 172.18.0.1:50258 - "GET /api/v1/folders/ HTTP/1.1" 200 - {}
LocalAI Logs
12:18PM INF Setting logging to info
12:18PM INF Starting LocalAI using 12 threads, with models path: /models
12:18PM INF LocalAI version: v3.3.0 (36179ffbed52b3f85341b2991e0c08de04845da1)
12:18PM INF Preloading models from /models

  Model name: bge-reranker-v2-m3                                              



  Model name: nomic-embed-text-v2-moe                                         


12:18PM INF core/startup process completed!
12:18PM INF LocalAI API is listening! Please connect to the endpoint for API documentation. endpoint=http://0.0.0.0:8080
12:19PM INF Success ip=127.0.0.1 latency="78.637µs" method=GET status=200 url=/readyz
12:20PM INF Success ip=127.0.0.1 latency="38.932µs" method=GET status=200 url=/readyz
12:21PM INF Success ip=127.0.0.1 latency="56.215µs" method=GET status=200 url=/readyz
12:22PM INF Success ip=127.0.0.1 latency="51.567µs" method=GET status=200 url=/readyz
12:23PM INF Success ip=127.0.0.1 latency="70.321µs" method=GET status=200 url=/readyz
12:24PM INF BackendLoader starting backend=vulkan-llama-cpp modelID=nomic-embed-text-v2-moe o.model=nomic-embed-text-v2-moe-f16.gguf
12:24PM INF Success ip=172.18.0.3 latency=3.431077734s method=POST status=200 url=/v1/embeddings
12:24PM INF Success ip=172.18.0.3 latency=702.692789ms method=POST status=200 url=/v1/embeddings
12:24PM INF Success ip=172.18.0.3 latency=670.274945ms method=POST status=200 url=/v1/embeddings
12:24PM INF Success ip=172.18.0.3 latency=484.961773ms method=POST status=200 url=/v1/embeddings
12:24PM INF Success ip=172.18.0.3 latency=676.057539ms method=POST status=200 url=/v1/embeddings
12:24PM INF Success ip=172.18.0.3 latency=666.097183ms method=POST status=200 url=/v1/embeddings
12:24PM INF Success ip=172.18.0.3 latency=691.714049ms method=POST status=200 url=/v1/embeddings
12:24PM INF Success ip=172.18.0.3 latency=468.40994ms method=POST status=200 url=/v1/embeddings
12:24PM INF Success ip=172.18.0.3 latency=657.254376ms method=POST status=200 url=/v1/embeddings
12:24PM INF Success ip=172.18.0.3 latency=656.406731ms method=POST status=200 url=/v1/embeddings
12:24PM INF Success ip=172.18.0.3 latency=684.495109ms method=POST status=200 url=/v1/embeddings
12:24PM INF Success ip=172.18.0.3 latency=710.997992ms method=POST status=200 url=/v1/embeddings
12:24PM INF Success ip=172.18.0.3 latency=667.144161ms method=POST status=200 url=/v1/embeddings
12:24PM INF Success ip=172.18.0.3 latency=681.042863ms method=POST status=200 url=/v1/embeddings
12:24PM INF Success ip=172.18.0.3 latency=680.960699ms method=POST status=200 url=/v1/embeddings
12:24PM INF Success ip=172.18.0.3 latency=685.555583ms method=POST status=200 url=/v1/embeddings
12:24PM INF Success ip=172.18.0.3 latency=472.810921ms method=POST status=200 url=/v1/embeddings
12:24PM INF Success ip=172.18.0.3 latency=664.101171ms method=POST status=200 url=/v1/embeddings
12:24PM INF Success ip=172.18.0.3 latency=691.898675ms method=POST status=200 url=/v1/embeddings
12:24PM INF Success ip=172.18.0.3 latency=677.01412ms method=POST status=200 url=/v1/embeddings
12:24PM INF Success ip=172.18.0.3 latency=692.419961ms method=POST status=200 url=/v1/embeddings
12:24PM INF Success ip=172.18.0.3 latency=691.205649ms method=POST status=200 url=/v1/embeddings
12:24PM INF Success ip=172.18.0.3 latency=698.605398ms method=POST status=200 url=/v1/embeddings
12:24PM INF Success ip=172.18.0.3 latency=710.376271ms method=POST status=200 url=/v1/embeddings
12:24PM INF Success ip=172.18.0.3 latency=744.921094ms method=POST status=200 url=/v1/embeddings
12:24PM INF Success ip=172.18.0.3 latency=489.374116ms method=POST status=200 url=/v1/embeddings
12:24PM INF Success ip=127.0.0.1 latency="22.312µs" method=GET status=200 url=/readyz
12:24PM INF Success ip=172.18.0.3 latency=686.162599ms method=POST status=200 url=/v1/embeddings
12:24PM INF Success ip=172.18.0.3 latency=686.372131ms method=POST status=200 url=/v1/embeddings
12:24PM INF Success ip=172.18.0.3 latency=693.382231ms method=POST status=200 url=/v1/embeddings
12:24PM INF Success ip=172.18.0.3 latency=704.930137ms method=POST status=200 url=/v1/embeddings
12:24PM INF Success ip=172.18.0.3 latency=707.084617ms method=POST status=200 url=/v1/embeddings
12:24PM INF Success ip=172.18.0.3 latency=458.466357ms method=POST status=200 url=/v1/embeddings
12:24PM INF Success ip=172.18.0.3 latency=700.91054ms method=POST status=200 url=/v1/embeddings
12:24PM INF Success ip=172.18.0.3 latency=691.71867ms method=POST status=200 url=/v1/embeddings
12:25PM INF Success ip=172.18.0.3 latency=691.86703ms method=POST status=200 url=/v1/embeddings
12:25PM INF Success ip=172.18.0.3 latency=696.328324ms method=POST status=200 url=/v1/embeddings
12:25PM INF Success ip=172.18.0.3 latency=726.521496ms method=POST status=200 url=/v1/embeddings
12:25PM INF Success ip=172.18.0.3 latency=461.181564ms method=POST status=200 url=/v1/embeddings
12:25PM INF Success ip=172.18.0.3 latency=719.777426ms method=POST status=200 url=/v1/embeddings
12:25PM INF Success ip=172.18.0.3 latency=688.473272ms method=POST status=200 url=/v1/embeddings
12:25PM INF Success ip=172.18.0.3 latency=411.526997ms method=POST status=200 url=/v1/embeddings
12:25PM INF Success ip=172.18.0.3 latency=710.649464ms method=POST status=200 url=/v1/embeddings
12:25PM INF Success ip=172.18.0.3 latency=753.220898ms method=POST status=200 url=/v1/embeddings
12:25PM INF Success ip=172.18.0.3 latency=446.497645ms method=POST status=200 url=/v1/embeddings
12:25PM INF Success ip=172.18.0.3 latency=679.264221ms method=POST status=200 url=/v1/embeddings
12:25PM INF Success ip=172.18.0.3 latency=702.598469ms method=POST status=200 url=/v1/embeddings
12:25PM INF Success ip=172.18.0.3 latency=716.11127ms method=POST status=200 url=/v1/embeddings
12:25PM INF Success ip=172.18.0.3 latency=695.653822ms method=POST status=200 url=/v1/embeddings
12:25PM INF Success ip=172.18.0.3 latency=706.499515ms method=POST status=200 url=/v1/embeddings
12:25PM INF Success ip=172.18.0.3 latency=687.51403ms method=POST status=200 url=/v1/embeddings
12:25PM INF Success ip=172.18.0.3 latency=710.837047ms method=POST status=200 url=/v1/embeddings
12:25PM INF Success ip=172.18.0.3 latency=687.095036ms method=POST status=200 url=/v1/embeddings
12:25PM INF Success ip=172.18.0.3 latency=717.529192ms method=POST status=200 url=/v1/embeddings
12:25PM INF Success ip=172.18.0.3 latency=716.474229ms method=POST status=200 url=/v1/embeddings
12:25PM INF Success ip=172.18.0.3 latency=700.36335ms method=POST status=200 url=/v1/embeddings
12:25PM INF Success ip=172.18.0.3 latency=716.163058ms method=POST status=200 url=/v1/embeddings
12:25PM INF Success ip=172.18.0.3 latency=694.248074ms method=POST status=200 url=/v1/embeddings
12:25PM INF Success ip=172.18.0.3 latency=726.295456ms method=POST status=200 url=/v1/embeddings
12:25PM INF Success ip=172.18.0.3 latency=703.951621ms method=POST status=200 url=/v1/embeddings
12:25PM INF Success ip=172.18.0.3 latency=674.830932ms method=POST status=200 url=/v1/embeddings
12:25PM INF Success ip=172.18.0.3 latency=712.011614ms method=POST status=200 url=/v1/embeddings
12:25PM INF Success ip=172.18.0.3 latency=607.003098ms method=POST status=200 url=/v1/embeddings
12:25PM INF Success ip=172.18.0.3 latency=710.82708ms method=POST status=200 url=/v1/embeddings
12:25PM INF Success ip=172.18.0.3 latency=596.892491ms method=POST status=200 url=/v1/embeddings
12:25PM INF Success ip=172.18.0.3 latency=737.986772ms method=POST status=200 url=/v1/embeddings
12:25PM INF Success ip=172.18.0.3 latency=441.627119ms method=POST status=200 url=/v1/embeddings
12:25PM INF Success ip=172.18.0.3 latency=714.030701ms method=POST status=200 url=/v1/embeddings
12:25PM INF Success ip=172.18.0.3 latency=499.239109ms method=POST status=200 url=/v1/embeddings
12:25PM INF Success ip=127.0.0.1 latency="44.713µs" method=GET status=200 url=/readyz
12:26PM INF Success ip=127.0.0.1 latency="64.41µs" method=GET status=200 url=/readyz
12:27PM INF Success ip=172.18.0.3 latency=423.624544ms method=POST status=200 url=/v1/embeddings
12:27PM INF Success ip=172.18.0.3 latency=406.705804ms method=POST status=200 url=/v1/embeddings
12:27PM INF Success ip=172.18.0.3 latency=403.815419ms method=POST status=200 url=/v1/embeddings
12:27PM WRN SetDefaultModelNameToFirstAvailable used with no matching models installed
12:27PM INF Success ip=172.18.0.3 latency=415.656944ms method=POST status=200 url=/v1/embeddings
12:27PM WRN SetDefaultModelNameToFirstAvailable used with no matching models installed
12:27PM WRN SetDefaultModelNameToFirstAvailable used with no matching models installed
12:27PM INF BackendLoader starting backend=vulkan-llama-cpp modelID=bge-reranker-v2-m3 o.model=bge-reranker-v2-m3-Q8_0.gguf
12:27PM ERR Server error error="rpc error: code = Internal desc = Error in receiving results" ip=172.18.0.3 latency=2.962352341s method=POST status=500 url=/v1/rerank
12:27PM ERR Server error error="rpc error: code = Internal desc = Error in receiving results" ip=172.18.0.3 latency=2.965578134s method=POST status=500 url=/v1/rerank
12:27PM ERR Server error error="rpc error: code = Internal desc = Error in receiving results" ip=172.18.0.3 latency=2.996191125s method=POST status=500 url=/v1/rerank
12:27PM INF Success ip=127.0.0.1 latency="21.571µs" method=GET status=200 url=/readyz
12:28PM INF Success ip=127.0.0.1 latency="20.999µs" method=GET status=200 url=/readyz
12:29PM INF Success ip=127.0.0.1 latency="56.005µs" method=GET status=200 url=/readyz
12:30PM INF Success ip=127.0.0.1 latency="41.998µs" method=GET status=200 url=/readyz
12:31PM INF Success ip=127.0.0.1 latency="66.384µs" method=GET status=200 url=/readyz
12:32PM INF Success ip=127.0.0.1 latency="52.488µs" method=GET status=200 url=/readyz
12:33PM INF Success ip=127.0.0.1 latency="72.326µs" method=GET status=200 url=/readyz
12:33PM WRN SetDefaultModelNameToFirstAvailable used with no matching models installed
12:33PM INF Success ip=172.18.0.1 latency=630.627398ms method=POST status=200 url=/v1/rerank
12:34PM INF Success ip=127.0.0.1 latency="48.421µs" method=GET status=200 url=/readyz
12:35PM INF Success ip=127.0.0.1 latency="44.163µs" method=GET status=200 url=/readyz
12:36PM INF Success ip=127.0.0.1 latency="48.712µs" method=GET status=200 url=/readyz
12:37PM INF Success ip=127.0.0.1 latency="56.536µs" method=GET status=200 url=/readyz
12:38PM INF Success ip=127.0.0.1 latency="64.01µs" method=GET status=200 url=/readyz
12:39PM INF Success ip=127.0.0.1 latency="46.638µs" method=GET status=200 url=/readyz
12:40PM INF Success ip=127.0.0.1 latency="40.696µs" method=GET status=200 url=/readyz
12:41PM WRN SetDefaultModelNameToFirstAvailable used with no matching models installed
12:41PM INF Success ip=172.18.0.3 latency=637.086445ms method=POST status=200 url=/v1/rerank
12:41PM INF Success ip=127.0.0.1 latency="64.661µs" method=GET status=200 url=/readyz
12:41PM WRN SetDefaultModelNameToFirstAvailable used with no matching models installed
12:41PM INF Success ip=172.18.0.3 latency=632.394941ms method=POST status=200 url=/v1/rerank
12:42PM INF Success ip=127.0.0.1 latency="48.09µs" method=GET status=200 url=/readyz
12:43PM INF Success ip=127.0.0.1 latency="63.288µs" method=GET status=200 url=/readyz
12:44PM INF Success ip=127.0.0.1 latency="45.615µs" method=GET status=200 url=/readyz
12:45PM INF Success ip=127.0.0.1 latency="53.721µs" method=GET status=200 url=/readyz
12:46PM INF Success ip=127.0.0.1 latency="63.469µs" method=GET status=200 url=/readyz
12:47PM INF Success ip=127.0.0.1 latency="47.048µs" method=GET status=200 url=/readyz
12:48PM INF Success ip=127.0.0.1 latency="53.771µs" method=GET status=200 url=/readyz
12:49PM INF Success ip=127.0.0.1 latency="48.661µs" method=GET status=200 url=/readyz

Additional Information

  • Manual requests from within the Open WebUI container to the reranker endpoint with the correct JSON format work as expected.
  • Only requests generated by Open WebUI fail due to data shape mismatch.
  • Environment: Open WebUI (latest as of 2025-08-02), reranker backend: LocalAI (bge-reranker-v2-m3), Docker Compose.
Originally created by @frost19k on GitHub (Aug 2, 2025). Original GitHub issue: https://github.com/open-webui/open-webui/issues/16228 ### 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 0.6.18 ### Ollama Version (if applicable) _No response_ ### Operating System Manjaro Linux ### Browser (if applicable) Firefox ### 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 Open WebUI should POST a JSON object with `model`, `query`, `documents` (list of strings), and `top_n` fields to the reranker endpoint, matching the OpenAI style API, ensuring compatibility with external reranking backends like LocalAI or llama.cpp. ### Actual Behavior The reranker endpoint receives a different format (such as a list of tuples or an unexpected structure), causing it to return a server error. Manual requests with the correct JSON succeed, but Open WebUI's requests fail due to a data shape mismatch. ### Steps to Reproduce 1. Configure Open WebUI to use an external reranking API (e.g., LocalAI with a reranker model). 2. Run a query that triggers reranking. 3. Observe 500 Server Error in logs from the reranker backend. 4. Manually POST the correct JSON (as above) to the reranker endpoint and observe that it succeeds. ### Logs & Screenshots See attached server logs from both Open WebUI and embeddings-api containers. Example error: `500 Server Error: Internal Server Error for url: http://embeddings-api:8080/v1/rerank` <details> <summary>Open WebUI Logs</summary> ```Bash 2025-08-02 12:27:40.550 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 172.18.0.1:50258 - "POST /api/v1/chats/new HTTP/1.1" 200 - {} 2025-08-02 12:27:40.619 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 172.18.0.1:50258 - "GET /api/v1/chats/?page=2 HTTP/1.1" 200 - {} 2025-08-02 12:27:40.638 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 172.18.0.1:50264 - "GET /api/v1/folders/ HTTP/1.1" 200 - {} 2025-08-02 12:27:40.648 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 172.18.0.1:50258 - "POST /api/v1/chats/9fca9d9c-5c51-4754-a450-b47a94c82f1c HTTP/1.1" 200 - {} 2025-08-02 12:27:40.658 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 172.18.0.1:50258 - "GET /api/v1/chats/?page=1 HTTP/1.1" 200 - {} 2025-08-02 12:27:40.671 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 172.18.0.1:50258 - "GET /api/v1/folders/ HTTP/1.1" 200 - {} 2025-08-02 12:27:41.124 | INFO | open_webui.routers.openai:get_all_models:392 - get_all_models() - {} 2025-08-02 12:27:42.803 | INFO | open_webui.retrieval.utils:query_collection_with_hybrid_search:352 - Starting hybrid search for 3 queries in 1 collections... - {} /usr/local/lib/python3.11/site-packages/langchain/__init__.py:30: UserWarning: Importing debug from langchain root module is no longer supported. Please use langchain.globals.set_debug() / langchain.globals.get_debug() instead. warnings.warn( /usr/local/lib/python3.11/site-packages/langchain/__init__.py:30: UserWarning: Importing debug from langchain root module is no longer supported. Please use langchain.globals.set_debug() / langchain.globals.get_debug() instead. warnings.warn( 2025-08-02 12:27:44.085 | INFO | open_webui.retrieval.models.external:predict:40 - ExternalReranker:predict:model bge-reranker-v2-m3 - {} 2025-08-02 12:27:44.086 | INFO | open_webui.retrieval.models.external:predict:41 - ExternalReranker:predict:query Cross Site Scripting vulnerabilities exploit mechanisms - {} 2025-08-02 12:27:44.101 | INFO | open_webui.retrieval.models.external:predict:40 - ExternalReranker:predict:model bge-reranker-v2-m3 - {} 2025-08-02 12:27:44.101 | INFO | open_webui.retrieval.models.external:predict:41 - ExternalReranker:predict:query Cross Site Scripting prevention techniques - {} 2025-08-02 12:27:44.108 | INFO | open_webui.retrieval.models.external:predict:40 - ExternalReranker:predict:model bge-reranker-v2-m3 - {} 2025-08-02 12:27:44.108 | INFO | open_webui.retrieval.models.external:predict:41 - ExternalReranker:predict:query XSS attack examples with code - {} 2025-08-02 12:27:47.053 | ERROR | open_webui.retrieval.models.external:predict:73 - Error in external reranking: 500 Server Error: Internal Server Error for url: http://embeddings-api:8080/v1/rerank - {} Traceback (most recent call last): File "/usr/local/lib/python3.11/threading.py", line 1002, in _bootstrap self._bootstrap_inner() │ └ <function Thread._bootstrap_inner at 0x7f50889d49a0> └ <Thread(ThreadPoolExecutor-3_0, started 139980247848640)> File "/usr/local/lib/python3.11/threading.py", line 1045, in _bootstrap_inner self.run() │ └ <function Thread.run at 0x7f50889d4680> └ <Thread(ThreadPoolExecutor-3_0, started 139980247848640)> File "/usr/local/lib/python3.11/threading.py", line 982, in run self._target(*self._args, **self._kwargs) │ │ │ │ │ └ {} │ │ │ │ └ <Thread(ThreadPoolExecutor-3_0, started 139980247848640)> │ │ │ └ (<weakref at 0x7f4fb2ac3330; to 'ThreadPoolExecutor' at 0x7f4fc0cd9fd0>, <_queue.SimpleQueue object at 0x7f4fb067d760>, None,... │ │ └ <Thread(ThreadPoolExecutor-3_0, started 139980247848640)> │ └ <function _worker at 0x7f50878e7d80> └ <Thread(ThreadPoolExecutor-3_0, started 139980247848640)> File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 83, in _worker work_item.run() │ └ <function _WorkItem.run at 0x7f50878e7ec0> └ <concurrent.futures.thread._WorkItem object at 0x7f4fb2b52450> File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, **self.kwargs) │ │ │ │ │ └ {} │ │ │ │ └ <concurrent.futures.thread._WorkItem object at 0x7f4fb2b52450> │ │ │ └ ('03ab71f2-4a00-453e-8a03-227ae510d540', 'Cross Site Scripting vulnerabilities exploit mechanisms') │ │ └ <concurrent.futures.thread._WorkItem object at 0x7f4fb2b52450> │ └ <function query_collection_with_hybrid_search.<locals>.process_query at 0x7f4fb06ea2a0> └ <concurrent.futures.thread._WorkItem object at 0x7f4fb2b52450> File "/app/backend/open_webui/retrieval/utils.py", line 358, in process_query result = query_doc_with_hybrid_search( └ <function query_doc_with_hybrid_search at 0x7f5024cac400> File "/app/backend/open_webui/retrieval/utils.py", line 165, in query_doc_with_hybrid_search result = compression_retriever.invoke(query) │ │ └ 'Cross Site Scripting vulnerabilities exploit mechanisms' │ └ <function BaseRetriever.invoke at 0x7f5024e78ea0> └ ContextualCompressionRetriever(base_compressor=RerankCompressor(embedding_function=<function chat_completion_files_handler.<l... File "/usr/local/lib/python3.11/site-packages/langchain_core/retrievers.py", line 259, in invoke result = self._get_relevant_documents( │ └ <function ContextualCompressionRetriever._get_relevant_documents at 0x7f5024e78720> └ ContextualCompressionRetriever(base_compressor=RerankCompressor(embedding_function=<function chat_completion_files_handler.<l... File "/usr/local/lib/python3.11/site-packages/langchain/retrievers/contextual_compression.py", line 44, in _get_relevant_documents compressed_docs = self.base_compressor.compress_documents( │ │ └ <function RerankCompressor.compress_documents at 0x7f5024cacd60> │ └ RerankCompressor(embedding_function=<function chat_completion_files_handler.<locals>.<lambda>.<locals>.<lambda> at 0x7f4fb06e... └ ContextualCompressionRetriever(base_compressor=RerankCompressor(embedding_function=<function chat_completion_files_handler.<l... File "/app/backend/open_webui/retrieval/utils.py", line 946, in compress_documents scores = self.reranking_function( │ └ <function chat_completion_files_handler.<locals>.<lambda>.<locals>.<lambda> at 0x7f4fb06eb9c0> └ RerankCompressor(embedding_function=<function chat_completion_files_handler.<locals>.<lambda>.<locals>.<lambda> at 0x7f4fb06e... File "/app/backend/open_webui/utils/middleware.py", line 657, in <lambda> lambda sentences: request.app.state.RERANKING_FUNCTION( │ │ └ <property object at 0x7f5084eceac0> │ └ <starlette.requests.Request object at 0x7f4fb068f0d0> └ [('Cross Site Scripting vulnerabilities exploit mechanisms', 'In some cases it is possible that signature-based filters can b... File "/app/backend/open_webui/retrieval/utils.py", line 452, in <lambda> return lambda sentences, user=None: reranking_function.predict( │ │ └ <function ExternalReranker.predict at 0x7f501d132ac0> │ └ <open_webui.retrieval.models.external.ExternalReranker object at 0x7f4fc0484f10> └ [('Cross Site Scripting vulnerabilities exploit mechanisms', 'In some cases it is possible that signature-based filters can b... > File "/app/backend/open_webui/retrieval/models/external.py", line 62, in predict r.raise_for_status() │ └ <function Response.raise_for_status at 0x7f50852d0860> └ <Response [500]> File "/usr/local/lib/python3.11/site-packages/requests/models.py", line 1026, in raise_for_status raise HTTPError(http_error_msg, response=self) │ │ └ <Response [500]> │ └ '500 Server Error: Internal Server Error for url: http://embeddings-api:8080/v1/rerank' └ <class 'requests.exceptions.HTTPError'> requests.exceptions.HTTPError: 500 Server Error: Internal Server Error for url: http://embeddings-api:8080/v1/rerank 2025-08-02 12:27:47.064 | ERROR | open_webui.retrieval.utils:query_doc_with_hybrid_search:191 - Error querying doc 03ab71f2-4a00-453e-8a03-227ae510d540 with hybrid search: 'NoneType' object has no attribute 'tolist' - {} Traceback (most recent call last): File "/usr/local/lib/python3.11/threading.py", line 1002, in _bootstrap self._bootstrap_inner() │ └ <function Thread._bootstrap_inner at 0x7f50889d49a0> └ <Thread(ThreadPoolExecutor-3_0, started 139980247848640)> File "/usr/local/lib/python3.11/threading.py", line 1045, in _bootstrap_inner self.run() │ └ <function Thread.run at 0x7f50889d4680> └ <Thread(ThreadPoolExecutor-3_0, started 139980247848640)> File "/usr/local/lib/python3.11/threading.py", line 982, in run self._target(*self._args, **self._kwargs) │ │ │ │ │ └ {} │ │ │ │ └ <Thread(ThreadPoolExecutor-3_0, started 139980247848640)> │ │ │ └ (<weakref at 0x7f4fb2ac3330; to 'ThreadPoolExecutor' at 0x7f4fc0cd9fd0>, <_queue.SimpleQueue object at 0x7f4fb067d760>, None,... │ │ └ <Thread(ThreadPoolExecutor-3_0, started 139980247848640)> │ └ <function _worker at 0x7f50878e7d80> └ <Thread(ThreadPoolExecutor-3_0, started 139980247848640)> File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 83, in _worker work_item.run() │ └ <function _WorkItem.run at 0x7f50878e7ec0> └ <concurrent.futures.thread._WorkItem object at 0x7f4fb2b52450> File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, **self.kwargs) │ │ │ │ │ └ {} │ │ │ │ └ <concurrent.futures.thread._WorkItem object at 0x7f4fb2b52450> │ │ │ └ ('03ab71f2-4a00-453e-8a03-227ae510d540', 'Cross Site Scripting vulnerabilities exploit mechanisms') │ │ └ <concurrent.futures.thread._WorkItem object at 0x7f4fb2b52450> │ └ <function query_collection_with_hybrid_search.<locals>.process_query at 0x7f4fb06ea2a0> └ <concurrent.futures.thread._WorkItem object at 0x7f4fb2b52450> File "/app/backend/open_webui/retrieval/utils.py", line 358, in process_query result = query_doc_with_hybrid_search( └ <function query_doc_with_hybrid_search at 0x7f5024cac400> > File "/app/backend/open_webui/retrieval/utils.py", line 165, in query_doc_with_hybrid_search result = compression_retriever.invoke(query) │ │ └ 'Cross Site Scripting vulnerabilities exploit mechanisms' │ └ <function BaseRetriever.invoke at 0x7f5024e78ea0> └ ContextualCompressionRetriever(base_compressor=RerankCompressor(embedding_function=<function chat_completion_files_handler.<l... File "/usr/local/lib/python3.11/site-packages/langchain_core/retrievers.py", line 259, in invoke result = self._get_relevant_documents( │ └ <function ContextualCompressionRetriever._get_relevant_documents at 0x7f5024e78720> └ ContextualCompressionRetriever(base_compressor=RerankCompressor(embedding_function=<function chat_completion_files_handler.<l... File "/usr/local/lib/python3.11/site-packages/langchain/retrievers/contextual_compression.py", line 44, in _get_relevant_documents compressed_docs = self.base_compressor.compress_documents( │ │ └ <function RerankCompressor.compress_documents at 0x7f5024cacd60> │ └ RerankCompressor(embedding_function=<function chat_completion_files_handler.<locals>.<lambda>.<locals>.<lambda> at 0x7f4fb06e... └ ContextualCompressionRetriever(base_compressor=RerankCompressor(embedding_function=<function chat_completion_files_handler.<l... File "/app/backend/open_webui/retrieval/utils.py", line 959, in compress_documents zip(documents, scores.tolist() if not isinstance(scores, list) else scores) │ │ │ └ None │ │ └ None │ └ None └ [Document(metadata={'created_by': 'ce2468e4-7c9c-45e6-9c40-5f916effa88c', 'embedding_config': '{"engine": "openai", "model": ... AttributeError: 'NoneType' object has no attribute 'tolist' 2025-08-02 12:27:47.066 | ERROR | open_webui.retrieval.utils:process_query:371 - Error when querying the collection with hybrid_search: 'NoneType' object has no attribute 'tolist' - {} Traceback (most recent call last): File "/usr/local/lib/python3.11/threading.py", line 1002, in _bootstrap self._bootstrap_inner() │ └ <function Thread._bootstrap_inner at 0x7f50889d49a0> └ <Thread(ThreadPoolExecutor-3_0, started 139980247848640)> File "/usr/local/lib/python3.11/threading.py", line 1045, in _bootstrap_inner self.run() │ └ <function Thread.run at 0x7f50889d4680> └ <Thread(ThreadPoolExecutor-3_0, started 139980247848640)> File "/usr/local/lib/python3.11/threading.py", line 982, in run self._target(*self._args, **self._kwargs) │ │ │ │ │ └ {} │ │ │ │ └ <Thread(ThreadPoolExecutor-3_0, started 139980247848640)> │ │ │ └ (<weakref at 0x7f4fb2ac3330; to 'ThreadPoolExecutor' at 0x7f4fc0cd9fd0>, <_queue.SimpleQueue object at 0x7f4fb067d760>, None,... │ │ └ <Thread(ThreadPoolExecutor-3_0, started 139980247848640)> │ └ <function _worker at 0x7f50878e7d80> └ <Thread(ThreadPoolExecutor-3_0, started 139980247848640)> File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 83, in _worker work_item.run() │ └ <function _WorkItem.run at 0x7f50878e7ec0> └ <concurrent.futures.thread._WorkItem object at 0x7f4fb2b52450> File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, **self.kwargs) │ │ │ │ │ └ {} │ │ │ │ └ <concurrent.futures.thread._WorkItem object at 0x7f4fb2b52450> │ │ │ └ ('03ab71f2-4a00-453e-8a03-227ae510d540', 'Cross Site Scripting vulnerabilities exploit mechanisms') │ │ └ <concurrent.futures.thread._WorkItem object at 0x7f4fb2b52450> │ └ <function query_collection_with_hybrid_search.<locals>.process_query at 0x7f4fb06ea2a0> └ <concurrent.futures.thread._WorkItem object at 0x7f4fb2b52450> > File "/app/backend/open_webui/retrieval/utils.py", line 358, in process_query result = query_doc_with_hybrid_search( └ <function query_doc_with_hybrid_search at 0x7f5024cac400> File "/app/backend/open_webui/retrieval/utils.py", line 192, in query_doc_with_hybrid_search raise e File "/app/backend/open_webui/retrieval/utils.py", line 165, in query_doc_with_hybrid_search result = compression_retriever.invoke(query) │ │ └ 'Cross Site Scripting vulnerabilities exploit mechanisms' │ └ <function BaseRetriever.invoke at 0x7f5024e78ea0> └ ContextualCompressionRetriever(base_compressor=RerankCompressor(embedding_function=<function chat_completion_files_handler.<l... File "/usr/local/lib/python3.11/site-packages/langchain_core/retrievers.py", line 259, in invoke result = self._get_relevant_documents( │ └ <function ContextualCompressionRetriever._get_relevant_documents at 0x7f5024e78720> └ ContextualCompressionRetriever(base_compressor=RerankCompressor(embedding_function=<function chat_completion_files_handler.<l... File "/usr/local/lib/python3.11/site-packages/langchain/retrievers/contextual_compression.py", line 44, in _get_relevant_documents compressed_docs = self.base_compressor.compress_documents( │ │ └ <function RerankCompressor.compress_documents at 0x7f5024cacd60> │ └ RerankCompressor(embedding_function=<function chat_completion_files_handler.<locals>.<lambda>.<locals>.<lambda> at 0x7f4fb06e... └ ContextualCompressionRetriever(base_compressor=RerankCompressor(embedding_function=<function chat_completion_files_handler.<l... File "/app/backend/open_webui/retrieval/utils.py", line 959, in compress_documents zip(documents, scores.tolist() if not isinstance(scores, list) else scores) │ │ │ └ None │ │ └ None │ └ None └ [Document(metadata={'created_by': 'ce2468e4-7c9c-45e6-9c40-5f916effa88c', 'embedding_config': '{"engine": "openai", "model": ... AttributeError: 'NoneType' object has no attribute 'tolist' 2025-08-02 12:27:47.077 | ERROR | open_webui.retrieval.models.external:predict:73 - Error in external reranking: 500 Server Error: Internal Server Error for url: http://embeddings-api:8080/v1/rerank - {} Traceback (most recent call last): File "/usr/local/lib/python3.11/threading.py", line 1002, in _bootstrap self._bootstrap_inner() │ └ <function Thread._bootstrap_inner at 0x7f50889d49a0> └ <Thread(ThreadPoolExecutor-3_1, started 139979485341376)> File "/usr/local/lib/python3.11/threading.py", line 1045, in _bootstrap_inner self.run() │ └ <function Thread.run at 0x7f50889d4680> └ <Thread(ThreadPoolExecutor-3_1, started 139979485341376)> File "/usr/local/lib/python3.11/threading.py", line 982, in run self._target(*self._args, **self._kwargs) │ │ │ │ │ └ {} │ │ │ │ └ <Thread(ThreadPoolExecutor-3_1, started 139979485341376)> │ │ │ └ (<weakref at 0x7f4fb2ac3880; to 'ThreadPoolExecutor' at 0x7f4fc0cd9fd0>, <_queue.SimpleQueue object at 0x7f4fb067d760>, None,... │ │ └ <Thread(ThreadPoolExecutor-3_1, started 139979485341376)> │ └ <function _worker at 0x7f50878e7d80> └ <Thread(ThreadPoolExecutor-3_1, started 139979485341376)> File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 83, in _worker work_item.run() │ └ <function _WorkItem.run at 0x7f50878e7ec0> └ <concurrent.futures.thread._WorkItem object at 0x7f4fc0088550> File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, **self.kwargs) │ │ │ │ │ └ {} │ │ │ │ └ <concurrent.futures.thread._WorkItem object at 0x7f4fc0088550> │ │ │ └ ('03ab71f2-4a00-453e-8a03-227ae510d540', 'XSS attack examples with code') │ │ └ <concurrent.futures.thread._WorkItem object at 0x7f4fc0088550> │ └ <function query_collection_with_hybrid_search.<locals>.process_query at 0x7f4fb06ea2a0> └ <concurrent.futures.thread._WorkItem object at 0x7f4fc0088550> File "/app/backend/open_webui/retrieval/utils.py", line 358, in process_query result = query_doc_with_hybrid_search( └ <function query_doc_with_hybrid_search at 0x7f5024cac400> File "/app/backend/open_webui/retrieval/utils.py", line 165, in query_doc_with_hybrid_search result = compression_retriever.invoke(query) │ │ └ 'XSS attack examples with code' │ └ <function BaseRetriever.invoke at 0x7f5024e78ea0> └ ContextualCompressionRetriever(base_compressor=RerankCompressor(embedding_function=<function chat_completion_files_handler.<l... File "/usr/local/lib/python3.11/site-packages/langchain_core/retrievers.py", line 259, in invoke result = self._get_relevant_documents( │ └ <function ContextualCompressionRetriever._get_relevant_documents at 0x7f5024e78720> └ ContextualCompressionRetriever(base_compressor=RerankCompressor(embedding_function=<function chat_completion_files_handler.<l... File "/usr/local/lib/python3.11/site-packages/langchain/retrievers/contextual_compression.py", line 44, in _get_relevant_documents compressed_docs = self.base_compressor.compress_documents( │ │ └ <function RerankCompressor.compress_documents at 0x7f5024cacd60> │ └ RerankCompressor(embedding_function=<function chat_completion_files_handler.<locals>.<lambda>.<locals>.<lambda> at 0x7f4fb06e... └ ContextualCompressionRetriever(base_compressor=RerankCompressor(embedding_function=<function chat_completion_files_handler.<l... File "/app/backend/open_webui/retrieval/utils.py", line 946, in compress_documents scores = self.reranking_function( │ └ <function chat_completion_files_handler.<locals>.<lambda>.<locals>.<lambda> at 0x7f4fb06eb9c0> └ RerankCompressor(embedding_function=<function chat_completion_files_handler.<locals>.<lambda>.<locals>.<lambda> at 0x7f4fb06e... File "/app/backend/open_webui/utils/middleware.py", line 657, in <lambda> lambda sentences: request.app.state.RERANKING_FUNCTION( │ │ └ <property object at 0x7f5084eceac0> │ └ <starlette.requests.Request object at 0x7f4fb068f0d0> └ [('XSS attack examples with code', '|ID |\n|------------|\n|WSTG-INPV-02|\n\n## Summary\n\nStored [Cross-site Script... File "/app/backend/open_webui/retrieval/utils.py", line 452, in <lambda> return lambda sentences, user=None: reranking_function.predict( │ │ └ <function ExternalReranker.predict at 0x7f501d132ac0> │ └ <open_webui.retrieval.models.external.ExternalReranker object at 0x7f4fc0484f10> └ [('XSS attack examples with code', '|ID |\n|------------|\n|WSTG-INPV-02|\n\n## Summary\n\nStored [Cross-site Script... > File "/app/backend/open_webui/retrieval/models/external.py", line 62, in predict r.raise_for_status() │ └ <function Response.raise_for_status at 0x7f50852d0860> └ <Response [500]> File "/usr/local/lib/python3.11/site-packages/requests/models.py", line 1026, in raise_for_status raise HTTPError(http_error_msg, response=self) │ │ └ <Response [500]> │ └ '500 Server Error: Internal Server Error for url: http://embeddings-api:8080/v1/rerank' └ <class 'requests.exceptions.HTTPError'> requests.exceptions.HTTPError: 500 Server Error: Internal Server Error for url: http://embeddings-api:8080/v1/rerank 2025-08-02 12:27:47.079 | ERROR | open_webui.retrieval.utils:query_doc_with_hybrid_search:191 - Error querying doc 03ab71f2-4a00-453e-8a03-227ae510d540 with hybrid search: 'NoneType' object has no attribute 'tolist' - {} Traceback (most recent call last): File "/usr/local/lib/python3.11/threading.py", line 1002, in _bootstrap self._bootstrap_inner() │ └ <function Thread._bootstrap_inner at 0x7f50889d49a0> └ <Thread(ThreadPoolExecutor-3_1, started 139979485341376)> File "/usr/local/lib/python3.11/threading.py", line 1045, in _bootstrap_inner self.run() │ └ <function Thread.run at 0x7f50889d4680> └ <Thread(ThreadPoolExecutor-3_1, started 139979485341376)> File "/usr/local/lib/python3.11/threading.py", line 982, in run self._target(*self._args, **self._kwargs) │ │ │ │ │ └ {} │ │ │ │ └ <Thread(ThreadPoolExecutor-3_1, started 139979485341376)> │ │ │ └ (<weakref at 0x7f4fb2ac3880; to 'ThreadPoolExecutor' at 0x7f4fc0cd9fd0>, <_queue.SimpleQueue object at 0x7f4fb067d760>, None,... │ │ └ <Thread(ThreadPoolExecutor-3_1, started 139979485341376)> │ └ <function _worker at 0x7f50878e7d80> └ <Thread(ThreadPoolExecutor-3_1, started 139979485341376)> File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 83, in _worker work_item.run() │ └ <function _WorkItem.run at 0x7f50878e7ec0> └ <concurrent.futures.thread._WorkItem object at 0x7f4fc0088550> File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, **self.kwargs) │ │ │ │ │ └ {} │ │ │ │ └ <concurrent.futures.thread._WorkItem object at 0x7f4fc0088550> │ │ │ └ ('03ab71f2-4a00-453e-8a03-227ae510d540', 'XSS attack examples with code') │ │ └ <concurrent.futures.thread._WorkItem object at 0x7f4fc0088550> │ └ <function query_collection_with_hybrid_search.<locals>.process_query at 0x7f4fb06ea2a0> └ <concurrent.futures.thread._WorkItem object at 0x7f4fc0088550> File "/app/backend/open_webui/retrieval/utils.py", line 358, in process_query result = query_doc_with_hybrid_search( └ <function query_doc_with_hybrid_search at 0x7f5024cac400> > File "/app/backend/open_webui/retrieval/utils.py", line 165, in query_doc_with_hybrid_search result = compression_retriever.invoke(query) │ │ └ 'XSS attack examples with code' │ └ <function BaseRetriever.invoke at 0x7f5024e78ea0> └ ContextualCompressionRetriever(base_compressor=RerankCompressor(embedding_function=<function chat_completion_files_handler.<l... File "/usr/local/lib/python3.11/site-packages/langchain_core/retrievers.py", line 259, in invoke result = self._get_relevant_documents( │ └ <function ContextualCompressionRetriever._get_relevant_documents at 0x7f5024e78720> └ ContextualCompressionRetriever(base_compressor=RerankCompressor(embedding_function=<function chat_completion_files_handler.<l... File "/usr/local/lib/python3.11/site-packages/langchain/retrievers/contextual_compression.py", line 44, in _get_relevant_documents compressed_docs = self.base_compressor.compress_documents( │ │ └ <function RerankCompressor.compress_documents at 0x7f5024cacd60> │ └ RerankCompressor(embedding_function=<function chat_completion_files_handler.<locals>.<lambda>.<locals>.<lambda> at 0x7f4fb06e... └ ContextualCompressionRetriever(base_compressor=RerankCompressor(embedding_function=<function chat_completion_files_handler.<l... File "/app/backend/open_webui/retrieval/utils.py", line 959, in compress_documents zip(documents, scores.tolist() if not isinstance(scores, list) else scores) │ │ │ └ None │ │ └ None │ └ None └ [Document(metadata={'created_by': 'ce2468e4-7c9c-45e6-9c40-5f916effa88c', 'embedding_config': '{"engine": "openai", "model": ... AttributeError: 'NoneType' object has no attribute 'tolist' 2025-08-02 12:27:47.081 | ERROR | open_webui.retrieval.utils:process_query:371 - Error when querying the collection with hybrid_search: 'NoneType' object has no attribute 'tolist' - {} Traceback (most recent call last): File "/usr/local/lib/python3.11/threading.py", line 1002, in _bootstrap self._bootstrap_inner() │ └ <function Thread._bootstrap_inner at 0x7f50889d49a0> └ <Thread(ThreadPoolExecutor-3_1, started 139979485341376)> File "/usr/local/lib/python3.11/threading.py", line 1045, in _bootstrap_inner self.run() │ └ <function Thread.run at 0x7f50889d4680> └ <Thread(ThreadPoolExecutor-3_1, started 139979485341376)> File "/usr/local/lib/python3.11/threading.py", line 982, in run self._target(*self._args, **self._kwargs) │ │ │ │ │ └ {} │ │ │ │ └ <Thread(ThreadPoolExecutor-3_1, started 139979485341376)> │ │ │ └ (<weakref at 0x7f4fb2ac3880; to 'ThreadPoolExecutor' at 0x7f4fc0cd9fd0>, <_queue.SimpleQueue object at 0x7f4fb067d760>, None,... │ │ └ <Thread(ThreadPoolExecutor-3_1, started 139979485341376)> │ └ <function _worker at 0x7f50878e7d80> └ <Thread(ThreadPoolExecutor-3_1, started 139979485341376)> File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 83, in _worker work_item.run() │ └ <function _WorkItem.run at 0x7f50878e7ec0> └ <concurrent.futures.thread._WorkItem object at 0x7f4fc0088550> File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, **self.kwargs) │ │ │ │ │ └ {} │ │ │ │ └ <concurrent.futures.thread._WorkItem object at 0x7f4fc0088550> │ │ │ └ ('03ab71f2-4a00-453e-8a03-227ae510d540', 'XSS attack examples with code') │ │ └ <concurrent.futures.thread._WorkItem object at 0x7f4fc0088550> │ └ <function query_collection_with_hybrid_search.<locals>.process_query at 0x7f4fb06ea2a0> └ <concurrent.futures.thread._WorkItem object at 0x7f4fc0088550> > File "/app/backend/open_webui/retrieval/utils.py", line 358, in process_query result = query_doc_with_hybrid_search( └ <function query_doc_with_hybrid_search at 0x7f5024cac400> File "/app/backend/open_webui/retrieval/utils.py", line 192, in query_doc_with_hybrid_search raise e File "/app/backend/open_webui/retrieval/utils.py", line 165, in query_doc_with_hybrid_search result = compression_retriever.invoke(query) │ │ └ 'XSS attack examples with code' │ └ <function BaseRetriever.invoke at 0x7f5024e78ea0> └ ContextualCompressionRetriever(base_compressor=RerankCompressor(embedding_function=<function chat_completion_files_handler.<l... File "/usr/local/lib/python3.11/site-packages/langchain_core/retrievers.py", line 259, in invoke result = self._get_relevant_documents( │ └ <function ContextualCompressionRetriever._get_relevant_documents at 0x7f5024e78720> └ ContextualCompressionRetriever(base_compressor=RerankCompressor(embedding_function=<function chat_completion_files_handler.<l... File "/usr/local/lib/python3.11/site-packages/langchain/retrievers/contextual_compression.py", line 44, in _get_relevant_documents compressed_docs = self.base_compressor.compress_documents( │ │ └ <function RerankCompressor.compress_documents at 0x7f5024cacd60> │ └ RerankCompressor(embedding_function=<function chat_completion_files_handler.<locals>.<lambda>.<locals>.<lambda> at 0x7f4fb06e... └ ContextualCompressionRetriever(base_compressor=RerankCompressor(embedding_function=<function chat_completion_files_handler.<l... File "/app/backend/open_webui/retrieval/utils.py", line 959, in compress_documents zip(documents, scores.tolist() if not isinstance(scores, list) else scores) │ │ │ └ None │ │ └ None │ └ None └ [Document(metadata={'created_by': 'ce2468e4-7c9c-45e6-9c40-5f916effa88c', 'embedding_config': '{"engine": "openai", "model": ... AttributeError: 'NoneType' object has no attribute 'tolist' 2025-08-02 12:27:47.102 | ERROR | open_webui.retrieval.models.external:predict:73 - Error in external reranking: 500 Server Error: Internal Server Error for url: http://embeddings-api:8080/v1/rerank - {} Traceback (most recent call last): File "/usr/local/lib/python3.11/threading.py", line 1002, in _bootstrap self._bootstrap_inner() │ └ <function Thread._bootstrap_inner at 0x7f50889d49a0> └ <Thread(ThreadPoolExecutor-3_2, started 139980097713856)> File "/usr/local/lib/python3.11/threading.py", line 1045, in _bootstrap_inner self.run() │ └ <function Thread.run at 0x7f50889d4680> └ <Thread(ThreadPoolExecutor-3_2, started 139980097713856)> File "/usr/local/lib/python3.11/threading.py", line 982, in run self._target(*self._args, **self._kwargs) │ │ │ │ │ └ {} │ │ │ │ └ <Thread(ThreadPoolExecutor-3_2, started 139980097713856)> │ │ │ └ (<weakref at 0x7f4fb2ac3ce0; to 'ThreadPoolExecutor' at 0x7f4fc0cd9fd0>, <_queue.SimpleQueue object at 0x7f4fb067d760>, None,... │ │ └ <Thread(ThreadPoolExecutor-3_2, started 139980097713856)> │ └ <function _worker at 0x7f50878e7d80> └ <Thread(ThreadPoolExecutor-3_2, started 139980097713856)> File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 83, in _worker work_item.run() │ └ <function _WorkItem.run at 0x7f50878e7ec0> └ <concurrent.futures.thread._WorkItem object at 0x7f4fc0089450> File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, **self.kwargs) │ │ │ │ │ └ {} │ │ │ │ └ <concurrent.futures.thread._WorkItem object at 0x7f4fc0089450> │ │ │ └ ('03ab71f2-4a00-453e-8a03-227ae510d540', 'Cross Site Scripting prevention techniques') │ │ └ <concurrent.futures.thread._WorkItem object at 0x7f4fc0089450> │ └ <function query_collection_with_hybrid_search.<locals>.process_query at 0x7f4fb06ea2a0> └ <concurrent.futures.thread._WorkItem object at 0x7f4fc0089450> File "/app/backend/open_webui/retrieval/utils.py", line 358, in process_query result = query_doc_with_hybrid_search( └ <function query_doc_with_hybrid_search at 0x7f5024cac400> File "/app/backend/open_webui/retrieval/utils.py", line 165, in query_doc_with_hybrid_search result = compression_retriever.invoke(query) │ │ └ 'Cross Site Scripting prevention techniques' │ └ <function BaseRetriever.invoke at 0x7f5024e78ea0> └ ContextualCompressionRetriever(base_compressor=RerankCompressor(embedding_function=<function chat_completion_files_handler.<l... File "/usr/local/lib/python3.11/site-packages/langchain_core/retrievers.py", line 259, in invoke result = self._get_relevant_documents( │ └ <function ContextualCompressionRetriever._get_relevant_documents at 0x7f5024e78720> └ ContextualCompressionRetriever(base_compressor=RerankCompressor(embedding_function=<function chat_completion_files_handler.<l... File "/usr/local/lib/python3.11/site-packages/langchain/retrievers/contextual_compression.py", line 44, in _get_relevant_documents compressed_docs = self.base_compressor.compress_documents( │ │ └ <function RerankCompressor.compress_documents at 0x7f5024cacd60> │ └ RerankCompressor(embedding_function=<function chat_completion_files_handler.<locals>.<lambda>.<locals>.<lambda> at 0x7f4fb06e... └ ContextualCompressionRetriever(base_compressor=RerankCompressor(embedding_function=<function chat_completion_files_handler.<l... File "/app/backend/open_webui/retrieval/utils.py", line 946, in compress_documents scores = self.reranking_function( │ └ <function chat_completion_files_handler.<locals>.<lambda>.<locals>.<lambda> at 0x7f4fb06eb9c0> └ RerankCompressor(embedding_function=<function chat_completion_files_handler.<locals>.<lambda>.<locals>.<lambda> at 0x7f4fb06e... File "/app/backend/open_webui/utils/middleware.py", line 657, in <lambda> lambda sentences: request.app.state.RERANKING_FUNCTION( │ │ └ <property object at 0x7f5084eceac0> │ └ <starlette.requests.Request object at 0x7f4fb068f0d0> └ [('Cross Site Scripting prevention techniques', '## Related Test Cases\n\n- [Testing for HTTP Parameter Pollution](../07-Inpu... File "/app/backend/open_webui/retrieval/utils.py", line 452, in <lambda> return lambda sentences, user=None: reranking_function.predict( │ │ └ <function ExternalReranker.predict at 0x7f501d132ac0> │ └ <open_webui.retrieval.models.external.ExternalReranker object at 0x7f4fc0484f10> └ [('Cross Site Scripting prevention techniques', '## Related Test Cases\n\n- [Testing for HTTP Parameter Pollution](../07-Inpu... > File "/app/backend/open_webui/retrieval/models/external.py", line 62, in predict r.raise_for_status() │ └ <function Response.raise_for_status at 0x7f50852d0860> └ <Response [500]> File "/usr/local/lib/python3.11/site-packages/requests/models.py", line 1026, in raise_for_status raise HTTPError(http_error_msg, response=self) │ │ └ <Response [500]> │ └ '500 Server Error: Internal Server Error for url: http://embeddings-api:8080/v1/rerank' └ <class 'requests.exceptions.HTTPError'> requests.exceptions.HTTPError: 500 Server Error: Internal Server Error for url: http://embeddings-api:8080/v1/rerank 2025-08-02 12:27:47.104 | ERROR | open_webui.retrieval.utils:query_doc_with_hybrid_search:191 - Error querying doc 03ab71f2-4a00-453e-8a03-227ae510d540 with hybrid search: 'NoneType' object has no attribute 'tolist' - {} Traceback (most recent call last): File "/usr/local/lib/python3.11/threading.py", line 1002, in _bootstrap self._bootstrap_inner() │ └ <function Thread._bootstrap_inner at 0x7f50889d49a0> └ <Thread(ThreadPoolExecutor-3_2, started 139980097713856)> File "/usr/local/lib/python3.11/threading.py", line 1045, in _bootstrap_inner self.run() │ └ <function Thread.run at 0x7f50889d4680> └ <Thread(ThreadPoolExecutor-3_2, started 139980097713856)> File "/usr/local/lib/python3.11/threading.py", line 982, in run self._target(*self._args, **self._kwargs) │ │ │ │ │ └ {} │ │ │ │ └ <Thread(ThreadPoolExecutor-3_2, started 139980097713856)> │ │ │ └ (<weakref at 0x7f4fb2ac3ce0; to 'ThreadPoolExecutor' at 0x7f4fc0cd9fd0>, <_queue.SimpleQueue object at 0x7f4fb067d760>, None,... │ │ └ <Thread(ThreadPoolExecutor-3_2, started 139980097713856)> │ └ <function _worker at 0x7f50878e7d80> └ <Thread(ThreadPoolExecutor-3_2, started 139980097713856)> File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 83, in _worker work_item.run() │ └ <function _WorkItem.run at 0x7f50878e7ec0> └ <concurrent.futures.thread._WorkItem object at 0x7f4fc0089450> File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, **self.kwargs) │ │ │ │ │ └ {} │ │ │ │ └ <concurrent.futures.thread._WorkItem object at 0x7f4fc0089450> │ │ │ └ ('03ab71f2-4a00-453e-8a03-227ae510d540', 'Cross Site Scripting prevention techniques') │ │ └ <concurrent.futures.thread._WorkItem object at 0x7f4fc0089450> │ └ <function query_collection_with_hybrid_search.<locals>.process_query at 0x7f4fb06ea2a0> └ <concurrent.futures.thread._WorkItem object at 0x7f4fc0089450> File "/app/backend/open_webui/retrieval/utils.py", line 358, in process_query result = query_doc_with_hybrid_search( └ <function query_doc_with_hybrid_search at 0x7f5024cac400> > File "/app/backend/open_webui/retrieval/utils.py", line 165, in query_doc_with_hybrid_search result = compression_retriever.invoke(query) │ │ └ 'Cross Site Scripting prevention techniques' │ └ <function BaseRetriever.invoke at 0x7f5024e78ea0> └ ContextualCompressionRetriever(base_compressor=RerankCompressor(embedding_function=<function chat_completion_files_handler.<l... File "/usr/local/lib/python3.11/site-packages/langchain_core/retrievers.py", line 259, in invoke result = self._get_relevant_documents( │ └ <function ContextualCompressionRetriever._get_relevant_documents at 0x7f5024e78720> └ ContextualCompressionRetriever(base_compressor=RerankCompressor(embedding_function=<function chat_completion_files_handler.<l... File "/usr/local/lib/python3.11/site-packages/langchain/retrievers/contextual_compression.py", line 44, in _get_relevant_documents compressed_docs = self.base_compressor.compress_documents( │ │ └ <function RerankCompressor.compress_documents at 0x7f5024cacd60> │ └ RerankCompressor(embedding_function=<function chat_completion_files_handler.<locals>.<lambda>.<locals>.<lambda> at 0x7f4fb06e... └ ContextualCompressionRetriever(base_compressor=RerankCompressor(embedding_function=<function chat_completion_files_handler.<l... File "/app/backend/open_webui/retrieval/utils.py", line 959, in compress_documents zip(documents, scores.tolist() if not isinstance(scores, list) else scores) │ │ │ └ None │ │ └ None │ └ None └ [Document(metadata={'created_by': 'ce2468e4-7c9c-45e6-9c40-5f916effa88c', 'embedding_config': '{"engine": "openai", "model": ... AttributeError: 'NoneType' object has no attribute 'tolist' 2025-08-02 12:27:47.106 | ERROR | open_webui.retrieval.utils:process_query:371 - Error when querying the collection with hybrid_search: 'NoneType' object has no attribute 'tolist' - {} Traceback (most recent call last): File "/usr/local/lib/python3.11/threading.py", line 1002, in _bootstrap self._bootstrap_inner() │ └ <function Thread._bootstrap_inner at 0x7f50889d49a0> └ <Thread(ThreadPoolExecutor-3_2, started 139980097713856)> File "/usr/local/lib/python3.11/threading.py", line 1045, in _bootstrap_inner self.run() │ └ <function Thread.run at 0x7f50889d4680> └ <Thread(ThreadPoolExecutor-3_2, started 139980097713856)> File "/usr/local/lib/python3.11/threading.py", line 982, in run self._target(*self._args, **self._kwargs) │ │ │ │ │ └ {} │ │ │ │ └ <Thread(ThreadPoolExecutor-3_2, started 139980097713856)> │ │ │ └ (<weakref at 0x7f4fb2ac3ce0; to 'ThreadPoolExecutor' at 0x7f4fc0cd9fd0>, <_queue.SimpleQueue object at 0x7f4fb067d760>, None,... │ │ └ <Thread(ThreadPoolExecutor-3_2, started 139980097713856)> │ └ <function _worker at 0x7f50878e7d80> └ <Thread(ThreadPoolExecutor-3_2, started 139980097713856)> File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 83, in _worker work_item.run() │ └ <function _WorkItem.run at 0x7f50878e7ec0> └ <concurrent.futures.thread._WorkItem object at 0x7f4fc0089450> File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, **self.kwargs) │ │ │ │ │ └ {} │ │ │ │ └ <concurrent.futures.thread._WorkItem object at 0x7f4fc0089450> │ │ │ └ ('03ab71f2-4a00-453e-8a03-227ae510d540', 'Cross Site Scripting prevention techniques') │ │ └ <concurrent.futures.thread._WorkItem object at 0x7f4fc0089450> │ └ <function query_collection_with_hybrid_search.<locals>.process_query at 0x7f4fb06ea2a0> └ <concurrent.futures.thread._WorkItem object at 0x7f4fc0089450> > File "/app/backend/open_webui/retrieval/utils.py", line 358, in process_query result = query_doc_with_hybrid_search( └ <function query_doc_with_hybrid_search at 0x7f5024cac400> File "/app/backend/open_webui/retrieval/utils.py", line 192, in query_doc_with_hybrid_search raise e File "/app/backend/open_webui/retrieval/utils.py", line 165, in query_doc_with_hybrid_search result = compression_retriever.invoke(query) │ │ └ 'Cross Site Scripting prevention techniques' │ └ <function BaseRetriever.invoke at 0x7f5024e78ea0> └ ContextualCompressionRetriever(base_compressor=RerankCompressor(embedding_function=<function chat_completion_files_handler.<l... File "/usr/local/lib/python3.11/site-packages/langchain_core/retrievers.py", line 259, in invoke result = self._get_relevant_documents( │ └ <function ContextualCompressionRetriever._get_relevant_documents at 0x7f5024e78720> └ ContextualCompressionRetriever(base_compressor=RerankCompressor(embedding_function=<function chat_completion_files_handler.<l... File "/usr/local/lib/python3.11/site-packages/langchain/retrievers/contextual_compression.py", line 44, in _get_relevant_documents compressed_docs = self.base_compressor.compress_documents( │ │ └ <function RerankCompressor.compress_documents at 0x7f5024cacd60> │ └ RerankCompressor(embedding_function=<function chat_completion_files_handler.<locals>.<lambda>.<locals>.<lambda> at 0x7f4fb06e... └ ContextualCompressionRetriever(base_compressor=RerankCompressor(embedding_function=<function chat_completion_files_handler.<l... File "/app/backend/open_webui/retrieval/utils.py", line 959, in compress_documents zip(documents, scores.tolist() if not isinstance(scores, list) else scores) │ │ │ └ None │ │ └ None │ └ None └ [Document(metadata={'created_by': 'ce2468e4-7c9c-45e6-9c40-5f916effa88c', 'embedding_config': '{"engine": "openai", "model": ... AttributeError: 'NoneType' object has no attribute 'tolist' 2025-08-02 12:27:47.116 | INFO | open_webui.routers.openai:get_all_models:392 - get_all_models() - {} 2025-08-02 12:27:48.017 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 172.18.0.1:50258 - "POST /api/chat/completions HTTP/1.1" 200 - {} 2025-08-02 12:27:48.047 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 172.18.0.1:50258 - "GET /api/v1/chats/?page=1 HTTP/1.1" 200 - {} 2025-08-02 12:27:48.056 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 172.18.0.1:50258 - "GET /api/v1/folders/ HTTP/1.1" 200 - {} ``` </details> <details> <summary>LocalAI Logs</summary> ```Bash 12:18PM INF Setting logging to info 12:18PM INF Starting LocalAI using 12 threads, with models path: /models 12:18PM INF LocalAI version: v3.3.0 (36179ffbed52b3f85341b2991e0c08de04845da1) 12:18PM INF Preloading models from /models Model name: bge-reranker-v2-m3 Model name: nomic-embed-text-v2-moe 12:18PM INF core/startup process completed! 12:18PM INF LocalAI API is listening! Please connect to the endpoint for API documentation. endpoint=http://0.0.0.0:8080 12:19PM INF Success ip=127.0.0.1 latency="78.637µs" method=GET status=200 url=/readyz 12:20PM INF Success ip=127.0.0.1 latency="38.932µs" method=GET status=200 url=/readyz 12:21PM INF Success ip=127.0.0.1 latency="56.215µs" method=GET status=200 url=/readyz 12:22PM INF Success ip=127.0.0.1 latency="51.567µs" method=GET status=200 url=/readyz 12:23PM INF Success ip=127.0.0.1 latency="70.321µs" method=GET status=200 url=/readyz 12:24PM INF BackendLoader starting backend=vulkan-llama-cpp modelID=nomic-embed-text-v2-moe o.model=nomic-embed-text-v2-moe-f16.gguf 12:24PM INF Success ip=172.18.0.3 latency=3.431077734s method=POST status=200 url=/v1/embeddings 12:24PM INF Success ip=172.18.0.3 latency=702.692789ms method=POST status=200 url=/v1/embeddings 12:24PM INF Success ip=172.18.0.3 latency=670.274945ms method=POST status=200 url=/v1/embeddings 12:24PM INF Success ip=172.18.0.3 latency=484.961773ms method=POST status=200 url=/v1/embeddings 12:24PM INF Success ip=172.18.0.3 latency=676.057539ms method=POST status=200 url=/v1/embeddings 12:24PM INF Success ip=172.18.0.3 latency=666.097183ms method=POST status=200 url=/v1/embeddings 12:24PM INF Success ip=172.18.0.3 latency=691.714049ms method=POST status=200 url=/v1/embeddings 12:24PM INF Success ip=172.18.0.3 latency=468.40994ms method=POST status=200 url=/v1/embeddings 12:24PM INF Success ip=172.18.0.3 latency=657.254376ms method=POST status=200 url=/v1/embeddings 12:24PM INF Success ip=172.18.0.3 latency=656.406731ms method=POST status=200 url=/v1/embeddings 12:24PM INF Success ip=172.18.0.3 latency=684.495109ms method=POST status=200 url=/v1/embeddings 12:24PM INF Success ip=172.18.0.3 latency=710.997992ms method=POST status=200 url=/v1/embeddings 12:24PM INF Success ip=172.18.0.3 latency=667.144161ms method=POST status=200 url=/v1/embeddings 12:24PM INF Success ip=172.18.0.3 latency=681.042863ms method=POST status=200 url=/v1/embeddings 12:24PM INF Success ip=172.18.0.3 latency=680.960699ms method=POST status=200 url=/v1/embeddings 12:24PM INF Success ip=172.18.0.3 latency=685.555583ms method=POST status=200 url=/v1/embeddings 12:24PM INF Success ip=172.18.0.3 latency=472.810921ms method=POST status=200 url=/v1/embeddings 12:24PM INF Success ip=172.18.0.3 latency=664.101171ms method=POST status=200 url=/v1/embeddings 12:24PM INF Success ip=172.18.0.3 latency=691.898675ms method=POST status=200 url=/v1/embeddings 12:24PM INF Success ip=172.18.0.3 latency=677.01412ms method=POST status=200 url=/v1/embeddings 12:24PM INF Success ip=172.18.0.3 latency=692.419961ms method=POST status=200 url=/v1/embeddings 12:24PM INF Success ip=172.18.0.3 latency=691.205649ms method=POST status=200 url=/v1/embeddings 12:24PM INF Success ip=172.18.0.3 latency=698.605398ms method=POST status=200 url=/v1/embeddings 12:24PM INF Success ip=172.18.0.3 latency=710.376271ms method=POST status=200 url=/v1/embeddings 12:24PM INF Success ip=172.18.0.3 latency=744.921094ms method=POST status=200 url=/v1/embeddings 12:24PM INF Success ip=172.18.0.3 latency=489.374116ms method=POST status=200 url=/v1/embeddings 12:24PM INF Success ip=127.0.0.1 latency="22.312µs" method=GET status=200 url=/readyz 12:24PM INF Success ip=172.18.0.3 latency=686.162599ms method=POST status=200 url=/v1/embeddings 12:24PM INF Success ip=172.18.0.3 latency=686.372131ms method=POST status=200 url=/v1/embeddings 12:24PM INF Success ip=172.18.0.3 latency=693.382231ms method=POST status=200 url=/v1/embeddings 12:24PM INF Success ip=172.18.0.3 latency=704.930137ms method=POST status=200 url=/v1/embeddings 12:24PM INF Success ip=172.18.0.3 latency=707.084617ms method=POST status=200 url=/v1/embeddings 12:24PM INF Success ip=172.18.0.3 latency=458.466357ms method=POST status=200 url=/v1/embeddings 12:24PM INF Success ip=172.18.0.3 latency=700.91054ms method=POST status=200 url=/v1/embeddings 12:24PM INF Success ip=172.18.0.3 latency=691.71867ms method=POST status=200 url=/v1/embeddings 12:25PM INF Success ip=172.18.0.3 latency=691.86703ms method=POST status=200 url=/v1/embeddings 12:25PM INF Success ip=172.18.0.3 latency=696.328324ms method=POST status=200 url=/v1/embeddings 12:25PM INF Success ip=172.18.0.3 latency=726.521496ms method=POST status=200 url=/v1/embeddings 12:25PM INF Success ip=172.18.0.3 latency=461.181564ms method=POST status=200 url=/v1/embeddings 12:25PM INF Success ip=172.18.0.3 latency=719.777426ms method=POST status=200 url=/v1/embeddings 12:25PM INF Success ip=172.18.0.3 latency=688.473272ms method=POST status=200 url=/v1/embeddings 12:25PM INF Success ip=172.18.0.3 latency=411.526997ms method=POST status=200 url=/v1/embeddings 12:25PM INF Success ip=172.18.0.3 latency=710.649464ms method=POST status=200 url=/v1/embeddings 12:25PM INF Success ip=172.18.0.3 latency=753.220898ms method=POST status=200 url=/v1/embeddings 12:25PM INF Success ip=172.18.0.3 latency=446.497645ms method=POST status=200 url=/v1/embeddings 12:25PM INF Success ip=172.18.0.3 latency=679.264221ms method=POST status=200 url=/v1/embeddings 12:25PM INF Success ip=172.18.0.3 latency=702.598469ms method=POST status=200 url=/v1/embeddings 12:25PM INF Success ip=172.18.0.3 latency=716.11127ms method=POST status=200 url=/v1/embeddings 12:25PM INF Success ip=172.18.0.3 latency=695.653822ms method=POST status=200 url=/v1/embeddings 12:25PM INF Success ip=172.18.0.3 latency=706.499515ms method=POST status=200 url=/v1/embeddings 12:25PM INF Success ip=172.18.0.3 latency=687.51403ms method=POST status=200 url=/v1/embeddings 12:25PM INF Success ip=172.18.0.3 latency=710.837047ms method=POST status=200 url=/v1/embeddings 12:25PM INF Success ip=172.18.0.3 latency=687.095036ms method=POST status=200 url=/v1/embeddings 12:25PM INF Success ip=172.18.0.3 latency=717.529192ms method=POST status=200 url=/v1/embeddings 12:25PM INF Success ip=172.18.0.3 latency=716.474229ms method=POST status=200 url=/v1/embeddings 12:25PM INF Success ip=172.18.0.3 latency=700.36335ms method=POST status=200 url=/v1/embeddings 12:25PM INF Success ip=172.18.0.3 latency=716.163058ms method=POST status=200 url=/v1/embeddings 12:25PM INF Success ip=172.18.0.3 latency=694.248074ms method=POST status=200 url=/v1/embeddings 12:25PM INF Success ip=172.18.0.3 latency=726.295456ms method=POST status=200 url=/v1/embeddings 12:25PM INF Success ip=172.18.0.3 latency=703.951621ms method=POST status=200 url=/v1/embeddings 12:25PM INF Success ip=172.18.0.3 latency=674.830932ms method=POST status=200 url=/v1/embeddings 12:25PM INF Success ip=172.18.0.3 latency=712.011614ms method=POST status=200 url=/v1/embeddings 12:25PM INF Success ip=172.18.0.3 latency=607.003098ms method=POST status=200 url=/v1/embeddings 12:25PM INF Success ip=172.18.0.3 latency=710.82708ms method=POST status=200 url=/v1/embeddings 12:25PM INF Success ip=172.18.0.3 latency=596.892491ms method=POST status=200 url=/v1/embeddings 12:25PM INF Success ip=172.18.0.3 latency=737.986772ms method=POST status=200 url=/v1/embeddings 12:25PM INF Success ip=172.18.0.3 latency=441.627119ms method=POST status=200 url=/v1/embeddings 12:25PM INF Success ip=172.18.0.3 latency=714.030701ms method=POST status=200 url=/v1/embeddings 12:25PM INF Success ip=172.18.0.3 latency=499.239109ms method=POST status=200 url=/v1/embeddings 12:25PM INF Success ip=127.0.0.1 latency="44.713µs" method=GET status=200 url=/readyz 12:26PM INF Success ip=127.0.0.1 latency="64.41µs" method=GET status=200 url=/readyz 12:27PM INF Success ip=172.18.0.3 latency=423.624544ms method=POST status=200 url=/v1/embeddings 12:27PM INF Success ip=172.18.0.3 latency=406.705804ms method=POST status=200 url=/v1/embeddings 12:27PM INF Success ip=172.18.0.3 latency=403.815419ms method=POST status=200 url=/v1/embeddings 12:27PM WRN SetDefaultModelNameToFirstAvailable used with no matching models installed 12:27PM INF Success ip=172.18.0.3 latency=415.656944ms method=POST status=200 url=/v1/embeddings 12:27PM WRN SetDefaultModelNameToFirstAvailable used with no matching models installed 12:27PM WRN SetDefaultModelNameToFirstAvailable used with no matching models installed 12:27PM INF BackendLoader starting backend=vulkan-llama-cpp modelID=bge-reranker-v2-m3 o.model=bge-reranker-v2-m3-Q8_0.gguf 12:27PM ERR Server error error="rpc error: code = Internal desc = Error in receiving results" ip=172.18.0.3 latency=2.962352341s method=POST status=500 url=/v1/rerank 12:27PM ERR Server error error="rpc error: code = Internal desc = Error in receiving results" ip=172.18.0.3 latency=2.965578134s method=POST status=500 url=/v1/rerank 12:27PM ERR Server error error="rpc error: code = Internal desc = Error in receiving results" ip=172.18.0.3 latency=2.996191125s method=POST status=500 url=/v1/rerank 12:27PM INF Success ip=127.0.0.1 latency="21.571µs" method=GET status=200 url=/readyz 12:28PM INF Success ip=127.0.0.1 latency="20.999µs" method=GET status=200 url=/readyz 12:29PM INF Success ip=127.0.0.1 latency="56.005µs" method=GET status=200 url=/readyz 12:30PM INF Success ip=127.0.0.1 latency="41.998µs" method=GET status=200 url=/readyz 12:31PM INF Success ip=127.0.0.1 latency="66.384µs" method=GET status=200 url=/readyz 12:32PM INF Success ip=127.0.0.1 latency="52.488µs" method=GET status=200 url=/readyz 12:33PM INF Success ip=127.0.0.1 latency="72.326µs" method=GET status=200 url=/readyz 12:33PM WRN SetDefaultModelNameToFirstAvailable used with no matching models installed 12:33PM INF Success ip=172.18.0.1 latency=630.627398ms method=POST status=200 url=/v1/rerank 12:34PM INF Success ip=127.0.0.1 latency="48.421µs" method=GET status=200 url=/readyz 12:35PM INF Success ip=127.0.0.1 latency="44.163µs" method=GET status=200 url=/readyz 12:36PM INF Success ip=127.0.0.1 latency="48.712µs" method=GET status=200 url=/readyz 12:37PM INF Success ip=127.0.0.1 latency="56.536µs" method=GET status=200 url=/readyz 12:38PM INF Success ip=127.0.0.1 latency="64.01µs" method=GET status=200 url=/readyz 12:39PM INF Success ip=127.0.0.1 latency="46.638µs" method=GET status=200 url=/readyz 12:40PM INF Success ip=127.0.0.1 latency="40.696µs" method=GET status=200 url=/readyz 12:41PM WRN SetDefaultModelNameToFirstAvailable used with no matching models installed 12:41PM INF Success ip=172.18.0.3 latency=637.086445ms method=POST status=200 url=/v1/rerank 12:41PM INF Success ip=127.0.0.1 latency="64.661µs" method=GET status=200 url=/readyz 12:41PM WRN SetDefaultModelNameToFirstAvailable used with no matching models installed 12:41PM INF Success ip=172.18.0.3 latency=632.394941ms method=POST status=200 url=/v1/rerank 12:42PM INF Success ip=127.0.0.1 latency="48.09µs" method=GET status=200 url=/readyz 12:43PM INF Success ip=127.0.0.1 latency="63.288µs" method=GET status=200 url=/readyz 12:44PM INF Success ip=127.0.0.1 latency="45.615µs" method=GET status=200 url=/readyz 12:45PM INF Success ip=127.0.0.1 latency="53.721µs" method=GET status=200 url=/readyz 12:46PM INF Success ip=127.0.0.1 latency="63.469µs" method=GET status=200 url=/readyz 12:47PM INF Success ip=127.0.0.1 latency="47.048µs" method=GET status=200 url=/readyz 12:48PM INF Success ip=127.0.0.1 latency="53.771µs" method=GET status=200 url=/readyz 12:49PM INF Success ip=127.0.0.1 latency="48.661µs" method=GET status=200 url=/readyz ``` </details> ### Additional Information - Manual requests from within the Open WebUI container to the reranker endpoint with the correct JSON format work as expected. - Only requests generated by Open WebUI fail due to data shape mismatch. - Environment: Open WebUI (latest as of 2025-08-02), reranker backend: LocalAI (bge-reranker-v2-m3), Docker Compose.
GiteaMirror added the bug label 2026-05-05 19:32:13 -05:00
Author
Owner

@tjbck commented on GitHub (Aug 2, 2025):

It literally sends exactly that. d5fd3b3600

<!-- gh-comment-id:3146566357 --> @tjbck commented on GitHub (Aug 2, 2025): It literally sends exactly that. https://github.com/open-webui/open-webui/commit/d5fd3b36006b4073af2ce0c04171d0a3034b57d7
Author
Owner

@frost19k commented on GitHub (Aug 2, 2025):

Ah. Okay, okay.

My mistake.

Clearly, then I am not seeing this error:

OWUI Logs
❯ docker logs open-webui
...
2025-08-02 15:32:21.513 | ERROR    | open_webui.retrieval.models.external:predict:73 - Error in external reranking: 500 Server Error: Internal Server Error for url: http://embeddings-api:8080/v1/rerank - {}
Traceback (most recent call last):

  File "/usr/local/lib/python3.11/threading.py", line 1002, in _bootstrap
    self._bootstrap_inner()
    │    └ <function Thread._bootstrap_inner at 0x7f6584f289a0>
    └ <Thread(ThreadPoolExecutor-2_1, started 140071298660032)>
  File "/usr/local/lib/python3.11/threading.py", line 1045, in _bootstrap_inner
    self.run()
    │    └ <function Thread.run at 0x7f6584f28680>
    └ <Thread(ThreadPoolExecutor-2_1, started 140071298660032)>
  File "/usr/local/lib/python3.11/threading.py", line 982, in run
    self._target(*self._args, **self._kwargs)
    │    │        │    │        │    └ {}
    │    │        │    │        └ <Thread(ThreadPoolExecutor-2_1, started 140071298660032)>
    │    │        │    └ (<weakref at 0x7f651839bfb0; to 'ThreadPoolExecutor' at 0x7f6518fc3350>, <_queue.SimpleQueue object at 0x7f6518face00>, None,...
    │    │        └ <Thread(ThreadPoolExecutor-2_1, started 140071298660032)>
    │    └ <function _worker at 0x7f6583e3bd80>
    └ <Thread(ThreadPoolExecutor-2_1, started 140071298660032)>
  File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 83, in _worker
    work_item.run()
    │         └ <function _WorkItem.run at 0x7f6583e3bec0>
    └ <concurrent.futures.thread._WorkItem object at 0x7f6518b8a8d0>
  File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             │    │   │    │       │    └ {}
             │    │   │    │       └ <concurrent.futures.thread._WorkItem object at 0x7f6518b8a8d0>
             │    │   │    └ ('03ab71f2-4a00-453e-8a03-227ae510d540', 'Cross site scripting exploit mechanisms')
             │    │   └ <concurrent.futures.thread._WorkItem object at 0x7f6518b8a8d0>
             │    └ <function query_collection_with_hybrid_search.<locals>.process_query at 0x7f6518b849a0>
             └ <concurrent.futures.thread._WorkItem object at 0x7f6518b8a8d0>

  File "/app/backend/open_webui/retrieval/utils.py", line 358, in process_query
    result = query_doc_with_hybrid_search(
             └ <function query_doc_with_hybrid_search at 0x7f65214a4400>

  File "/app/backend/open_webui/retrieval/utils.py", line 165, in query_doc_with_hybrid_search
    result = compression_retriever.invoke(query)
             │                     │      └ 'Cross site scripting exploit mechanisms'
             │                     └ <function BaseRetriever.invoke at 0x7f6521670ea0>
             └ ContextualCompressionRetriever(base_compressor=RerankCompressor(embedding_function=<function chat_completion_files_handler.<l...

  File "/usr/local/lib/python3.11/site-packages/langchain_core/retrievers.py", line 259, in invoke
    result = self._get_relevant_documents(
             │    └ <function ContextualCompressionRetriever._get_relevant_documents at 0x7f6521670720>
             └ ContextualCompressionRetriever(base_compressor=RerankCompressor(embedding_function=<function chat_completion_files_handler.<l...
  File "/usr/local/lib/python3.11/site-packages/langchain/retrievers/contextual_compression.py", line 44, in _get_relevant_documents
    compressed_docs = self.base_compressor.compress_documents(
                      │    │               └ <function RerankCompressor.compress_documents at 0x7f65214a4d60>
                      │    └ RerankCompressor(embedding_function=<function chat_completion_files_handler.<locals>.<lambda>.<locals>.<lambda> at 0x7f6518bf...
                      └ ContextualCompressionRetriever(base_compressor=RerankCompressor(embedding_function=<function chat_completion_files_handler.<l...

  File "/app/backend/open_webui/retrieval/utils.py", line 946, in compress_documents
    scores = self.reranking_function(
             │    └ <function chat_completion_files_handler.<locals>.<lambda>.<locals>.<lambda> at 0x7f6518bdbb00>
             └ RerankCompressor(embedding_function=<function chat_completion_files_handler.<locals>.<lambda>.<locals>.<lambda> at 0x7f6518bf...

  File "/app/backend/open_webui/utils/middleware.py", line 657, in <lambda>
    lambda sentences: request.app.state.RERANKING_FUNCTION(
           │          │       └ <property object at 0x7f6581422b60>
           │          └ <starlette.requests.Request object at 0x7f6518fed0d0>
           └ [('Cross site scripting exploit mechanisms', 'In some cases it is possible that signature-based filters can be simply defeate...

  File "/app/backend/open_webui/retrieval/utils.py", line 452, in <lambda>
    return lambda sentences, user=None: reranking_function.predict(
                  │                     │                  └ <function ExternalReranker.predict at 0x7f6519f0ac00>
                  │                     └ <open_webui.retrieval.models.external.ExternalReranker object at 0x7f6519f183d0>
                  └ [('Cross site scripting exploit mechanisms', 'In some cases it is possible that signature-based filters can be simply defeate...

> File "/app/backend/open_webui/retrieval/models/external.py", line 62, in predict
    r.raise_for_status()
    │ └ <function Response.raise_for_status at 0x7f6581824860>
    └ <Response [500]>

  File "/usr/local/lib/python3.11/site-packages/requests/models.py", line 1026, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
          │         │                        └ <Response [500]>
          │         └ '500 Server Error: Internal Server Error for url: http://embeddings-api:8080/v1/rerank'
          └ <class 'requests.exceptions.HTTPError'>

requests.exceptions.HTTPError: 500 Server Error: Internal Server Error for url: http://embeddings-api:8080/v1/rerank
2025-08-02 15:32:21.517 | ERROR    | open_webui.retrieval.utils:query_doc_with_hybrid_search:191 - Error querying doc 03ab71f2-4a00-453e-8a03-227ae510d540 with hybrid search: 'NoneType' object has no attribute 'tolist' - {}

Even though I can manually curl the endpoint from inside the OWUI container.

❯ docker exec -it open-webui curl http://embeddings-api:8080/v1/rerank \
  -H "Content-Type: application/json" \
  -d '{
  "model": "bge-reranker-v2-m3",
  "query": "Organic skincare products for sensitive skin",
  "documents": [
    "Eco-friendly kitchenware for modern homes",
    "Biodegradable cleaning supplies for eco-conscious consumers",
    "Organic cotton baby clothes for sensitive skin",
    "Natural organic skincare range for sensitive skin",
    "Tech gadgets for smart homes: 2024 edition",
    "Sustainable gardening tools and compost solutions",
    "Sensitive skin-friendly facial cleansers and toners",
    "Organic food wraps and storage solutions",
    "All-natural pet food for dogs with allergies",
    "Yoga mats made from recycled materials"
  ],
  "top_n": 3
}'
{"model":"bge-reranker-v2-m3","usage":{"total_tokens":195,"prompt_tokens":195},"results":[{"index":0,"document":{"text":"Eco-friendly kitchenware for modern homes"},"relevance_score":-10.513687133789062},{"index":1,"document":{"text":"Biodegradable cleaning supplies for eco-conscious consumers"},"relevance_score":-7.814051628112793},{"index":2,"document":{"text":"Organic cotton baby clothes for sensitive skin"},"relevance_score":-0.49957573413848877},{"index":3,"document":{"text":"Natural organic skincare range for sensitive skin"},"relevance_score":7.2425642013549805},{"index":4,"document":{"text":"Tech gadgets for smart homes: 2024 edition"},"relevance_score":-10.516611099243164},{"index":5,"document":{"text":"Sustainable gardening tools and compost solutions"},"relevance_score":-10.506714820861816},{"index":6,"document":{"text":"Sensitive skin-friendly facial cleansers and toners"},"relevance_score":1.0279350280761719},{"index":7,"document":{"text":"Organic food wraps and storage solutions"},"relevance_score":-7.0455322265625},{"index":8,"document":{"text":"All-natural pet food for dogs with allergies"},"relevance_score":-8.817167282104492},{"index":9,"document":{"text":"Yoga mats made from recycled materials"},"relevance_score":-10.696022033691406}]}

There must be something wrong with my eyes. I'll go consult an ophthalmologist.

<!-- gh-comment-id:3146579709 --> @frost19k commented on GitHub (Aug 2, 2025): Ah. Okay, okay. My mistake. Clearly, then I am not seeing this error: <details> <summary>OWUI Logs</summary> ```Bash ❯ docker logs open-webui ... 2025-08-02 15:32:21.513 | ERROR | open_webui.retrieval.models.external:predict:73 - Error in external reranking: 500 Server Error: Internal Server Error for url: http://embeddings-api:8080/v1/rerank - {} Traceback (most recent call last): File "/usr/local/lib/python3.11/threading.py", line 1002, in _bootstrap self._bootstrap_inner() │ └ <function Thread._bootstrap_inner at 0x7f6584f289a0> └ <Thread(ThreadPoolExecutor-2_1, started 140071298660032)> File "/usr/local/lib/python3.11/threading.py", line 1045, in _bootstrap_inner self.run() │ └ <function Thread.run at 0x7f6584f28680> └ <Thread(ThreadPoolExecutor-2_1, started 140071298660032)> File "/usr/local/lib/python3.11/threading.py", line 982, in run self._target(*self._args, **self._kwargs) │ │ │ │ │ └ {} │ │ │ │ └ <Thread(ThreadPoolExecutor-2_1, started 140071298660032)> │ │ │ └ (<weakref at 0x7f651839bfb0; to 'ThreadPoolExecutor' at 0x7f6518fc3350>, <_queue.SimpleQueue object at 0x7f6518face00>, None,... │ │ └ <Thread(ThreadPoolExecutor-2_1, started 140071298660032)> │ └ <function _worker at 0x7f6583e3bd80> └ <Thread(ThreadPoolExecutor-2_1, started 140071298660032)> File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 83, in _worker work_item.run() │ └ <function _WorkItem.run at 0x7f6583e3bec0> └ <concurrent.futures.thread._WorkItem object at 0x7f6518b8a8d0> File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, **self.kwargs) │ │ │ │ │ └ {} │ │ │ │ └ <concurrent.futures.thread._WorkItem object at 0x7f6518b8a8d0> │ │ │ └ ('03ab71f2-4a00-453e-8a03-227ae510d540', 'Cross site scripting exploit mechanisms') │ │ └ <concurrent.futures.thread._WorkItem object at 0x7f6518b8a8d0> │ └ <function query_collection_with_hybrid_search.<locals>.process_query at 0x7f6518b849a0> └ <concurrent.futures.thread._WorkItem object at 0x7f6518b8a8d0> File "/app/backend/open_webui/retrieval/utils.py", line 358, in process_query result = query_doc_with_hybrid_search( └ <function query_doc_with_hybrid_search at 0x7f65214a4400> File "/app/backend/open_webui/retrieval/utils.py", line 165, in query_doc_with_hybrid_search result = compression_retriever.invoke(query) │ │ └ 'Cross site scripting exploit mechanisms' │ └ <function BaseRetriever.invoke at 0x7f6521670ea0> └ ContextualCompressionRetriever(base_compressor=RerankCompressor(embedding_function=<function chat_completion_files_handler.<l... File "/usr/local/lib/python3.11/site-packages/langchain_core/retrievers.py", line 259, in invoke result = self._get_relevant_documents( │ └ <function ContextualCompressionRetriever._get_relevant_documents at 0x7f6521670720> └ ContextualCompressionRetriever(base_compressor=RerankCompressor(embedding_function=<function chat_completion_files_handler.<l... File "/usr/local/lib/python3.11/site-packages/langchain/retrievers/contextual_compression.py", line 44, in _get_relevant_documents compressed_docs = self.base_compressor.compress_documents( │ │ └ <function RerankCompressor.compress_documents at 0x7f65214a4d60> │ └ RerankCompressor(embedding_function=<function chat_completion_files_handler.<locals>.<lambda>.<locals>.<lambda> at 0x7f6518bf... └ ContextualCompressionRetriever(base_compressor=RerankCompressor(embedding_function=<function chat_completion_files_handler.<l... File "/app/backend/open_webui/retrieval/utils.py", line 946, in compress_documents scores = self.reranking_function( │ └ <function chat_completion_files_handler.<locals>.<lambda>.<locals>.<lambda> at 0x7f6518bdbb00> └ RerankCompressor(embedding_function=<function chat_completion_files_handler.<locals>.<lambda>.<locals>.<lambda> at 0x7f6518bf... File "/app/backend/open_webui/utils/middleware.py", line 657, in <lambda> lambda sentences: request.app.state.RERANKING_FUNCTION( │ │ └ <property object at 0x7f6581422b60> │ └ <starlette.requests.Request object at 0x7f6518fed0d0> └ [('Cross site scripting exploit mechanisms', 'In some cases it is possible that signature-based filters can be simply defeate... File "/app/backend/open_webui/retrieval/utils.py", line 452, in <lambda> return lambda sentences, user=None: reranking_function.predict( │ │ └ <function ExternalReranker.predict at 0x7f6519f0ac00> │ └ <open_webui.retrieval.models.external.ExternalReranker object at 0x7f6519f183d0> └ [('Cross site scripting exploit mechanisms', 'In some cases it is possible that signature-based filters can be simply defeate... > File "/app/backend/open_webui/retrieval/models/external.py", line 62, in predict r.raise_for_status() │ └ <function Response.raise_for_status at 0x7f6581824860> └ <Response [500]> File "/usr/local/lib/python3.11/site-packages/requests/models.py", line 1026, in raise_for_status raise HTTPError(http_error_msg, response=self) │ │ └ <Response [500]> │ └ '500 Server Error: Internal Server Error for url: http://embeddings-api:8080/v1/rerank' └ <class 'requests.exceptions.HTTPError'> requests.exceptions.HTTPError: 500 Server Error: Internal Server Error for url: http://embeddings-api:8080/v1/rerank 2025-08-02 15:32:21.517 | ERROR | open_webui.retrieval.utils:query_doc_with_hybrid_search:191 - Error querying doc 03ab71f2-4a00-453e-8a03-227ae510d540 with hybrid search: 'NoneType' object has no attribute 'tolist' - {} ``` </details> Even though I can manually curl the endpoint from inside the OWUI container. ```Bash ❯ docker exec -it open-webui curl http://embeddings-api:8080/v1/rerank \ -H "Content-Type: application/json" \ -d '{ "model": "bge-reranker-v2-m3", "query": "Organic skincare products for sensitive skin", "documents": [ "Eco-friendly kitchenware for modern homes", "Biodegradable cleaning supplies for eco-conscious consumers", "Organic cotton baby clothes for sensitive skin", "Natural organic skincare range for sensitive skin", "Tech gadgets for smart homes: 2024 edition", "Sustainable gardening tools and compost solutions", "Sensitive skin-friendly facial cleansers and toners", "Organic food wraps and storage solutions", "All-natural pet food for dogs with allergies", "Yoga mats made from recycled materials" ], "top_n": 3 }' {"model":"bge-reranker-v2-m3","usage":{"total_tokens":195,"prompt_tokens":195},"results":[{"index":0,"document":{"text":"Eco-friendly kitchenware for modern homes"},"relevance_score":-10.513687133789062},{"index":1,"document":{"text":"Biodegradable cleaning supplies for eco-conscious consumers"},"relevance_score":-7.814051628112793},{"index":2,"document":{"text":"Organic cotton baby clothes for sensitive skin"},"relevance_score":-0.49957573413848877},{"index":3,"document":{"text":"Natural organic skincare range for sensitive skin"},"relevance_score":7.2425642013549805},{"index":4,"document":{"text":"Tech gadgets for smart homes: 2024 edition"},"relevance_score":-10.516611099243164},{"index":5,"document":{"text":"Sustainable gardening tools and compost solutions"},"relevance_score":-10.506714820861816},{"index":6,"document":{"text":"Sensitive skin-friendly facial cleansers and toners"},"relevance_score":1.0279350280761719},{"index":7,"document":{"text":"Organic food wraps and storage solutions"},"relevance_score":-7.0455322265625},{"index":8,"document":{"text":"All-natural pet food for dogs with allergies"},"relevance_score":-8.817167282104492},{"index":9,"document":{"text":"Yoga mats made from recycled materials"},"relevance_score":-10.696022033691406}]} ``` There must be something wrong with my eyes. I'll go consult an ophthalmologist.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#56497