Change Gemini rules without cache bust

Stop replaying history to change one rule. system_input updates the rule; the cache stays.

Changing a system rule in a long Gemini session used to mean stuffing it into a user message or rewriting top-level system_instruction, which busts the prefix cache. From 2026-12-03 the Interactions API preview accepts system_input mid-turn so history can stay cached. To line up a freeze-then-read-only rule, open a room on oakmeet.

The searchable result is change Gemini rules without a cache bust. Public preview on all Gemini 4 models via v1beta. Tokens in system_input bill at standard input rates. From Google Keyword, 2026-12-03 and Mid-conversation instructions.

Leave top-level fixedprevious_interaction_idsystem_inputthen user_input
2026-12-03Interactions API preview
v1betaGemini 4, sample gemini-4-neon
Input ratesNo separate system_input fee

Do not rewrite the top level; send this turn's system_input

Rules as a user message

Preserves cache, but the text is weaker than a system instruction and users can imitate it.

Rewrite system_instruction or tools

The prefix changes, the cache dies, the model reprocesses the whole conversation.

ApproachCacheAuthority
New rules in a user messageKeptWeak, spoofable
Change top-level system_instruction / toolsBustedStrong, full replay
system_input, top-level unchangedPrefix reusableSame weight as top-level

One step per turn, immediately before the user

  1. 01
    Keep system_instruction byte-identical

    Sample: You are an infrastructure troubleshooting assistant. Pass the same string on turn two. The delta lives in system_input.

  2. 02
    Pass previous_interaction_id

    client.interactions.create(..., previous_interaction_id=turn1.id). The server attaches history; you do not POST the whole thread again.

  3. 03
    system_input, then user_input

    In the input array: type: system_input, then user_input. One per turn. Text, added_tools, removed_tools, or both.

  4. 04
    Add/remove functions only; leave the top-level list

    Sample keeps get_store_hours and issue_refund at the top. Turn two removes refund and adds create_escalation_ticket. Same step: remove, then add. MCP tools are not supported.

from google import genai
client = genai.Client(http_options={"api_version": "v1beta"})
system_instruction = "You are an infrastructure troubleshooting assistant."
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."}]},
    {"type": "user_input", "content": [{"type": "text", "text": "Give me the command to deploy a new release."}]},
  ],
)

Put the new rule in system_input. Leave the top-level sentence alone. Touch it, and the cache is gone.

Does system_input replace the top-level instruction?
It appends as its own step. Rules on different topics stay in force together. On conflict, the model favors the newest instruction.
Can added_tools update MCP servers?
Only function tools today, not MCP server tools.
Untrusted content
system_input is an orchestration control. Authorize every function call on the backend. Keep end-user text out of system_input.

Put the freeze and the remaining functions in two columns

If the fight is whether deploy is still allowed after a freeze, draw read-only diagnostics and the keep-out list on one page. oakmeet is a browser whiteboard: space code in, no account. It is not the Gemini API.

CLI seats: free Gemini CLI will not finish a first repo task. Studio: Google AI Studio. Short alignment: start a room.

Is this GA?

Google calls it public preview on the Interactions API, v1beta, across all Gemini 4 models. Gemini Enterprise Agent Platform support is listed as coming soon.

Is there a separate mid-conversation fee?

No separate fee. Tokens in system_input bill at the model's standard input rates. Earlier turns remain eligible for cached-token rates after a rule or tool change.

How many system_input steps per turn?

One, placed directly before user_input.

Does oakmeet change Gemini system instructions for me?

No. The start link only spreads the freeze and the keep-out list. API calls stay in your client.

Start a room