Skip to content

feat(openai): Set gen_ai.tool.definitions for the Responses API - #6951

Merged
alexander-alderman-webb merged 20 commits into
masterfrom
webb/openai-responses-gen-ai-tool-definitions
Jul 31, 2026
Merged

feat(openai): Set gen_ai.tool.definitions for the Responses API#6951
alexander-alderman-webb merged 20 commits into
masterfrom
webb/openai-responses-gen-ai-tool-definitions

Conversation

@alexander-alderman-webb

@alexander-alderman-webb alexander-alderman-webb commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Description

Set the attribute according to the schema defined in

https://github.com/getsentry/rfcs/blob/main/text/0153-decoupling-sentrys-generative-ai-conventions-from-open-telemetry.md

Issues

Closes #5762

Reminders

@alexander-alderman-webb alexander-alderman-webb changed the title feat(openai): Set attribute for the Responses API Jul 30, 2026
@github-actions

github-actions Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Codecov Results 📊

99634 passed | ⏭️ 6757 skipped | Total: 106391 | Pass Rate: 93.65% | Execution Time: 349m 3s

📊 Comparison with Base Branch

Metric Change
Total Tests 📈 +80
Passed Tests 📈 +56
Failed Tests
Skipped Tests 📈 +24

All tests are passing successfully.

✅ Patch coverage is 93.75%. Project has 2502 uncovered lines.
✅ Project coverage is 89.89%. Comparing base (base) to head (head).

Files with missing lines (1)
File Patch % Lines
sentry_sdk/ai/_openai_responses_api.py 92.86% ⚠️ 2 Missing and 7 partials
Coverage diff
@@            Coverage Diff             @@
##          main       #PR       +/-##
==========================================
+ Coverage    89.87%    89.89%    +0.02%
==========================================
  Files          193       193         —
  Lines        24719     24747       +28
  Branches      8838      8858       +20
==========================================
+ Hits         22215     22245       +30
- Misses        2504      2502        -2
- Partials      1410      1413        +3

Generated by Codecov Action

Comment thread sentry_sdk/ai/_openai_responses_api.py
@alexander-alderman-webb
alexander-alderman-webb marked this pull request as ready for review July 31, 2026 08:55
@alexander-alderman-webb
alexander-alderman-webb requested a review from a team as a code owner July 31, 2026 08:55
Comment thread sentry_sdk/ai/_openai_responses_api.py
@alexander-alderman-webb alexander-alderman-webb changed the title feat(openai): Set gen_ai.tool.definitions attribute for the Responses API Jul 31, 2026
Base automatically changed from webb/openai-completions-gen-ai-tool-definitions to master July 31, 2026 10:56
@alexander-alderman-webb
alexander-alderman-webb enabled auto-merge (squash) July 31, 2026 11:01

@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 a2f64ab. Configure here.

Comment thread sentry_sdk/ai/_openai_responses_api.py Outdated
@alexander-alderman-webb
alexander-alderman-webb enabled auto-merge (squash) July 31, 2026 11:08
@alexander-alderman-webb
alexander-alderman-webb merged commit 972ec46 into master Jul 31, 2026
145 checks passed
@alexander-alderman-webb
alexander-alderman-webb deleted the webb/openai-responses-gen-ai-tool-definitions branch July 31, 2026 11:15
mgaligniana pushed a commit to mgaligniana/sentry-python that referenced this pull request Aug 9, 2026
…tsentry#6951)

Set the attribute with `type`, `name` and `description` fields for function and custom tools, and additionally the `parameters` field for function tools.
Only the `type` field is recorded for instances of other tool types.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants