-
Notifications
You must be signed in to change notification settings - Fork 71
Description
Description
The Genkit documentation clearly shows how to use Google Search grounding with the @genkit-ai/vertexai plugin, but there is no corresponding documentation for the @genkit-ai/googleai (or the newer @genkit-ai/google-genai) plugin.
This makes it unclear whether the feature is unsupported for the Google AI (Gemini API) plugin or if it's simply a documentation gap, leading to incorrect implementation attempts.
Real-World Impact of Documentation Gap
The lack of clear documentation is already causing confusion for developers and even other AI assistants trying to write Genkit code. The assumption is that search should be enabled as a tool rather than a config option, which is incorrect based on the Vertex AI pattern.
For example, when asking another AI model for help generating a code sample, it provided the following feedback, highlighting its confusion:
Google Search tool wiring. agents.md does not specify how the Search tool is exposed. In the merged code I left two commented options:
tools: ['googleSearch']tools: ['googleai:googleSearch']
This demonstrates that without a clear example for the Google AI plugin, the natural assumption is to try and use search via the tools array. This leads to implementation errors and wasted development time trying to debug a feature that may not be supported in that manner.
Current Behavior (What's in the Docs)
The documentation for the Vertex AI plugin has a dedicated "Grounding" section that shows how to enable Google Search retrieval via the config object.
Example from Vertex AI Plugin Docs:
await ai.generate({
model: vertexAI.model('gemini-2.5-flash'),
prompt: '...',
config: {
googleSearchRetrieval: {
disableAttribution: true,
}
}
})