[GH-ISSUE #153] bug: chat_messages INSERT crashes when Open WebUI models array reaches the scalar model column — message rows silently dropped #76

Closed
opened 2026-10-18 14:02:42 +00:00 by bsakaguchi · 2 comments
Owner

Originally created by @penradioGables on GitHub (Jul 17, 2026).
Original GitHub issue: https://github.com/open-webui/computer/issues/153

Version: cptr 0.9.8

Summary

Open WebUI sends models: ["cptr/cptr"] (a list). During a chat_messages INSERT, a list value is bound to a scalar TEXT column (schema: chats.py ~L509, model column), raising:

sqlite3.ProgrammingError: Error binding parameter 5: type 'list' is not supported

The INSERT rolls back and that message is not persisted.

Evidence (container stdout)

sqlalchemy.exc.ProgrammingError: (sqlite3.ProgrammingError) Error binding parameter 5: type 'list' is not supported
[INSERT INTO chat_messages (id, chat_id, parent_id, role, content, model, done, output, …)]

Impact

Silent loss of conversation turns; downstream history-reconstruction gaps.

Suggested fix

Coerce/validate non-scalar fields before bind (store model as a scalar, or JSON-encode); reject/normalize list-valued model at the gateway boundary.

Originally created by @penradioGables on GitHub (Jul 17, 2026). Original GitHub issue: https://github.com/open-webui/computer/issues/153 **Version:** cptr 0.9.8 ## Summary Open WebUI sends `models: ["cptr/cptr"]` (a list). During a `chat_messages` INSERT, a list value is bound to a scalar TEXT column (schema: `chats.py` ~L509, `model` column), raising: ``` sqlite3.ProgrammingError: Error binding parameter 5: type 'list' is not supported ``` The INSERT rolls back and that message is not persisted. ## Evidence (container stdout) ``` sqlalchemy.exc.ProgrammingError: (sqlite3.ProgrammingError) Error binding parameter 5: type 'list' is not supported [INSERT INTO chat_messages (id, chat_id, parent_id, role, content, model, done, output, …)] ``` ## Impact Silent loss of conversation turns; downstream history-reconstruction gaps. ## Suggested fix Coerce/validate non-scalar fields before bind (store `model` as a scalar, or JSON-encode); reject/normalize list-valued `model` at the gateway boundary.
Author
Owner

@owui-terminator[bot] commented on GitHub (Jul 17, 2026):

⚠️ Missing Issue Title Prefix

@penradioGables, your issue title is missing a categorising prefix (e.g. bug:, feat:, docs:).

Please update the title to lead with one of:

  • bug: bug report or error
  • feat: feature request or enhancement
  • docs: documentation issue
  • question: usage question
  • help: support request

Example: bug: Login fails when the password contains special characters

<!-- gh-comment-id:4998147585 --> @owui-terminator[bot] commented on GitHub (Jul 17, 2026): # ⚠️ Missing Issue Title Prefix @penradioGables, your issue title is missing a categorising prefix (e.g. `bug:`, `feat:`, `docs:`). Please update the title to lead with one of: - **bug**: bug report or error - **feat**: feature request or enhancement - **docs**: documentation issue - **question**: usage question - **help**: support request Example: `bug: Login fails when the password contains special characters`
Author
Owner

@tjbck commented on GitHub (Jul 18, 2026):

Should be addressed!

<!-- gh-comment-id:5010222830 --> @tjbck commented on GitHub (Jul 18, 2026): Should be addressed!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
open-webui/computer#76
No description provided.