-
-
Notifications
You must be signed in to change notification settings - Fork 506
Open
Description
What version of Effect is running?
@effect/ai-google:0.12.1effect:3.19.15
What steps can reproduce the bug?
Define a tool with a primitive success or failure schema (e.g., Schema.String, Schema.Number):
const SearchTool = Tool.make("search", {
description: "Search for items",
parameters: { query: Schema.String },
success: Schema.String, // or failure: Schema.String with failureMode: "return"
})When the tool executes and returns a primitive value, the agentic loop fails on iteration 2 (when the tool result is sent back to Gemini) with:
Invalid value at 'contents[2].parts[0].function_response.response' (type.googleapis.com/google.protobuf.Struct), "Found 5 results"
What is the expected behavior?
Primitive tool results should work with Gemini.
What do you see instead?
Gemini's function_response.response field requires a Struct (object), but primitive values are sent directly, causing a 400 error when the tool result is sent back on iteration 2.
Metadata
Metadata
Assignees
Labels
No labels