-
Notifications
You must be signed in to change notification settings - Fork 4k
[firebase_vertexai]: Multi tool generative AI calls fail with server error "Request contains an invalid argument" #16883
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hello @MrCsabaToth thanks for the detailed report. Could you provide a complete sample so we can reproduce your issue on our end? |
Hey @MrCsabaToth. We need more information to resolve this issue but there hasn't been an update in 7 weekdays. I'm marking the issue as stale and if there are no new updates in the next 7 days I will close it automatically. If you have more information that will help us get to the bottom of this, just add a comment! |
Sorry I'm bogged down with work. I'll try to carve out some time during the weekend or next week. |
I need a little more time please |
Hey there, many thanks for the reproduction repo however I have been unable to run it but I have been able to test it on the example application. It is known on Gemini model 1 and 1.5, there are issues with putting in multiple tools as parameters: GoogleCloudPlatform/generative-ai#1561 So out of Gemini 1.5 and 2 make sure you use Gemini 2 as older models do not support multi tooling. However, after trying this out myself on the example app making some new tools, it does not appear that we support multi tooling yet in the FlutterFire implementation, so I will keep this ticket open and I can only suggest using your multiple tools as one as a workaround for now. |
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: