Gemini API adds mid-conversation instruction and tool updates
Original title: Introducing mid-conversation instructions in the Gemini API
A system_input step can change rules or function tools without invalidating the prompt cache.
Google opened a preview of mid-conversation system instruction and tool changes in the Gemini API through the Interactions API. Developers can append a system_input step that has the same authority as the top-level system instruction while earlier turns stay cached. Function tools can be added or removed with added_tools and removed_tools if the top-level tools list stays unchanged. MCP server tools are not supported.
- The feature is in preview and the sample uses model gemini-4-neon.
- One system_input step is allowed per turn, placed directly before user_input.
- When instructions conflict, the model favors the most recent system_input.
- Retrieved interactions list system_input steps beside user and model output.
- Vendors
- Products
- Gemini APIInteractions API
- Organizations
- Google Cloud
- AI models
- gemini-4-neon
From the original article
5 min read at blog.google
Update system instructions and tools mid-conversation while preserving your prompt cache.
By Trey Nguyen · blog.google
A short excerpt; the article and its images belong to the publisher. Summary, key facts and assessment above are AI-written from the article and can be wrong.