[GH-ISSUE #11822] issue: Bug by open citations / context pop up using files (with the usage of reranking models) #87107

Closed
opened 2026-05-15 11:28:30 -05:00 by GiteaMirror · 8 comments
Owner

Originally created by @etlstrauss on GitHub (Mar 18, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/11822

Check Existing Issues

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

Installation Method

Docker

Open WebUI Version

v0.5.19 and v0.5.20

Ollama Version (if applicable)

0.6.1

Operating System

Ubuntu 24.04.2 LTS and Debian GNU/Linux 12 (bookworm)

Browser (if applicable)

Firefox 136.0.1 and Chrome 134.0.6998.35

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 listed steps to reproduce the bug in detail.

Expected Behavior

By using knowledge bases or direct file upload, the interface provides (at the bottom of the messages) a link to the used context and specific data. This button should open a pop up dialogue with this informations.

Actual Behavior

By clicking on the button an error occurred an the whole interface freezes. No pop up dialogue will be opened.

Steps to Reproduce

  1. Go to Admin Panel -> Documents -> enable Hybrid Search + choose a rerank model
  2. Open a new chat
  3. Ask somethings and include a file upload or knowledge base
  4. Click on the button under the actual chat message, where the information of the used context is provided.

Logs & Screenshots

Uncaught (in promise) TypeError: n[9].distance.toFixed is not a function
    vi CitationsModal.svelte:135
    pi CitationsModal.svelte:123
    vt utils.js:165
    ai tippy.esm.js:2482
    Pt Component.js:148
    li Tooltip.svelte:39
    _i CitationsModal.svelte:142
    Tl CitationsModal.svelte:115
    hi CitationsModal.svelte:111
    Rl CitationsModal.svelte:84
    wi CitationsModal.svelte:78
    vt utils.js:165
    M Immutable
    p Modal.svelte:64
    dt scheduler.js:119
    _t scheduler.js:79
    promise callback*ut scheduler.js:20
    ht Component.js:81
    ctx Component.js:139
    I Citations.svelte:108
    g Citations.svelte:120
    D dom.js:361
    m Citations.svelte:121
    m Citations.svelte:124
    m Citations.svelte:205
    m Citations.svelte:99
    _t Component.js:44
    m ResponseMessage.svelte:806
    m ResponseMessage.svelte:812
    m ResponseMessage.svelte:814
    m ResponseMessage.svelte:538
    _t Component.js:44
    m Message.svelte:72
    m Message.svelte:66
    m Message.svelte:109
    _t Component.js:44
    m Messages.svelte:409
    m Messages.svelte:428
    m Messages.svelte:434
    m Messages.svelte:436
    _t Component.js:44
    m Chat.svelte:2019
    m Chat.svelte:2111
    m pane.svelte:82
    _t Component.js:44
    m Chat.svelte:2120
    m pane-group.svelte:49
    _t Component.js:44
    m Chat.svelte:1934
    p Chat.svelte:1881
    dt scheduler.js:119
CitationsModal.svelte:135:32

Additional Information

Since i already understood the problem, no docker logs are included.
Like shown in the error log the function n[9].distance.toFixed(4) caused this problem. This will be triggered by {document.distance.toFixed(4)} in "CitationsModal.svelte" (line 135), based on Messages.D-mnE1G1.js (in Open WebUI version v0.5.20).
By adding breakpoints (in Messages.D-mnE1G1.js ) I noticed, that by using rerank models n[9].distance will be a array of floats and looks similar to n[9].metadata.score. Without a rerank model it is just a float. And the toFixed function is not usable on arrays.

Possible solutions:
→ check the dtype of n[9].distance → run .toFixed directly or in loop
or
→ just directly change the dtype to an array

Originally created by @etlstrauss on GitHub (Mar 18, 2025). Original GitHub issue: https://github.com/open-webui/open-webui/issues/11822 ### Check Existing Issues - [x] I have searched the existing issues and discussions. - [x] I am using the latest version of Open WebUI. ### Installation Method Docker ### Open WebUI Version v0.5.19 and v0.5.20 ### Ollama Version (if applicable) 0.6.1 ### Operating System Ubuntu 24.04.2 LTS and Debian GNU/Linux 12 (bookworm) ### Browser (if applicable) Firefox 136.0.1 and Chrome 134.0.6998.35 ### 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. - [ ] I have included the Docker container logs. - [x] I have listed steps to reproduce the bug in detail. ### Expected Behavior By using knowledge bases or direct file upload, the interface provides (at the bottom of the messages) a link to the used context and specific data. This button should open a pop up dialogue with this informations. ### Actual Behavior By clicking on the button an error occurred an the whole interface freezes. No pop up dialogue will be opened. ### Steps to Reproduce 1. Go to Admin Panel -> Documents -> enable Hybrid Search + choose a rerank model 3. Open a new chat 4. Ask somethings and include a file upload or knowledge base 5. Click on the button under the actual chat message, where the information of the used context is provided. ### Logs & Screenshots ``` Uncaught (in promise) TypeError: n[9].distance.toFixed is not a function vi CitationsModal.svelte:135 pi CitationsModal.svelte:123 vt utils.js:165 ai tippy.esm.js:2482 Pt Component.js:148 li Tooltip.svelte:39 _i CitationsModal.svelte:142 Tl CitationsModal.svelte:115 hi CitationsModal.svelte:111 Rl CitationsModal.svelte:84 wi CitationsModal.svelte:78 vt utils.js:165 M Immutable p Modal.svelte:64 dt scheduler.js:119 _t scheduler.js:79 promise callback*ut scheduler.js:20 ht Component.js:81 ctx Component.js:139 I Citations.svelte:108 g Citations.svelte:120 D dom.js:361 m Citations.svelte:121 m Citations.svelte:124 m Citations.svelte:205 m Citations.svelte:99 _t Component.js:44 m ResponseMessage.svelte:806 m ResponseMessage.svelte:812 m ResponseMessage.svelte:814 m ResponseMessage.svelte:538 _t Component.js:44 m Message.svelte:72 m Message.svelte:66 m Message.svelte:109 _t Component.js:44 m Messages.svelte:409 m Messages.svelte:428 m Messages.svelte:434 m Messages.svelte:436 _t Component.js:44 m Chat.svelte:2019 m Chat.svelte:2111 m pane.svelte:82 _t Component.js:44 m Chat.svelte:2120 m pane-group.svelte:49 _t Component.js:44 m Chat.svelte:1934 p Chat.svelte:1881 dt scheduler.js:119 CitationsModal.svelte:135:32 ``` ### Additional Information Since i already understood the problem, no docker logs are included. Like shown in the error log the function n[9].distance.toFixed(4) caused this problem. This will be triggered by ``` {document.distance.toFixed(4)} ``` in "CitationsModal.svelte" (line 135), based on ``` Messages.D-mnE1G1.js ``` (in Open WebUI version v0.5.20). By adding breakpoints (in ``` Messages.D-mnE1G1.js ```) I noticed, that by using rerank models n[9].distance will be a array of floats and looks similar to n[9].metadata.score. Without a rerank model it is just a float. And the toFixed function is not usable on arrays. Possible solutions: → check the dtype of n[9].distance → run .toFixed directly or in loop or → just directly change the dtype to an array
GiteaMirror added the bug label 2026-05-15 11:28:30 -05:00
Author
Owner

@tjbck commented on GitHub (Apr 3, 2025):

Could you confirm this has been addressed with the latest release?

<!-- gh-comment-id:2774220170 --> @tjbck commented on GitHub (Apr 3, 2025): Could you confirm this has been addressed with the latest release?
Author
Owner

@etlstrauss commented on GitHub (Apr 3, 2025):

Unfortunately, the error still exists. Although it now reads ‘TypeError: (intermediate value).toFixed is not a function’, it still seems to be triggered by ‘CitationsModal.svelte’. I'll have a closer look tomorrow and let you know then.

Perhaps as a note: I have only tested this on Ubuntu 24.04 with Firefox today. I also use the current Open WebUI cuda docker image as a basis, with a few customization. Current Open WebUI version is 0.6.0.

If you need some other information, logs or screenshots, let me know.

<!-- gh-comment-id:2776003514 --> @etlstrauss commented on GitHub (Apr 3, 2025): Unfortunately, the error still exists. Although it now reads ‘TypeError: (intermediate value).toFixed is not a function’, it still seems to be triggered by ‘CitationsModal.svelte’. I'll have a closer look tomorrow and let you know then. Perhaps as a note: I have only tested this on Ubuntu 24.04 with Firefox today. I also use the current Open WebUI cuda docker image as a basis, with a few customization. Current Open WebUI version is 0.6.0. If you need some other information, logs or screenshots, let me know.
Author
Owner

@tjbck commented on GitHub (Apr 7, 2025):

Might be addressed with the latest dev!

<!-- gh-comment-id:2781856813 --> @tjbck commented on GitHub (Apr 7, 2025): Might be addressed with the latest dev!
Author
Owner

@etlstrauss commented on GitHub (Apr 7, 2025):

Unfortunately, the problem does not seem to have been solved yet. I tested it again today with the latest dev-cuda image (sha256:4f7b3ad402dc38b808db78a2288382e40605b6f2fe7b8d618088997a645e5a4e) (Open WebUI version 0.6.2). However, the error has only moved from line 135 in CitationsModal.svelte to line 139. This is probably due to the user settings of the frontend.

Otherwise, the problem is probably still that in the file ‘to.Fixed’ is applied to an array.

<!-- gh-comment-id:2782367693 --> @etlstrauss commented on GitHub (Apr 7, 2025): Unfortunately, the problem does not seem to have been solved yet. I tested it again today with the latest dev-cuda image (sha256:4f7b3ad402dc38b808db78a2288382e40605b6f2fe7b8d618088997a645e5a4e) (Open WebUI version 0.6.2). However, the error has only moved from line 135 in CitationsModal.svelte to line 139. This is probably due to the user settings of the frontend. Otherwise, the problem is probably still that in the file ‘to.Fixed’ is applied to an array.
Author
Owner

@tjbck commented on GitHub (Apr 13, 2025):

Might be addressed in dev again, testing wanted here!

<!-- gh-comment-id:2799556637 --> @tjbck commented on GitHub (Apr 13, 2025): Might be addressed in dev again, testing wanted here!
Author
Owner

@etlstrauss commented on GitHub (Apr 15, 2025):

@tjbck Unfortunately I closed this issue by miss clicking. Please reopen it.

I now testet latests images cuda (
sha256:b768633c723f01a2d566d090710a853f39c569c362b913476dfe4977addd613e), dev (sha256:876998b35257d1f399b56aa34d2f0783b25f51e1e8a02838c3147a468a87e4d4) and dev-cuda (sha256:b816f34eeae54d16a1d6e3dca2ad83fd0f8d98b49a5cb16b09c1c9c203476dd5). But in no version the failure was fixed.

<!-- gh-comment-id:2804136180 --> @etlstrauss commented on GitHub (Apr 15, 2025): @tjbck Unfortunately I closed this issue by miss clicking. Please reopen it. I now testet latests images cuda ( sha256:b768633c723f01a2d566d090710a853f39c569c362b913476dfe4977addd613e), dev (sha256:876998b35257d1f399b56aa34d2f0783b25f51e1e8a02838c3147a468a87e4d4) and dev-cuda (sha256:b816f34eeae54d16a1d6e3dca2ad83fd0f8d98b49a5cb16b09c1c9c203476dd5). But in no version the failure was fixed.
Author
Owner

@tjbck commented on GitHub (Apr 20, 2025):

Might be addressed in dev!

<!-- gh-comment-id:2817019572 --> @tjbck commented on GitHub (Apr 20, 2025): Might be addressed in dev!
Author
Owner

@etlstrauss commented on GitHub (Apr 22, 2025):

I tested the latest image based on dev and it seems to function. The pop-up will be opened without failure. However, the problem is now, that the relevance will not be monitored. The space under the “Relevance” heading in the pop-up is empty.

Since the problem itself is solved I suggest to close this issue and create a new one, when you agree @tjbck ?

<!-- gh-comment-id:2820774637 --> @etlstrauss commented on GitHub (Apr 22, 2025): I tested the latest image based on dev and it seems to function. The pop-up will be opened without failure. However, the problem is now, that the relevance will not be monitored. The space under the “Relevance” heading in the pop-up is empty. Since the problem itself is solved I suggest to close this issue and create a new one, when you agree @tjbck ?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#87107