Guozhen AIGlobal AI field notes and model intelligence

Realtime AI News

Gemini API now updates system instructions and tools mid-conversation without losing prompt cache

Google announced that the Gemini API can now update system instructions and available tools in the middle of a conversation while preserving the prompt cache already built for that session. The change lets long-running and agent-style applications adjust model behavior without restarting the exchange or reprocessing the same context.

Published
Gemini API 支持对话中途更新系统指令与工具,且不丢失提示缓存
Image source: gemini.google

Google announced on its AI blog that the Gemini API can now update system instructions and tools in the middle of an ongoing conversation without losing the prompt cache that has already been built up for that session.

According to the post, the capability addresses a long-standing engineering trade-off: developers who wanted to change the rules governing a model's behavior, or the set of tools it is permitted to call, previously had to either restart the exchange or accept that the cached context would no longer apply.

Prompt caching matters because it is a reuse mechanism. Long conversations and large shared contexts are expensive to reprocess on every turn, and the cache is what removes that repeated work. Keeping the cache alive while instructions change lets teams adapt behavior without paying to re-read the same material on every turn.

For teams building agents, the change has practical weight. A single task often moves from planning to retrieval to execution, and the tools required at each stage differ. Being able to swap the tool set mid-session, rather than tearing the conversation down, makes multi-step workflows easier to organize.

It also touches product design. An assistant can shift working modes inside one session, for example moving from open-ended conversation to constrained task execution, without forcing the user into a fresh conversation because the underlying rules changed.

The announcement is deliberately narrow: it describes an API-level capability rather than a new model, and it is about the plumbing of how calls and context are managed. That is precisely why its significance lies in how developers structure long sessions rather than in any change to the model itself.

What to watch next is how the capability gets used in real projects and whether more detail around mid-session control follows as developers report back. For cost-sensitive teams that need to hold context for extended periods, this is the kind of infrastructure change worth evaluating early.

Why it matters

The update lowers context-management costs for long sessions and agent applications, letting developers change model behavior and tool sets without giving up cache benefits. For products built around multi-turn conversation, it directly affects latency and call overhead.

Gemini APIGoogleDeveloper Tools
Back to realtime news

Nearby Updates

All