ProductsNEWS BRIEFING

Gemini API Introduces Mid-Conversation Instructions for Dynamic System and Tool Updates

4 min read

88Z AI, 6 December — On December 3, 2026, Google launched a public preview of mid-conversation system instruction and tool updates in the Gemini API’s Interactions API. Developers can append new rules or add and remove function tools with a system_input step, keep the top-level system_instruction unchanged, and continue reusing the prompt cache instead of reprocessing the full conversation.

At a glance

  • On the next turn with previous_interaction_id, place a single system_input directly before user_input and keep the top-level system_instruction unchanged so the cache stays valid
  • system_input has the same authority as the top-level system instruction and precedes user messages; if it conflicts with an earlier system_input, the newest instruction wins
  • Leave the top-level tools list unchanged and use added_tools and removed_tools; only function tools are supported, not MCP server tools
  • There is no separate fee; system_input tokens are billed at the model’s standard input rates. The preview covers all Gemini 4 models on the Interactions API v1beta endpoint

The two workarounds and their cost

According to Google’s official blog (December 3, 2026, by product managers Trey Nguyen and Daniel Kyme) and the @GoogleAIStudio post, long-running agents often need new rules, permissions, or tools after dozens or even hundreds of turns. Developers had two common workarounds: putting new instructions in a user message to preserve the cache, which does not carry the same weight as a top-level system instruction and can be imitated by users; or rewriting the top-level system instruction or tools list, which invalidates the prompt cache so the model reprocesses the entire history, adding cost and latency. The Interactions API now lets you send a system_input step on any turn with system-instruction or tool changes.

How system_input works, with the official example

The official steps are: pass the previous turn’s ID in previous_interaction_id; place a system_input step in the input array directly before user_input; and keep the top-level system_instruction unchanged across turns so the prompt prefix remains cacheable. You may send one system_input per turn, containing text, tool updates, or both. Each system_input is appended to the session and stays active with the top-level instruction. Rules on different topics can coexist; if a newer system_input conflicts with an earlier one, the model favors the most recent instruction. The step has the same authority as the top-level system instruction and takes precedence over user messages. Retrieving the turn with client.interactions.get(id=turn2.id) shows system_input, user_input, and model_output in order. The client must use api_version v1beta. The official example uses model gemini-4-neon:

from google import genai client = genai.Client(http_options={"api_version": "v1beta"}) system_instruction = "You are an infrastructure troubleshooting assistant." turn1 = client.interactions.create(model="gemini-4-neon", system_instruction=system_instruction, input="Latency just spiked on our service. What should I check first?") turn2 = client.interactions.create(model="gemini-4-neon", previous_interaction_id=turn1.id, system_instruction=system_instruction, input=[{"type": "system_input", "content": [{"type": "text", "text": "A production deployment freeze is now active. Recommend read-only diagnostics and do not allow further rollouts."}]}, {"type": "user_input", "content": [{"type": "text", "text": "Give me the command to deploy a new release."}]}]) print(turn2.output_text)

Updating tools with added_tools and removed_tools without breaking the cache

Tool declarations sit at the start of the prompt, so changing the top-level tools list between turns breaks the cache. Google recommends leaving that list identical on every turn and using added_tools and removed_tools instead. Only function tools are supported this way, not MCP server tools. When a single system_input includes both fields, the API processes removed_tools before added_tools, which lets you replace a tool definition in place. A short note when removing a tool helps the model explain why an action is unavailable. In the official example, a support agent starts with get_store_hours and issue_refund; on the next turn the app removes issue_refund and adds create_escalation_ticket while the top-level tools list stays the same:

from google import genai client = genai.Client(http_options={"api_version": "v1beta"}) tools = [{"type": "function", "name": "get_store_hours", "description": "Look up opening hours for a store.", "parameters": {"type": "object", "properties": {"store_id": {"type": "string"}}, "required": ["store_id"]}}, {"type": "function", "name": "issue_refund", "description": "Refund an order.", "parameters": {"type": "object", "properties": {"order_id": {"type": "string"}}, "required": ["order_id"]}}] turn1 = client.interactions.create(model="gemini-4-neon", input="Hi, I have a question about my order.", tools=tools) turn2 = client.interactions.create(model="gemini-4-neon", previous_interaction_id=turn1.id, tools=tools, input=[{"type": "system_input", "content": [{"type": "text", "text": "This account is under billing review. Explain that refunds are paused and offer to escalate."}], "removed_tools": [{"type": "function", "name": "issue_refund"}], "added_tools": [{"type": "function", "name": "create_escalation_ticket", "description": "Escalate a billing review issue to support.", "parameters": {"type": "object", "properties": {"order_id": {"type": "string"}}, "required": ["order_id"]}}]}, {"type": "user_input", "content": [{"type": "text", "text": "Refund order 12345."}]}]) print(turn2.output_text)

Safety, billing, and availability

Google says system_input, added_tools, and removed_tools are orchestration controls: the application should still authorize every function call on the backend before executing it, and should keep untrusted external or end-user content out of system_input. Mid-conversation system instructions carry no separate fee. Tokens in system_input steps are billed at the standard input token rates for the model you call, and earlier turns remain eligible for cached-token rates when rules or tools change. The feature is in public preview across all Gemini 4 models in the Interactions API through the v1beta endpoint. Support for the Gemini Enterprise Agent Platform is to come soon. Official use cases include constraints discovered mid-session (workspace settings, entitlements, spending limits), reinforcing format or policy rules in long sessions, enabling write tools after authentication or approval and removing them for read-only review, disabling a tool when a dependency is down, and starting with a small tool set then adding more without breaking the cache. The full post is at https://blog.google/innovation-and-ai/technology/developers-tools/gemini-api-mid-conversation-updates/ .

Sources & editorial note

This article is an AI-assisted synthesis by 88Z AI based on the public sources below. Product claims and availability are attributed to their publishers. It does not represent independent testing or first-hand reporting.

  1. Google AI StudioSource published
  2. Google BlogSource published

Source dates above refer to the original announcements; the date under the headline is this article’s publication on 88Z AI.

Related reading

All stories
88Z.ai