[GH-ISSUE #19732] Open WebUI API Works with normal models but fails with RAG/Knowledge Database on OpenAI-Compatible Clients #18972

Closed
opened 2026-04-20 01:15:37 -05:00 by GiteaMirror · 1 comment
Owner

Originally created by @R-Bower on GitHub (Dec 4, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/19732

This original issue was converted into a discussion, but this is definitely a bug:


I’m currently setting up Open-WebUI’s API and running into an issue. The API works perfectly with normal models when accessed through other OpenAI-compatible clients (such as Cline or ChatboxAI). However, when I attach a knowledge/RAG database to the API, I encounter the following error:

Cannot read properties of undefined (reading '0')  

This error occurs consistently across multiple client applications (except Open-WebUI itself), suggesting an issue with how the API handles the knowledge/RAG database in non-Open-WebUI clients.

To reproduce:

  1. Set up a working Open-WebUI API endpoint with a normal model (no knowledge/RAG database).
    • Verify that it works with other clients like Cline or ChatboxAI.
  2. Attach a knowledge/RAG database to the API.
  3. Attempt to connect it to Cline or ChatboxAI again.
  4. Observe the error mentioned above.

I’ve confirmed that the API works fine with curl in the terminal and can connect to other Open-WebUI instances without issues, even with the knowledge/RAG database attached.

Has anyone else experienced this or have any insights into why this might be happening? Any suggestions or potential solutions would be greatly appreciated!

Thank you in advance for your help!

Originally posted by @bpawnzZ in https://github.com/open-webui/open-webui/discussions/8466

Originally created by @R-Bower on GitHub (Dec 4, 2025). Original GitHub issue: https://github.com/open-webui/open-webui/issues/19732 This original issue was converted into a discussion, but this is definitely a bug: --- I’m currently setting up Open-WebUI’s API and running into an issue. The API works perfectly with normal models when accessed through other OpenAI-compatible clients (such as Cline or [ChatboxAI](https://web.chatboxai.app)). However, when I attach a knowledge/RAG database to the API, I encounter the following error: ``` Cannot read properties of undefined (reading '0') ``` This error occurs consistently across multiple client applications (except Open-WebUI itself), suggesting an issue with how the API handles the knowledge/RAG database in non-Open-WebUI clients. To reproduce: 1. Set up a working Open-WebUI API endpoint with a normal model (no knowledge/RAG database). - Verify that it works with other clients like Cline or ChatboxAI. 2. Attach a knowledge/RAG database to the API. 3. Attempt to connect it to Cline or ChatboxAI again. 4. Observe the error mentioned above. I’ve confirmed that the API works fine with `curl` in the terminal and can connect to other Open-WebUI instances without issues, even with the knowledge/RAG database attached. Has anyone else experienced this or have any insights into why this might be happening? Any suggestions or potential solutions would be greatly appreciated! Thank you in advance for your help! _Originally posted by @bpawnzZ in https://github.com/open-webui/open-webui/discussions/8466_
Author
Owner

@owui-terminator[bot] commented on GitHub (Dec 4, 2025):

🔍 Similar Issues Found

I found some existing issues that might be related to this one. Please check if any of these are duplicates or contain helpful solutions:

  1. #8465 Open-WebUI API Works with Normal Models but Fails with Knowledge/RAG Database on Other OpenAI-Compatible Clients
    by bpawnzZ • Jan 10, 2025

  2. #17407 issue: generated RAG queries not visible when using a model with attached knowledge base
    by vaclcer • Sep 12, 2025 • bug

  3. #4348 Bug: v0.3.11 - Load models from OpenAI-compatible API without auth
    by av • Aug 04, 2024

  4. #7037 bug: problem handling Perplexity Online models via OpenRouter
    by neuromechanist • Nov 19, 2024

  5. #10411 Bug: ModelModel Not JSON Serializable in OpenWebUI v0.5.14
    by samuelpetermoshi • Feb 20, 2025

Show 5 more related issues
  1. #1105 bug: RAG loses context on model response regeneration with Groq models via API key
    by silentoplayz • Mar 08, 2024

  2. #3349 OpenAI Network Problem on OpenWebUI
    by whateverzpy • Jun 21, 2024

  3. #6298 Models not working with RAG UNLESS imported via Openwebui's experimental feature (but broken response)
    by antonio-lamberti • Oct 20, 2024

  4. #18272 issue: Knowledge Collection RAG not working -> Model Conext Length Overrun
    by rahepler2 • Oct 13, 2025 • bug

  5. #1826 Custom OpenAI API Endpoints Do Not Load
    by jmstacey • Apr 28, 2024


💡 Tips:

  • If this is a duplicate, please consider closing this issue and adding any additional details to the existing one
  • If you found a solution in any of these issues, please share it here to help others

This comment was generated automatically by a bot. Please react with a 👍 if this comment was helpful, or a 👎 if it was not.

<!-- gh-comment-id:3610094815 --> @owui-terminator[bot] commented on GitHub (Dec 4, 2025): 🔍 **Similar Issues Found** I found some existing issues that might be related to this one. Please check if any of these are duplicates or contain helpful solutions: 1. [#8465](https://github.com/open-webui/open-webui/issues/8465) **Open-WebUI API Works with Normal Models but Fails with Knowledge/RAG Database on Other OpenAI-Compatible Clients** *by bpawnzZ • Jan 10, 2025* 2. [#17407](https://github.com/open-webui/open-webui/issues/17407) **issue: generated RAG queries not visible when using a model with attached knowledge base** *by vaclcer • Sep 12, 2025 • `bug`* 3. [#4348](https://github.com/open-webui/open-webui/issues/4348) **Bug: v0.3.11 - Load models from OpenAI-compatible API without auth** *by av • Aug 04, 2024* 4. [#7037](https://github.com/open-webui/open-webui/issues/7037) **bug: problem handling Perplexity Online models via OpenRouter** *by neuromechanist • Nov 19, 2024* 5. [#10411](https://github.com/open-webui/open-webui/issues/10411) **❗ Bug: ModelModel Not JSON Serializable in OpenWebUI v0.5.14** *by samuelpetermoshi • Feb 20, 2025* <details> <summary>Show 5 more related issues</summary> 6. [#1105](https://github.com/open-webui/open-webui/issues/1105) **bug: RAG loses context on model response regeneration with Groq models via API key** *by silentoplayz • Mar 08, 2024* 7. [#3349](https://github.com/open-webui/open-webui/issues/3349) **OpenAI Network Problem on OpenWebUI** *by whateverzpy • Jun 21, 2024* 8. [#6298](https://github.com/open-webui/open-webui/issues/6298) **Models not working with RAG UNLESS imported via Openwebui's experimental feature (but broken response)** *by antonio-lamberti • Oct 20, 2024* 9. [#18272](https://github.com/open-webui/open-webui/issues/18272) **issue: Knowledge Collection RAG not working -> Model Conext Length Overrun** *by rahepler2 • Oct 13, 2025 • `bug`* 10. [#1826](https://github.com/open-webui/open-webui/issues/1826) **Custom OpenAI API Endpoints Do Not Load** *by jmstacey • Apr 28, 2024* </details> --- 💡 **Tips:** - If this is a duplicate, please consider closing this issue and adding any additional details to the existing one - If you found a solution in any of these issues, please share it here to help others *This comment was generated automatically by a bot.* Please react with a 👍 if this comment was helpful, or a 👎 if it was not.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#18972