mirror of
https://github.com/open-webui/open-webui.git
synced 2026-07-16 06:03:26 -05:00
[GH-ISSUE #15002] issue: JSON Parsing Error in Docling Picture Description Configuration Field #56104
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 @healdgar on GitHub (Jun 15, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/15002
Check Existing Issues
Installation Method
Docker
Open WebUI Version
0.6.14
Ollama Version (if applicable)
0.9.0
Operating System
ghcr.io/open-webui/open-webui:main
Browser (if applicable)
Chrome (latest)
Confirmation
README.md.Expected Behavior
When entering valid JSON configuration in either the
picture_description_localorpicture_description_apifields in the Docling settings, the configuration should:The UI tooltip states "Enter config in JSON format" which implies JSON should be accepted and parsed correctly.
Actual Behavior
Any JSON configuration entered in either
picture_description_localorpicture_description_apifields results in validation errors where individual JSON field names are treated as strings instead of parsing the complete JSON object.Error Pattern:
The
'input'value changes to individual field names like:'url''params''model''temperature''options'This indicates the JSON is being split and individual keys are being validated as complete objects, which fails.
Steps to Reproduce
Environment Setup:
Docker Compose Configuration:
Reproduction Steps:
docker compose up -dhttp://localhost:3000Alternative test with minimal JSON:
Test with picture_description_local field:
Logs & Screenshots
Browser Console Error:
Detailed Error Response:
Docker Container Logs (open-webui):
Docker Container Logs (docling):
Additional Information
Configuration Details:
Environment Variables:
Test JSON Configurations Attempted:
Additional Information
Root Cause Analysis:
The error pattern suggests that the frontend or backend code is incorrectly processing the JSON input by:
Impact:
Verification that Docling works independently:
Direct API call to Docling with the same JSON configuration works correctly:
This confirms the issue is in Open WebUI's JSON parsing/validation, not in Docling itself.
Additional Testing:
picture_description_localandpicture_description_apifieldsThis bug prevents the Docling picture description feature from being usable through the Open WebUI interface and requires investigation of the JSON parsing logic in the configuration validation system.
@tjbck commented on GitHub (Jun 16, 2025):
#14903 Most likely related, confirmation wanted here!
@healdgar commented on GitHub (Jun 16, 2025):
Yes, I think https://github.com/open-webui/open-webui/pull/14903 may have solved the issue. I will pull the image and test. If you don't hear anything from me in an hour, it means it was resolve and you can close this.
The Fix: The PR serializes the content before sending it to Docling
Exact Problem: Open WebUI was trying to parse the JSON and send individual fields instead of the complete JSON string
@healdgar commented on GitHub (Jun 16, 2025):
It's not working still. It seems as though Docling expects an object and not a JSON string? This might be a Docling-side parsing bug.
@vaclcer commented on GitHub (Jun 17, 2025):
Hmm, I can confirm it was functioning correctly in my feature branch, as shown at pictures in https://github.com/open-webui/open-webui/pull/14903
I will investigate what is going on..
Edit: And it still is (with v0.6.15)! Just make sure you are using a valid JSON, for example:
Edit 2: docs updated https://github.com/open-webui/docs/pull/584
@arunbugkiller commented on GitHub (Jun 20, 2025):
@vaclcer @healdgar I have been experimenting with self-hosted docling, as it happens it is taking too long to process a simple PDF file. Any recommendation on the underlying hardware based on your experience with the same. I am currently hosting it on a 32GB RAM, 16 core vCPU (shared) server.
@vaclcer commented on GitHub (Jun 20, 2025):
picture description feature is by default using a VLM, so I would guess you need a GPU to make it reasonable fast.
Since this is not an issue anymore, I would suggest continuing in a Discussion ..
@badgerde commented on GitHub (Jul 4, 2025):
I am using openwebui 0.6.15 and running docling in a separate docker which works fine without image description.
Getting picture description to work seems still impossible for me,
I have been trying using the configuration examples provided, but to no success.
fastapi.exceptions.HTTPException: 400: Error calling Docling: Error calling Docling API: Unprocessable Entity - [{'type': 'model_attributes_type', 'loc': ['body', 'picture_description_local'], 'msg': 'Input should be a valid dictionary or object to extract fields from', 'input': '{"repo_id": "HuggingFaceTB/SmolVLM-256-Instruct", "generation_config": {"max_new_tokens": 200, "do_sample": false}, "prompt": "Describe this image in a few sentences."}'}]
This is the config used (taken from docling.md)
{
"repo_id": "HuggingFaceTB/SmolVLM-256-Instruct",
"generation_config": {
"max_new_tokens": 200,
"do_sample": false
},
"prompt": "Describe this image in a few sentences."
}
@Soliver84 commented on GitHub (Jul 18, 2025):
Yes, they should release a patch as soon as possible.
So that Docling works with /V1/ and the picture problem is fixed.
@rgaricano commented on GitHub (Jul 18, 2025):
there are already a PR that address it: https://github.com/open-webui/open-webui/pull/15785
@ju6ge commented on GitHub (Mar 5, 2026):
Hey guys,
I am hitting on the same issue as described here, just with a different field from the docling api, i am using the
vlm_pipeline_model_apiparameter. But I think this is a more general problem with the implementation in OpenWebUi and not a problem on thedoclingside of things. #14903 only partly addresses this for the fields that where relevant to the submitter.I would have opened a separate Issue for this, but the Issue creation process requests a lot of information that is entirely irrelevant to the problem I am describing. So I have opted to but the information here instead. I hope this does not go under as this Issue is marked as closed.
Generally there is a difference between using
docling/v1/convert/urlanddocling/v1/convert/fileapi endpoints. The difference being thatv1/convert/urlexpects a json body while thedocling/v1/convert/fileendpoint expectsmultipart/form-datathis is where the issue comes in, when OpenWebUi sends the json in a convert file request all complex json fields need to have the same work around applied as in #14903 that is quite a few fields. If any field is no converted to a json string usingjson.dumpsit will cause issues with deserialization on the docling serve endpoint.Kind regards,
ju6ge