不支持本地ollama重排序模型接入 #22012

Closed
opened 2026-02-21 20:15:16 -05:00 by yindo · 1 comment
Owner

Originally created by @gzqy-hub on GitHub (Feb 1, 2026).

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.10.0

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

  1. 添加ollama重排序模型:qllama/bge-reranker-v2-m3:latest
  2. 模型类型选择:Rerank
  3. 保存时提示错误:An error occurred during credentials validation: 404 Client Error: Not Found for url: http://host.docker.internal:11434/api/rerank

✔️ Expected Behavior

  1. 可以正常添加Rerank模型
  2. 当前Dify版本为1.10.0,最新版本的Dify有对该问题解决进行支持吗?

Actual Behavior

No response

Originally created by @gzqy-hub on GitHub (Feb 1, 2026). ### 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.10.0 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce 1. 添加ollama重排序模型:qllama/bge-reranker-v2-m3:latest 2. 模型类型选择:Rerank 3. 保存时提示错误:An error occurred during credentials validation: 404 Client Error: Not Found for url: http://host.docker.internal:11434/api/rerank ### ✔️ Expected Behavior 1. 可以正常添加Rerank模型 2. 当前Dify版本为1.10.0,最新版本的Dify有对该问题解决进行支持吗? ### ❌ Actual Behavior _No response_
yindo added the 🐞 bug label 2026-02-21 20:15:16 -05:00
yindo closed this issue 2026-02-21 20:15:16 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Feb 1, 2026):

本地 Ollama 重排序(rerank)模型目前无法在 Dify(包括 1.10.0 及最新版本)中直接接入,原因是 Ollama 并未实现 Dify 所需的 /api/rerank 接口,导致添加模型时出现 404 错误。这不是配置问题,而是 Ollama 本身暂不支持 rerank API,Dify 也没有内置适配或官方解决方案。即使升级 Dify 版本也无法解决此问题。

如需 rerank 功能,建议使用支持 /rerank 接口的后端(如部分 OpenAI 兼容服务或 vLLM),或者通过 llama.cpp、TEI、xinference VLLM 等工具部署 rerank 模型。如果有开发能力,也可以尝试自定义插件扩展 Ollama 的 rerank 支持,但这需要较多开发工作。目前没有现成的 workaround 或官方计划支持本地 Ollama rerank 模型。参考1 参考2 参考3

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other

Chat with Dosu Open in Cursor Join Discord Share on X

@dosubot[bot] commented on GitHub (Feb 1, 2026): <!-- Answer --> 本地 Ollama 重排序(rerank)模型目前无法在 Dify(包括 1.10.0 及最新版本)中直接接入,原因是 Ollama 并未实现 Dify 所需的 `/api/rerank` 接口,导致添加模型时出现 404 错误。这不是配置问题,而是 Ollama 本身暂不支持 rerank API,Dify 也没有内置适配或官方解决方案。即使升级 Dify 版本也无法解决此问题。 如需 rerank 功能,建议使用支持 `/rerank` 接口的后端(如部分 OpenAI 兼容服务或 vLLM),或者通过 llama.cpp、TEI、xinference VLLM 等工具部署 rerank 模型。如果有开发能力,也可以尝试自定义插件扩展 Ollama 的 rerank 支持,但这需要较多开发工作。目前没有现成的 workaround 或官方计划支持本地 Ollama rerank 模型。[参考1](https://github.com/langgenius/dify/issues/24642#issuecomment-3227632544) [参考2](https://github.com/langgenius/dify/discussions/23970#discussioncomment-14112367) [参考3](https://github.com/langgenius/dify/issues/21254#issuecomment-2989438759) <!-- 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/a6fa9bcb-aa1c-4c4c-bd62-ccb8b6e604f5?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/a6fa9bcb-aa1c-4c4c-bd62-ccb8b6e604f5?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/a6fa9bcb-aa1c-4c4c-bd62-ccb8b6e604f5?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/a6fa9bcb-aa1c-4c4c-bd62-ccb8b6e604f5?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/a6fa9bcb-aa1c-4c4c-bd62-ccb8b6e604f5?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/a6fa9bcb-aa1c-4c4c-bd62-ccb8b6e604f5?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/a6fa9bcb-aa1c-4c4c-bd62-ccb8b6e604f5?feedback_type=other)</sup> [![Chat with Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/6088a4f4-073a-43f3-b3d4-4f06fb0c05a0/ask?utm_source=github)&nbsp;[![Open in Cursor](https://dosu.dev/dosu-in-cursor.svg)](https://cursor.com/link/prompt?text=%E6%9C%AC%E5%9C%B0%20Ollama%20%E9%87%8D%E6%8E%92%E5%BA%8F%EF%BC%88rerank%EF%BC%89%E6%A8%A1%E5%9E%8B%E7%9B%AE%E5%89%8D%E6%97%A0%E6%B3%95%E5%9C%A8%20Dify%EF%BC%88%E5%8C%85%E6%8B%AC%201.10.0%20%E5%8F%8A%E6%9C%80%E6%96%B0%E7%89%88%E6%9C%AC%EF%BC%89%E4%B8%AD%E7%9B%B4%E6%8E%A5%E6%8E%A5%E5%85%A5%EF%BC%8C%E5%8E%9F%E5%9B%A0%E6%98%AF%20Ollama%20%E5%B9%B6%E6%9C%AA%E5%AE%9E%E7%8E%B0%20Dify%20%E6%89%80%E9%9C%80%E7%9A%84%20%60/api/rerank%60%20%E6%8E%A5%E5%8F%A3%EF%BC%8C%E5%AF%BC%E8%87%B4%E6%B7%BB%E5%8A%A0%E6%A8%A1%E5%9E%8B%E6%97%B6%E5%87%BA%E7%8E%B0%20404%20%E9%94%99%E8%AF%AF%E3%80%82%E8%BF%99%E4%B8%8D%E6%98%AF%E9%85%8D%E7%BD%AE%E9%97%AE%E9%A2%98%EF%BC%8C%E8%80%8C%E6%98%AF%20Ollama%20%E6%9C%AC%E8%BA%AB%E6%9A%82%E4%B8%8D%E6%94%AF%E6%8C%81%20rerank%20API%EF%BC%8CDify%20%E4%B9%9F%E6%B2%A1%E6%9C%89%E5%86%85%E7%BD%AE%E9%80%82%E9%85%8D%E6%88%96%E5%AE%98%E6%96%B9%E8%A7%A3%E5%86%B3%E6%96%B9%E6%A1%88%E3%80%82%E5%8D%B3%E4%BD%BF%E5%8D%87%E7%BA%A7%20Dify%20%E7%89%88%E6%9C%AC%E4%B9%9F%E6%97%A0%E6%B3%95%E8%A7%A3%E5%86%B3%E6%AD%A4%E9%97%AE%E9%A2%98%E3%80%82%0A%0A%E5%A6%82%E9%9C%80%20rerank%20%E5%8A%9F%E8%83%BD%EF%BC%8C%E5%BB%BA%E8%AE%AE%E4%BD%BF%E7%94%A8%E6%94%AF%E6%8C%81%20%60/rerank%60%20%E6%8E%A5%E5%8F%A3%E7%9A%84%E5%90%8E%E7%AB%AF%EF%BC%88%E5%A6%82%E9%83%A8%E5%88%86%20OpenAI%20%E5%85%BC%E5%AE%B9%E6%9C%8D%E5%8A%A1%E6%88%96%20vLLM%EF%BC%89%EF%BC%8C%E6%88%96%E8%80%85%E9%80%9A%E8%BF%87%20llama.cpp%E3%80%81TEI%E3%80%81xinference%20VLLM%20%E7%AD%89%E5%B7%A5%E5%85%B7%E9%83%A8%E7%BD%B2%20rerank%20%E6%A8%A1%E5%9E%8B%E3%80%82%E5%A6%82%E6%9E%9C%E6%9C%89%E5%BC%80%E5%8F%91%E8%83%BD%E5%8A%9B%EF%BC%8C%E4%B9%9F%E5%8F%AF%E4%BB%A5%E5%B0%9D%E8%AF%95%E8%87%AA%E5%AE%9A%E4%B9%89%E6%8F%92%E4%BB%B6%E6%89%A9%E5%B1%95%20Ollama%20%E7%9A%84%20rerank%20%E6%94%AF%E6%8C%81%EF%BC%8C%E4%BD%86%E8%BF%99%E9%9C%80%E8%A6%81%E8%BE%83%E5%A4%9A%E5%BC%80%E5%8F%91%E5%B7%A5%E4%BD%9C%E3%80%82%E7%9B%AE%E5%89%8D%E6%B2%A1%E6%9C%89%E7%8E%B0%E6%88%90%E7%9A%84%20workaround%20%E6%88%96%E5%AE%98%E6%96%B9%E8%AE%A1%E5%88%92%E6%94%AF%E6%8C%81%E6%9C%AC%E5%9C%B0%20Ollama%20rerank%20%E6%A8%A1%E5%9E%8B%E3%80%82%5B%E5%8F%82%E8%80%831%5D%28https%3A//github.com/langgenius/dify/issues/24642%23issuecomment-3227632544%29%20%5B%E5%8F%82%E8%80%832%5D%28https%3A//github.com/langgenius/dify/discussions/23970%23discussioncomment-14112367%29%20%5B%E5%8F%82%E8%80%833%5D%28https%3A//github.com/langgenius/dify/issues/21254%23issuecomment-2989438759%29)&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/31819)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#22012