NotImplementedError thrown when embedding a document using vertex AI's text-multilingual-embedding-002 model #519

Closed
opened 2026-02-16 10:19:38 -05:00 by yindo · 6 comments
Owner

Originally created by @Armando200108 on GitHub (Aug 5, 2025).

Self Checks

  • I have read the Contributing Guide and Language Policy.
  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report, otherwise it will be closed.
  • 【中文用户 & Non English User】请使用英语提交,否则会被关闭 :)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

1.7.1

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

Submit a txt file in the file upload section of the knowledge base, select the embedding model named “text-multilingual-embedding-002”, and the rerank model named “amazon.rerank-v1:0”. After submitting, observe the log to find the result

log details:

worker-1  | 2025-08-05 14:05:26.306 ERROR [ThreadPoolExecutor-0_0] [cached_embedding.py:98] - Failed to embed documents: %s
worker-1  | Traceback (most recent call last):
worker-1  |   File "/app/api/core/model_runtime/model_providers/__base/text_embedding_model.py", line 42, in invoke
worker-1  |     return plugin_model_manager.invoke_text_embedding(
worker-1  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
worker-1  |   File "/app/api/core/plugin/impl/model.py", line 273, in invoke_text_embedding
worker-1  |     for resp in response:
worker-1  |                 ^^^^^^^^
worker-1  |   File "/app/api/core/plugin/impl/base.py", line 211, in _request_with_plugin_daemon_response_stream
worker-1  |     self._handle_plugin_daemon_error(error.error_type, error.message)
worker-1  |   File "/app/api/core/plugin/impl/base.py", line 245, in _handle_plugin_daemon_error
worker-1  |     raise PluginInvokeError(description=message)
worker-1  | core.plugin.impl.exc.PluginInvokeError: PluginInvokeError: {"args":{},"error_type":"NotImplementedError","message":""}
worker-1  | 
worker-1  | During handling of the above exception, another exception occurred:
worker-1  | 
worker-1  | Traceback (most recent call last):
worker-1  |   File "/app/api/core/rag/embedding/cached_embedding.py", line 61, in embed_documents
worker-1  |     embedding_result = self._model_instance.invoke_text_embedding(
worker-1  |                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
worker-1  |   File "/app/api/core/model_manager.py", line 221, in invoke_text_embedding
worker-1  |     self._round_robin_invoke(
worker-1  |   File "/app/api/core/model_manager.py", line 370, in _round_robin_invoke
worker-1  |     return function(*args, **kwargs)
worker-1  |            ^^^^^^^^^^^^^^^^^^^^^^^^^
worker-1  |   File "/app/api/core/model_runtime/model_providers/__base/text_embedding_model.py", line 53, in invoke
worker-1  |     raise self._transform_invoke_error(e)
worker-1  | core.model_runtime.errors.invoke.InvokeError: [vertex_ai] Error: PluginInvokeError: {"args":{},"error_type":"NotImplementedError","message":""}
worker-1  | 2025-08-05 14:05:26.310 ERROR [Dummy-14] [indexing_runner.py:96] - consume document failed
worker-1  | Traceback (most recent call last):
worker-1  |   File "/app/api/core/model_runtime/model_providers/__base/text_embedding_model.py", line 42, in invoke
worker-1  |     return plugin_model_manager.invoke_text_embedding(
worker-1  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
worker-1  |   File "/app/api/core/plugin/impl/model.py", line 273, in invoke_text_embedding
worker-1  |     for resp in response:
worker-1  |                 ^^^^^^^^
worker-1  |   File "/app/api/core/plugin/impl/base.py", line 211, in _request_with_plugin_daemon_response_stream
worker-1  |     self._handle_plugin_daemon_error(error.error_type, error.message)
worker-1  |   File "/app/api/core/plugin/impl/base.py", line 245, in _handle_plugin_daemon_error
worker-1  |     raise PluginInvokeError(description=message)
worker-1  | core.plugin.impl.exc.PluginInvokeError: PluginInvokeError: {"args":{},"error_type":"NotImplementedError","message":""}
worker-1  | 
worker-1  | During handling of the above exception, another exception occurred:
worker-1  | 
worker-1  | Traceback (most recent call last):
worker-1  |   File "/app/api/core/indexing_runner.py", line 80, in run
worker-1  |     self._load(
worker-1  |   File "/app/api/core/indexing_runner.py", line 576, in _load
worker-1  |     tokens += future.result()
worker-1  |               ^^^^^^^^^^^^^^^
worker-1  |   File "/usr/local/lib/python3.12/concurrent/futures/_base.py", line 456, in result
worker-1  |     return self.__get_result()
worker-1  |            ^^^^^^^^^^^^^^^^^^^
worker-1  |   File "/usr/local/lib/python3.12/concurrent/futures/_base.py", line 401, in __get_result
worker-1  |     raise self._exception
worker-1  |   File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 59, in run
worker-1  |     result = self.fn(*self.args, **self.kwargs)
worker-1  |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
worker-1  |   File "/app/api/core/indexing_runner.py", line 631, in _process_chunk
worker-1  |     index_processor.load(dataset, chunk_documents, with_keywords=False)
worker-1  |   File "/app/api/core/rag/index_processor/processor/paragraph_index_processor.py", line 78, in load
worker-1  |     vector.create(documents)
worker-1  |   File "/app/api/core/rag/datasource/vdb/vector_factory.py", line 188, in create
worker-1  |     batch_embeddings = self._embeddings.embed_documents([document.page_content for document in batch])
worker-1  |                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
worker-1  |   File "/app/api/core/rag/embedding/cached_embedding.py", line 99, in embed_documents
worker-1  |     raise ex
worker-1  |   File "/app/api/core/rag/embedding/cached_embedding.py", line 61, in embed_documents
worker-1  |     embedding_result = self._model_instance.invoke_text_embedding(
worker-1  |                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
worker-1  |   File "/app/api/core/model_manager.py", line 221, in invoke_text_embedding
worker-1  |     self._round_robin_invoke(
worker-1  |   File "/app/api/core/model_manager.py", line 370, in _round_robin_invoke
worker-1  |     return function(*args, **kwargs)
worker-1  |            ^^^^^^^^^^^^^^^^^^^^^^^^^
worker-1  |   File "/app/api/core/model_runtime/model_providers/__base/text_embedding_model.py", line 53, in invoke
worker-1  |     raise self._transform_invoke_error(e)

✔️ Expected Behavior

Text can be embedded normally

Actual Behavior

Error reported, message: [vertex_ai] Error: PluginInvokeError: {“args”:{}, ‘error_type’: " NotImplementedError“, ‘message’:”"}

Originally created by @Armando200108 on GitHub (Aug 5, 2025). ### Self Checks - [x] I have read the [Contributing Guide](https://github.com/langgenius/dify/blob/main/CONTRIBUTING.md) and [Language Policy](https://github.com/langgenius/dify/issues/1542). - [x] This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general). - [x] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [x] I confirm that I am using English to submit this report, otherwise it will be closed. - [x] 【中文用户 & Non English User】请使用英语提交,否则会被关闭 :) - [x] Please do not modify this template :) and fill in all the required fields. ### Dify version 1.7.1 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce Submit a txt file in the file upload section of the knowledge base, select the embedding model named “text-multilingual-embedding-002”, and the rerank model named “amazon.rerank-v1:0”. After submitting, observe the log to find the result log details: ``` worker-1 | 2025-08-05 14:05:26.306 ERROR [ThreadPoolExecutor-0_0] [cached_embedding.py:98] - Failed to embed documents: %s worker-1 | Traceback (most recent call last): worker-1 | File "/app/api/core/model_runtime/model_providers/__base/text_embedding_model.py", line 42, in invoke worker-1 | return plugin_model_manager.invoke_text_embedding( worker-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ worker-1 | File "/app/api/core/plugin/impl/model.py", line 273, in invoke_text_embedding worker-1 | for resp in response: worker-1 | ^^^^^^^^ worker-1 | File "/app/api/core/plugin/impl/base.py", line 211, in _request_with_plugin_daemon_response_stream worker-1 | self._handle_plugin_daemon_error(error.error_type, error.message) worker-1 | File "/app/api/core/plugin/impl/base.py", line 245, in _handle_plugin_daemon_error worker-1 | raise PluginInvokeError(description=message) worker-1 | core.plugin.impl.exc.PluginInvokeError: PluginInvokeError: {"args":{},"error_type":"NotImplementedError","message":""} worker-1 | worker-1 | During handling of the above exception, another exception occurred: worker-1 | worker-1 | Traceback (most recent call last): worker-1 | File "/app/api/core/rag/embedding/cached_embedding.py", line 61, in embed_documents worker-1 | embedding_result = self._model_instance.invoke_text_embedding( worker-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ worker-1 | File "/app/api/core/model_manager.py", line 221, in invoke_text_embedding worker-1 | self._round_robin_invoke( worker-1 | File "/app/api/core/model_manager.py", line 370, in _round_robin_invoke worker-1 | return function(*args, **kwargs) worker-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^ worker-1 | File "/app/api/core/model_runtime/model_providers/__base/text_embedding_model.py", line 53, in invoke worker-1 | raise self._transform_invoke_error(e) worker-1 | core.model_runtime.errors.invoke.InvokeError: [vertex_ai] Error: PluginInvokeError: {"args":{},"error_type":"NotImplementedError","message":""} worker-1 | 2025-08-05 14:05:26.310 ERROR [Dummy-14] [indexing_runner.py:96] - consume document failed worker-1 | Traceback (most recent call last): worker-1 | File "/app/api/core/model_runtime/model_providers/__base/text_embedding_model.py", line 42, in invoke worker-1 | return plugin_model_manager.invoke_text_embedding( worker-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ worker-1 | File "/app/api/core/plugin/impl/model.py", line 273, in invoke_text_embedding worker-1 | for resp in response: worker-1 | ^^^^^^^^ worker-1 | File "/app/api/core/plugin/impl/base.py", line 211, in _request_with_plugin_daemon_response_stream worker-1 | self._handle_plugin_daemon_error(error.error_type, error.message) worker-1 | File "/app/api/core/plugin/impl/base.py", line 245, in _handle_plugin_daemon_error worker-1 | raise PluginInvokeError(description=message) worker-1 | core.plugin.impl.exc.PluginInvokeError: PluginInvokeError: {"args":{},"error_type":"NotImplementedError","message":""} worker-1 | worker-1 | During handling of the above exception, another exception occurred: worker-1 | worker-1 | Traceback (most recent call last): worker-1 | File "/app/api/core/indexing_runner.py", line 80, in run worker-1 | self._load( worker-1 | File "/app/api/core/indexing_runner.py", line 576, in _load worker-1 | tokens += future.result() worker-1 | ^^^^^^^^^^^^^^^ worker-1 | File "/usr/local/lib/python3.12/concurrent/futures/_base.py", line 456, in result worker-1 | return self.__get_result() worker-1 | ^^^^^^^^^^^^^^^^^^^ worker-1 | File "/usr/local/lib/python3.12/concurrent/futures/_base.py", line 401, in __get_result worker-1 | raise self._exception worker-1 | File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 59, in run worker-1 | result = self.fn(*self.args, **self.kwargs) worker-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ worker-1 | File "/app/api/core/indexing_runner.py", line 631, in _process_chunk worker-1 | index_processor.load(dataset, chunk_documents, with_keywords=False) worker-1 | File "/app/api/core/rag/index_processor/processor/paragraph_index_processor.py", line 78, in load worker-1 | vector.create(documents) worker-1 | File "/app/api/core/rag/datasource/vdb/vector_factory.py", line 188, in create worker-1 | batch_embeddings = self._embeddings.embed_documents([document.page_content for document in batch]) worker-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ worker-1 | File "/app/api/core/rag/embedding/cached_embedding.py", line 99, in embed_documents worker-1 | raise ex worker-1 | File "/app/api/core/rag/embedding/cached_embedding.py", line 61, in embed_documents worker-1 | embedding_result = self._model_instance.invoke_text_embedding( worker-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ worker-1 | File "/app/api/core/model_manager.py", line 221, in invoke_text_embedding worker-1 | self._round_robin_invoke( worker-1 | File "/app/api/core/model_manager.py", line 370, in _round_robin_invoke worker-1 | return function(*args, **kwargs) worker-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^ worker-1 | File "/app/api/core/model_runtime/model_providers/__base/text_embedding_model.py", line 53, in invoke worker-1 | raise self._transform_invoke_error(e) ``` ### ✔️ Expected Behavior Text can be embedded normally ### ❌ Actual Behavior Error reported, message: [vertex_ai] Error: PluginInvokeError: {“args”:{}, ‘error_type’: " NotImplementedError“, ‘message’:”"}
yindo closed this issue 2026-02-16 10:19:38 -05:00
Author
Owner

@Armando200108 commented on GitHub (Aug 5, 2025):

Meanwhile, when I use an extremely simple workflow directly (start -> gemini 2.5 pro -> outout) and type Hello World, it outputs the following error:

Run failed: [vertex_ai] Error: PluginInvokeError: {"args":{},"error_type":"AttributeError","message":"'list' object has no attribute 'get'"}
@Armando200108 commented on GitHub (Aug 5, 2025): Meanwhile, when I use an extremely simple workflow directly (start -> gemini 2.5 pro -> outout) and type Hello World, it outputs the following error: ``` Run failed: [vertex_ai] Error: PluginInvokeError: {"args":{},"error_type":"AttributeError","message":"'list' object has no attribute 'get'"} ```
Author
Owner

@Meshinfo commented on GitHub (Aug 5, 2025):

+1 ,the same error when trying to use vertex embedding models in KB

@Meshinfo commented on GitHub (Aug 5, 2025): +1 ,the same error when trying to use vertex embedding models in KB
Author
Owner

@Armando200108 commented on GitHub (Aug 5, 2025):

Apologies to all, after checking with other departments, it has been confirmed that Google Service Account was disabled by this department in the early hours of this morning, which led to this issue, and the issue will not happen after restoring the account.

@Armando200108 commented on GitHub (Aug 5, 2025): Apologies to all, after checking with other departments, it has been confirmed that Google Service Account was disabled by this department in the early hours of this morning, which led to this issue, and the issue will not happen after restoring the account.
Author
Owner

@Meshinfo commented on GitHub (Aug 5, 2025):

This is not my case, i am sure the vertx ai api works fine,but still get the error message of :
Traceback (most recent call last):
File "/app/api/core/indexing_runner.py", line 80, in run
self._load(
File "/app/api/core/indexing_runner.py", line 575, in _load
tokens += future.result()
^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/concurrent/futures/_base.py", line 456, in result
return self.__get_result()
^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/concurrent/futures/_base.py", line 401, in __get_result
raise self._exception
File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 59, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/api/core/indexing_runner.py", line 630, in _process_chunk
index_processor.load(dataset, chunk_documents, with_keywords=False)
File "/app/api/core/rag/index_processor/processor/paragraph_index_processor.py", line 78, in load
vector.create(documents)
File "/app/api/core/rag/datasource/vdb/vector_factory.py", line 188, in create
batch_embeddings = self._embeddings.embed_documents([document.page_content for document in batch])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/api/core/rag/embedding/cached_embedding.py", line 99, in embed_documents
raise ex
File "/app/api/core/rag/embedding/cached_embedding.py", line 61, in embed_documents
embedding_result = self._model_instance.invoke_text_embedding(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/api/core/model_manager.py", line 221, in invoke_text_embedding
self._round_robin_invoke(
File "/app/api/core/model_manager.py", line 370, in _round_robin_invoke
return function(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/api/core/model_runtime/model_providers/__base/text_embedding_model.py", line 53, in invoke
raise self._transform_invoke_error(e)
core.model_runtime.errors.invoke.InvokeError: [vertex_ai] Error: PluginInvokeError: {"args":{},"error_type":"NotImplementedError","message":""}
2025-08-05 10:25:21.506 INFO [Dummy-2] [retry_document_indexing_task.py:102] - Retry dataset: 7f753103-9619-4a98-b1a6-1691810e87df latency: 1.9819961660541594
2025-08-05 10:25:21.574 INFO [Dummy-2] [trace.py:128] - Task tasks.retry_document_indexing_task.retry_document_indexing_task[abd580ac-047e-4816-944d-d5c129697800] succeeded in 2.050429111113772s: None

@Meshinfo commented on GitHub (Aug 5, 2025): This is not my case, i am sure the vertx ai api works fine,but still get the error message of : Traceback (most recent call last): File "/app/api/core/indexing_runner.py", line 80, in run self._load( File "/app/api/core/indexing_runner.py", line 575, in _load tokens += future.result() ^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/concurrent/futures/_base.py", line 456, in result return self.__get_result() ^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/concurrent/futures/_base.py", line 401, in __get_result raise self._exception File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 59, in run result = self.fn(*self.args, **self.kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/core/indexing_runner.py", line 630, in _process_chunk index_processor.load(dataset, chunk_documents, with_keywords=False) File "/app/api/core/rag/index_processor/processor/paragraph_index_processor.py", line 78, in load vector.create(documents) File "/app/api/core/rag/datasource/vdb/vector_factory.py", line 188, in create batch_embeddings = self._embeddings.embed_documents([document.page_content for document in batch]) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/core/rag/embedding/cached_embedding.py", line 99, in embed_documents raise ex File "/app/api/core/rag/embedding/cached_embedding.py", line 61, in embed_documents embedding_result = self._model_instance.invoke_text_embedding( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/core/model_manager.py", line 221, in invoke_text_embedding self._round_robin_invoke( File "/app/api/core/model_manager.py", line 370, in _round_robin_invoke return function(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/core/model_runtime/model_providers/__base/text_embedding_model.py", line 53, in invoke raise self._transform_invoke_error(e) core.model_runtime.errors.invoke.InvokeError: [vertex_ai] Error: PluginInvokeError: {"args":{},"error_type":"NotImplementedError","message":""} 2025-08-05 10:25:21.506 INFO [Dummy-2] [retry_document_indexing_task.py:102] - Retry dataset: 7f753103-9619-4a98-b1a6-1691810e87df latency: 1.9819961660541594 2025-08-05 10:25:21.574 INFO [Dummy-2] [trace.py:128] - Task tasks.retry_document_indexing_task.retry_document_indexing_task[abd580ac-047e-4816-944d-d5c129697800] succeeded in 2.050429111113772s: None
Author
Owner

@Meshinfo commented on GitHub (Aug 5, 2025):

Fix it , just can't set the region as "global" to use embedding models....need to specific such as "us-west1".

@Meshinfo commented on GitHub (Aug 5, 2025): Fix it , just can't set the region as "global" to use embedding models....need to specific such as "us-west1".
Author
Owner

@Armando200108 commented on GitHub (Aug 5, 2025):

Fix it , just can't set the region as "global" to use embedding models....need to specific such as "us-west1".

So I think we've got all our problems solved, and the issue can be closed :-)

@Armando200108 commented on GitHub (Aug 5, 2025): > Fix it , just can't set the region as "global" to use embedding models....need to specific such as "us-west1". So I think we've got all our problems solved, and the issue can be closed :-)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify-official-plugins#519