[PR #22147] [CLOSED] fix: resolve model aliases in openai proxy, responses, and embeddings endpoints #49563

Closed
opened 2026-04-30 01:51:41 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/open-webui/open-webui/pull/22147
Author: @Classic298
Created: 3/2/2026
Status: Closed

Base: devHead: fix/openai-proxy-alias-resolution


📝 Commits (1)

  • 91cb41c fix: resolve model aliases in openai proxy, responses, and embeddings endpoints

📊 Changes

1 file changed (+28 additions, -2 deletions)

View changed files

📝 backend/open_webui/routers/openai.py (+28 -2)

📄 Description

The proxy (catch-all), responses, and embeddings endpoints only looked up models in the OPENAI_MODELS cache, which contains real backend models but not workspace alias models. When an alias model was requested, it was not found and the request either fell back to the wrong backend (idx=0) or the upstream returned 404 for the unrecognized alias name.

Now all three endpoints check the Models DB for workspace aliases and resolve base_model_id before routing, matching the existing behavior in generate_chat_completion.

Fixes #22134

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.

Note

Deleting the CLA section will lead to immediate closure of your PR and it will not be merged in.


🔄 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/22147 **Author:** [@Classic298](https://github.com/Classic298) **Created:** 3/2/2026 **Status:** ❌ Closed **Base:** `dev` ← **Head:** `fix/openai-proxy-alias-resolution` --- ### 📝 Commits (1) - [`91cb41c`](https://github.com/open-webui/open-webui/commit/91cb41c285181dd0072272fca7e4b1760c7961e9) fix: resolve model aliases in openai proxy, responses, and embeddings endpoints ### 📊 Changes **1 file changed** (+28 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `backend/open_webui/routers/openai.py` (+28 -2) </details> ### 📄 Description The proxy (catch-all), responses, and embeddings endpoints only looked up models in the OPENAI_MODELS cache, which contains real backend models but not workspace alias models. When an alias model was requested, it was not found and the request either fell back to the wrong backend (idx=0) or the upstream returned 404 for the unrecognized alias name. Now all three endpoints check the Models DB for workspace aliases and resolve base_model_id before routing, matching the existing behavior in generate_chat_completion. Fixes #22134 ### Contributor License Agreement <!-- 🚨 DO NOT DELETE THE TEXT BELOW 🚨 Keep the "Contributor License Agreement" confirmation text intact. Deleting it will trigger the CLA-Bot to INVALIDATE your PR. --> By submitting this pull request, I confirm that I have read and fully agree to the [Contributor License Agreement (CLA)](https://github.com/open-webui/open-webui/blob/main/CONTRIBUTOR_LICENSE_AGREEMENT), and I am providing my contributions under its terms. > [!NOTE] > Deleting the CLA section will lead to immediate closure of your PR and it will not be merged in. --- <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-04-30 01:51:41 -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#49563