dify - ๐Ÿ’ก(How to fix) Fix Langfuse token counting error [1 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#35421โ€ขFetched 2026-04-20 12:16:00
View on GitHub
Comments
0
Participants
1
Timeline
1
Reactions
1
Author
Participants
Timeline (top)
labeled ร—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

1.13.2

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

<img width="1757" height="918" alt="Image" src="https://github.com/user-attachments/assets/2ab26cfe-7ea9-419e-bc3f-a30cd2e4e143" />

I create an api-key on langfuse, and fill secret_key, public_key and host in dify page.

The token input statistics only account for the system prompt and exclude user inputs.All token input statistics are identical.

โœ”๏ธ Expected Behavior

Standard token counting.

โŒ Actual Behavior

No response

extent analysis

TL;DR

The issue may be related to incorrect configuration of the API keys or token counting settings in Dify.

Guidance

  • Verify that the secret_key, public_key, and host are correctly filled in the Dify page and match the values from Langfuse.
  • Check the token counting settings in Dify to ensure that user inputs are being included in the statistics.
  • Review the image provided in the issue for any clues about the configuration or error messages.
  • Test the API connection with a different set of keys or a different Langfuse configuration to isolate the issue.

Notes

The issue lacks detailed information about the configuration and error messages, making it difficult to provide a more specific solution.

Recommendation

Apply workaround: Verify the API key configuration and token counting settings, as the issue might be related to incorrect setup rather than a version-specific bug.

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

dify - ๐Ÿ’ก(How to fix) Fix Langfuse token counting error [1 participants]