Self Checks
Dify version
Self-hosted Docker. I reproduced this with the langgenius/openai_api_compatible plugin version 0.0.51.
Plugin version
openai_api_compatible 0.0.51
Cloud or Self Hosted
Self Hosted (Docker)
Steps to reproduce
- Install and configure the
OpenAI-API-compatible model provider.
- Add a text embedding model with vision support enabled.
- Use different values for the Dify model registration name and the actual upstream API model name:
{
"model_name": "Qwen3-VL-Embedding",
"endpoint_url": "http://host.docker.internal:18080/v1",
"endpoint_model_name": "qwen3-vl-embedding-8b-awq",
"vision_support": "support",
"encoding_format": "float",
"document_prefix": "document:",
"query_prefix": "query:"
}
- Create or use a multimodal dataset (
is_multimodal=true) so Dify calls dispatch/multimodal_embedding/invoke.
- Index a document that triggers multimodal embedding.
Expected Behavior
Both text-only embedding and multimodal embedding should send the configured upstream model name from endpoint_model_name to the OpenAI-compatible API.
In the example above, the request body should contain:
{
"model": "qwen3-vl-embedding-8b-awq"
}
This is also how the text-only embedding path currently behaves.
Actual Behavior
The text-only embedding path works correctly and sends endpoint_model_name:
endpoint_model_name = credentials.get("endpoint_model_name", "") or model
payload = {
"model": endpoint_model_name,
"input": batch,
}
However, the multimodal embedding path calls _embed_multimodal_via_chat(...) with model, and then create_chat_embeddings(...) also receives model=model instead of endpoint_model_name.
As a result, the upstream OpenAI-compatible server receives:
{
"model": "Qwen3-VL-Embedding"
}
instead of:
{
"model": "qwen3-vl-embedding-8b-awq"
}
The upstream server then returns 404 because Qwen3-VL-Embedding is the Dify display/registration name, not the real upstream model id.
Error log
From Dify API logs:
HTTP Request: POST http://plugin_daemon:5002/plugin/.../dispatch/multimodal_embedding/invoke "HTTP/1.1 200 OK"
Error in stream response for plugin {'code': -500, 'message': '{"message":"{\"args\":{\"description\":\"[models] Error: Error code: 404 - {\'error\': {\'message\': \'The model `Qwen3-VL-Embedding` does not exist.\', \'type\': \'NotFoundError\', \'param\': None, \'code\': 404}}\"},\"error_type\":\"InvokeError\",\"message\":\"[models] Error: Error code: 404 - {\'error\': {\'message\': \'The model `Qwen3-VL-Embedding` does not exist.\', \'type\': \'NotFoundError\', \'param\': None, \'code\': 404}}\"}","error_type":"PluginInvokeError","args":null}'
The same provider configuration works for text-only embedding, and the proxy logs show many successful POST /v1/embeddings requests. The failure only appears when the multimodal embedding path is used.
Suggested fix
Use the resolved endpoint model name in the multimodal path as well. For example:
endpoint_model_name = credentials.get("endpoint_model_name", "") or model
...
self._embed_multimodal_via_chat(
endpoint_model_name,
credentials,
multimodal_inputs,
endpoint_url,
api_key,
max_chunks,
)
or pass both the Dify display model name and the upstream endpoint model name separately, but the OpenAI-compatible request body should use endpoint_model_name consistently for text-only and multimodal embedding.
Additional context
A previous issue requested multimodal embedding support (#2330), but this report is about the current multimodal implementation ignoring endpoint_model_name while the text-only implementation already honors it.
Self Checks
Dify version
Self-hosted Docker. I reproduced this with the
langgenius/openai_api_compatibleplugin version0.0.51.Plugin version
openai_api_compatible 0.0.51Cloud or Self Hosted
Self Hosted (Docker)
Steps to reproduce
OpenAI-API-compatiblemodel provider.{ "model_name": "Qwen3-VL-Embedding", "endpoint_url": "http://host.docker.internal:18080/v1", "endpoint_model_name": "qwen3-vl-embedding-8b-awq", "vision_support": "support", "encoding_format": "float", "document_prefix": "document:", "query_prefix": "query:" }is_multimodal=true) so Dify callsdispatch/multimodal_embedding/invoke.Expected Behavior
Both text-only embedding and multimodal embedding should send the configured upstream model name from
endpoint_model_nameto the OpenAI-compatible API.In the example above, the request body should contain:
{ "model": "qwen3-vl-embedding-8b-awq" }This is also how the text-only embedding path currently behaves.
Actual Behavior
The text-only embedding path works correctly and sends
endpoint_model_name:However, the multimodal embedding path calls
_embed_multimodal_via_chat(...)withmodel, and thencreate_chat_embeddings(...)also receivesmodel=modelinstead ofendpoint_model_name.As a result, the upstream OpenAI-compatible server receives:
{ "model": "Qwen3-VL-Embedding" }instead of:
{ "model": "qwen3-vl-embedding-8b-awq" }The upstream server then returns 404 because
Qwen3-VL-Embeddingis the Dify display/registration name, not the real upstream model id.Error log
From Dify API logs:
The same provider configuration works for text-only embedding, and the proxy logs show many successful
POST /v1/embeddingsrequests. The failure only appears when the multimodal embedding path is used.Suggested fix
Use the resolved endpoint model name in the multimodal path as well. For example:
or pass both the Dify display model name and the upstream endpoint model name separately, but the OpenAI-compatible request body should use
endpoint_model_nameconsistently for text-only and multimodal embedding.Additional context
A previous issue requested multimodal embedding support (#2330), but this report is about the current multimodal implementation ignoring
endpoint_model_namewhile the text-only implementation already honors it.