Last updated: December 3, 2026
Gemini mid-conversation system instructions, released in public preview on December 3, 2026, let developers send a system_input step in the Interactions API. It adds new rules or swaps function tools partway through a chat on Gemini 4 Carbon, Neon and Hydrogen without invalidating the prompt cache for earlier turns.
Contents
- What changed on December 3
- How to send a system_input step
- Rules that return HTTP 400
- Adding and removing tools mid-session
- Models, pricing and caching
- Workflows and prompt patterns
- Limitations and comparison with earlier options
- Frequently asked questions
What changed on December 3
Google’s Gemini API release notes for December 3, 2026 list one new feature: the Interactions API now accepts system_input steps on the v1beta API version (Gemini API release notes). A system_input step can carry new text instructions, an added_tools list and a removed_tools list. Google labels the feature a preview and says the API surface may change before general availability (mid-conversation instructions guide).
The problem it solves is cost and latency in long sessions. Tool definitions and the system instruction sit near the top of every Gemini 4 prompt, so editing either one forces the model to reprocess the history below it (context caching). A system_input step is appended to the history instead, so the cached prefix stays intact.
| Need | Before (edit the top of the prompt) | Now (system_input step) |
|---|---|---|
| Add a rule late in a session | Change system_instruction, which invalidates the cached history below it |
Append the rule as a step before the next user turn |
| Disable a function | Drop it from tools, which invalidates the system instruction and history |
List it in removed_tools; keep sending the original tools |
| Enable a new function | Add it to tools, with the same cache loss |
Define it in added_tools |
How to send a system_input step
The feature works with the Google Gen AI SDKs for Python and JavaScript and with REST calls to generativelanguage.googleapis.com/v1beta/interactions (mid-conversation instructions guide). To use it:
- Create the client with the
v1betaAPI version, for examplegenai.Client(http_options={"api_version": "v1beta"})in Python. - Start the conversation with
client.interactions.create()ongemini-4-carbon,gemini-4-neonorgemini-4-hydrogen, and keep the returned interaction ID. - On a later turn, pass that ID as
previous_interaction_id. - Make
inputan array with asystem_inputstep whosecontentholds a text part, followed directly by auser_inputstep. - Read the reply from
output_text, and callclient.interactions.get()to confirm that thesystem_inputstep appears in order in the stored steps.
Google’s example adds a jurisdiction rule: “The user is in California. Show the CCPA disclosure before sharing any address data.” Stored interactions are kept for 55 days on the paid tier and 1 day on the free tier by default, which matters because chaining with previous_interaction_id relies on server-side storage (Interactions API overview).
Rules that return HTTP 400
Google lists strict placement rules; breaking any of them returns HTTP 400 (mid-conversation instructions guide):
- Send
system_inputdirectly before auser_inputstep, and at most one per turn. - Do not send it on its own or while returning a
function_resultin a function-calling loop; wait for the next user turn. - Use text only in
content, and include text unless the step only adds or removes tools.
Instructions accumulate. The top-level system_instruction and every earlier system_input stay in context, rules that do not conflict all keep applying, and on a conflict the model favors the most recent instruction.
Adding and removing tools mid-session
Because tools are serialized before the system instruction, adding, removing or reordering non-deferred tools invalidates both the system instruction and the entire conversation history in the cache (context caching). The new pattern is to send the same top-level tools list on every turn and change what the model may call through the system_input step (mid-conversation instructions guide). Google’s tool rules:
removed_toolstakes objects such as{"type": "function", "name": "issue_refund"}, not bare strings.added_toolstakes full function definitions in the same schema astools.- If both fields appear, removals are processed before additions, and changes last until another
system_inputchanges them. - Keep removed tools in the top-level
toolslist on later turns, and leave added tools out of it; either mistake returns HTTP 400.
Models, pricing and caching
Google does not list a separate charge for system_input. The supported models bill at their normal Standard paid-tier rates per million tokens (Gemini API pricing):
| Model | Input | Output (incl. thinking) | Cached input | Free tier |
|---|---|---|---|---|
gemini-4-carbon |
$4.00 | $20.00 | $0.20 | Not available |
gemini-4-neon |
$3.00 | $15.00 | $0.15 | Not available |
gemini-4-hydrogen |
$1.50 | $7.50 | $0.075 | Free of charge |
All three use implicit caching only, with a 4,096-token minimum, a 95% discount on cached input across tiers and no storage fee (context caching). Cache entries have a best-effort time to live of up to 24 hours and can be evicted at any time, so savings are not guaranteed. Track usage.total_cached_tokens against usage.total_input_tokens to measure the hit rate. For model details, see our Gemini 4 Hydrogen guide and the Gemini 4 Carbon API pricing guide.
Workflows and prompt patterns
Patterns that follow from Google’s documented behavior and best practices:
- Permission unlocks: after a user finishes OAuth for a calendar or billing system, add the related functions with
added_toolsinstead of rebuilding the tool list. - Late constraints: add a budget cap, jurisdiction rule or tone change learned during the session as a short
system_input. - Feature pauses: remove a tool and include a note such as “Refunds are paused for this account; offer escalation instead” so the model can explain why the action is unavailable.
- Reversals: because old steps cannot be removed, write “Refunds are available again. Ignore the earlier instruction that paused refunds.”
Limitations and comparison with earlier options
Current limits from Google’s guide (mid-conversation instructions guide):
- Interactions API on
v1betaonly;generateContentdoes not support it. modelinteractions only;agentinteractions are not supported.- Each
system_inputstays in context permanently. - Function calling modes (
tool_choice) apply only to tools in the initialtoolslist, although the model can still call added tools. - Only custom function tools can be added or removed; MCP servers and built-in tools are excluded.
The closest earlier option was tool_search with deferred tools, which loads large tool sets on demand; our Gemini tool retrieval guide covers it. For voice sessions, the Live API has its own send_context_update method, covered in the Gemini 4 Live guide. The difference is that system_input gives explicit, ordered control over rules and functions in text conversations.
Frequently asked questions
What are Gemini mid-conversation system instructions?
They are system_input steps in the Gemini Interactions API, released in public preview on December 3, 2026. A system_input step adds new rules or changes function tools partway through a conversation while earlier turns stay in the prompt cache.
Which Gemini models support system_input?
Google lists gemini-4-carbon, gemini-4-neon and gemini-4-hydrogen. Other models return an HTTP 400 error. The feature requires the v1beta API version and works only on model interactions, not agent interactions.
Does system_input replace my original system instruction?
No. The top-level system_instruction and every earlier system_input stay in context for the rest of the conversation. If a new rule conflicts with an older one, the model favors the most recent rule, so Google recommends stating what changed.
Can I add MCP servers or Google Search with added_tools?
No. Google says added_tools and removed_tools support only custom function tools. MCP servers and built-in tools such as Google Search or code execution are not currently supported.
Does system_input cost extra?
Google’s documentation does not list a separate fee. Tokens are billed at the model’s normal rates, and cached input on Gemini 4 models costs 95% less than standard input, so keeping the prefix unchanged is what saves money.
Can I use system_input with generateContent?
No. Mid-conversation system instructions are supported on the Interactions API only. The generateContent method does not support system_input steps.
Sources
- Gemini API release notes (Google)
- Mid-conversation system instructions (Google AI for Developers)
- Context caching (Google AI for Developers)
- Interactions API overview (Google AI for Developers)
- Gemini Developer API pricing (Google)
Image: Google Gemini logo by Google LLC, public domain, via Wikimedia Commons. FreeAnswers is not affiliated with Google.