Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fix: ignore Open WebUI-owned keys in upstream model listings - #29693

Open
Classic298 wants to merge 1 commit into
open-webui:devfrom
Classic298:fix-upstream-model-field-passthrough
Open

fix: ignore Open WebUI-owned keys in upstream model listings#29693
Classic298 wants to merge 1 commit into
open-webui:devfrom
Classic298:fix-upstream-model-field-passthrough

Conversation

@Classic298

Copy link
Copy Markdown
Member

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 #29629

Contributor License Agreement

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant