
- 谁
- 时间
Today, mid-conversation system instruction and tool changes are available in preview in the Gemini API through the Interactions API .
发生了什么
Google 已通过 Gemini API 中的 Interactions API,面向所有 Gemini 4 模型推出对话中途系统指令和函数工具更新的公开预览版。开发者可以在 user_input 之前传入带有 added_tools 和 removed_tools 的 system_input 步骤,同时保持顶层的 system_instruction 和 tools 不变,从而在多轮对话中保留提示词缓存。system_input 步骤中的 token 按标准输入费率计费,不另收费;目前暂不支持 MCP 服务器工具。
推荐理由
构建智能体的开发者现在可以在会话中途更新指令和函数工具,而不会使提示词缓存失效,从而避免额外的延迟和全量重新处理成本。
这件事到目前为止
Google has launched mid-conversation system instruction and function tool updates in public preview for all Gemini 4 models through the Interactions API on the v1beta endpoint of the Gemini API. Developers can pass a system_input step with added_tools and removed_tools before user_input while leaving top-level system_instruction and tools unchanged, preserving the prompt cache across turns. Mid-conversation system instructions carry no separate fee, and tokens in system_input steps are billed at the standard input token rates for the model called. Currently, the feature only supports updating function tools via added_tools and removed_tools, while MCP server tools are not yet supported.
每天一封日报,不再漏掉重要进展
精选模型发布、价格变化与算力动态,每条附原始来源。免费,确认后开始发送,随时一键退订。 看一份往期日报
