OpenAI-API-compatible add model Qwen3-Reranker-8B error 'results' #726

Closed
opened 2026-02-16 10:20:18 -05:00 by yindo · 3 comments
Owner

Originally created by @Richie666888 on GitHub (Oct 16, 2025).

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

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

模型名称:Qwen/Qwen3-Reranker-8B
模型类型:Rerank
API Key:xxxxxxxxxxxxxx
API endpoint URL:http://10.10.10.10:8000/v1

✔️ Expected Behavior

Add success

Actual Behavior

report an error “results”

Originally created by @Richie666888 on GitHub (Oct 16, 2025). ### 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.9.0.1 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce 模型名称:Qwen/Qwen3-Reranker-8B 模型类型:Rerank API Key:xxxxxxxxxxxxxx API endpoint URL:http://10.10.10.10:8000/v1 ### ✔️ Expected Behavior Add success ### ❌ Actual Behavior report an error “results”
yindo added the bug label 2026-02-16 10:20:18 -05:00
yindo closed this issue 2026-02-16 10:20:18 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Oct 16, 2025):

The error occurs because Dify expects the reranker model API response to include a top-level field named docs (a list of reranked documents), but the Qwen3-Reranker-8B model returns a field named results instead. Dify does not have built-in support to map results to docs, so it fails to parse the response and throws the error you see. The expected schema for a reranker response is:

{
  "model": "your-model-name",
  "docs": [
    {
      "index": 0,
      "text": "document text",
      "score": 0.95
    }
    // ... more documents
  ]
}

To resolve this, you need to ensure that your API endpoint or any adapter/plugin you use returns the field as docs instead of results. You can do this by modifying the API response or adding a lightweight proxy that renames the field before it reaches Dify. There is currently no official plugin or patch that handles this mapping automatically in Dify or its official plugins—this adaptation must happen at the API or plugin layer you control.
Reference: Dify reranker model schema

To reply, just mention @dosu.


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

@dosubot[bot] commented on GitHub (Oct 16, 2025): <!-- Answer --> The error occurs because Dify expects the reranker model API response to include a top-level field named `docs` (a list of reranked documents), but the Qwen3-Reranker-8B model returns a field named `results` instead. Dify does not have built-in support to map `results` to `docs`, so it fails to parse the response and throws the error you see. The expected schema for a reranker response is: ```json { "model": "your-model-name", "docs": [ { "index": 0, "text": "document text", "score": 0.95 } // ... more documents ] } ``` To resolve this, you need to ensure that your API endpoint or any adapter/plugin you use returns the field as `docs` instead of `results`. You can do this by modifying the API response or adding a lightweight proxy that renames the field before it reaches Dify. There is currently no official plugin or patch that handles this mapping automatically in Dify or its official plugins—this adaptation must happen at the API or plugin layer you control. [Reference: Dify reranker model schema](https://github.com/langgenius/dify/blob/8cafc2009856c95265daf4d0656e9a7c30257673/api/core/model_runtime/entities/rerank_entities.py) <!-- 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/96c1d438-6583-43a0-8151-7349dd8ab6c1?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/96c1d438-6583-43a0-8151-7349dd8ab6c1?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/96c1d438-6583-43a0-8151-7349dd8ab6c1?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/96c1d438-6583-43a0-8151-7349dd8ab6c1?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/96c1d438-6583-43a0-8151-7349dd8ab6c1?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/96c1d438-6583-43a0-8151-7349dd8ab6c1?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/96c1d438-6583-43a0-8151-7349dd8ab6c1?feedback_type=other)</sup>&nbsp;&nbsp;[![Chat with Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/6088a4f4-073a-43f3-b3d4-4f06fb0c05a0/ask?utm_source=github)&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/27030)
Author
Owner

@Richie666888 commented on GitHub (Oct 16, 2025):

It would be great if the OpenAI-API-compatible plugin could handle things automatically.

@Richie666888 commented on GitHub (Oct 16, 2025): It would be great if the OpenAI-API-compatible plugin could handle things automatically.
Author
Owner

@dosubot[bot] commented on GitHub (Nov 2, 2025):

Hi, @Richie666888. I'm Dosu, and I'm helping the dify-official-plugins team manage their backlog and am marking this issue as stale.

Issue Summary:

  • You reported an error with the Qwen3-Reranker-8B model on Dify v1.9.0.1 due to the API returning a "results" field instead of the expected "docs" field.
  • The current Dify implementation requires a top-level "docs" list in the reranker response and does not support automatic mapping from "results" to "docs."
  • A maintainer explained that you need to adapt the API response or use a proxy to rename the field for compatibility.
  • You suggested it would be helpful if the OpenAI-API-compatible plugin could handle this mapping automatically.
  • The issue remains unresolved with no implemented workaround in the plugin itself.

What's Next:

  • Please let me know if this issue is still relevant with the latest version of dify-official-plugins by commenting here to keep the discussion open.
  • Otherwise, this issue will be automatically closed in 5 days.

Thank you for your understanding and contribution!

@dosubot[bot] commented on GitHub (Nov 2, 2025): Hi, @Richie666888. I'm [Dosu](https://dosu.dev), and I'm helping the dify-official-plugins team manage their backlog and am marking this issue as stale. Issue Summary: - You reported an error with the Qwen3-Reranker-8B model on Dify v1.9.0.1 due to the API returning a "results" field instead of the expected "docs" field. - The current Dify implementation requires a top-level "docs" list in the reranker response and does not support automatic mapping from "results" to "docs." - A maintainer explained that you need to adapt the API response or use a proxy to rename the field for compatibility. - You suggested it would be helpful if the OpenAI-API-compatible plugin could handle this mapping automatically. - The issue remains unresolved with no implemented workaround in the plugin itself. What's Next: - Please let me know if this issue is still relevant with the latest version of dify-official-plugins by commenting here to keep the discussion open. - Otherwise, this issue will be automatically closed in 5 days. Thank you for your understanding and contribution!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify-official-plugins#726