Skip to content

Conversation

@Tarquinen
Copy link
Collaborator

Summary

  • Fix Gemini API compatibility by using Struct (object) format for functionResponse.response instead of a plain string
  • The Gemini API expects the response to be an object with name and content fields

Changes

The pruned content placeholder is now wrapped in a proper Struct object:

response: {
    name: part.functionResponse.name,
    content: PRUNED_CONTENT_MESSAGE
}

This ensures the API doesn't reject pruned tool outputs due to type mismatch.

…atibility

The Gemini API expects functionResponse.response to be a Struct (object),
not a plain string. This change wraps the pruned content message in an
object with 'name' and 'content' fields to match the expected format.
@Tarquinen Tarquinen merged commit c474053 into master Nov 29, 2025
1 check passed
@Tarquinen Tarquinen deleted the fix/gemini-response-struct-format branch November 29, 2025 03:13
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