mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-06 10:58:17 -05:00
[GH-ISSUE #21418] issue: Task model selector rejects all models — legacy access_control check not updated for access_grants (v0.8.1) #58139
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ahgray on GitHub (Feb 14, 2026).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/21418
Check Existing Issues
Installation Method
Docker
Open WebUI Version
v0.8.1
Ollama Version (if applicable)
n/a
Operating System
Ubuntu 22.04 Docker
Browser (if applicable)
Chrome/Firefox
Confirmation
README.md.Expected Behavior
When an admin selects any model in the Local Task Model or External Task Model dropdowns under Admin Panel → Settings → Interface, the model should be accepted and saved as the task model.
Actual Behavior
Selecting any model (including models confirmed to be public) displays the error toast:
"This model is not publicly available. Please select another model."
The model selection still binds (it doesn't clear), and saving via the API works correctly — only the UI validation is broken.
Steps to Reproduce
Log in as an admin user.
Navigate to Admin Panel → Settings → Interface.
In the Local Task Model dropdown, select any model — including one confirmed as public.
Observe the error toast: "This model is not publicly available. Please select another model."
Repeat with the External Task Model dropdown — same result.
Logs & Screenshots
Error doesn't appear to produce logs or web console output.
Additional Information
Root Cause
PR #21277 replaced the access_control JSON column with the new access_grant table and access_grants array in API responses. However, the task model selector in Interface.svelte was not updated and still checks the old property:
src/lib/components/admin/Settings/Interface.svelte lines 155 and 190:
javascriptif (model?.access_control !== null) {
toast.error($i18n.t('This model is not publicly available. Please select another model.'));
}
Since access_control no longer exists in the model API response, model.access_control is always undefined. In JavaScript, undefined !== null evaluates to true, so every model fails this check — the validation is effectively dead code that blocks all task model selection.
The rest of the codebase already uses the new access_grants pattern. For example, AccessControl.svelte (line 155) and Navbar.svelte (line 29) both define a hasPublicReadGrant helper:
javascriptconst hasPublicReadGrant = (grants) =>
grants.some(
(grant) => grant.principal_type === 'user' && grant.principal_id === '*' && grant.permission === 'read'
);
Workaround
Set the task model via the API directly, bypassing the broken UI validation:
bash# Read current config, set TASK_MODEL, write it back
curl -s http://:3000/api/v1/tasks/config
-H "Authorization: Bearer <API_KEY>" |
python3 -c "import sys, json; c=json.load(sys.stdin); c['TASK_MODEL']=''; print(json.dumps(c))" |
curl -s http://:3000/api/v1/tasks/config/update
-H "Authorization: Bearer <API_KEY>"
-H "Content-Type: application/json" -d @-
Suggested Fix
Replace the legacy access_control checks at lines 155 and 190 with the access_grants pattern used elsewhere in the codebase:
javascript// Before (lines 155 and 190):
if (model?.access_control !== null) {
// After:
if (!model?.access_grants?.some(g => g.principal_type === 'user' && g.principal_id === '*' && g.permission === 'read')) {
Alternatively, consider whether this client-side check is needed at all — task models execute server-side and arguably don't require public access (see also #14172). Removing the check entirely would also resolve the issue and simplify the admin experience.
Related Issues
#21377 — [object Object] error on model access control (partially fixed by commit
f027a01, which addressed the 404/error display but not this task model selector issue)#14172 — Feature request: eliminate public requirement for task models
#21277 — PR that introduced the access control refactor
@tjbck commented on GitHub (Feb 15, 2026):
Should be fixed in dev!