Google opened mid-conversation instruction and tool updates in public preview on December 3, 2026, for teams running Gemini-powered business assistants. To change what an agent can do without rewriting its cached history, append the change immediately before the next user turn and keep the original instructions and tool declarations unchanged. This can preserve cache eligibility; it does not guarantee savings or replace permission checks.
Consider a support assistant that must stop offering refunds halfway through a conversation. The application can remove its refund function from the active set and explain the pause, while retaining earlier context. The important distinction is between what the model is offered and what the backend will actually allow.
Check your model and API before changing tools
The feature guide’s supported list names gemini-4-carbon, gemini-4-neon and gemini-4-hydrogen. Use model requests on the v1beta Interactions API. The feature does not support generateContent or Interactions requests using the agent field. An assistant you build around a model is not the same as an API-managed agent.
Only custom functions can be added or removed this way—not MCP server tools or built-in tools such as Google Search and code execution. The preview interface may change before general availability. If your application still selects Argon, first review preparing Argon apps for the Carbon switch; do not infer support from the broader Gemini 4 name.
The chained recipe below also needs stored interactions. Under the Interactions storage rules, an interaction created with store=false cannot be used as a later previous_interaction_id. Do not enable storage merely to copy the example if your application’s data policy forbids it. Conversation storage and implicit caching are separate controls.
Pause a refund at the next user turn
First block refunds in the application’s authoritative permission checks. Then, at the next user-input boundary, send one system_input immediately followed by user_input, as specified in Google’s request-ordering rules. Do not insert the update while returning a function result.
This illustrative Python fragment has not been run against the API. It assumes an existing Carbon conversation, no outstanding function call, and original configuration variables saved from earlier requests. original_tools still contains the full issue_refund definition; user_message is the actual next user message.
from google import genai
client = genai.Client(http_options={"api_version": "v1beta"})
update = client.interactions.create(
model="gemini-4-carbon",
previous_interaction_id=last_turn.id,
system_instruction=original_instruction,
tools=original_tools,
generation_config=original_config,
input=[
{
"type": "system_input",
"content": [{
"type": "text",
"text": "Refund processing is paused for this account. "
"Explain the pause; do not offer to issue a refund."
}],
"removed_tools": [
{"type": "function", "name": "issue_refund"}
]
},
{
"type": "user_input",
"content": [{"type": "text", "text": user_message}]
}
]
)The removal identifies the function by type and name. It is not a bare string. For additions, added_tools needs the full function definition, including its parameter schema. Tool updates persist until another update changes them; if one step contains removals and additions, removals happen first.
Keep the original tool list separate from active tools
A removed refund function must remain in the original top-level tools array on later chained requests. That declaration lets the API validate stored history; removed_tools changes the active set. Rebuilding the original array from whichever functions are currently enabled confuses those two jobs.
Conversely, functions first introduced through added_tools stay outside the original top-level list. Google documents HTTP 400 errors both for dropping removed original declarations and for redeclaring an active later-added function at the top level. Keep the baseline fixed and track accepted active-tool changes separately. The tool-update rules explain both cases.
Other documented HTTP 400 traps include:
Sending an update alone, putting it anywhere other than directly before user input, or sending it during a function-result loop.
Sending multiple system-input steps in one turn, or non-text content in that step.
Sending an empty step with neither text nor a tool addition or removal.
Selecting a model outside the supported list.
Keep resending the unchanged system_instruction and generation_config too: a previous interaction ID carries history, not those settings. Changing the reasoning setting or reordering original tools can still break cache reuse.
Make read-only access a backend rule
For read-only operation, remove every relevant custom write function, including any added earlier in the session. Do not rely on tool_choice alone: Google’s limitation notice says its function-calling modes apply only to the initial tool list. The model can still call functions introduced later through added_tools.
Google explicitly calls for backend authorization before every function executes. Keep user messages and untrusted external content out of system_input, which carries privileged instructions. MCP and built-in actions need separate controls because these update fields do not manage them.
The implementation consequence is straightforward: if permission changes during a function-calling loop, enforce it in the backend immediately rather than waiting for the next user turn. Updating the model’s view is not an emergency-cancellation mechanism for an already running transaction. A reply saying refunds are paused is not proof that execution was blocked.
Check cached tokens before calculating savings
There is no separate fee for mid-conversation instructions. Newly appended instruction tokens are billed at the model’s normal input rate. Earlier history remains eligible for cached-input pricing, but implicit caching is opportunistic: these three models have a 4,096-token input minimum and no guaranteed retention or savings. A short successful example can therefore show no cache benefit.
For a concrete cost check, Carbon’s current Standard paid rates are US$4 per million input tokens, US$0.20 per million cached-input tokens and US$20 per million output tokens, including thinking. These are not Batch rates; the Interactions API does not support Batch requests or explicit cache objects.
Illustrative input-only calculation: assume one request contains 100,000 earlier tokens and 500 new uncached tokens. If all earlier tokens hit the cache, input costs (100,000 × $0.20 + 500 × $4) ÷ 1,000,000 = $0.022. With no cache hit, the same 100,500 input tokens cost $0.402. The difference is $0.38 for that request’s input—not the whole task.
Those token counts are assumptions, not measurements. The comparison excludes initial conversation costs, output and thinking, external tools, retries and taxes; it assumes identical output and tool work. A changed prompt can also retain a partial cache hit, so the no-hit case is not a prediction of every edit.
Inspect usage.total_cached_tokens alongside usage.total_input_tokens in actual responses, using Google’s cache-usage guidance. Compare complete-task spending as well as input reuse. If your separate question is whether to load a large tool library on demand, see when Gemini tool retrieval is worth its cost; changing active functions does not erase earlier schemas or refund earlier charges.
Restore access explicitly, then check the next turn
After the backend permits refunds again, append a new instruction explicitly lifting the earlier pause and supply the full refund function through added_tools. Earlier instructions remain in context; Google says newer conflicting instructions take precedence, not that old ones are deleted. Preserve the original declaration list rather than rewriting history.
Before using real transactions, validate a pause and restoration with harmless stand-ins. Check that the following turn still accepts the original declarations, that the backend independently refuses denied actions, and that recorded cached-token usage supports any cost claim. Inspecting the stored interaction steps helps confirm the model-facing sequence; execution logs must establish what actually ran.
