fix: ignore Open WebUI-owned keys in upstream model listings - #29693
Open
Classic298 wants to merge 1 commit into
Open
fix: ignore Open WebUI-owned keys in upstream model listings#29693Classic298 wants to merge 1 commit into
Classic298 wants to merge 1 commit into
Conversation
Models from an OpenAI-compatible connection are merged with the upstream response spread in verbatim, so a gateway can set keys Open WebUI assigns itself. A gateway sending `preset` makes the admin model list treat a model that has no workspace entry as a preset, so clicking Edit opens the workspace model editor on an id that does not exist there and the request 404s. `pipe`, `arena`, `action_ids` and `filter_ids` do more damage: they route chat completions to a local function that is not there, let access be decided by upstream-supplied grants, and attach local functions to a remote model. Upstream entries are now merged without those keys. Every other field, including ones Open WebUI knows nothing about, still passes through untouched, and models that Open WebUI itself marks as presets are unaffected. One consequence worth calling out: when a connection points at another Open WebUI instance, that instance's `info` block is no longer inherited, so those models lose the remote description, icon and capability flags. Inheriting another instance's database-shaped state, down to its `user_id` and access grants, is what makes this whole class of bug possible, so it goes with the rest. Fixes open-webui#29629
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Models from an OpenAI-compatible connection are merged with the upstream response spread in verbatim, so a gateway can set keys Open WebUI assigns itself. A gateway sending
presetmakes the admin model list treat a model that has no workspace entry as a preset, so clicking Edit opens the workspace model editor on an id that does not exist there and the request 404s.pipe,arena,action_idsandfilter_idsdo more damage: they route chat completions to a local function that is not there, let access be decided by upstream-supplied grants, and attach local functions to a remote model.Upstream entries are now merged without those keys. Every other field, including ones Open WebUI knows nothing about, still passes through untouched, and models that Open WebUI itself marks as presets are unaffected.
One consequence worth calling out: when a connection points at another Open WebUI instance, that instance's
infoblock is no longer inherited, so those models lose the remote description, icon and capability flags. Inheriting another instance's database-shaped state, down to itsuser_idand access grants, is what makes this whole class of bug possible, so it goes with the rest.Fixes #29629
Contributor License Agreement