open-webui/backend/open_webui/retrieval
Classic298 9923c53c10
fix: treat SVG uploads as documents instead of vision images (#30102)
Uploading an .svg to a chat attached it as a vision image input, so the model received a data URI it could not decode. PIL-backed servers answered "cannot identify image file" and OpenAI answered "The image data you provided does not represent a valid image". No setting made it work.

SVG now takes the ordinary file upload path, so its XML source is extracted and indexed and the model can answer questions about it. Rasterizing was the alternative and it would have discarded the part of an SVG a model reads best, the source itself. Raster formats are untouched and still go up as image inputs.

A shared helper replaces the ad hoc image/ prefix checks at the points that decide image input versus document, on both ends. It normalises the content type first, because a stored "image/SVG+xml" or a trailing charset parameter slipped past a plain comparison.

One behaviour change worth knowing: an SVG now needs the model to have the file upload capability, where before it rode in as an image.

Fixes #30100
2026-09-17 17:40:07 -04:00
..
loaders fix: treat SVG uploads as documents instead of vision images (#30102) 2026-09-17 17:40:07 -04:00
models fix: repair two broken logging calls, one of which makes VECTOR_DB=opengauss unusable (#27838) 2026-08-10 22:19:41 -06:00
vector refac 2026-09-06 17:13:32 -04:00
web fix: sync Playwright loader spins a CPU core when a page opens a WebSocket (#30050) 2026-09-15 22:51:37 -04:00
external.py refac 2026-07-27 01:59:17 -04:00
utils.py fix: stop logging a traceback twice per failed vector search (#29981) 2026-09-16 15:59:05 -04:00