Gemeni 2.0 Native Tools - (Grounding)

Hi n8n community,

Would it be possible to add the “grounding” option to the Gemini 2 AI Model?
If you check AI studio you will find there are missing options not available on n8n while on AI studio is available , & ChatGPT has all sort of functions!


image

How can we utilize this options?

This would allow us to use native search tool of the model, improving the relevance and accuracy of its responses within our workflows.

Thanks.

1 Like

It looks like your topic is missing some important information. Could you provide the following if applicable.

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

Hey. @Ess800

Just checked n8n v1.73.1 and unfortunately, the installed version of @langchain/google-genai (=1.14) is just a few versions behind for Google’s grounding support. It should work once this is upgraded to v1.16 though official node support is another story.

Workaround would be to use the HTTP node like so… though I suspect you already knew that!

If you’re self-hosting, you can try using the Langchain code node once n8n is updated with @langchain/google-genai v1.16 or higher. Note - the following isn’t supposed to work at time of writing!

3 Likes

too bad, is there a way to upvote this as a feature request?

2 Likes

Thank you so much. You put me on the right track.

To expand on your answer, the gemini-2.0-flash-exp model does not seem to support anything beyond a simple tool description. It worked, but you are not able to specify thresholds or mode. So for the flash 2 exp, you have to use this simplified syntax for the JSON when using CURL/HTTP request:

{
  "contents": [
    {
      "parts": [
        { "text": "Your prompt here" }
      ]
    }
  ],
  "tools": [
    {
      "google_search": {}
    }
  ]
}
2 Likes

Thank you for that helpful workaround!
I hope we’ll see official support for this functionality soon.
It would be great to have Gemini fully integrated like we do with the ChatGPT API, that would really streamline things

2 Likes

I feel the same. It is too bad and a way to upvote would be great!

feature request for this is here, please upvote! Update Google Gemini Chat Model node to support new grounding feature

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.