The Pulse
Google previews mid-conversation instruction updates for Gemini API
Developers can change system instructions and function tools during a Gemini API conversation without invalidating the prompt cache. The feature is in public preview for Gemini 4 models through the Interactions API.

Developers can now change system instructions and function tools during a Gemini API conversation without invalidating the prompt cache. Google made the feature available in public preview on December 3 through its Interactions API.
The preview covers all Gemini 4 models through the v1beta endpoint. Support for Gemini Enterprise Agent Platform is to come soon, Google says.
Previously, changing top-level system instructions or tools invalidated the prompt cache. Google says that caused the model to reprocess the entire conversation history, adding cost and latency.
A workaround was to send new instructions in a user message. Those instructions did not carry the same weight as top-level system instructions and allowed users to try to imitate them, according to the company.
The new system_input step has the same authority as a top-level system instruction and takes precedence over user messages. Each step remains active for the rest of the session alongside the original instruction. Rules on different topics remain in effect together; when a newer instruction conflicts with an earlier one, the model favors the newer instruction.
Developers pass the previous turn's ID in previous_interaction_id and put a system_input step directly before user_input in the input array. Google says the top-level system_instruction should stay unchanged across turns to keep the prompt prefix valid in the cache.
One system_input step can be sent per turn. It can contain text, tool updates or both. When a developer retrieves an interaction, the steps appear in order alongside user inputs and model outputs.
In one example, an infrastructure troubleshooting assistant receives a new instruction that a deployment freeze is active. The instruction tells it to recommend read-only diagnostics and not allow further rollouts, before the user asks for a deployment command.
For tools, Google recommends keeping the same top-level tool list on every turn and using added_tools and removed_tools to change which functions the model can call. The preview currently supports updates to function tools through those fields, but not to MCP server tools.
Tool updates stay active until a later system_input changes them. When a step includes both fields, the API processes removals before additions, allowing a tool definition to be replaced in place.
In a support-agent example, an app removes a refund function and adds an escalation-ticket function during a billing review. Other uses Google lists include changing permissions after authentication, disabling a tool when a downstream dependency goes offline and adding tools as a task requires them.
Google cautions that the fields steer model behavior and act as orchestration controls. The company says applications should still authorize every function call on the backend before execution and keep untrusted external or end-user content out of system_input.
There is no separate fee for mid-conversation system instructions. Tokens in system_input steps are billed at the called model's standard input-token rates, while earlier turns remain eligible for cached-token rates when rules or tools change.
Google on AI.info
Sources
- Original source · Blog post Google “Introducing mid-conversation instructions in the Gemini API” blog.google
Companies in this story
Related stories
- Google rolls out AI training opt-out for future Search history
- LAUSD temporarily blocks Google AI Overviews on student devices, Los Angeles Times reports
- Reuters: Moonshot trains on Google and Meta model outputs as OpenAI and Anthropic curb access
- LangChain Adds Goals to Guide Agent Improvement in LangSmith
- Wiz extends its Security Graph to SaaS apps and the AI agents built in them