Instructions and tools can change mid-conversation while the cache stays intact

Google has released, as a preview, a feature in its developer-facing "Gemini API" called "Mid-conversation system instructions" that lets developers add system instructions partway through a conversation. System instructions are the baseline instructions a developer gives first to shape how the AI behaves. Sending a new type of step, "system_input," to the "Interactions API," which is used to carry on exchanges with a model, adds new rules or tool changes while earlier turns stay in the cache (a mechanism that stores and reuses computed results).

Google's changelog lists the feature as a public preview under Dec. 3 and says developers can send instructions or update function tools mid-conversation without invalidating the prompt cache.

According to the documentation, rules and available tools often change after the first turn of a long conversation. Until now, developers had to rewrite the initial system instructions or tool list, which forces the model to reprocess the full conversation history from scratch.

Schmid introduces the feature on X

Philipp Schmid, whose X account carries a "Google AI Studio" affiliation badge, posted on X at 5:19 p.m. Dec. 4 Japan time that mid-conversation system instructions had rolled out in the Gemini API. The post is not from an official Google account.

As examples, Schmid listed steering an agent mid-session when it moves between stages such as planning and building, unlocking a tool that writes email after a user signs in, temporarily removing a tool during an outage and adding it back later, and applying limits discovered mid-session.

We just rolled out mid-conversation system instructions in the Gemini API 🚀 We added a new system_input step that allows you to change instructions or add/remove tools at any turn, while earlier turns stay cached. You can now - Steer agents mid-session with SI authority (plan → build) - Add tools on demand, like newly added MCP servers. - Add and Unlock tools after a user signs in, e.g. write email - Remove a tool during an outage, then adding it back - Apply limits found mid-session Preview on Gemini 4 Carbon, Neon & Hydrogen.

Instructions stack up, and the latest wins in a conflict

The documentation lists uses for system_input: reinforcing a rule late in a long session, adding constraints learned mid-session such as a budget cap or a jurisdiction rule (which country's or state's law applies), and enabling or disabling function tools. Its tool examples are after a user completes OAuth (signing in to an outside service and granting permissions) and when a feature is paused.

Each system_input is added to the conversation history as its own step and does not replace or delete earlier instructions. The initial system instruction and every earlier system_input stay in the model's context for the rest of the conversation. If instructions conflict, the model favors the most recent one. Because earlier instructions remain in context, Google recommends stating what changed, giving the example "Refunds are available again. Ignore the earlier instruction that paused refunds."

There are rules for sending the step, and breaking them makes the API return an HTTP 400 error. A system_input must come directly before the user's input (user_input), and only one can be sent per turn. It cannot be sent on its own or while the model is in the middle of calling a function and receiving its result. Its content must be text only, and text is required unless the step changes tools.

Tool swaps cover custom functions only; MCP and built-in tools are excluded

Because tool definitions sit at the start of the prompt, changing the tool list between turns invalidates the prompt cache. Google says developers should keep sending the same tool list every turn and use "added_tools" and "removed_tools" on a system_input step to switch the functions the model can call. If a step includes both, removals are processed first. Changes stay in effect until another system_input changes them.

However, added_tools and removed_tools handle only custom function tools defined by the developer. The documentation says MCP servers (a common way to connect outside services to AI) and built-in tools such as Google Search and code execution are not currently supported. Schmid's post cited "newly added MCP servers" as an example of adding tools on demand, which conflicts with the documentation.

The original tool list, including tools that have been removed, must be sent on every turn. The API checks the stored history against that list, so dropping a removed tool from it causes an HTTP 400 error on later turns. Re-declaring a tool added with added_tools in the original list on a later turn also returns HTTP 400.

Three Gemini 4 models supported; generateContent not supported

The supported models are "Gemini 4 Carbon," "Gemini 4 Neon" and "Gemini 4 Hydrogen," and sending the step to any other model returns an HTTP 400 error. The feature requires the "v1beta" version of the API, and because it is a preview, Google says the API surface may change before general availability.

It works only on the Interactions API and not on generateContent, the Gemini API's other way of calling models. Within the Interactions API, only model interactions are supported, not agent interactions. A system_input stays in the conversation's context and cannot be removed later. The setting that controls whether functions are called (tool_choice) applies only to tools in the initial list, and the model can still call tools added mid-conversation regardless of that setting.

The documentation page does not describe pricing or cache discounts. ORIENS has not tested the API and has not confirmed how much processing time or cost is reduced.