Flowise icon indicating copy to clipboard operation
Flowise copied to clipboard

[BUG] AgentflowV2 ChatGoogleGenerativeAI Tool Use

Open flyingbag opened this issue 1 year ago • 1 comments

Describe the bug

Given an agentflow v2 created from the Supervisor Worker template in Flowise V3, when I switch the Model to any of the ChatGoogleGenerativeAI models, I get the following error when running a user query.

Error in LLM node: [GoogleGenerativeAI Error]: Error fetching from
https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-pro-preview-03-25:streamGenerateContent?alt=sse
: [400 Bad Request] Invalid JSON payload received. Unknown name "type" at 'tools[0].function_declarations[0]': Cannot find field.
Invalid JSON payload received. Unknown name "function" at 'tools[0].function_declarations[0]': Cannot find field. [{"@type":"type.googleapis.com/google.rpc.BadRequest","fieldViolations":[{"field":"tools[0].function_declarations[0]","description":"Invalid JSON payload received. Unknown name "type" at 'tools[0].function_declarations[0]': Cannot find field."},{"field":"tools[0].function_declarations[0]","description":"Invalid JSON payload received. Unknown name "function" at 'tools[0].function_declarations[0]': Cannot find field."}]}]

To Reproduce Steps to reproduce the behavior:

  1. Go to 'Marketplaces', filter the templates by 'AgentflowV2' type.
  2. Click on 'Supervisor Worker', then click 'Use Template'.
  3. Click on 'Save Agents' to save it with a name.
  4. Double-click on 'Supervisor' node.
  5. Click on 'Model' dropdown, then select 'ChatGoogleGeneratieAI'.
  6. Click on 'ChatGoogleGenerativeAI Parameters' dropdown, then fill up 'Connect Credential' and 'Model Name' fields correctly.
  7. Click on 'Save Agents'.
  8. Click on 'Chat' to open the chat, then type any user query.
  9. See error.

Expected behavior The execution should pass the Supervisor node without any errors.

Screenshots

Image

Flow Directly created from Supervisor Worker template (v2).

Setup

  • Installation: docker 'flowiseai/flowise:3.0.0',
  • Flowise Version: 3.0.0
  • OS: macOS with Silicon Processor
  • Browser: Chrome

Additional context Nil.

flyingbag avatar May 22 '25 05:05 flyingbag

https://github.com/FlowiseAI/Flowise/pull/4713

HenryHengZJ avatar Jun 23 '25 18:06 HenryHengZJ