On December 3 Google for Developers announced a system_input step in the Gemini Interactions API (v1beta public preview). Developers can add or reinforce system instructions mid-conversation and add or remove function tools with added_tools and removed_tools without invalidating the prompt cache. It works with gemini-4-carbon, gemini-4-neon and gemini-4-hydrogen. New instructions add to earlier ones, and on conflict the model favors the most recent. A system_input must come directly before a user_input, at most one per turn, or the API returns HTTP 400.
Key Takeaways
- ✓New: a system_input step in the Interactions API appends rules mid-conversation without editing the original system instruction.
- ✓Tool swaps: added_tools and removed_tools on the same step change callable functions while the original tools list is still sent each turn, keeping the prompt cache valid.
- ✓Stacking: new instructions add to earlier ones and the most recent wins on conflict; Google advises stating what changed.
- ✓Scope: v1beta public preview for gemini-4-carbon, gemini-4-neon and gemini-4-hydrogen, chained with previous_interaction_id.
- ✓Limits: directly before user_input, at most one per turn, not while returning a function result, text-only content; otherwise HTTP 400.
Key Decision Metrics at a Glance
Turn your technical choice into a development budget
Compare 40 dev plans & simulate token costs vs $20/mo subscriptions
Project Links & Resources
Direct AccessIn-Depth Technical Analysis
Background and pain points
In long agent sessions, rules and available tools change mid-way: a user finishes OAuth, a feature is paused, or a budget cap appears. Editing the original system instruction or tools list used to force the model to reprocess the full history and invalidate the prompt cache. On December 3 Google for Developers announced on X that the Gemini Interactions API now supports system_input steps, listed as public preview in the changelog.
Architecture and mechanics
Per the guide, you place a system_input step before a user_input step to append rules, and use added_tools and removed_tools on that step to change which functions the model can call while still sending the original tools list each turn, so the cache stays intact. New instructions do not replace earlier ones; on conflict the model favors the most recent.
Benchmarks
This is an API feature; Google has published no latency or cost figures. The main gain is keeping cached earlier turns when rules or tools change.
Getting started
It requires v1beta and works with gemini-4-carbon, gemini-4-neon and gemini-4-hydrogen, chaining turns with previous_interaction_id. Rules: send system_input directly before user_input, at most one per turn, never alone or while returning a function result, and text only in content; violations return HTTP 400.
Benchmark side-by-side against alternatives, or calculate monthly token cost vs subscription break-even.
Discussion & Comments
Sign in to join the discussion
Connect with AI developers to exchange benchmark insights.