mirror of
https://github.com/langgenius/dify-official-plugins.git
synced 2026-07-21 17:45:23 -04:00
Add rerank model occour 400 error when using GPUStack langgenius/dify#14069 #76
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 @liuw518 on GitHub (Mar 13, 2025).
The problem still exists after the update

2025-03-13 16:25:15.370 ERROR [Dummy-14] [models.py:162] - Failed to save model credentials, tenant_id: c9e64c48-10ae-4c43-8829-dfb2992809dc, model: bge-reranker-v2-m3, model_type: rerank
Traceback (most recent call last):
File "/app/api/controllers/console/workspace/models.py", line 154, in post
model_provider_service.save_model_credentials(
File "/app/api/services/model_provider_service.py", line 237, in save_model_credentials
provider_configuration.add_or_update_custom_model_credentials(
File "/app/api/core/entities/provider_configuration.py", line 422, in add_or_update_custom_model_credentials
provider_model_record, credentials = self.custom_model_credentials_validate(model_type, model, credentials)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/api/core/entities/provider_configuration.py", line 402, in custom_model_credentials_validate
credentials = model_provider_factory.model_credentials_validate(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/api/core/model_runtime/model_providers/model_provider_factory.py", line 191, in model_credentials_validate
self.plugin_model_manager.validate_model_credentials(
File "/app/api/core/plugin/manager/model.py", line 137, in validate_model_credentials
for resp in response:
^^^^^^^^
File "/app/api/core/plugin/manager/base.py", line 189, in _request_with_plugin_daemon_response_stream
self._handle_plugin_daemon_error(error.error_type, error.message)
File "/app/api/core/plugin/manager/base.py", line 219, in _handle_plugin_daemon_error
raise CredentialsValidateFailedError(error_object.get("message"))
core.model_runtime.errors.validate.CredentialsValidateFailedError: 400 Client Error: Bad Request for url: http://172.16.0.217/v1/rerank
Originally posted by @liuw518 in https://github.com/langgenius/dify-official-plugins/issues/382#issuecomment-2721883119
@liuw518 commented on GitHub (Mar 13, 2025):
using the same api-key to create an Embedding Model, everything is OK.
but when creating Rerank Model, 400 error ...
@xiaoyan88 commented on GitHub (Mar 15, 2025):
@xiaoyan88 commented on GitHub (Mar 15, 2025):
Add this line of code, otherwise dify will pass 'top_n=None' and repack it into difypkg.
@liuw518 commented on GitHub (Mar 17, 2025):
According to the method you provided, the problem has been solved after modification, thinks !!!!
@linyinli commented on GitHub (Apr 3, 2025):
Fixed in 0.0.5.
@dosubot[bot] commented on GitHub (Aug 19, 2025):
Hi, @liuw518. I'm Dosu, and I'm helping the dify-official-plugins team manage their backlog and am marking this issue as stale.
Issue Summary:
What's Next:
Thank you for your understanding and contribution!