Skip to content

fix: ai builder chat stream missing usage stats#1670

Merged
kevinkim-ogp merged 1 commit into
develop-v2from
fix/ai-builder-usage
Jun 4, 2026
Merged

fix: ai builder chat stream missing usage stats#1670
kevinkim-ogp merged 1 commit into
develop-v2from
fix/ai-builder-usage

Conversation

@kevinkim-ogp
Copy link
Copy Markdown
Contributor

@kevinkim-ogp kevinkim-ogp commented Jun 3, 2026

TL;DR

Langfuse traces are missing usage stats for the AI Builder's chat stream such as the total tokens and cost.

Fix

Add includeUsage: true when creating the engineProvider.

Tests

  • Verify that you can still chat with the Ai Builder
  • Verify that traces in Langfuse contain the total tokens and cost details

Copy link
Copy Markdown
Contributor Author


How to use the Graphite Merge Queue

Add the label lfg to this PR to add it to the merge queue.

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@kevinkim-ogp kevinkim-ogp marked this pull request as ready for review June 3, 2026 13:33
@kevinkim-ogp kevinkim-ogp requested a review from a team as a code owner June 3, 2026 13:33
@kevinkim-ogp kevinkim-ogp changed the title fix: missing usage stats fix: ai builder chat stream missing usage stats Jun 3, 2026
Copy link
Copy Markdown
Contributor

@m0nggh m0nggh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm sir checked that the usage comes in

@kevinkim-ogp kevinkim-ogp merged commit 6963365 into develop-v2 Jun 4, 2026
7 checks passed
@kevinkim-ogp kevinkim-ogp deleted the fix/ai-builder-usage branch June 4, 2026 01:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants