Model jina-reranker-v2 credentials is not initialized. #374

Closed
opened 2026-02-16 10:19:11 -05:00 by yindo · 1 comment
Owner

Originally created by @xian-zh on GitHub (Jun 17, 2025).

Self Checks

  • 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 (我已阅读并同意 Language Policy).
  • [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

1.4.3

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

I use APIs for creating knowledge bases:
curl --location --request POST 'http://127.0.0.1/v1/datasets' \ --header 'Authorization: Bearer dataset-zV3fwGj0kTQMuuroYsqEoT5F' \ --header 'Content-Type: application/json' \ --data-raw '{"name":"testapi","description":"testapi","permission":"only_me","provider":"vendor","indexing_technique":"high_quality","embedding_model":"jina-embeddings-v3","embedding_model_provider":"langgenius/xinference/xinference","retrieval_model":{"search_method":"hybrid_search","reranking_enable":true,"top_k":3,"score_threshold_enabled":false,"score_threshold":0.5,"reranking_model":{"reranking_model_name":"jina-reranker-v2","reranking_provider_name":"langgenius/xinference/xinference"}}}' {"code": "invalid_param", "message": "Model jina-reranker-v2 credentials is not initialized.", "status": 400}
Then I checked that my locally deployed xinference API calling jina-reranker-v2 is useful:
curl http://localhost:9997/v1/rerank -d '{"model":"jina-reranker-v2","query":"搜索词","documents":["文本1","文本2"]}' {"id":"0b7a9e9c-4b57-11f0-bdd4-325ce09c0afd","results":[{"index":1,"relevance_score":0.2197265625,"document":null},{"index":0,"relevance_score":0.189453125,"document":null}],"meta":{"api_version":null,"billed_units":null,"tokens":null,"warnings":null}}%
dify config buy the jina-reranker-v2:

Image

The API key is customized

also in the difyWeb Client is sueful

Image

✔️ Expected Behavior

Successfully used via API calls

Actual Behavior

{"code": "invalid_param", "message": "Model jina-reranker-v2 credentials is not initialized.", "status": 400}

Originally created by @xian-zh on GitHub (Jun 17, 2025). ### Self Checks - [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 (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). - [x] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:) - [x] Please do not modify this template :) and fill in all the required fields. ### Dify version 1.4.3 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce I use APIs for creating knowledge bases: `curl --location --request POST 'http://127.0.0.1/v1/datasets' \ --header 'Authorization: Bearer dataset-zV3fwGj0kTQMuuroYsqEoT5F' \ --header 'Content-Type: application/json' \ --data-raw '{"name":"testapi","description":"testapi","permission":"only_me","provider":"vendor","indexing_technique":"high_quality","embedding_model":"jina-embeddings-v3","embedding_model_provider":"langgenius/xinference/xinference","retrieval_model":{"search_method":"hybrid_search","reranking_enable":true,"top_k":3,"score_threshold_enabled":false,"score_threshold":0.5,"reranking_model":{"reranking_model_name":"jina-reranker-v2","reranking_provider_name":"langgenius/xinference/xinference"}}}' {"code": "invalid_param", "message": "Model jina-reranker-v2 credentials is not initialized.", "status": 400}` Then I checked that my locally deployed xinference API calling jina-reranker-v2 is useful: ` curl http://localhost:9997/v1/rerank -d '{"model":"jina-reranker-v2","query":"搜索词","documents":["文本1","文本2"]}' {"id":"0b7a9e9c-4b57-11f0-bdd4-325ce09c0afd","results":[{"index":1,"relevance_score":0.2197265625,"document":null},{"index":0,"relevance_score":0.189453125,"document":null}],"meta":{"api_version":null,"billed_units":null,"tokens":null,"warnings":null}}% ` dify config buy the jina-reranker-v2: ![Image](https://github.com/user-attachments/assets/332ebf3d-79da-4b4d-a4c6-16e1778ec7cd) The API key is customized also in the difyWeb Client is sueful ![Image](https://github.com/user-attachments/assets/5022b340-c3ec-4079-99b0-8c76a09792ed) ### ✔️ Expected Behavior Successfully used via API calls ### ❌ Actual Behavior `{"code": "invalid_param", "message": "Model jina-reranker-v2 credentials is not initialized.", "status": 400}`
yindo closed this issue 2026-02-16 10:19:11 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Jun 17, 2025):

Hi @xian-zh! I'm Dosu and I’m helping the dify team.

The error “Model jina-reranker-v2 credentials is not initialized” usually means Dify can’t find the required credentials for this model/provider in its database for the current tenant/session context, even if your local xinference API and the Dify web client work.

This often happens in self-hosted Docker setups when the model credentials are only initialized for the web client’s session or tenant, but not for API calls (which may use a different tenant or context). Dify manages model credentials using provider schemas, and these credentials must be fully initialized and stored in the database for each model/provider/tenant combination. If they’re missing or incomplete, you’ll get this error [source].

To fix this:

  • Double-check that the model credentials for jina-reranker-v2 are configured and saved for the same tenant/context as your API calls. Sometimes, credentials set via the web UI are not available to API requests if the API is using a different tenant or token.
  • Make sure all required fields (like server_url, model_uid, etc.) are filled in according to the provider schema.
  • If you’re using Docker, avoid using localhost or 127.0.0.1 for service endpoints—use the actual internal IP or http://host.docker.internal instead, so containers can communicate properly [source].
  • Check your environment variables (PLUGIN_DAEMON_URL, SANDBOX_ENABLE_NETWORK, etc.) and Docker Compose setup to ensure network access for plugins and models [source].

If you’ve already set up credentials in the web UI, try re-saving them, or explicitly set them for the API’s tenant/context. If the problem persists, check the Dify logs for credential validation errors—they can help pinpoint what’s missing or misconfigured [source].

Let me know if you need help with the exact credential fields or schema for your setup!

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other  Join Discord Share on X

@dosubot[bot] commented on GitHub (Jun 17, 2025): <!-- Greeting --> Hi @xian-zh! I'm [Dosu](https://go.dosu.dev/dosubot) and I’m helping the dify team. <!-- Answer --> The error “Model jina-reranker-v2 credentials is not initialized” usually means Dify can’t find the required credentials for this model/provider in its database for the current tenant/session context, even if your local xinference API and the Dify web client work. This often happens in self-hosted Docker setups when the model credentials are only initialized for the web client’s session or tenant, but not for API calls (which may use a different tenant or context). Dify manages model credentials using provider schemas, and these credentials must be fully initialized and stored in the database for each model/provider/tenant combination. If they’re missing or incomplete, you’ll get this error [[source]](https://github.com/langgenius/dify/blob/0dcacdf83d3b03ef40b0006b8134a671fe543a6b/api/core/model_runtime/docs/en_US/customizable_model_scale_out.md). To fix this: - Double-check that the model credentials for `jina-reranker-v2` are configured and saved for the same tenant/context as your API calls. Sometimes, credentials set via the web UI are not available to API requests if the API is using a different tenant or token. - Make sure all required fields (like `server_url`, `model_uid`, etc.) are filled in according to the provider schema. - If you’re using Docker, avoid using `localhost` or `127.0.0.1` for service endpoints—use the actual internal IP or `http://host.docker.internal` instead, so containers can communicate properly [[source]](https://github.com/langgenius/dify/issues/20325). - Check your environment variables (`PLUGIN_DAEMON_URL`, `SANDBOX_ENABLE_NETWORK`, etc.) and Docker Compose setup to ensure network access for plugins and models [[source]](https://github.com/langgenius/dify/issues/20325). If you’ve already set up credentials in the web UI, try re-saving them, or explicitly set them for the API’s tenant/context. If the problem persists, check the Dify logs for credential validation errors—they can help pinpoint what’s missing or misconfigured [[source]](https://github.com/langgenius/dify/issues/14074). Let me know if you need help with the exact credential fields or schema for your setup! <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/7d342d43-b305-4b28-9126-6f1d99e85a69?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/7d342d43-b305-4b28-9126-6f1d99e85a69?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/7d342d43-b305-4b28-9126-6f1d99e85a69?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/7d342d43-b305-4b28-9126-6f1d99e85a69?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/7d342d43-b305-4b28-9126-6f1d99e85a69?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/7d342d43-b305-4b28-9126-6f1d99e85a69?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/7d342d43-b305-4b28-9126-6f1d99e85a69?feedback_type=other)</sup>&nbsp;&nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share on X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/langgenius/dify/issues/21117)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify-official-plugins#374