mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-06 10:58:17 -05:00
feat: Vision filter - Route images to a configured vision model while keeping the conversation on the original model #6190
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 @GilGedje on GitHub (Aug 23, 2025).
Check Existing Issues
Problem Description
Desired Solution you'd like
Introduce a Vision Router that:
1. Detects image attachments in a message.
2. If the active model is not vision-capable (or if the user enabled “always pre-process images”), calls a configured vision model.
3. Receives a structured result (caption, OCR text, optional objects/layout JSON).
4. Injects the result into the prompt/context for the original model (no image content forwarded).
5. Marks the image as processed so future turns don’t re-hit the vision model automatically (opt-in reprocess button available).
Alternatives Considered
I have tried many filter functions, yet none was able to deliver with opensource models.
I was able to create a fallback to a vision model when a text model fails, but then the conversation is with the vision model, and not with the wanted model. (since there is an image in the prompt)
Additional Context
No response
@badbubi commented on GitHub (Aug 25, 2025):
Take a look at the Dynamic Vision Router, perhaps you can adapt it for yourself.
https://openwebui.com/f/hub/dynamic_vision_router
@GilGedje commented on GitHub (Aug 25, 2025):
I’m familiar with this function, yet it still doesn’t do what I suggested.
It routes the conversation to the vision model and stays with the vision model for the rest of it, since it sees the image in the context.
Modifying it would be quite difficult to do—I’m not much of a coder.
Still, I think it’s a really good feature that people would love.
@edacul commented on GitHub (Aug 25, 2025):
+1