Title: OpenAI chat.completions.parse and Anthropic messages.parse produce no span · Issue #7891 · getsentry/sentry-python · GitHub
Open Graph Title: OpenAI chat.completions.parse and Anthropic messages.parse produce no span · Issue #7891 · getsentry/sentry-python
X Title: OpenAI chat.completions.parse and Anthropic messages.parse produce no span · Issue #7891 · getsentry/sentry-python
Description: Version 2.71.0 (master @ 6a4eb20) Steps to Reproduce Call client.chat.completions.parse(model=..., messages=..., response_format=MyModel) (sync or async), or Anthropic client.messages.parse(...). Expected Result A gen_ai.chat span with t...
Open Graph Description: Version 2.71.0 (master @ 6a4eb20) Steps to Reproduce Call client.chat.completions.parse(model=..., messages=..., response_format=MyModel) (sync or async), or Anthropic client.messages.parse(...). E...
X Description: Version 2.71.0 (master @ 6a4eb20) Steps to Reproduce Call client.chat.completions.parse(model=..., messages=..., response_format=MyModel) (sync or async), or Anthropic client.messages.parse(...). E...
Opengraph URL: https://github.com/getsentry/sentry-python/issues/7891
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"OpenAI chat.completions.parse and Anthropic messages.parse produce no span","articleBody":"### Version\n2.71.0 (master @ 6a4eb20)\n\n### Steps to Reproduce\nCall `client.chat.completions.parse(model=..., messages=..., response_format=MyModel)` (sync or async), or Anthropic `client.messages.parse(...)`.\n\n### Expected Result\nA `gen_ai.chat` span with token usage, like `create()`.\n\n### Actual Result\nNo span, so structured-output calls are invisible. `parse()` calls `self._post` directly instead of `create()`, and only `create` and `stream` are patched ([openai.py#L138-L149](https://github.com/getsentry/sentry-python/blob/6a4eb20f1db3de7b025bda6eedb73b9073cfbc91/sentry_sdk/integrations/openai.py#L138-L149), [anthropic.py#L245-L274](https://github.com/getsentry/sentry-python/blob/6a4eb20f1db3de7b025bda6eedb73b9073cfbc91/sentry_sdk/integrations/anthropic.py#L245-L274)). `responses.parse` is the same gap (#5401). Checked on openai 1.109.1 to 3.24.0 and anthropic 0.125.0 to 1.11.0.\n\nI'd like to open a PR to fix this, with tests, if that's okay with you.\n","author":{"url":"https://github.com/4ktLuffy","@type":"Person","name":"4ktLuffy"},"datePublished":"2026-10-06T15:01:58Z","url":"https://github.com/getsentry/sentry-python/issues/7891"}
| 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 | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:68f21143-3d73-c3e7-418c-30f5d0dbfba2 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9128:2564D8:2D83A1:3E0565:6B00C37E |
| html-safe-nonce | 40c2da6d321ef51e6e45981f186add65395b0b398dbdb7c21bdccd8181739526 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5MTI4OjI1NjREODoyRDgzQTE6M0UwNTY1OjZCMDBDMzdFIiwidmlzaXRvcl9pZCI6IjI1ODE1NDMwMDQ3NTgxMzE1ODIiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | e6c21004eb83f6b6682cc4780e1b10c2eb60474a44ab72bc95e0e7b2eeba3c40 |
| hovercard-subject-tag | issue:5730644995 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/getsentry/sentry-python/7891/issue_layout |
| twitter:image | https://opengraph.githubassets.com/f9667e9522279ca181e6314577fe6ff78fb0baafd74fbd45fbe6060776d363fc/getsentry/sentry-python/issues/7891 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/f9667e9522279ca181e6314577fe6ff78fb0baafd74fbd45fbe6060776d363fc/getsentry/sentry-python/issues/7891 |
| og:image:alt | Version 2.71.0 (master @ 6a4eb20) Steps to Reproduce Call client.chat.completions.parse(model=..., messages=..., response_format=MyModel) (sync or async), or Anthropic client.messages.parse(...). E... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | 4ktLuffy |
| hostname | github.com |
| expected-hostname | github.com |
| None | 93edd3bebc4afb7ce711ee74cb5d2a95927850b082a4d43e212222389cb1c415 |
| turbo-cache-control | no-preview |
| 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 |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 1fee81a280ea86312b69448e261b418189bfd5b5 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width