Google Previews Mid-Conversation Instructions and Tool Updates in Gemini API

Google AI BlogGoogle AI Blog·Original
Operator Bae ChangHyun

Key point

Google previewed Gemini API updates that let developers change instructions and tools mid-conversation without invalidating earlier cached turns.

1 / 5

Details

  • Google has previewed mid-conversation system-instruction and tool changes through the Gemini API’s Interactions API, so long-running agents can adapt while keeping earlier turns cached.
  • Developers add a system_input step before user_input; it has the authority of a top-level system instruction, and newer conflicting instructions take precedence.
  • Developers can change available function tools with added_tools and removed_tools, but MCP server tools are not supported for these updates.

Implementation and safeguards

  • To preserve the cache, keep the top-level system instruction and tools list unchanged across turns; each system_input step remains active for the rest of the session.
  • Google says interaction traces include system-input steps for auditing and debugging, and applications should authorize function calls on the backend and keep untrusted content out of system_input.

Availability and pricing

  • The feature is in public preview for all Gemini 4 models through the Interactions API at the v1beta endpoint.
  • system_input tokens use standard input-token pricing, while earlier turns remain eligible for cached-token rates; Google says Gemini Enterprise Agent Platform support is coming soon.

This summary was generated automatically by AI. Check the original for the author's claims and context. Copyright belongs to the original author.

Our guide explains how the AI works. Report summary errors, attribution issues, or removal requests via Contact.