js-genai v3.4.0
- Source
- github.com
- Author
- release-please[bot]
- Date

Context
The main addition in version 3.4.0 of @google/genai, Google DeepMind's JavaScript and TypeScript library for the Gemini API, is a set of types for tool search in the Interactions API (release notes). Tool search addresses a cost of giving a model many tools. Normally every tool's name, description and parameter schema goes into the request, using up and before the model has done any work. With tool search, the model looks for the tools a task needs and loads only those definitions. Google's generated type definition describes the feature as letting clients avoid loading all tool definitions up front, which it says may help reduce overall token usage and cost.
The types show how the pieces fit together. A function definition can now set `defer_loading`, which defers loading it, and a `short_description`, which the model sees as a summary of each held-back function. A new `tool_search` tool has an execution mode of server or client; in client mode the app supplies the search function's own name, description and parameters, so the app does the searching. A conversation then records two new kinds of step: a tool search call, whose arguments can list function names to load, and a tool search result, which returns the matching function definitions. The Interactions API is the interface Google now recommends for new Gemini projects and says is where new capabilities and tools will launch; earlier coverage explains how it stores conversation state and execution steps.
The idea is not new to the industry. Anthropic's Claude API already offers a tool search tool built around a `defer_loading` flag of the same name. What this release establishes for Gemini is narrower: the library can now describe tool search requests and responses. Neither the release notes nor the generated types say which models or API versions support the feature, so a type in the SDK is not by itself evidence that a given Gemini model will accept it. The Python library's 3.4.0, released the same day, adds the same types. The rest of this release exposes processing options for audio, document and spreadsheet files in the Interactions API and adds batch inputs and usage data for Gemini models on Gemini Enterprise.
- context window — The maximum amount of text a model can consider at once — its working memory for the current conversation or task.
- token — The chunk of text a model reads and writes in — roughly three-quarters of a word — and the unit AI usage is billed in.
- AI agent — An AI system that doesn't just answer once but works toward a goal in a loop — taking actions, reading the results, and deciding what to do next.
- embedding — A list of numbers representing a piece of text's meaning, so that similar meanings end up numerically close and can be searched.
Checking sign-in…
Loading comments…





