Skip to content

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

Merged
alexander-alderman-webb merged 18 commits into
masterfrom
webb/langchain/reasoning-tokens
Aug 10, 2026
Merged

feat(langchain): Record reasoning token usage attribute#7136
alexander-alderman-webb merged 18 commits into
masterfrom
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
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 📊

99560 passed | ⏭️ 6671 skipped | Total: 106231 | Pass Rate: 93.72% | Execution Time: 343m 7s

📊 Comparison with Base Branch

Metric Change
Total Tests
Passed Tests
Failed Tests
Skipped Tests

✨ No test changes detected

All tests are passing successfully.

✅ Patch coverage is 94.44%. Project has 2507 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        25061     25073       +12
  Branches      9058      9066        +8
==========================================
+ Hits         22552     22566       +14
- Misses        2509      2507        -2
- Partials      1439      1438        -1

Generated by Codecov Action

Comment thread sentry_sdk/consts.py
Base automatically changed from webb/langchain/more-tokens to master August 10, 2026 09:43

@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.

Reviewed by Cursor Bugbot for commit 920ea2d. Configure here.

Comment thread tests/integrations/langchain/test_langchain.py
Comment thread sentry_sdk/integrations/langchain.py
@alexander-alderman-webb
alexander-alderman-webb merged commit 98b9aaa into master Aug 10, 2026
145 checks passed
@alexander-alderman-webb
alexander-alderman-webb deleted the webb/langchain/reasoning-tokens branch August 10, 2026 11:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants