The caching docs table states 2,048 minimum tokens for Gemini 2.5 Flash, and does not list gemini-2.5-flash-lite at all. The API enforces different values:
| Model | Docs | API actually enforces |
|---|---|---|
gemini-2.5-flash |
2,048 | 1,024 |
gemini-2.5-flash-lite |
not listed | 2,048 |
The API states the limit in its own 400 response:
gemini-2.5-flash, 1006 tokens:
400 INVALID_ARGUMENT: Cached content is too small.
total_token_count=1006, min_total_token_count=1024
gemini-2.5-flash-lite, 2010 tokens:
400 INVALID_ARGUMENT: Cached content is too small.
total_token_count=2010, min_total_token_count=2048
Reproduction: call caches.create on each model with ~1,100 tokens of text. Flash succeeds; Flash-Lite is refused. SDK google-genai 2.17.0.
Impact:
-
The Flash figure is too high. Docs say 2,048; the API accepts 1,024. A developer with a 1,200-token block reads the docs, concludes it’s too small to cache, and forgoes a 90% input discount they were actually entitled to.
-
Flash-Lite has no documented minimum at all. Its real limit (2,048) is only discoverable by hitting the 400. A developer who sizes to Flash’s observed behaviour — 1,024, which you find in seconds by just trying it — then switches to Flash-Lite and gets a failure with nothing in the docs to explain it.
Request: correct the Flash row to 1,024 and add a Flash-Lite row at 2,048.
Here are the wrong docs links :-
