pipelines icon indicating copy to clipboard operation
pipelines copied to clipboard

issue: Usage information is not passed to the Langfuse generation

Open highyield3011 opened this issue 1 year ago • 10 comments

Check Existing Issues

  • [x] I have searched the existing issues and discussions.
  • [x] I am using the latest version of Open WebUI.

Installation Method

Docker

Open WebUI Version

v0.5.20

Ollama Version (if applicable)

No response

Operating System

Ubuntu 22.04

Browser (if applicable)

No response

Confirmation

  • [x] I have read and followed all instructions in README.md.
  • [x] I am using the latest version of both Open WebUI and Ollama.
  • [x] I have included the browser console logs.
  • [x] I have included the Docker container logs.
  • [x] I have listed steps to reproduce the bug in detail.

Expected Behavior

Usage information should be passed to Langfuse

Actual Behavior

Usage information is not passed to Langfuse

Steps to Reproduce

  1. Integrate Open WebUI with Langfuse - https://langfuse.com/docs/integrations/openwebui
  2. Start a new chat
  3. Check traces in Langfuse

Logs & Screenshots

Image

Image

Please also refer to the reply from the author of Langfuse: https://github.com/langfuse/langfuse/issues/6299

Additional Information

No response

highyield3011 avatar Apr 08 '25 02:04 highyield3011

same issue

eanson023 avatar Jan 05 '26 04:01 eanson023

You can try with the updated pipeline, it's on PR https://github.com/open-webui/pipelines/pull/586 For more reference, issue https://github.com/open-webui/pipelines/issues/556

rgaricano avatar Jan 05 '26 09:01 rgaricano

You can try with the updated pipeline, it's on PR #586 For more reference, issue #556

Thanks for your help! @rgaricano

I'm using the new langfuse filter from https://github.com/rgaricano/pipelines/blob/main/examples/filters/langfuse_v3_filter_pipeline.py

But the token costs are still unrecorded.

Image

eanson023 avatar Jan 05 '26 09:01 eanson023

@rgaricano

I guarantee that the 'Usage' box of model capabilities is enabled before the LLM calling.

eanson023 avatar Jan 05 '26 09:01 eanson023

@eanson023 you can try upgrading the langfuse client: pip install -U langfuse (3.10.5 here)

rgaricano avatar Jan 05 '26 10:01 rgaricano

@rgaricano Thanks for your reply. Where should I change this? I installed and updated Langfuse before starting Open-WebUI, but the cost recording still isn't working. Do I need to make changes elsewhere?

eanson023 avatar Jan 05 '26 10:01 eanson023

@eanson023

Edit the langfuse pipeline and replace the requirements:

"""
title: Langfuse Filter Pipeline for v3
author: open-webui
date: 2025-12-07
version: 0.0.2
license: MIT
description: A filter pipeline that uses Langfuse v3.
requirements: langfuse>=3.10.5
"""

And relaunch the pipelines server.

(I updated the langfuse v3 pipeline with this change) (another direct way is just run the pip install -U langfuse in the same python env where you are running the pipelines server or edit the pipelines/requirements.txt to force this langfuse client version, changing langfuse by langfuse>=3.10.5 & relaunch the pipeline server, running start.sh or start.batagain )

rgaricano avatar Jan 05 '26 10:01 rgaricano

@eanson023

Also you can take a look to the @YetheSamartaka open-webui function (instead of use pipelines for that): https://github.com/open-webui/pipelines/pull/586#issuecomment-3710024202

rgaricano avatar Jan 05 '26 11:01 rgaricano

I'll take a look at it tomorrow, thanks for the reply @rgaricano

eanson023 avatar Jan 05 '26 12:01 eanson023

Vào 19:42 T.2, 5 Th1, 2026 eanson @.***> đã viết:

eanson023 left a comment (open-webui/pipelines#493) https://github.com/open-webui/pipelines/issues/493#issuecomment-3710267798

I'll take a look at it tomorrow, thanks for the reply @rgaricano https://github.com/rgaricano

— Reply to this email directly, view it on GitHub https://github.com/open-webui/pipelines/issues/493#issuecomment-3710267798, or unsubscribe https://github.com/notifications/unsubscribe-auth/BTTHD2RU7KUF6YH3PLNI3RD4FJLZZAVCNFSM6AAAAACQV2Y7MKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTOMJQGI3DONZZHA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

vinh900 avatar Jan 07 '26 19:01 vinh900