mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-07 03:18:23 -05:00
[GH-ISSUE #8914] Using OpenAI API with deepseek-reasoner and pasting an image in to the chat box causes 422: Failed to deserialize the JSON #53988
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @rayone on GitHub (Jan 25, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/8914
Installation Method
Proxmox PXC
Environment
Open WebUI Version: v0.5.4 to v0.5.7
Operating System: Debian 12
Confirmation:
I am on the latest version of both Open WebUI and Ollama.
I have included the System logs.
I have provided the exact steps to reproduce the bug in the "Steps to Reproduce" section below.
Expected Behavior:
Pasting an image in to the chat box and submitting the msg does not cause a failure of the whole chat session and ideally actual response is returned.
Actual Behavior:
422: Failed to deserialize the JSON body into the target type: messages[11]: data did not match any variant of untagged enum ChatCompletionRequestContent at line 1 column [n]
Description
Using OpenAI API with deepseek-reasoner and pasting an image in to the chat box causes a JSON error that breaks the whole session.
Reproduction Details
Steps to Reproduce:
This is not a once off, it's consistent and it also happens with deepseeker-chat.
Relevant log entries:
Jan 25 21:18:39 openwebui start.sh[13972]: INFO [open_webui.routers.openai] get_all_models()
Jan 25 21:18:41 openwebui start.sh[13972]: ERROR [open_webui.routers.openai] 422, message='Attempt to decode JSON with unexpected mimetype: text/plain; charset=utf-8', url='https://api.deepseek.com/chat/completions'
Jan 25 21:18:41 openwebui start.sh[13972]: ERROR [open_webui.routers.openai] 422, message='Unprocessable Entity', url='https://api.deepseek.com/chat/completions'
Jan 25 21:18:41 openwebui start.sh[13972]: Traceback (most recent call last):
Jan 25 21:18:41 openwebui start.sh[13972]: File "/opt/open-webui/backend/open_webui/routers/openai.py", line 696, in generate_chat_completion
Jan 25 21:18:41 openwebui start.sh[13972]: r.raise_for_status()
Jan 25 21:18:41 openwebui start.sh[13972]: File "/usr/local/lib/python3.11/dist-packages/aiohttp/client_reqrep.py", line 1157, in raise_for_status
Jan 25 21:18:41 openwebui start.sh[13972]: raise ClientResponseError(
Jan 25 21:18:41 openwebui start.sh[13972]: aiohttp.client_exceptions.ClientResponseError: 422, message='Unprocessable Entity', url='https://api.deepseek.com/chat/completions'
Jan 25 21:18:41 openwebui start.sh[13972]: INFO: 10.0.21.115:56110 - "POST /api/chat/completions HTTP/1.1" 400 Bad Request
Jan 25 21:18:41 openwebui start.sh[13972]: INFO: 10.0.21.115:56110 - "GET /api/v1/chats/?page=1 HTTP/1.1" 200 OK
@d0rc commented on GitHub (Jan 27, 2025):
It's not a vision model.