Skip to content

sentry_sdk.init throws an exception - openai_agents #5129

@TomerHeber

Description

@TomerHeber

How do you use Sentry?

Sentry Saas (sentry.io)

Version

2.45.0

Steps to Reproduce

  1. install latest sentry-sdk[fastapi].
  2. start application.

Expected Result

application to start and not throw an exception

Actual Result

Exception is thrown for openai_agents even though I have not installed it.
Reverting to 2.44.0 fixes the issue.
Disabling default integrations also solves the issue.

/python3.13/site-packages/sentry_sdk/integrations/openai_agents/__init__.py", line 42, in _patch_tools
    _create_get_all_tools_wrapper(agents.run.AgentRunner._get_all_tools),
                                  ^^^^^^^^^^
AttributeError: module 'agents' has no attribute 'run'

Metadata

Metadata

Assignees

Projects

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions