Skip to content

Conversation

@sentrivana
Copy link
Contributor

Description

"agents" is too generic a name, and we're using it to determine whether someone has openai-agents installed.

Issues

Closes#5129

Reminders

@sentrivanasentrivana marked this pull request as ready for review November 21, 2025 10:15
@sentrivanasentrivana requested a review from a team as a code ownerNovember 21, 2025 10:15
Copy link
Contributor

@alexander-alderman-webbalexander-alderman-webb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

It would be nice to have a more generic solution, but I don't think there's a way to detect imports that is not fragile in some way.

@sentrivana
Copy link
ContributorAuthor

Def not the most elegant of solutions, but should be good enough. We could probably also do this via importlib if we were fancy but it shouldn't be necessary.

@sentrivanasentrivana merged commit f945e38 into masterNov 21, 2025
133 checks passed
@sentrivanasentrivana deleted the ivana/fix-agents-import branch November 21, 2025 12:26
@codecov
Copy link

codecovbot commented Nov 21, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.03%. Comparing base (0e6e808) to head (ce88573).
⚠️ Report is 2 commits behind head on master.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@ Coverage Diff @@## master #5132 +/- ## ========================================== + Coverage 84.01% 84.03% +0.02%  ========================================== Files 180 180 Lines 18168 18169 +1 Branches 3227 3227 ========================================== + Hits 15264 15269 +5 + Misses 1916 1914 -2 + Partials 988 986 -2 
Files with missing linesCoverage Δ
sentry_sdk/integrations/openai_agents/__init__.py90.90% <100.00%> (+0.43%)⬆️

... and 3 files with indirect coverage changes

Sign up for freeto 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.

sentry_sdk.init throws an exception - openai_agents

3 participants

@sentrivana@alexander-alderman-webb