-
Notifications
You must be signed in to change notification settings - Fork 449
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
gemini-2.0 does not recognize google_search_retrieval tool #667
Comments
Code with search tool generated by Google AI Studio https://aistudio.google.com/ for model gemini-2.0-flash-exp also does not work |
Hi @Kvit, My hunch is search grounding with 2.0 models only work with the new SDK. Have you tried with new SDK?? Here is the gist. You can also follow the quickstart colab notebook for grounding using search tool. I checked with the AI Studio code, it's not working. I will escalate this to our internal team to update this. Thanks. |
@gmKeshari I think I figured out the issue: Gemini 2.0 API structure is different from the previous version. I suppose AI Studio code generator should be updated. Otherwise, it is confusing. |
@Kvit so how did you get it to work? I am having the same error |
I've arrived here while struggling to figure out how to enable grounding when using langchain. It seems like the documentation is a little all over the place, including the docs on the GCP page itself for grounding |
I just tried the example on Google Docs and I get the same error. |
Description of the bug:
While switching model from
gemini-1.5-pro
togemini-2.0-flash-exp
google_search_retrieval
tool is no longer recognizedActual vs expected behavior:
Using "gemini-2.0-flash-exp"
InvalidArgument: 400 Unable to submit request because Please use google_search field instead of google_search_retrieval field.. Learn more: https://cloud.google.com/vertex-ai/generative-ai/docs/model-reference/gemini
Expected:
Here's a summary of the latest news as of February 1, 2025...
Any other information you'd like to share?
Package Version
The text was updated successfully, but these errors were encountered: