AIToday
Large Language ModelsAI Coding AssistantsGoogle AI BlogPublished: Dec 4, 2026, 04:00 JST

Gemini API Adds Mid-Conversation Instruction Changes in Preview

Send on LINE
Gemini API Adds Mid-Conversation Instruction Changes in Preview

3 Key Points

  1. What happened

    Google's Gemini API now offers mid-conversation system instruction and tool changes in preview via the Interactions API, using a system_input step that carries top-level authority while earlier turns stay cached. Tool updates use added_tools and removed_tools.

  2. Why it matters

    Developers can update rules or tools mid-session without invalidating the prompt cache, so agents adapt without reprocessing the full conversation history and adding cost and latency.

WHO IT HITSDevelopers building long-running AI agents on the Gemini API gain a way to change rules or tools mid-session without breaking the prompt cache, which should reduce cost and latency in multi-turn applications.

Ask AI

Ask the AI about this article. Questions and answers are published on this page

Context & Analysis

The Interactions API addresses a longstanding friction in building agents: rules, permissions and available tools often change during a long session, but until now updating them meant invalidating the prompt cache. Developers worked around this either by sending new instructions as a user message, which lacked authority, or by rewriting the system instruction, which forced the model to reprocess the entire conversation history and added cost and latency.

The new system_input step appends to the conversation history as its own step and stays active alongside the top-level system_instruction. When a newer system_input conflicts with an earlier instruction, the model favors the most recent one. For tools, developers leave the top-level tools list unchanged and use added_tools and removed_tools to update which functions the model can call; only function tools are supported this way, not MCP server tools. When a single step includes both fields, the API processes removed_tools before added_tools, allowing a tool definition to be replaced in place.

According to Google, system_input, added_tools and removed_tools steer model behavior and serve as orchestration controls, so applications should still authorize every function call on the backend and keep untrusted content out of system_input. The feature is in public preview across all Gemini 4 models through the v1beta endpoint, with support for Gemini Enterprise Agent Platform to come soon.

FAQ
How do I send a mid-conversation instruction?
Pass the previous turn's ID in previous_interaction_id and place a system_input step directly before user_input in the input array, while keeping your top-level system_instruction unchanged.
Does this cost extra?
Mid-conversation system instructions carry no separate fee; tokens in system_input steps are billed at standard input token rates, and earlier turns remain eligible for cached-token rates.
Which models support it?
The feature is in public preview across all Gemini 4 models in the Interactions API through the v1beta endpoint.
Google AI BlogRead Original Article
Send on LINE

AI news that matters for your work, delivered every morning.

Pick your industry and the AI tools you use, and get news related to your work every day.

By signing up you agree to the Terms of Service and Privacy Policy.

Free · 30 seconds with Google · unsubscribe anytimeWhat is AIToday? →

Related Articles

Next articleMicrosoft's Ken Archer: AI responsibility stays with human builders