Google Adds Mid-Conversation Instructions to Gemini API, Keeps Prompt Cache
⚡ Breaking News
Google AI Blog
December 3, 20264 min read4

Google Adds Mid-Conversation Instructions to Gemini API, Keeps Prompt Cache

By — Senior AI Technical Editor

Back to News
❝

Google launched mid-conversation instructions in Gemini API via Interactions API, available in public preview for all Gemini 4 models on the v1beta endpoint. Developers can update system instructions or tools without invalidating the Prompt Cache, cutting cost and latency for long-running agents. There are no separate feature fees; system_input tokens bill at standard input rates, while prior turns retain cached-token pricing.

Executive Overview

Google officially announced via the Google AI Blog that mid-conversation instructions are now available in Gemini API through the Interactions API, in public preview for all Gemini 4 models on the v1beta endpoint. The feature lets developers update system instructions or tools mid-conversation while preserving the Prompt Cache, with no separate feature fees. This directly reduces cost and latency for long-running agents that operate across dozens or hundreds of turns.

📊 Official Data & Technical Specifications Card

Technical AxisConfirmed Official Data
💰 Pricing & Usage CostNo separate feature fees; system_input tokens are billed at the model's standard input token rates. Prior turns remain eligible for cached-token rates.
🌐 Platforms & Immediate AvailabilityGemini API via Interactions API (v1beta endpoint); public preview for all Gemini 4 models. Gemini Enterprise Agent Platform support coming soon.
⚡ Performance & Speed IndicatorsReduces cost and latency by avoiding full conversation-history reprocessing when instructions or tools change; preserves Prompt Cache across turns.
🛡️ Security & Injection Resistancesystem_input carries the same authority as top-level system instructions and takes precedence over user messages. Applications must authorize every function call on the backend and keep untrusted external content outside system_input.
🧠 Context WindowGoogle did not state a specific numeric context window size in this announcement; the feature operates across multiple turns (dozens to hundreds) while preserving the cache.
🌍 Arabic & Regional SupportThe feature is part of Gemini API and works with any language the model supports, including Arabic, with no change to billing or performance mechanics.

Deep-Dive Features & Architecture

The new capability addresses a core problem in long-running agents that operate across dozens or hundreds of turns, where rules, permissions, and available tools change during a session. Before this announcement, developers resorted to two workarounds: sending new instructions as a user message (which strips them of top-level system authority and lets users mimic them), or rewriting system instructions or tools (which invalidates the Prompt Cache and forces the model to reprocess the entire conversation history, adding cost and latency).

The Interactions API now allows sending a system_input step at any turn containing changes to system instructions or tools, passing the previous turn ID in previous_interaction_id and placing system_input directly before user_input in the input array. This step carries the same authority as top-level system instructions and takes precedence over user messages, while prior turns remain cached. Each system_input step is added to the conversation history as an independent step and remains active for the rest of the session; when new instructions conflict with older ones, the model favors the most recent.

For tool updates, Google recommends keeping the same top-level tool list on every turn and using added_tools and removed_tools to update the functions the model can call. Currently, only function tools are supported for updates, not MCP server tools. When both fields are included, the API processes removed_tools before added_tools, enabling in-place replacement of a tool definition. Tool updates remain in effect until a subsequent system_input step changes them.

  • system_input step: carries top-level system authority and takes precedence over user messages.
  • previous_interaction_id: links the new turn to the prior interaction to preserve cache continuity.
  • added_tools / removed_tools: update function tools without rewriting the full tool list.
  • Prompt Cache preservation: prior tokens remain identical across turns, avoiding full reprocessing.

Benchmark & Competitive Performance

Google does not provide specific benchmark numbers or quantitative improvement percentages versus competitors in this announcement. However, the structural benefit is clear: avoiding full conversation-history reprocessing on every instruction or tool change reduces token consumption and latency, directly impacting the operating cost of long-running agents. Prior turns remain eligible for cached-token rates, preserving the cost advantage even when rules or tools change.

Industry Impact & Enterprise Adoption

For developers in the Arab world and globally, the feature lowers the barrier to building persistent, multi-turn agents that adapt mid-session without incurring cache invalidation penalties. Enterprises deploying customer-support, workflow-automation, or coding agents across hundreds of turns can now adjust permissions and tool access dynamically while keeping costs predictable. The upcoming support for the Gemini Enterprise Agent Platform signals Google's intent to bring the same cache-preserving instruction model to managed enterprise deployments.

Conclusion

Google's mid-conversation instructions in Gemini API represent a meaningful architectural improvement for long-running agents: system-level authority for mid-session updates, preserved Prompt Cache, and no separate feature fees. With public preview available for all Gemini 4 models on v1beta and enterprise platform support coming soon, developers can now build adaptive agents that change rules and tools without paying the cache-invalidation tax.

Media Source: Google AI Blog | البيان الرسمي للشركة: المصدر الأصلي | Fact Verification & Analysis: AI Tools Oasis

Original Source:Google AI BlogThis news was formulated based on coverage from Google AI Blog

Frequently Asked Questions

What is the pricing for using mid-conversation instructions in Gemini API?

There are no separate fees for the feature. system_input tokens are billed at the model's standard input token rates, and prior turns remain eligible for cached-token rates when rules or tools change.

Which Gemini models support mid-conversation instructions?

The feature is available in public preview for all Gemini 4 models via the Interactions API on the v1beta endpoint in Gemini API. Support for the Gemini Enterprise Agent Platform is coming soon.

Does the feature support updating MCP tools?

No. Currently, only function tools can be updated via added_tools and removed_tools; MCP server tools are not supported for mid-conversation updates.

How does the feature preserve the Prompt Cache?

By adding a system_input step within the current turn, all prior tokens remain identical from turn to turn, allowing the Prompt Cache to be reused without reprocessing the full conversation history.

Does the feature support Arabic?

The feature is part of Gemini API and is not language-specific; it works with any language the model supports, including Arabic, with no change to billing or performance mechanics.

AI Tools Oasis

AI Tools Oasis Team

Bringing you the latest news and analysis in the world of Artificial Intelligence with accuracy and credibility. Follow us for all updates.

Related News