dify - 💡(How to fix) Fix retriever_resources empty in API response when Chatflow calls a child Workflow as tool (v1.12.1) [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
langgenius/dify#34724Fetched 2026-04-09 08:18:09
View on GitHub
Comments
1
Participants
2
Timeline
2
Reactions
1
Author
Timeline (top)
commented ×1labeled ×1
RAW_BUFFERClick to expand / collapse

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

v1.12.1

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

In Dify v1.12.1, when a Chatflow (parent app) invokes a custom tool that is implemented as a child Workflow (which internally contains a Knowledge Retrieval node), the API response from the Chatflow execution includes a metadata field, but the retriever_resources array inside it is always empty ([]).

The UI correctly shows citations and attribution when testing the Chatflow interactively. However, the same information is missing from the API response.

Image Image

✔️ Expected Behavior

The metadata.retriever_resources array should contain the retrieved chunks from the child Workflow's knowledge retrieval, including fields like dataset_id, dataset_name, document_name, content, score, etc.

❌ Actual Behavior

No response

extent analysis

TL;DR

The issue with the empty retriever_resources array in the API response from the Chatflow execution may be due to a discrepancy between the interactive UI testing and the API response handling.

Guidance

  • Verify that the Knowledge Retrieval node in the child Workflow is correctly configured and functioning as expected.
  • Check the API endpoint and response handling code to ensure that it is properly parsing and including the retriever_resources array in the response.
  • Compare the interactive UI testing and API response handling code to identify any differences in how the metadata is being processed and returned.
  • Review the Dify version documentation (v1.12.1) to see if there are any known issues or limitations related to the retriever_resources array.

Example

No specific code example can be provided without more information about the API endpoint and response handling code.

Notes

The issue may be specific to the Self Hosted (Docker) environment, and it is unclear if this issue occurs in Cloud hosted environments.

Recommendation

Apply workaround: Modify the API response handling code to correctly parse and include the retriever_resources array in the response, if possible. This may involve debugging the code and identifying where the metadata is being lost or not properly processed.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING