Skip to content

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

Open
alexander-alderman-webb wants to merge 7 commits into
webb/openai-completions-gen-ai-tool-definitionsfrom
webb/openai-responses-gen-ai-tool-definitions
Open

feat(openai): Set gen_ai.tool.definitions attribute for the Responses API#6951
alexander-alderman-webb wants to merge 7 commits into
webb/openai-completions-gen-ai-tool-definitionsfrom
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

Reminders

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

github-actions Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Codecov Results 📊

99632 passed | ❌ 2 failed | ⏭️ 6757 skipped | Total: 106391 | Pass Rate: 93.65% | Execution Time: 357m 50s

📊 Comparison with Base Branch

Metric Change
Total Tests 📉 -160
Passed Tests 📉 -137
Failed Tests 📈 +1
Skipped Tests 📉 -24

➕ New Tests (2)

View new tests
  • test_continuous_profiler_auto_start_and_stop_sampled[experiment-thread]
    • File: tests.profiler.test_continuous_profiler
    • Status: ❌ Failing
  • test_continuous_profiler_auto_start_and_stop_sampled[experiment-gevent]
    • File: tests.profiler.test_continuous_profiler
    • Status: ❌ Failing

➖ Removed Tests (1)

View removed tests
  • test_continuous_profiler_auto_start_and_stop_sampled_span_streaming[non-experiment-thread]
    • File: tests.profiler.test_continuous_profiler

❌ Failed Tests

test_continuous_profiler_auto_start_and_stop_sampled[experiment-thread]

File: tests.profiler.test_continuous_profiler
Suite: py3.11-common
Error: AssertionError: profiler should not be running assert 'baf9605b15654b2a9f4cd5d33668ccba' is None + where 'baf9605b15654b2a9f4cd5d33668ccba' = get_profiler_id()

Stack Trace
tests/profiler/test_continuous_profiler.py:812: in test_continuous_profiler_auto_start_and_stop_sampled
    assert get_profiler_id() is None, "profiler should not be running"
E   AssertionError: profiler should not be running
E   assert 'baf9605b15654b2a9f4cd5d33668ccba' is None
E    +  where 'baf9605b15654b2a9f4cd5d33668ccba' = get_profiler_id()

test_continuous_profiler_auto_start_and_stop_sampled[experiment-gevent]

File: tests.profiler.test_continuous_profiler
Suite: py3.6-gevent
Error: AssertionError: profiler should not be running assert 'aca2eff248654eeb9e42007f376065ee' is None + where 'aca2eff248654eeb9e42007f376065ee' = get_profiler_id()

Stack Trace
tests/profiler/test_continuous_profiler.py:812: in test_continuous_profiler_auto_start_and_stop_sampled
    assert get_profiler_id() is None, "profiler should not be running"
E   AssertionError: profiler should not be running
E   assert 'aca2eff248654eeb9e42007f376065ee' is None
E    +  where 'aca2eff248654eeb9e42007f376065ee' = get_profiler_id()

✅ Patch coverage is 91.18%. Project has 2504 uncovered lines.
✅ Project coverage is 89.88%. Comparing base (base) to head (head).

Files with missing lines (1)
File Patch % Lines
sentry_sdk/ai/_openai_responses_api.py 90.00% ⚠️ 3 Missing and 8 partials
Coverage diff
@@            Coverage Diff             @@
##          main       #PR       +/-##
==========================================
+ Coverage    89.88%    89.88%        —%
==========================================
  Files          193       193         —
  Lines        24686     24749       +63
  Branches      8814      8860       +46
==========================================
+ Hits         22188     22245       +57
- Misses        2498      2504        +6
- Partials      1400      1415       +15

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
…ebb/openai-responses-gen-ai-tool-definitions

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

Comment thread sentry_sdk/ai/_openai_responses_api.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