Skip to content

Conversation

@andrewtruong
Copy link
Collaborator

@andrewtruong andrewtruong commented Dec 19, 2025

https://wandb.atlassian.net/browse/WB-29827
#5844

Updates the patch target so when the user does

from google import genai
import weave

weave.init(...)

The genai methods will be patched automatically

@codecov
Copy link

codecov bot commented Dec 19, 2025

Codecov Report

❌ Patch coverage is 0% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
weave/integrations/patch.py 0.00% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@wandbot-3000
Copy link

wandbot-3000 bot commented Dec 19, 2025

@andrewtruong andrewtruong marked this pull request as ready for review December 19, 2025 20:58
@andrewtruong andrewtruong requested a review from a team as a code owner December 19, 2025 20:58
@jamie-rasmussen
Copy link
Collaborator

Does the _PATCHED_INTEGRATIONS.add("google.generativeai") line need to be updated? Will this make logging stop working for old Google SDKs?

@andrewtruong
Copy link
Collaborator Author

Yep, thanks for catching. It will stop autopatching the old Google SDKs, but those are long deprecated by Google anyways:
https://pypi.org/project/google-generativeai/

@andrewtruong
Copy link
Collaborator Author

Actually I guess we can keep patching for that path anyways. We do that for crewai

@neutralino1
Copy link
Collaborator

I'm not sure this is working due to the fact that we use split(".")[0] to identify the root module.
I have a different fix here: https://github.com/wandb/weave/pull/5879/changes

@andrewtruong
Copy link
Collaborator Author

andrewtruong commented Jan 5, 2026

@neutralino1 my solution seems to work for me. Are you seeing something different?

https://wandb.ai/megatruong/testing/r/call/019b9059-e994-719f-aad9-b163ef49226d
image

@neutralino1
Copy link
Collaborator

ok then 🤔

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.

4 participants