NeuralBridge
Sign in Download IDE
AI NewsGemini API

Gemini API allows changing instructions and tools during a conversation

Google launched a public preview of system instruction and functional tool updates in Gemini API without resetting the cache of previous steps. Changes are added to the dialogue history, and permissions for performing actions still need to be verified on the server.

Gemini API allows changing instructions and tools during a conversation
Image: reymer.ai

On 3 December 2026, Google opened a public preview of a feature for Gemini API: developers can change system instructions and the set of tools directly during a conversation. New rules and tools are added via Interactions API, and the cache of previous steps is retained.

How instruction updates work

To modify rules, the application sends a step system_input. It has priority over the system instruction and over user messages. A new step is added to the dialogue history, so previously processed tokens remain unchanged and can be used from the cache. To continue with the saved history, the request is linked to the previous interaction via previous_interaction_id.

An update does not replace the original system instruction or previous ones system_input: all these rules remain in context. If requirements conflict, the model follows the newer one. To cancel a rule, you need to add an instruction that explains the change and asks not to apply the previous requirement. Deleting the old step from the history in this way is not possible.

This mechanism allows changing the agent's operating conditions without resending the entire conversation. For example, if during a failure investigation you need to prohibit changes in the working environment, the application can add a rule that restricts the agent to read‑only diagnostic actions.

Changing the tool set

The list of functional tools can be changed using added_tools and removed_tools inside system_input. The specified changes are retained until the next update. If the request contains both parameters, the API first removes the tools, then adds new ones — this allows replacing the function definition.

The mechanism updates the tool set available to the model, but it does not itself provide action authorization. Before invoking calls, applications need to verify permissions on the server. This is important, for example, when enabling recording functions after authentication or disabling a tool during a related system outage.

The preview supports custom functional tools. MCP server tools and built‑in tools, including Google Search and code execution, are not supported. Also, you should not pass to system_input untrusted content from users or external sources.

Availability and pricing

The feature is available via version v1beta Interactions API, and the preview interface may change. Publications differ on model coverage: one source reports support for all Gemini models 4, another lists gemini-4-carbon, gemini-4-neon and gemini-4-hydrogen and warns that for other models the API returns HTTP error 400. The second material also notes that the feature is intended for interactions with the model, not for generateContent or interactions with agents.

There is no separate charge for updating instructions. Tokens of new steps system_input are billed at the standard input rates of the selected model, and cached token rates may apply for previous steps. Google also plans to add support for the feature in the Gemini Enterprise Agent Platform.

What this means for developers

Rules and the agent's function set can now be adapted to the current dialogue stage without loading all instructions and tools at once. This helps account for context and permission changes while preserving the cache of long sessions. When designing, it's important to remember instruction accumulation: cancelling a previous rule must be done explicitly. And the list of available model functions should not be considered an access control mechanism — each call, especially one that modifies data, requires a separate server-side check.

All postsAlso in "AI News"