-
Notifications
You must be signed in to change notification settings - Fork 10.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Parameter Extractor Node Costs Not Visible in Langfuse #14272
Comments
Hey @lyestarzalt, I'm here to help you with any bugs, questions, or contributions you have for Langgenius' Dify project. Let's tackle this issue together! The issue you're experiencing, where cost information for Parameter Extractor nodes is not visible in Langfuse, might be related to how the metadata is being sent. According to the Dify codebase, the metadata from the Parameter Extractor node does include cost information, such as total tokens, total price, and currency [1]. Here are a few things you might want to check:
If these checks do not resolve the issue, it might be helpful to review the specific implementation details in your setup or consult any additional documentation or support resources available for Dify and Langfuse. To continue talking to Dosu, mention @dosu. Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other |
From LangfuseLLM node:
Parameter Extractor Node:
From DifyThe Parameter Extractor trace JSON shows: {
"usage": {
"prompt_tokens": 623,
"prompt_unit_price": "0.03",
"prompt_price_unit": "0.001",
"prompt_price": "0.0186900",
"completion_tokens": 8,
"completion_unit_price": "0.06",
"completion_price_unit": "0.001",
"completion_price": "0.0004800",
"total_tokens": 631,
"total_price": "0.0191700",
"currency": "USD",
"latency": 1.4745679500047117
}
}
In Dify trace logs, Parameter Extractor nodes correctly calculate and track token usage and costs, but these values aren't properly transmitted to Langfuse's cost tracking fields, while LLM nodes successfully populate these same fields. |
Self Checks
Dify version
0.15.3
Cloud or Self Hosted
Self Hosted (Docker)
Steps to reproduce
✔️ Expected Behavior
Langfuse should display cost information for Parameter Extractor nodes.
❌ Actual Behavior
Cost information is only visible for LLM nodes in Langfuse, but not for Parameter Extractor nodes.
The text was updated successfully, but these errors were encountered: