Google adds mid-conversation instructions to the Gemini API
AI

Google adds mid-conversation instructions to the Gemini API

TechNews Editorial
TechNews EditorialDec 4, 2026 · 1 min read
Share

Why it matters

Google says developers can change an agent’s rules or function tools during a session while keeping earlier turns eligible for cached-token rates.

The facts

  • Google added mid-conversation instruction and tool updates to the Gemini API in public preview.
  • Earlier turns remain eligible for prompt caching when developers change rules or function tools.
  • The feature works across all Gemini 4 models through the Interactions API’s v1beta endpoint.

Advertisement

Google has added mid-conversation instruction and tool updates to the Gemini API. Available in public preview, the feature lets developers change an agent’s rules or available functions during a session while keeping earlier turns in the prompt cache, the company says.

The change is aimed at agents that handle long conversations. Google says changing top-level instructions or tools previously invalidated the cache, requiring the model to process the conversation history again. Placing new rules in a user message preserved the cache, but did not give those rules the authority of a system instruction.

Developers add instructions using a system input step

Developers can now add a system_input step through the Interactions API. It can contain new instructions, tool changes or both. The step appears before the user’s input for that turn and remains active for the rest of the session. Google says it takes precedence over user messages; when instructions conflict, the model favors the newer one.

For tool changes, developers keep the top-level tool list the same and use added_tools or removed_tools in the new step. The changes remain in effect until another system_input changes them. This currently works for function tools, but not MCP server tools.

A backend engineer stands looking up while slotting a green security module into a tall metal rack.
Illustration: AI & Tech News

Google says developers should still authorize each function call on their backend before it runs. It also advises keeping content from users and other untrusted sources out of system_input.

Tokens in the new steps are billed at standard rates

There is no separate fee for mid-conversation instructions. Tokens in those steps are billed at the model’s standard input rates, while earlier turns remain eligible for cached-token rates. The feature is available across all Gemini 4 models through the Interactions API’s v1beta endpoint. Google says support for Gemini Enterprise Agent Platform is coming soon.

Source: Google

Newsletter

Get the best AI & tech news daily

A concise daily digest. Unsubscribe anytime.

We use your email only to send this newsletter.

Keep reading