Gemini API adds mid-conversation instruction and tool updates
Brief
Developers can now update system instructions and function tools during a Gemini API conversation without invalidating the prompt cache.
What changes
- In the Interactions API, send a system_input step before user_input to add instructions; newer conflicting instructions take precedence.
- Use added_tools and removed_tools to change available function tools while keeping the top-level tools list unchanged. MCP server tool updates are not supported.
Availability and cost
- The feature is in public preview for all Gemini 4 models through the Interactions API v1beta endpoint.
- There is no separate fee for mid-conversation instructions; system_input tokens are billed at standard input rates, and earlier turns remain eligible for cached-token rates.
Generated by AI from the original article. Check the source for full details.