Expect the metadata of the LLM node in the workflow to increase the usage data of input_token and export_token after execution. #7703

Closed
opened 2026-02-21 18:21:57 -05:00 by yindo · 2 comments
Owner

Originally created by @MrLiangLong on GitHub (Jan 13, 2025).

Self Checks

  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • Please do not modify this template :) and fill in all the required fields.

1. Is this request related to a challenge you're experiencing? Tell me about your story.

In order to facilitate and accurately manage model fees for downstream logging platforms. We expect more flexible and precise management of model fees on downstream logging platforms, such as, langfuse. Input and output costs need to be calculated separately.

2. Additional context or comments

No response

3. Can you help us with this feature?

  • I am interested in contributing to this feature.
Originally created by @MrLiangLong on GitHub (Jan 13, 2025). ### Self Checks - [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 (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). - [X] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:) - [X] Please do not modify this template :) and fill in all the required fields. ### 1. Is this request related to a challenge you're experiencing? Tell me about your story. In order to facilitate and accurately manage model fees for downstream logging platforms. We expect more flexible and precise management of model fees on downstream logging platforms, such as, langfuse. Input and output costs need to be calculated separately. ### 2. Additional context or comments _No response_ ### 3. Can you help us with this feature? - [X] I am interested in contributing to this feature.
yindo added the 💪 enhancement🌊 feat:workflow labels 2026-02-21 18:21:57 -05:00
yindo closed this issue 2026-02-21 18:21:57 -05:00
Author
Owner

@DavideDelbianco commented on GitHub (Jan 29, 2025):

After inspecting the traces metadata, I see a "total_price" and "currency" that LangFuse is not using and:
ls_provider - Model Provider
ls_model_name - Model ID

As documented here: https://docs.dify.ai/guides/monitoring/integrate-external-ops-tools/integrate-langfuse
are not being sent

@DavideDelbianco commented on GitHub (Jan 29, 2025): After inspecting the traces metadata, I see a "total_price" and "currency" that LangFuse is not using and: ls_provider - Model Provider ls_model_name - Model ID As documented here: https://docs.dify.ai/guides/monitoring/integrate-external-ops-tools/integrate-langfuse are not being sent
Author
Owner

@dosubot[bot] commented on GitHub (Mar 1, 2025):

Hi, @MrLiangLong. I'm Dosu, and I'm helping the Dify team manage their backlog. I'm marking this issue as stale.

Issue Summary

  • Enhancement request to include usage data for input and output tokens in LLM node's metadata.
  • Aimed at improving model fee management by separating input and output costs.
  • @DavideDelbianco noted that some metadata fields are unused and some expected fields are missing.
  • You expressed interest in contributing to the development of this feature.

Next Steps

  • Is this issue still relevant to the latest version of the Dify repository? If so, please comment to keep the discussion open.
  • If no further activity occurs, this issue will be automatically closed in 15 days.

Thank you for your understanding and contribution!

@dosubot[bot] commented on GitHub (Mar 1, 2025): Hi, @MrLiangLong. I'm [Dosu](https://dosu.dev), and I'm helping the Dify team manage their backlog. I'm marking this issue as stale. **Issue Summary** - Enhancement request to include usage data for input and output tokens in LLM node's metadata. - Aimed at improving model fee management by separating input and output costs. - @DavideDelbianco noted that some metadata fields are unused and some expected fields are missing. - You expressed interest in contributing to the development of this feature. **Next Steps** - Is this issue still relevant to the latest version of the Dify repository? If so, please comment to keep the discussion open. - If no further activity occurs, this issue will be automatically closed in 15 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#7703