Skip to content

feat(openai): Set gen_ai.tool.definitions for the Chat Completions API - #6950

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

feat(openai): Set gen_ai.tool.definitions for the Chat Completions API#6950
alexander-alderman-webb merged 12 commits into
masterfrom
webb/openai-completions-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

Comment thread sentry_sdk/ai/_openai_completions_api.py
Comment thread sentry_sdk/ai/_openai_completions_api.py
@github-actions

github-actions Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Codecov Results 📊

99578 passed | ⏭️ 6733 skipped | Total: 106311 | Pass Rate: 93.67% | Execution Time: 349m 55s

📊 Comparison with Base Branch

Metric Change
Total Tests 📉 -240
Passed Tests 📉 -191
Failed Tests 📉 -1
Skipped Tests 📉 -48

➖ 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

All tests are passing successfully.

✅ Patch coverage is 83.33%. Project has 2504 uncovered lines.
❌ Project coverage is 89.87%. Comparing base (base) to head (head).

Files with missing lines (1)
File Patch % Lines
sentry_sdk/ai/_openai_completions_api.py 81.25% ⚠️ 6 Missing and 10 partials
Coverage diff
@@            Coverage Diff             @@
##          main       #PR       +/-##
==========================================
- Coverage    89.88%    89.87%    -0.01%
==========================================
  Files          193       193         —
  Lines        24686     24719       +33
  Branches      8814      8838       +24
==========================================
+ Hits         22188     22215       +27
- Misses        2498      2504        +6
- Partials      1400      1410       +10

Generated by Codecov Action

Comment thread sentry_sdk/ai/_openai_completions_api.py
Comment thread sentry_sdk/integrations/openai.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_completions_api.py
Comment thread sentry_sdk/ai/_openai_completions_api.py

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

Comment thread sentry_sdk/integrations/openai.py
@alexander-alderman-webb alexander-alderman-webb changed the title feat(openai): Set gen_ai.tool.definitions attribute for the Completions API feat(openai): Set gen_ai.tool.definitions attribute for the Chat Completions API Jul 31, 2026
@alexander-alderman-webb
alexander-alderman-webb enabled auto-merge (squash) July 31, 2026 10:46
@alexander-alderman-webb alexander-alderman-webb changed the title feat(openai): Set gen_ai.tool.definitions attribute for the Chat Completions API feat(openai): Set gen_ai.tool.definitions for the Chat Completions API Jul 31, 2026
@alexander-alderman-webb
alexander-alderman-webb merged commit b9012a2 into master Jul 31, 2026
140 checks passed
@alexander-alderman-webb
alexander-alderman-webb deleted the webb/openai-completions-gen-ai-tool-definitions branch July 31, 2026 10:56
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