Skip to content

Fix Google GenAI input serialization for Content objects and tool fallback#167

Open
colinbennettbrain wants to merge 3 commits intomainfrom
colin-google-serialize
Open

Fix Google GenAI input serialization for Content objects and tool fallback#167
colinbennettbrain wants to merge 3 commits intomainfrom
colin-google-serialize

Conversation

@colinbennettbrain
Copy link
Copy Markdown
Contributor

This fixes contents serialization for types. Content objects by recursively serializing nested parts, so binary Part.inline_data inside Content.parts is preserved as Braintrust attachments instead of falling through generic serialization. It also hardens tool serialization by keeping Google’s serializer as the primary path, but adding debug logging and a best-effort fallback when that path fails, so tool definitions are still logged in structured form rather than being silently dropped.

The change includes regression tests covering nested binary content serialization and tool fallback behavior.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

let’s avoid tests with mocks and use vcr based cassette tests instead.

I have to improve the agent skills so that this becomes the default.

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.

2 participants