fix: Lazy load integration modules - #795
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
b7e533f to
f1a216c
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f1a216cd31
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "Codex (@codex) review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "Codex (@codex) address that feedback".
|
|
||
| if openai: | ||
| results["openai"] = _instrument_integration(OpenAIIntegration) | ||
| results["openai"] = _instrument_integration("openai", "OpenAIIntegration") |
There was a problem hiding this comment.
Update the existing test double for the new helper signature
When test_auto_instrument_registration_and_disable runs in test_core, it monkeypatches braintrust.auto._instrument_integration with the one-argument function lambda _: False. This changed call supplies two arguments, so the first enabled OpenAI branch raises TypeError and aborts the test. Update that test double to accept the module and class names, or retain a one-argument helper interface, so the core suite remains green.
Useful? React with 👍 / 👎.
resolves https://linear.app/braintrustdata/issue/SDK-327/lazy-load-python-sdk-integrations-on-import