fix(google_genai): Redact binary data in inline_data and fix multi-part message extraction#5977
Open
ericapisani wants to merge 2 commits intomasterfrom
Open
fix(google_genai): Redact binary data in inline_data and fix multi-part message extraction#5977ericapisani wants to merge 2 commits intomasterfrom
ericapisani wants to merge 2 commits intomasterfrom
Conversation
…rt message extraction Redact binary/byte data that appears in `inline_data`, which fixes a failing `checkBinaryRedaction` assertion in the AI testing framework. Also includes changes for the following: - Properly handling lists of part-like items (merging into single multi-part user message) - Handling bare inline_data dicts that aren't wrapped in Part objects - Always substituting blob data (both bytes and base64 strings) - Moving PIL import to module level with availability flag to reduce all the dynamic imports of the module within the code Fixes PY-2287 and #5965 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Contributor
Semver Impact of This PR🟢 Patch (bug fixes) 📋 Changelog PreviewThis is how your changes will appear in the changelog. New Features ✨
Bug Fixes 🐛Anthropic
Pydantic Ai
Other
Internal Changes 🔧Litellm
Other
Other
🤖 This preview updates automatically when you update the PR. |
Contributor
Codecov Results 📊✅ 1736 passed | ⏭️ 368 skipped | Total: 2104 | Pass Rate: 82.51% | Execution Time: 2m 26s All tests are passing successfully. ❌ Patch coverage is 0.00%. Project has 12600 uncovered lines. Files with missing lines (1)
Generated by Codecov Action |
Member
Author
|
bugbot run |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit d197318. Configure here.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Redact binary/byte data that appears in
inline_data, which fixes a failingcheckBinaryRedactionassertion in the AI testing framework.Also includes changes for the following:
inline_datadicts that aren't wrapped in Part objectsFixes PY-2287 and #5965