mirror of
https://github.com/langgenius/dify-official-plugins.git
synced 2026-07-21 17:45:23 -04:00
Model jina-reranker-v2 credentials is not initialized. #374
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 @xian-zh on GitHub (Jun 17, 2025).
Self Checks
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:
The API key is customized
also in the difyWeb Client is sueful
✔️ Expected Behavior
Successfully used via API calls
❌ Actual Behavior
{"code": "invalid_param", "message": "Model jina-reranker-v2 credentials is not initialized.", "status": 400}@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:
jina-reranker-v2are 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.server_url,model_uid, etc.) are filled in according to the provider schema.localhostor127.0.0.1for service endpoints—use the actual internal IP orhttp://host.docker.internalinstead, so containers can communicate properly [source].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
