Gemini API adds mid-conversation system instructions: new rules and tools on any turn without losing the cache
Apps built on Gemini can now change the model's standing orders in the middle of a conversation. A new system_input step, in public preview since December 3, adds rules or swaps tools on any turn, and the earlier turns keep their cached-token price.
What happened
Google announced on December 3 that developers can now give a Gemini model new system instructions partway through a session. Before this, you couldn't give the model a new system instruction or update tools without invalidating the cache. Now earlier turns remain eligible for cached-token rates when rules or tools change.
The fix is one new step type. You place a system_input step directly before user_input in the input array, and from then on it sits in the session's instructions alongside everything sent before it, so when two clash the model favors the most recent instruction. The same step can switch function tools on or off with added_tools and removed_tools; built-in and MCP tools aren't supported there yet.
Who gets it and what it costs
- Status: public preview in the Interactions API on the v1beta version. The older
generateContentcall doesn't support system_input, and Gemini Enterprise Agent Platform support is to come soon, without a date. - Models: Google's post says all Gemini 4 models, but the docs name gemini-4-carbon, gemini-4-neon and gemini-4-hydrogen, and say other models return an HTTP 400 error. Test on yours before you build on it.
- Price: the instructions carry no separate fee and count as ordinary input tokens.
- Limits: at most one system_input per turn, and never during a function-calling loop. Once sent, a step stays in context for the rest of the conversation.
Google also warns that these controls steer the model but aren't security, so your application should still authorize every function call on the backend.
Try it
This system_input switches a support bot into a stricter mode after the user hits a plan limit:
From this turn on, the user is on the [plan name] plan and has used their [limit] for this month. 1. Answer questions about the product as before. 2. For any request that needs [the paid feature], explain in one sentence that it's paused until [reset date] and offer the closest thing they can still do. 3. Don't mention prices or upgrades unless the user asks. This rule replaces any earlier instruction about [the paid feature].
For the instruction you set at the start of a session, copy the role-and-rules shape from our Gemini prompts.
Sources
- Google, Introducing mid-conversation instructions in the Gemini API, December 3, 2026
- Google AI Studio docs, Mid-conversation system instructions, checked December 4, 2026
- Google AI Studio, Changelog, December 3, 2026 entry