[GH-ISSUE #23960] issue: Model clone (Save & Create) and model update (Save & Update) return 500 due to unsanitized payload fields #35657

Closed
opened 2026-04-25 09:50:28 -05:00 by GiteaMirror · 1 comment
Owner

Originally created by @ekiine233 on GitHub (Apr 21, 2026).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/23960

Check Existing Issues

  • I have searched for any existing and/or related issues.
  • I have searched for any existing and/or related discussions.
  • I have also searched in the CLOSED issues AND CLOSED discussions and found no related items (your issue might already be addressed on the development branch!).
  • I am using the latest version of Open WebUI.

Installation Method

Docker

Open WebUI Version

v0.9.1

Ollama Version (if applicable)

No response

Operating System

Ubuntu 24.04

Browser (if applicable)

Microsoft Edge 147.0 (Windows)

Confirmation

  • I have read and followed all instructions in README.md.
  • I am using the latest version of both Open WebUI and Ollama.
  • I have included the browser console logs.
  • I have included the Docker container logs.
  • I have provided every relevant configuration, setting, and environment variable used in my setup.
  • I have clearly listed every relevant configuration, custom setting, environment variable, and command-line option that influences my setup (such as Docker Compose overrides, .env values, browser settings, authentication configurations, etc).
  • I have documented step-by-step reproduction instructions that are precise, sequential, and leave nothing to interpretation. My steps:
  • Start with the initial platform/version/OS and dependencies used,
  • Specify exact install/launch/configure commands,
  • List URLs visited, user input (incl. example values/emails/passwords if needed),
  • Describe all options and toggles enabled or changed,
  • Include any files or environmental changes,
  • Identify the expected and actual result at each stage,
  • Ensure any reasonably skilled user can follow and hit the same issue.

Expected Behavior

Model clone ("Save & Create") and model update ("Save & Update") should complete successfully and persist the model configuration.

Actual Behavior

Both operations return 500 Internal Server Error. The frontend sends the full model object including fields the backend does not accept in the create/update request body.

  • Clone (POST /api/v1/models/create): includes openai, permission, connection_type, owned_by, root, parent, object from the source model
  • Update (POST /api/v1/models/model/update): includes user: null, write_access: true

Both operations succeed when called via curl with only the required fields.

Steps to Reproduce

Environment: Docker (ghcr.io/open-webui/open-webui:main), v0.9.1, external OpenAI-compatible API (vLLM)

Clone reproduction:

  1. Go to Admin Panel → Settings → Models
  2. In the model list, click the "..." (More) button on the model to clone
  3. Select "Clone" from the dropdown menu — this opens the model configuration form at /workspace/models/create
  4. Click "Save & Create"
  5. Observe 500 in DevTools Network tab (POST /api/v1/models/create)

Update reproduction:

  1. Create a model via curl with minimal payload (this succeeds):
    curl -X POST http://localhost:8080/api/v1/models/create
    -H "Content-Type: application/json"
    -H "Authorization: Bearer "
    -d '{"id":"test-clone-001","name":"Test Clone","base_model_id":"","meta":{"description":"test"},"params":{}}'
  2. Open the created model in the UI editor
  3. Add a system prompt
  4. Click "Save & Update"
  5. Observe 500 in DevTools Network tab (POST /api/v1/models/model/update)

Key finding: curl with minimal payload → 200 OK. UI with full model object → 500.

Logs & Screenshots

  • No traceback in docker logs — the 500 appears to be caught silently at the Pydantic validation layer
  • nginx error.log is also empty
  • Response body from the server is a generic nginx 500 page (no Python error detail)

Additional Information

The frontend appears to serialize the entire model object (including read-only and relational fields) when submitting create/update requests. The backend rejects these extra fields, but the error is not surfaced in logs or in the API response body.

Confirmed problematic fields:

  • Create: openai, permission, connection_type, owned_by, root, parent, object
  • Update: user (sent as null), write_access

Suggested fix: sanitize the payload in the frontend before submission, or configure the backend to ignore unknown fields.

Originally created by @ekiine233 on GitHub (Apr 21, 2026). Original GitHub issue: https://github.com/open-webui/open-webui/issues/23960 ### Check Existing Issues - [x] I have searched for any existing and/or related issues. - [x] I have searched for any existing and/or related discussions. - [x] I have also searched in the CLOSED issues AND CLOSED discussions and found no related items (your issue might already be addressed on the development branch!). - [x] I am using the latest version of Open WebUI. ### Installation Method Docker ### Open WebUI Version v0.9.1 ### Ollama Version (if applicable) _No response_ ### Operating System Ubuntu 24.04 ### Browser (if applicable) Microsoft Edge 147.0 (Windows) ### Confirmation - [x] I have read and followed all instructions in `README.md`. - [x] I am using the latest version of **both** Open WebUI and Ollama. - [x] I have included the browser console logs. - [x] I have included the Docker container logs. - [x] I have **provided every relevant configuration, setting, and environment variable used in my setup.** - [x] I have clearly **listed every relevant configuration, custom setting, environment variable, and command-line option that influences my setup** (such as Docker Compose overrides, .env values, browser settings, authentication configurations, etc). - [x] I have documented **step-by-step reproduction instructions that are precise, sequential, and leave nothing to interpretation**. My steps: - Start with the initial platform/version/OS and dependencies used, - Specify exact install/launch/configure commands, - List URLs visited, user input (incl. example values/emails/passwords if needed), - Describe all options and toggles enabled or changed, - Include any files or environmental changes, - Identify the expected and actual result at each stage, - Ensure any reasonably skilled user can follow and hit the same issue. ### Expected Behavior Model clone ("Save & Create") and model update ("Save & Update") should complete successfully and persist the model configuration. ### Actual Behavior Both operations return 500 Internal Server Error. The frontend sends the full model object including fields the backend does not accept in the create/update request body. - Clone (POST /api/v1/models/create): includes `openai`, `permission`, `connection_type`, `owned_by`, `root`, `parent`, `object` from the source model - Update (POST /api/v1/models/model/update): includes `user: null`, `write_access: true` Both operations succeed when called via curl with only the required fields. ### Steps to Reproduce Environment: Docker (ghcr.io/open-webui/open-webui:main), v0.9.1, external OpenAI-compatible API (vLLM) Clone reproduction: 1. Go to Admin Panel → Settings → Models 2. In the model list, click the "..." (More) button on the model to clone 3. Select "Clone" from the dropdown menu — this opens the model configuration form at /workspace/models/create 4. Click "Save & Create" 5. Observe 500 in DevTools Network tab (POST /api/v1/models/create) Update reproduction: 1. Create a model via curl with minimal payload (this succeeds): curl -X POST http://localhost:8080/api/v1/models/create \ -H "Content-Type: application/json" \ -H "Authorization: Bearer <token>" \ -d '{"id":"test-clone-001","name":"Test Clone","base_model_id":"<model-id>","meta":{"description":"test"},"params":{}}' 2. Open the created model in the UI editor 3. Add a system prompt 4. Click "Save & Update" 5. Observe 500 in DevTools Network tab (POST /api/v1/models/model/update) Key finding: curl with minimal payload → 200 OK. UI with full model object → 500. ### Logs & Screenshots - No traceback in `docker logs` — the 500 appears to be caught silently at the Pydantic validation layer - nginx error.log is also empty - Response body from the server is a generic nginx 500 page (no Python error detail) ### Additional Information The frontend appears to serialize the entire model object (including read-only and relational fields) when submitting create/update requests. The backend rejects these extra fields, but the error is not surfaced in logs or in the API response body. Confirmed problematic fields: - Create: openai, permission, connection_type, owned_by, root, parent, object - Update: user (sent as null), write_access Suggested fix: sanitize the payload in the frontend before submission, or configure the backend to ignore unknown fields.
GiteaMirror added the bug label 2026-04-25 09:50:28 -05:00
Author
Owner

@tjbck commented on GitHub (Apr 24, 2026):

Addressed in dev.

<!-- gh-comment-id:4311864546 --> @tjbck commented on GitHub (Apr 24, 2026): Addressed in dev.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#35657