Skip to content

Cost tracking via Langfuse #4506

Answered by dosubot bot
asadsk8r02 asked this question in Support
Nov 30, 2024 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

Hey there, @asadsk8r02! I'm here to help you with your Langfuse and FastAPI issues. Let's tackle these together!

I found a similar unsolved discussion regarding inferring the cost of a trace from a metadata field, which might be related to your issue with cost calculation [1]. Additionally, there was a closed issue about Langfuse not counting tokens and costs with Langchain, but no solution was found in the comments [2].

For your first question, Langfuse's ModelUsage feature should automatically calculate costs if the model is registered correctly. Ensure that the model is specified in the generation request and that it matches one of the supported models, such as OpenAI or Anthropic. Th…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@marcklingen
Comment options

Answer selected by marcklingen
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants