mirror of
https://github.com/langgenius/dify-official-plugins.git
synced 2026-07-22 01:55:27 -04:00
[PR #2574] [MERGED] feat: Add vision support for text embedding and reranker model #2580
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?
📋 Pull Request Information
Original PR: https://github.com/langgenius/dify-official-plugins/pull/2574
Author: @PaimonLumine
Created: 2/11/2026
Status: ✅ Merged
Merged: 2/11/2026
Merged by: @crazywoola
Base:
main← Head:main📝 Commits (5)
3e1e501feat(openai_api_compatible): add multimodal vision support to rerank0528c59Merge branch 'langgenius:main' into main61b3622fix(rerank): handle None features list and simplify text-only mode7509627fix(rerank): correct top_n=0 handling and add SSRF protectiona843da2Merge branch 'main' into main📊 Changes
5 files changed (+979 additions, -15 deletions)
View changed files
📝
.gitignore(+1 -0)📝
models/openai_api_compatible/manifest.yaml(+1 -1)📝
models/openai_api_compatible/models/rerank/rerank.py(+423 -3)📝
models/openai_api_compatible/models/text_embedding/text_embedding.py(+516 -11)📝
models/openai_api_compatible/provider/openai_api_compatible.yaml(+38 -0)📄 Description
Description
This PR enhances the
openai_api_compatibleplugin to add multimodal support for Qwen3-VL Embedding and Qwen3-VL Reranker models via custom base URL configuration.Key Changes
Text Embedding Model (
text_embedding.py)max_tokens)vision_supportcredential option to enable multimodal capabilitiesEmbeddingUsagePydantic validation errors by adding all required fieldsRerank Model (
rerank.py)_invoke_multimodalmethod following vLLM/Qwen3-VL-Reranker API specificationScoreMultiModalParamformat for documents:vision_supportcredential optionBoth Models
endpoint_model_namecredential to support custom model namingSupported Use Cases
Configuration
Users can enable vision support by setting:
vision_support: "support" (enables multimodal capabilities)endpoint_url: Custom API endpoint (e.g.,http://baseurl.com)endpoint_model_name: Model identifier for the endpointRelated Issues or Context
This enhancement allows Dify users to leverage Qwen3-VL models deployed via vLLM or compatible inference engines for:
This PR contains Changes to Non-Plugin
This PR contains Changes to Non-LLM Models Plugin
This PR contains Changes to LLM Models Plugin
EmbeddingUsagevalidation errorsVersion Control (Any Changes to the Plugin Will Require Bumping the Version)
VersionField, Not in Meta Section)Dify Plugin SDK Version
dify_plugin>=0.3.0,<0.6.0is in requirements.txtEnvironment Verification (If Any Code Changes)
Local Deployment Environment
SaaS Environment
This is not tested because my self-hosted models are private.
Screenshots/Demonstrations
Multimodal Embedding Test
Multimodal Rerank Test
Testing Checklist
Known Issues
Notes
Qwen3-VL-Reranker Limitation: The model uses a single-tower architecture, so queries must be text-only. Documents can be multimodal.
Image Processing: The plugin automatically handles:
Text Chunking: For embedding models with token limits, the plugin automatically:
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.