Interactive simulator exploring Google Gen AI SDK v3.4.0: evaluate dynamic ToolSearch in the Interactions API (saving 95%+ prompt tokens), simulate declarative audio and document slicing, and calculate batch embedding token efficiencies.
import { GoogleGenAI } from "@google/genai";
const ai = new GoogleGenAI({ apiKey: process.env.GEMINI_API_KEY });
// Launch interaction with dynamic ToolSearch enabled
const interaction = await ai.clients.interactions.create({
model: "gemini-4-hydrogen",
input: "Check why the pods in our us-east-prod cluster under namespace 'checkout' are restarting.",
config: {
thinking_config: { thinking_level: "high" },
automatic_continuation: true,
tools: [
{
tool_search: {
description: "Enterprise infrastructure, Kubernetes and observability tool registry"
}
}
]
}
});
console.log("Final Resolution:", interaction.output?.text);