Sulat.com / Writing on AIMonday, December 7, 2026
Enter →
Agents/6 December 2026

Prompt caching on Gemini 4 Neon

Shubham Saboo says a cached 50K-token turn costs $0.0075 on Gemini 4 Neon. I measured it and tested what breaks the cache.

3D illustration of the Gemini logo beside a glowing stack of glass layers representing a cached prompt
Illustration: Sulat, featuring the Gemini logo

At a glance

  • Shubham Saboo says a cached 50K-token turn on Gemini 4 Neon costs $0.0075 against $0.15 uncached, and that rewriting the system prompt mid-session loses the cache.
  • I measured a cached turn at $0.0133 to $0.0134 against $0.148 uncached, about 11 times cheaper rather than 20, because Neon recomputes a trailing 2,050-token window on every request.
  • All 12 edits I tried to the system prompt, thinking_level, tools or the document returned zero cached tokens and billed at full price.
  • Chaining turns with previous_interaction_id kept every follow-up at $0.0153 to $0.0171, including one that added a 3K-token tool result.
  • Antigravity users report the same 2,049-token tail re-read, and cache misses from MCP tool names printed in a different order on each start.

Shubham Saboo, a senior AI product manager at Google, posted that an agent re-reading 50,000 tokens every turn costs $0.15 a turn on Gemini 4 Neon, that a cached turn costs $0.0075, and that rewriting the system prompt mid-session throws the cache away. I ran a 50K-token prompt through Neon’s API to check. The second claim held in all 12 edits I tried. The first is optimistic: a cached turn cost $0.0133 to $0.0134, about 11 times cheaper than uncached rather than 20.

Shubham Saboo’s post.

What the post gets right

The arithmetic comes straight from Google’s price list. Neon charges $3 per million input tokens and $0.15 per million cached ones, so 50,000 tokens cost $0.15 uncached and $0.0075 if every token is cached. Prompt caching means the provider reuses the start of a prompt it has already read instead of reading it again. I explained that from scratch in the earlier Neon caching piece, and the terms are in the AI vocabulary guide.

The warning about the system prompt is also correct. Google’s caching documentation says Gemini 4 builds every request in a fixed order: thinking_level first, then tool declarations, then the system instruction, then the conversation. Caching matches from the first token, so the first change breaks everything after it.

What the documentation adds

  • Every Gemini 4 request recomputes a trailing 2,050-token window at the standard input rate, so a cached turn is never fully cached.
  • Changing thinking_level breaks all of the cache, and changing the tools breaks the system instruction and the conversation behind them.
  • Caching is implicit and best effort. Google gives no guaranteed retention, and nothing is cached below 4,096 input tokens.

What I ran

I called the Interactions API from a 4-core, 15 GB RAM Ubuntu 24 box. The shared prefix was a 166,000-character operating manual I generated, about 50K tokens. Every request used this shape, with the same system prompt and question:

Code
r = client.interactions.create(
    model="gemini-4-neon",
    system_instruction="You answer questions about the operating manual below. Reply in one short sentence.",
    input=[
        {"type": "text", "text": manual},
        {"type": "text", "text": "Question: What must the returns desk do about serial numbers?"},
    ],
    store=False,
    generation_config={"max_output_tokens": 4000, "thinking_level": "low"},
)
print(r.usage.total_input_tokens, r.usage.total_cached_tokens)

For each test I sent the request, sent it again to confirm the cache was warm, then sent one edited version. Input cost is the uncached tokens at $3 per million plus the cached tokens at $0.15 per million. Output and thinking tokens are left out.

A cached turn costs about 11 times less

Every identical resend hit the cache. That was nine out of nine, across nine different prefixes.

RequestInput tokensCached tokensInput cost
First send, nothing cached49,8790$0.1496
Identical resend49,43747,380$0.0133
Identical resend49,87947,822$0.0133
Identical resend50,31148,254$0.0134
Identical resend, one tool declared77,71075,653$0.0175
Input cost only. The uncached row is the first send of the 49,879-token prefix.

Every hit left exactly 2,057 tokens uncached, whatever the prompt size. That’s Google’s trailing window plus a few new tokens. On the 49,879-token request, 47,822 cached tokens cost $0.0072 and the 2,057 uncached ones cost $0.0062. The window alone is nearly half the bill.

So $0.0075 is what a turn would cost if every token were cached, and Neon never does that. The measured gap is 11 to 1 against the 20 to 1 the token prices suggest. It widens with size, because the window is a fixed cost: the 77,710-token request cost $0.0175 cached against $0.2331 uncached, 13 to 1.

Infographic: a Gemini 4 Neon cached turn costs $0.0134 against $0.148 uncached, about 11 times less, not 20
Cached turns cost about 11 times less, not 20.

Every edit lost the cache

I made 12 edits. Seven of them came straight after a confirmed hit on the unedited prompt, and every one returned zero cached tokens and billed the whole request at full price.

EditInput tokensCached tokensInput cost
One sentence added to the system prompt49,4400$0.1483
One sentence added to the system prompt, second run52,7480$0.1582
Date and time added to the system prompt49,8970$0.1497
Date added, new on every turn52,8470$0.1585
Date added again a minute later52,8480$0.1585
thinking_level changed49,9350$0.1498
thinking_level changed to high, second run52,8860$0.1587
One line added at the top of the manual49,9860$0.1500
One line added at the top, second run52,9440$0.1588
One sentence inserted mid-manual49,8660$0.1496
One sentence inserted near the end of the manual49,9660$0.1499
A second tool added77,7380$0.2332
Each row is one edited request. The second runs came from a longer conversation sent as plain text.
List of five Gemini 4 Neon prompt edits, each with zero cached tokens: system sentence, date, thinking_level, document line, extra tool
Every edit I tried to the prompt came back with zero cached tokens.

The date rows matter most for agents. A system prompt that carries today’s date or a session ID changes on every call, so it can’t hit. Google’s documentation lists timestamps, UUIDs and session IDs in the system instruction as cache breakers for the same reason.

The edit didn’t evict the original. Resending the unedited prompt afterwards hit again in four later runs, with 47.4K to 50.7K tokens cached. Position gave me no safe edit either: a sentence inserted near the end of the manual missed as completely as one at the top. The one partial survivor was a reworded question that sat after the manual in the conversation, which kept 47,325 tokens cached and cost $0.0241.

Chaining turns kept it

The chain was the part that worked every time. I sent turn one, then each follow-up with previous_interaction_id and the same system prompt, tools and config. Turn four added a 3K-token tool result.

TurnInput tokensCached tokensInput cost
1, cold49,9380$0.1498
2, short follow-up50,76147,881$0.0158
3, short follow-up51,36748,712$0.0153
4, 3K-token tool result added54,50151,368$0.0171
5, short follow-up54,97252,452$0.0154
Stateful chain with previous_interaction_id.
Bar chart: a Gemini 4 Neon chain costs $0.150 on turn one, then about $0.015 to $0.017 on turns two to five
Chained with previous_interaction_id, every turn after the first stayed near $0.015.

All four follow-ups hit. Turn two cost $0.0158, about a tenth of the cold turn, and the tool-result turn cost $0.0171. That matches Google’s description of agent turns, where thinking and tool results push each turn past the 2,050-token threshold.

Resending the conversation myself did worse. With store=False, I appended each earlier answer as plain text, and only 1 of 7 follow-ups hit. Google’s documentation says a stateless client has to append every model step unchanged, thought signatures included, and I didn’t, so those misses say nothing about the documented method. The chained runs are the ones that follow the documentation.

The fix for the system prompt

If the instructions have to change mid-session, don’t rewrite the system prompt. Google’s Interactions API now takes a system_input message in the conversation. In my test of it, rewriting the system prompt returned zero cached tokens in nine of nine runs, while adding the instruction as system_input kept most of the prefix cached. Tool changes go through added_tools and removed_tools, with system_instruction and tools left alone.

Where this shows up in Antigravity

I haven’t measured Antigravity itself. Its documentation says it rereads your rules and skills before each turn, so an edited rule applies to your next message without a restart. Users in the Antigravity CLI repository have logged the cost of cache misses in that harness.

  • Issue 2052 analyses 30 sessions and 788 steps on Neon and Hydrogen. It puts 49.5% of uncached input tokens down to misses and re-prefills. On 273 steps the cached count sat exactly 2,049 below the previous total, which looks like the same trailing window Google’s documentation describes.
  • Issue 2177 traces a full cache miss on session resume to MCP tool names printed in a different order each time the process starts. The same session without MCP tools resumed with 6,980 tokens cached.
  • Issue 1665 reports Neon caches dropping to zero within a minute between turns in November, and a later comment says that improved in a newer release.

These are user reports, not Google figures. They show the same two failure modes as my tests: a prompt that changes between calls, and a short follow-up that pays for the trailing window.

What to do about it

  1. Keep thinking_level, the tools and the system prompt fixed for the life of a session.
  2. Put dates, IDs and per-turn notes in the newest message or in system_input, never in the system prompt.
  3. Chain turns with previous_interaction_id and resend the same config each time. If you manage the history yourself, append every model step unchanged.
  4. Budget for the trailing window. It’s about $0.006 a turn, which is why cached input costs an eleventh of the full price, not a twentieth.
  5. Read usage.total_cached_tokens on every turn. Below 4,096 input tokens nothing is cached.
Infographic: editing a Gemini 4 Neon prompt loses the cache, chaining turns keeps it
Chain the turns and leave the prompt alone.

What this test covers

This is a smoke test: one generated manual, one model, and a handful of repeats per case. Implicit caching is best effort, so hit rates in production will vary. I didn’t test the other Gemini 4 models, long sessions beyond five chained turns, or Antigravity’s own harness.