[firebase_vertexai]: Multi tool generative AI calls fail with server error "Request contains an invalid argument" #16883
Labels
Needs Attention
This issue needs maintainer attention.
platform: android
Issues / PRs which are specifically for Android.
plugin: vertexai
label issues for vertexai plugin
type: bug
Something isn't working
Is there an existing issue for this?
Which plugins are affected?
Other
Which platforms are affected?
Android
Description
My Generative AI application contains several functions grouped into multiple tools. Whenever when I try to perform a call on the Gemini 1.5 or 2.0 model (regardless of Flash or Pro) equipped with those tools the call fails with server error "Request contains an invalid argument". When I refactor the Tool list to "flatten" all the functions into one unified mixed tool, the call succeeds.
How it should work:
The only way it works now:
I supply the tools during the model isntantiation:
Reproducing the issue
The call only survives the call without the server side error if the tools' functions are flattened into a list.
Firebase Core version
3.8.1
Flutter Version
3.27.0
Relevant Log Output
No response
Flutter dependencies
Expand
Flutter dependencies
snippetAdditional context and comments
No response
The text was updated successfully, but these errors were encountered: