Skip to content

Issue with using Google models when an agent has tools #9

@kyen99

Description

@kyen99

This Helicone n8n node is such a great idea! Thanks for putting this together.

This worked perfectly for a basic AI agent using claude-sonnet-4/bedrock. However, when I tried to use gemini-3-flash-preview/vertex with the exact same agent I got errors that Google's API didn't like the $schema key provided as part of the tool descriptions. As soon as I change the model back to Claude it works. If I use a Google model but I remove the tools from the agent, it also works. I'm using BYOK in both cases.

With a simple agent with one tool (all with BYOK)...

This worked:
claude-sonnet-4/bedrock

This didn't work:
gemini-3-flash-preview/vertex
gemini-3-flash-preview/google-ai-studio

Here is one of the errors from Helicone...

{ "error": { "code": 400, "message": "Invalid JSON payload received. Unknown name \"$schema\" at 'tools[0].function_declarations[0].parameters': Cannot find field.\nInvalid JSON payload received. Unknown name \"$schema\" at 'tools[0].function_declarations[1].parameters': Cannot find field.", "status": "INVALID_ARGUMENT", "details": [ { "@type": "type.googleapis.com/google.rpc.BadRequest", "fieldViolations": [ { "field": "tools[0].function_declarations[0].parameters", "description": "Invalid JSON payload received. Unknown name \"$schema\" at 'tools[0].function_declarations[0].parameters': Cannot find field." }, { "field": "tools[0].function_declarations[1].parameters", "description": "Invalid JSON payload received. Unknown name \"$schema\" at 'tools[0].function_declarations[1].parameters': Cannot find field." } ] } ] } }

I'm happy to provide more information if that would help.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions