[PR #16385] [MERGED] feat: Propagate upstream OpenAI router errors #127773

Closed
opened 2026-05-21 09:55:43 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/open-webui/open-webui/pull/16385
Author: @gaby
Created: 8/8/2025
Status: Merged
Merged: 8/8/2025
Merged by: @tjbck

Base: devHead: 2025-08-08-13-38-31


📝 Commits (4)

📊 Changes

3 files changed (+352 additions, -278 deletions)

View changed files

📝 backend/open_webui/retrieval/vector/dbs/oracle23ai.py (+274 -219)
📝 backend/open_webui/routers/openai.py (+76 -57)
📝 backend/open_webui/utils/tools.py (+2 -2)

📄 Description

Description

The main purpose of this PR is to change how errors are handled by the openai router. Currently when a bad request happens, Open-WebUI doesn't propagate the error back to the user, instead of just has a generic "Bad Request". This makes debugging for API users very hard, since they can't see which fields are wrong/missing.

  • Propagate upstream OpenAI error payloads instead of generic messages.
  • Handle both JSON and Plaintext responses from the router.
  • Handle error statuses in verification, chat completion, embedding and proxy routes.

Contributor License Agreement

By submitting this pull request, I confirm that I have read and fully agree to the Contributor License Agreement (CLA), and I am providing my contributions under its terms.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/open-webui/open-webui/pull/16385 **Author:** [@gaby](https://github.com/gaby) **Created:** 8/8/2025 **Status:** ✅ Merged **Merged:** 8/8/2025 **Merged by:** [@tjbck](https://github.com/tjbck) **Base:** `dev` ← **Head:** `2025-08-08-13-38-31` --- ### 📝 Commits (4) - [`2ae7584`](https://github.com/open-webui/open-webui/commit/2ae75846869d94c05ccb5a25fe1073a69b1d4089) feat: forward upstream OpenAI errors - [`5d7e8c8`](https://github.com/open-webui/open-webui/commit/5d7e8c8e5f10cad82eb40c34c51ad736d7f1c45c) Format openai router - [`d2f2d42`](https://github.com/open-webui/open-webui/commit/d2f2d42e0962fe4d8d36c40e56c3bab5ea39f82d) Format python code - [`7619f44`](https://github.com/open-webui/open-webui/commit/7619f449c8f68791a208b859a1fe02e5f76ce041) Format code base ### 📊 Changes **3 files changed** (+352 additions, -278 deletions) <details> <summary>View changed files</summary> 📝 `backend/open_webui/retrieval/vector/dbs/oracle23ai.py` (+274 -219) 📝 `backend/open_webui/routers/openai.py` (+76 -57) 📝 `backend/open_webui/utils/tools.py` (+2 -2) </details> ### 📄 Description ### Description The main purpose of this PR is to change how errors are handled by the `openai` router. Currently when a bad request happens, Open-WebUI doesn't propagate the error back to the user, instead of just has a generic "Bad Request". This makes debugging for API users very hard, since they can't see which fields are wrong/missing. - Propagate upstream OpenAI error payloads instead of generic messages. - Handle both JSON and Plaintext responses from the router. - Handle error statuses in verification, chat completion, embedding and proxy routes. --- ### Contributor License Agreement By submitting this pull request, I confirm that I have read and fully agree to the [Contributor License Agreement (CLA)](/CONTRIBUTOR_LICENSE_AGREEMENT), and I am providing my contributions under its terms. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-05-21 09:55:43 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#127773