fix: ssrf, add internal ip filter when parse tool schema
[!IMPORTANT]
- Make sure you have read our contribution guidelines
- Ensure there is an associated issue and you have been assigned to it
- Use the correct syntax to link this PR:
Fixes #<issue number>.
Summary
Screenshots
| Before | After |
|---|---|
| ... | ... |
Checklist
- [ ] This change requires a documentation update, included: Dify Document
- [x] I understand that this PR may be closed in case there was no previous discussion or issues. (This doesn't apply to typos!)
- [x] I've added a test for each change that was introduced, and I tried as much as possible to make a single atomic change.
- [x] I've updated the documentation accordingly.
- [x] I ran
dev/reformat(backend) andcd web && npx lint-staged(frontend) to appease the lint gods
The error happens because the rerank model validation logic in the HTTP API does not handle the llm_factory (the part after the @ in your model name) for rerank models, even though it does for LLMs. When you specify a rerank model like qwen3-reranker@GPUStack, the system tries to find a model with that exact name, but your rerank model is actually registered with the name and factory stored separately. This mismatch causes the API to report that the rerank model doesn't exist, even though it does.
To fix this, the rerank model validation should split the rerank_id into model name and factory (just like it does for LLMs) and use both when querying for the model. Until this is fixed in the code, a possible workaround is to register and reference your rerank model without the @factory suffix, or to patch the validation logic to use the same split/query approach as LLMs. For more details, see the relevant code and explanation here: chat.py and tenant_llm_service.py.
To reply, just mention @dosu.
How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other
Dose the chat model work?
Dose the chat model work?
The chat model can work successfully.
same bug when calling create_chat or chat.update api with ragflow v0.22.1
same bug when calling
create_chatorchat.updateapi with ragflow v0.22.1
the same http api