[GH-ISSUE #9380] 0.5.8 Object of type ModelModel is not JSON serializable #15477

Closed
opened 2026-04-19 21:39:36 -05:00 by GiteaMirror · 6 comments
Owner

Originally created by @LazyG9 on GitHub (Feb 5, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/9380

Bug Report

0.5.8

Object of type ModelModel is not JSON serializable
all models is error

Image

Image

Originally created by @LazyG9 on GitHub (Feb 5, 2025). Original GitHub issue: https://github.com/open-webui/open-webui/issues/9380 # Bug Report 0.5.8 Object of type ModelModel is not JSON serializable all models is error ![Image](https://github.com/user-attachments/assets/01afc582-4c46-4725-8bfa-f52e9545e649) ![Image](https://github.com/user-attachments/assets/4e16a942-d072-4ed0-a5ce-8ec2a1da373a)
Author
Owner

@LazyG9 commented on GitHub (Feb 5, 2025):

i`m back to 0.5.7
everything is ok

<!-- gh-comment-id:2636284875 --> @LazyG9 commented on GitHub (Feb 5, 2025): i`m back to 0.5.7 everything is ok
Author
Owner

@LazyG9 commented on GitHub (Feb 5, 2025):

func bug

<!-- gh-comment-id:2636351037 --> @LazyG9 commented on GitHub (Feb 5, 2025): func bug
Author
Owner

@thiswillbeyourgithub commented on GitHub (Feb 5, 2025):

I'm having the same issue, so far caused by my add metadata function when it's calling json.dumps(body). I'm fixing it right now.

Note to devs: It would be nice if clicking on the error message banner could show the admin the trace. That would make it easier to find out the source of the issue.

<!-- gh-comment-id:2636489788 --> @thiswillbeyourgithub commented on GitHub (Feb 5, 2025): I'm having the same issue, so far caused by my [add metadata](https://github.com/thiswillbeyourgithub/openwebui_custom_pipes_filters/blob/main/filters/add_metadata.py) function when it's [calling json.dumps(body)](https://github.com/thiswillbeyourgithub/openwebui_custom_pipes_filters/blob/06b9ffc0c056007d5905d1beef64e9bdfcd4ef70/filters/add_metadata.py#L138). I'm fixing it right now. Note to devs: It would be nice if clicking on the error message banner could show the admin the trace. That would make it easier to find out the source of the issue.
Author
Owner

@thiswillbeyourgithub commented on GitHub (Feb 5, 2025):

Update: It appears the issue was calling json.dumps(meta=ModelMeta(profile_image_url='/static/favicon.png', description="X's prompt", capabilities={'vision': True, 'usage': True, 'citations': True}, position=17, tags=[{'name': 'vision'}, {'name': 'best'}, {'name': 'X'}], filterIds=['addmetadata', 'long_chat_limiter']), access_control={'read': {'group_ids': [], 'user_ids': []}, 'write': {'group_ids': [], 'user_ids': []}}, is_active=True, updated_at=17248X, created_at=172486X)}})

<!-- gh-comment-id:2636508966 --> @thiswillbeyourgithub commented on GitHub (Feb 5, 2025): Update: It appears the issue was calling `json.dumps(meta=ModelMeta(profile_image_url='/static/favicon.png', description="X's prompt", capabilities={'vision': True, 'usage': True, 'citations': True}, position=17, tags=[{'name': 'vision'}, {'name': 'best'}, {'name': 'X'}], filterIds=['addmetadata', 'long_chat_limiter']), access_control={'read': {'group_ids': [], 'user_ids': []}, 'write': {'group_ids': [], 'user_ids': []}}, is_active=True, updated_at=17248X, created_at=172486X)}})`
Author
Owner

@LazyG9 commented on GitHub (Feb 5, 2025):

Update: It appears the issue was calling json.dumps(meta=ModelMeta(profile_image_url='/static/favicon.png', description="X's prompt", capabilities={'vision': True, 'usage': True, 'citations': True}, position=17, tags=[{'name': 'vision'}, {'name': 'best'}, {'name': 'X'}], filterIds=['addmetadata', 'long_chat_limiter']), access_control={'read': {'group_ids': [], 'user_ids': []}, 'write': {'group_ids': [], 'user_ids': []}}, is_active=True, updated_at=17248X, created_at=172486X)}})

i use this one
https://github.com/VariantConst/OpenWebUI-Monitor/pull/34/files

<!-- gh-comment-id:2636514812 --> @LazyG9 commented on GitHub (Feb 5, 2025): > Update: It appears the issue was calling `json.dumps(meta=ModelMeta(profile_image_url='/static/favicon.png', description="X's prompt", capabilities={'vision': True, 'usage': True, 'citations': True}, position=17, tags=[{'name': 'vision'}, {'name': 'best'}, {'name': 'X'}], filterIds=['addmetadata', 'long_chat_limiter']), access_control={'read': {'group_ids': [], 'user_ids': []}, 'write': {'group_ids': [], 'user_ids': []}}, is_active=True, updated_at=17248X, created_at=172486X)}})` i use this one https://github.com/VariantConst/OpenWebUI-Monitor/pull/34/files
Author
Owner

@thiswillbeyourgithub commented on GitHub (Feb 5, 2025):

I fixed my function in version 1.0.1 that can be found there: https://openwebui.com/f/qqqqqqqqqqqqqqqqqqqq/addmetadata

<!-- gh-comment-id:2636544648 --> @thiswillbeyourgithub commented on GitHub (Feb 5, 2025): I fixed my function in version 1.0.1 that can be found there: https://openwebui.com/f/qqqqqqqqqqqqqqqqqqqq/addmetadata
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#15477