Skip to content

feat(langchain): Record reasoning token usage attribute - #7136

Open
alexander-alderman-webb wants to merge 3 commits into
webb/langchain/more-tokensfrom
webb/langchain/reasoning-tokens
Open

feat(langchain): Record reasoning token usage attribute#7136
alexander-alderman-webb wants to merge 3 commits into
webb/langchain/more-tokensfrom
webb/langchain/reasoning-tokens

Conversation

@alexander-alderman-webb

@alexander-alderman-webb alexander-alderman-webb commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Description

Record the reasoning token count from the provider-agnostic UsageMetadata dictionary.

Issues

Reminders

@alexander-alderman-webb
alexander-alderman-webb marked this pull request as ready for review August 7, 2026 11:28
@alexander-alderman-webb
alexander-alderman-webb requested a review from a team as a code owner August 7, 2026 11:28

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Want reviews to match your repository better? Bugbot Learning can learn team-specific rules from PR activity. A team admin can enable Learning in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit f59a152. Configure here.

Comment thread sentry_sdk/integrations/langchain.py
Comment thread sentry_sdk/integrations/langchain.py Outdated
@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Codecov Results 📊

99182 passed | ⏭️ 6527 skipped | Total: 105709 | Pass Rate: 93.83% | Execution Time: 346m 12s

📊 Comparison with Base Branch

Metric Change
Total Tests 📉 -35
Passed Tests 📉 -83
Failed Tests
Skipped Tests 📈 +48

All tests are passing successfully.

✅ Patch coverage is 94.44%. Project has 2501 uncovered lines.
✅ Project coverage is 90%. Comparing base (base) to head (head).

Files with missing lines (1)
File Patch % Lines
sentry_sdk/integrations/langchain.py 93.75% ⚠️ 1 Missing and 2 partials
Coverage diff
@@            Coverage Diff             @@
##          main       #PR       +/-##
==========================================
+ Coverage    89.99%    90.00%    +0.01%
==========================================
  Files          193       193         —
  Lines        24991     25008       +17
  Branches      9012      9038       +26
==========================================
+ Hits         22490     22507       +17
- Misses        2501      2501         —
- Partials      1437      1441        +4

Generated by Codecov Action

Comment thread sentry_sdk/consts.py
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