| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:270610e0-002e-9049-917d-986f3620752c |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | 8D32:DB09F:3EA292:515428:6B00D503 |
| html-safe-nonce | 9a87f64fadc43f63b564fee287b23507b81d8ba8e590cd19d979de525539e39e |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4RDMyOkRCMDlGOjNFQTI5Mjo1MTU0Mjg6NkIwMEQ1MDMiLCJ2aXNpdG9yX2lkIjoiNDc2OTU3Mzg0OTg2MTc3MjU0NyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | f429590a5cdfc8244d38f8fe35a8d440bc0d0456cf6ee89696eee74cab4682ad |
| hovercard-subject-tag | pull_request:5377826571 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | ///pull_requests/show/files |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/getsentry/sentry-python/pull/8329/files |
| twitter:image | https://avatars.githubusercontent.com/u/39389607?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/39389607?s=400&v=4 |
| og:image:alt | Description
Count the number of reasoning tokens in non-streaming anthropic responses in the anthropic integration.
Issues
resolves: #5802
resolves: PY-2208 |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | a481f62a1e04c9b9bdcb5628230682c66d59006f5b13b080f79cba84a176905b |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/getsentry/sentry-python git https://github.com/getsentry/sentry-python.git |
| octolytics-dimension-user_id | 1396951 |
| octolytics-dimension-user_login | getsentry |
| octolytics-dimension-repository_id | 137814779 |
| octolytics-dimension-repository_nwo | getsentry/sentry-python |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 137814779 |
| octolytics-dimension-repository_network_root_nwo | getsentry/sentry-python |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 84c8c5cc25e2fb7f2308428458538436baecc6d2 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| Skip to content | https://github.com/getsentry/sentry-python/pull/8329/files#start-of-content |
| https://github.com/ |
| Sign in | https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgetsentry%2Fsentry-python%2Fpull%2F8329%2Ffiles |
| GitHubRepository hosting, code review, and collaboration | https://github.com/platform |
| CopilotAI coding agent for tasks, projects, and automated work | https://github.com/features/copilot |
| ActionsCI/CD and automation | https://github.com/features/actions |
| Code QualityQuality analysis, fixes, and enforcement | https://github.com/features/code-quality |
| CodespacesCloud development environments | https://github.com/features/codespaces |
| Code SecurityVulnerability detection and remediation | https://github.com/security/advanced-security/code-security |
| Secret ProtectionSecret scanning and leak prevention | https://github.com/security/advanced-security/secret-protection |
| All Features | https://github.com/features |
| Documentation | https://docs.github.com/en |
| Training | https://learn.github.com/skills |
| Certifications | https://learn.github.com/credentials |
| Build with Copilot | https://github.com/features/ai |
| Customize Copilot | https://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview |
| Integrations | https://github.com/marketplace |
| Trending repos | https://github.com/trending |
| GitHub Sponsors | https://github.com/open-source/sponsors |
| Developer articles | https://github.com/resources/articles |
| ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place. | https://github.blog/changelog/ |
| Enterprises | https://github.com/enterprise |
| Team | https://github.com/team |
| Startups | https://github.com/enterprise/startups |
| Nonprofits | https://github.com/solutions/industry/nonprofits |
| Healthcare | https://github.com/solutions/industry/healthcare |
| Financial services | https://github.com/solutions/industry/financial-services |
| Manufacturing | https://github.com/solutions/industry/manufacturing |
| Government | https://github.com/solutions/industry/government |
| See all industries | https://github.com/solutions/industry |
| Why GitHub | https://github.com/why-github |
| Customer Stories | https://github.com/customer-stories |
| Business insights | https://github.com/solutions/executive-insights |
| Trust Center | https://github.com/trust-center |
| GitHub Advanced SecurityEnterprise-grade code security | https://github.com/security/advanced-security |
| Copilot for businessEnterprise-grade AI features | https://github.com/features/copilot/copilot-business |
| Premium SupportEnterprise-grade 24/7 support | https://github.com/enterprise/premium-support |
| Documentation | https://docs.github.com/en |
| Resource center | https://github.com/resources |
| Blog | https://github.blog/ |
| Events & webinars | https://github.com/resources/events |
| Community Forum | https://github.com/orgs/community/discussions |
| Customer Stories | https://github.com/customer-stories |
| Integrations | https://github.com/marketplace |
| Customer support | https://help.github.com/ |
| Training | https://learn.github.com/skills |
| GitHub Status | https://www.githubstatus.com/ |
| About | https://github.com/about |
| Partners | https://github.com/partners |
| Changelog | https://github.blog/changelog/ |
| GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub. | https://githubuniverse.com/ |
| Pricing | https://github.com/pricing |
| Sign in | https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgetsentry%2Fsentry-python%2Fpull%2F8329%2Ffiles |
| Sign up | https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=getsentry%2Fsentry-python |
| Reload | https://github.com/getsentry/sentry-python/pull/8329/files |
| Reload | https://github.com/getsentry/sentry-python/pull/8329/files |
| Reload | https://github.com/getsentry/sentry-python/pull/8329/files |
| getsentry | https://github.com/getsentry |
| sentry-python | https://github.com/getsentry/sentry-python |
| Code | https://github.com/getsentry/sentry-python |
| Issues345 (345) | https://github.com/getsentry/sentry-python/issues |
| Pull requests42 (42) | https://github.com/getsentry/sentry-python/pulls |
| Discussions | https://github.com/getsentry/sentry-python/discussions |
| Actions | https://github.com/getsentry/sentry-python/actions |
| Security and quality2 (2) | https://github.com/getsentry/sentry-python/security |
| Insights | https://github.com/getsentry/sentry-python/insights |
| Sign up for GitHub
| https://github.com/signup?return_to=%2Fgetsentry%2Fsentry-python%2Fissues%2Fnew%2Fchoose |
| terms of service | https://docs.github.com/terms |
| privacy statement | https://docs.github.com/privacy |
| Sign in | https://github.com/login?return_to=%2Fgetsentry%2Fsentry-python%2Fissues%2Fnew%2Fchoose |
| srothh | https://github.com/srothh |
| master | https://github.com/getsentry/sentry-python/tree/master |
| srothh/anthropic-output-tokens-reasoning-attributes | https://github.com/getsentry/sentry-python/tree/srothh/anthropic-output-tokens-reasoning-attributes |
|
Conversation
6
| https://github.com/getsentry/sentry-python/pull/8329 |
|
Commits
6
| https://github.com/getsentry/sentry-python/pull/8329/commits |
|
Checks
184
| https://github.com/getsentry/sentry-python/pull/8329/checks |
|
Files changed
| https://github.com/getsentry/sentry-python/pull/8329/files |
| Please reload this page | https://github.com/getsentry/sentry-python/pull/8329/files |
|
feat(anthropic): Set gen_ai.usage.output_tokens.reasoning attributes for non-streaming responses
| https://github.com/getsentry/sentry-python/pull/8329/files#top |
|
Show all changes
6 commits
| https://github.com/getsentry/sentry-python/pull/8329/files |
|
bcfc0e5
feat(anthropic): Set gen_ai.usage.output_to
srothh Nov 18, 2026
| https://github.com/getsentry/sentry-python/pull/8329/commits/bcfc0e527402be08cba3b2a04f8dc47cbfa2744d |
|
71cf7a7
test(anthropic): Add tests for output_reasoning_tokens #5802
srothh Nov 18, 2026
| https://github.com/getsentry/sentry-python/pull/8329/commits/71cf7a7eb3cfa7cc75b0de2f7532a86850787154 |
|
ac8ebf4
ref(anthropic): Remove _RecordedUsage change from non-streaming branch
srothh Nov 18, 2026
| https://github.com/getsentry/sentry-python/pull/8329/commits/ac8ebf4a5d285347c9c6872627fa17137e48a586 |
|
fea2b61
test(anthropic): Remove unnessecary parametrization from reasoning to…
srothh Nov 18, 2026
| https://github.com/getsentry/sentry-python/pull/8329/commits/fea2b6197cb3d2e0d4aeb653228a725526e0823f |
|
9d4ffb8
feat(anthropic): Set gen_ai.usage.output_tokens.reasoning attributes …
srothh Nov 19, 2026
| https://github.com/getsentry/sentry-python/pull/8329/commits/9d4ffb88a7199e374611363a6158362e0233faf6 |
|
cf28b45
Merge branch 'master' into srothh/anthropic-output-tokens-reasoning-a…
srothh Nov 19, 2026
| https://github.com/getsentry/sentry-python/pull/8329/commits/cf28b45fcd1e60db3443671108c014be50a274c0 |
|
Clear filters
| https://github.com/getsentry/sentry-python/pull/8329/files |
| Please reload this page | https://github.com/getsentry/sentry-python/pull/8329/files |
| Please reload this page | https://github.com/getsentry/sentry-python/pull/8329/files |
|
anthropic.py
| https://github.com/getsentry/sentry-python/pull/8329/files#diff-2fe73f39bab33821a7af1fccb0fd22b943b931b2cbf8d13aead2784b3cd21e05 |
|
test_anthropic.py
| https://github.com/getsentry/sentry-python/pull/8329/files#diff-3f015b03855e3bb647b04195c2a27a75ece9eb2c427a13c79a5ab81660a1365d |
|
| https://github.com/getsentry/sentry-python/blob/master/.github/CODEOWNERS#L1 |
| sentry_sdk/integrations/anthropic.py | https://github.com/getsentry/sentry-python/pull/8329/files#diff-2fe73f39bab33821a7af1fccb0fd22b943b931b2cbf8d13aead2784b3cd21e05 |
|
View file
| https://github.com/getsentry/sentry-python/blob/cf28b45fcd1e60db3443671108c014be50a274c0/sentry_sdk/integrations/anthropic.py |
|
Open in desktop
| https://desktop.github.com |
| https://github.co/hiddenchars |
| https://github.com/getsentry/sentry-python/pull/8329/{{ revealButtonHref }} |
|
| https://github.com/getsentry/sentry-python/pull/8329/files#diff-2fe73f39bab33821a7af1fccb0fd22b943b931b2cbf8d13aead2784b3cd21e05 |
|
| https://github.com/getsentry/sentry-python/pull/8329/files#diff-2fe73f39bab33821a7af1fccb0fd22b943b931b2cbf8d13aead2784b3cd21e05 |
|
| https://github.com/getsentry/sentry-python/pull/8329/files#diff-2fe73f39bab33821a7af1fccb0fd22b943b931b2cbf8d13aead2784b3cd21e05 |
|
| https://github.com/getsentry/sentry-python/pull/8329/files#diff-2fe73f39bab33821a7af1fccb0fd22b943b931b2cbf8d13aead2784b3cd21e05 |
| cursor | https://github.com/apps/cursor |
| Nov 19, 2026 | https://github.com/getsentry/sentry-python/pull/8329/files#r4626726683 |
| Learn more | https://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment |
| sentry_sdk/integrations/anthropic.py#L169-L170 | https://github.com/getsentry/sentry-python/blob/cf28b45fcd1e60db3443671108c014be50a274c0/sentry_sdk/integrations/anthropic.py#L169-L170 |
| sentry_sdk/integrations/anthropic.py#L817-L821 | https://github.com/getsentry/sentry-python/blob/cf28b45fcd1e60db3443671108c014be50a274c0/sentry_sdk/integrations/anthropic.py#L817-L821 |
| https://cursor.com/open?link=eyJ2ZXJzaW9uIjoxLCJ0eXBlIjoiQlVHQk9UX0ZJWF9JTl9DVVJTT1IiLCJkYXRhIjp7InJlZGlzS2V5IjoiYnVnYm90OmE0ZDMxMDdhLTgxZDgtNDg3ZC1iMWIwLTcwNmRlYmVhOGM4NyIsImVuY3J5cHRpb25LZXkiOiJ3bXNmU1k1ZE4zOHhfaTRNS1NYZ2puSGd2Q2FjVEVjLVQ3eEpMekNWd0xNIiwiYnJhbmNoIjoic3JvdGhoL2FudGhyb3BpYy1vdXRwdXQtdG9rZW5zLXJlYXNvbmluZy1hdHRyaWJ1dGVzIiwicmVwb093bmVyIjoiZ2V0c2VudHJ5IiwicmVwb05hbWUiOiJzZW50cnktcHl0aG9uIiwicHJvdmlkZXIiOiJnaXRodWIifX0 |
| https://cursor.com/agents?link=eyJ2ZXJzaW9uIjoxLCJ0eXBlIjoiQlVHQk9UX0ZJWF9JTl9XRUIiLCJkYXRhIjp7InJlZGlzS2V5IjoiYnVnYm90OmE0ZDMxMDdhLTgxZDgtNDg3ZC1iMWIwLTcwNmRlYmVhOGM4NyIsImVuY3J5cHRpb25LZXkiOiJ3bXNmU1k1ZE4zOHhfaTRNS1NYZ2puSGd2Q2FjVEVjLVQ3eEpMekNWd0xNIiwiYnJhbmNoIjoic3JvdGhoL2FudGhyb3BpYy1vdXRwdXQtdG9rZW5zLXJlYXNvbmluZy1hdHRyaWJ1dGVzIiwicmVwb093bmVyIjoiZ2V0c2VudHJ5IiwicmVwb05hbWUiOiJzZW50cnktcHl0aG9uIiwicHJOdW1iZXIiOjgzMjksImNvbW1pdFNoYSI6ImNmMjhiNDVmY2QxZTYwZGIzNDQzNjcxMTA4YzAxNGJlNTBhMjc0YzAiLCJwcm92aWRlciI6ImdpdGh1YiJ9fQ |
| Cursor Bugbot | https://cursor.com/bugbot |
| cf28b45 | https://github.com/getsentry/sentry-python/commit/cf28b45fcd1e60db3443671108c014be50a274c0 |
| here | https://www.cursor.com/dashboard/bugbot |
| Please reload this page | https://github.com/getsentry/sentry-python/pull/8329/files |
|
| https://github.com/getsentry/sentry-python/pull/8329/files#diff-2fe73f39bab33821a7af1fccb0fd22b943b931b2cbf8d13aead2784b3cd21e05 |
|
| https://github.com/getsentry/sentry-python/pull/8329/files#diff-2fe73f39bab33821a7af1fccb0fd22b943b931b2cbf8d13aead2784b3cd21e05 |
|
| https://github.com/getsentry/sentry-python/pull/8329/files#diff-2fe73f39bab33821a7af1fccb0fd22b943b931b2cbf8d13aead2784b3cd21e05 |
|
| https://github.com/getsentry/sentry-python/pull/8329/files#diff-2fe73f39bab33821a7af1fccb0fd22b943b931b2cbf8d13aead2784b3cd21e05 |
|
| https://github.com/getsentry/sentry-python/pull/8329/files#diff-2fe73f39bab33821a7af1fccb0fd22b943b931b2cbf8d13aead2784b3cd21e05 |
|
| https://github.com/getsentry/sentry-python/pull/8329/files#diff-2fe73f39bab33821a7af1fccb0fd22b943b931b2cbf8d13aead2784b3cd21e05 |
|
| https://github.com/getsentry/sentry-python/pull/8329/files#diff-2fe73f39bab33821a7af1fccb0fd22b943b931b2cbf8d13aead2784b3cd21e05 |
|
| https://github.com/getsentry/sentry-python/pull/8329/files#diff-2fe73f39bab33821a7af1fccb0fd22b943b931b2cbf8d13aead2784b3cd21e05 |
|
| https://github.com/getsentry/sentry-python/pull/8329/files#diff-2fe73f39bab33821a7af1fccb0fd22b943b931b2cbf8d13aead2784b3cd21e05 |
|
| https://github.com/getsentry/sentry-python/pull/8329/files#diff-2fe73f39bab33821a7af1fccb0fd22b943b931b2cbf8d13aead2784b3cd21e05 |
|
| https://github.com/getsentry/sentry-python/pull/8329/files#diff-2fe73f39bab33821a7af1fccb0fd22b943b931b2cbf8d13aead2784b3cd21e05 |
|
| https://github.com/getsentry/sentry-python/pull/8329/files#diff-2fe73f39bab33821a7af1fccb0fd22b943b931b2cbf8d13aead2784b3cd21e05 |
|
| https://github.com/getsentry/sentry-python/pull/8329/files#diff-2fe73f39bab33821a7af1fccb0fd22b943b931b2cbf8d13aead2784b3cd21e05 |
|
| https://github.com/getsentry/sentry-python/pull/8329/files#diff-2fe73f39bab33821a7af1fccb0fd22b943b931b2cbf8d13aead2784b3cd21e05 |
|
| https://github.com/getsentry/sentry-python/pull/8329/files#diff-2fe73f39bab33821a7af1fccb0fd22b943b931b2cbf8d13aead2784b3cd21e05 |
|
| https://github.com/getsentry/sentry-python/pull/8329/files#diff-2fe73f39bab33821a7af1fccb0fd22b943b931b2cbf8d13aead2784b3cd21e05 |
|
| https://github.com/getsentry/sentry-python/pull/8329/files#diff-2fe73f39bab33821a7af1fccb0fd22b943b931b2cbf8d13aead2784b3cd21e05 |
|
| https://github.com/getsentry/sentry-python/pull/8329/files#diff-2fe73f39bab33821a7af1fccb0fd22b943b931b2cbf8d13aead2784b3cd21e05 |
| Please reload this page | https://github.com/getsentry/sentry-python/pull/8329/files |
| Please reload this page | https://github.com/getsentry/sentry-python/pull/8329/files |
|
| https://github.com |
| Terms | https://docs.github.com/site-policy/github-terms/github-terms-of-service |
| Privacy | https://docs.github.com/site-policy/privacy-policies/github-privacy-statement |
| Security | https://github.com/security |
| Status | https://www.githubstatus.com/ |
| Community | https://github.community/ |
| Docs | https://docs.github.com/ |
| Contact | https://support.github.com?tags=dotcom-footer |