[GH-ISSUE #24163] v0.9.2: model save in admin UI overwrites meta.capabilities with form defaults #58883

Open
opened 2026-05-06 00:20:26 -05:00 by GiteaMirror · 0 comments
Owner

Originally created by @zhapostolski on GitHub (Apr 26, 2026).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/24163

Description

In v0.9.2, saving a custom model via Admin > Models > [model] > Save (without making any visible changes) overwrites meta.capabilities in the DB with form defaults (all true), discarding any custom false values that were set programmatically or via the API.

Repro

  1. Set a capability to false directly in the DB:
    UPDATE model
    SET meta = jsonb_set(meta::jsonb, '{capabilities,web_search}', 'false')
    WHERE id = 'My Custom Model';
    
  2. Verify in DB: meta.capabilities.web_search is false.
  3. Open Admin > Models > "My Custom Model" in the browser.
  4. Click Save without changing anything in the form.
  5. Re-check DB: meta.capabilities.web_search is now true.

Expected

Capability values present in the DB should be loaded into the form when opening the model editor, and a no-op save should preserve them. If a capability isn't represented in the UI, it should not be overwritten.

Actual

The form initializes capability checkboxes from internal defaults (all true), not from the DB. On save, those defaults overwrite the persisted DB values.

Affected fields observed

meta.capabilities: web_search, code_interpreter, terminal, image_generation all flip from false -> true on no-op save.

params.tool_ids and meta.toolIds are preserved correctly -- only meta.capabilities is affected.

Impact

For custom model presets where an admin needs to disable a capability (e.g. disable web_search to stop RAG auto-search per message, or disable code_interpreter to prevent fallback fabrication when a tool fails), there's no way to keep that disabled across admin edits. Any user who clicks Save in admin re-enables it.

Environment

  • Open WebUI v0.9.2 (running via ghcr.io/open-webui/open-webui:v0.9.2)
  • PostgreSQL (RDS) backend (DATABASE_URL set)
  • Custom model wrapper with base_model_id = NULL and ID matching a backend model from the OpenAI-compatible endpoint (LiteLLM upstream)

Workaround

Re-run a SQL UPDATE on meta.capabilities after any admin save:

import json, psycopg2, os
conn = psycopg2.connect(os.environ["DATABASE_URL"])
cur = conn.cursor()
cur.execute("SELECT meta FROM model WHERE id=%s", ["My Custom Model"])
m = cur.fetchone()[0]
m["capabilities"]["web_search"] = False
m["capabilities"]["code_interpreter"] = False
cur.execute("UPDATE model SET meta=%s WHERE id=%s", [json.dumps(m), "My Custom Model"])
conn.commit()
Originally created by @zhapostolski on GitHub (Apr 26, 2026). Original GitHub issue: https://github.com/open-webui/open-webui/issues/24163 ## Description In v0.9.2, saving a custom model via Admin > Models > [model] > Save (without making any visible changes) overwrites `meta.capabilities` in the DB with form defaults (all `true`), discarding any custom `false` values that were set programmatically or via the API. ## Repro 1. Set a capability to `false` directly in the DB: ```sql UPDATE model SET meta = jsonb_set(meta::jsonb, '{capabilities,web_search}', 'false') WHERE id = 'My Custom Model'; ``` 2. Verify in DB: `meta.capabilities.web_search` is `false`. 3. Open Admin > Models > "My Custom Model" in the browser. 4. Click **Save** without changing anything in the form. 5. Re-check DB: `meta.capabilities.web_search` is now `true`. ## Expected Capability values present in the DB should be loaded into the form when opening the model editor, and a no-op save should preserve them. If a capability isn't represented in the UI, it should not be overwritten. ## Actual The form initializes capability checkboxes from internal defaults (all `true`), not from the DB. On save, those defaults overwrite the persisted DB values. ## Affected fields observed `meta.capabilities`: `web_search`, `code_interpreter`, `terminal`, `image_generation` all flip from `false` -> `true` on no-op save. `params.tool_ids` and `meta.toolIds` are preserved correctly -- only `meta.capabilities` is affected. ## Impact For custom model presets where an admin needs to **disable** a capability (e.g. disable `web_search` to stop RAG auto-search per message, or disable `code_interpreter` to prevent fallback fabrication when a tool fails), there's no way to keep that disabled across admin edits. Any user who clicks Save in admin re-enables it. ## Environment - Open WebUI v0.9.2 (running via `ghcr.io/open-webui/open-webui:v0.9.2`) - PostgreSQL (RDS) backend (DATABASE_URL set) - Custom model wrapper with `base_model_id = NULL` and ID matching a backend model from the OpenAI-compatible endpoint (LiteLLM upstream) ## Workaround Re-run a SQL UPDATE on `meta.capabilities` after any admin save: ```python import json, psycopg2, os conn = psycopg2.connect(os.environ["DATABASE_URL"]) cur = conn.cursor() cur.execute("SELECT meta FROM model WHERE id=%s", ["My Custom Model"]) m = cur.fetchone()[0] m["capabilities"]["web_search"] = False m["capabilities"]["code_interpreter"] = False cur.execute("UPDATE model SET meta=%s WHERE id=%s", [json.dumps(m), "My Custom Model"]) conn.commit() ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#58883