Merge pull request #312 from cogwheel0/fix-no-reponses-owui-0.6.42

fix(api): prevent NoneType error by adding empty parent_message object
This commit is contained in:
cogwheel
2025-12-22 08:00:45 +05:30
committed by GitHub
2 changed files with 6 additions and 1 deletions

View File

@@ -3292,6 +3292,11 @@ class ApiService {
data['parent_id'] = parentMessageId;
}
// Always include parent_message as empty object to prevent NoneType error in OWUI 0.6.42+
// The server code does: parent_message.get("files", []) which fails if parent_message is None
// See: https://github.com/cogwheel0/conduit/issues/311
data['parent_message'] = <String, dynamic>{};
// Attach background_tasks if provided
if (backgroundTasks != null && backgroundTasks.isNotEmpty) {
data['background_tasks'] = backgroundTasks;