The Cache Is Not the Only Token Budget
A redundant 964-byte path block reached the model 50 times in one session. The fix was not compression after the fact, but removing redundant context at the emitter.
Reading a 900 by 300 text screenshot as pixels cost 363 vision tokens against 27 for its recognised text, and a 2560 by 1107 send billed 3,680 tokens of which 1,400 reached the encoder.
Part 2 of 4 in Token reduction. Previous: The Cache Is Not the Only Token Budget · Next: Our Panel Said Enforced for Six Days
A 900 by 300 text screenshot cost 363 vision tokens when we sent it as a picture. Its recognised text cost 27. The model reads the same words from either, so the picture cost about 13 times more for nothing.
We found this while working through a panel of token cuts. Of the 22 cuts active on 26 July, one was written with a measurement behind it. It is the only one that a hook now enforces.
Vision input is priced by pixel dimension. The panel records a check on the format question: converting a PNG to JPEG or WebP saves disk and bandwidth, but it does not change the vision token count. Only resolution or dropping the image changes the count. We left that line unticked on purpose, because it is information, not a cut.
So the lever is not the file type. It is whether the picture needs to be sent at all.
The cut is a PreToolUse hook, image_read_gate.py, that denies a read of a picture containing text. The denial carries the recognised text instead, so the words still reach the model. A picture with no text but a size above the cap is denied too, and the hook hands back a copy fitted to the cap. The escape hatch is IMG_READ_ALLOW=1, meant for visual checks only. If the recogniser fails, the hook fails open and the read goes through.
We did not open the hook source for this post. The claims about its behaviour come from the panel line that describes it.
A 2560 by 1107 send billed 3,680 tokens. The encoder received the picture resized to 1568 by 678, which the panel counts as 1,400 tokens. The gap is 2,280 tokens, which is 62 percent of the bill, spent on pixels the encoder never used.
The receipt records this as measured. It does not separate the resize step from the upload step, so the cause is inferred from the numbers, not isolated.
What does not count: a smaller file on disk. A file that is 40 percent smaller can cost the same number of tokens if its pixel dimensions do not change.
We have one screenshot. Text density, font size and language will move the 363 and the 27, and we have not tested any of them. We also do not know how many image reads a working day contains that carry text, nor how many the gate denies. Without those two counts, the gate's total saving is unknown.
Send the 900 by 300 screenshot once as an image and once as its OCR text. Read the input token count from the usage field each time. If the image count is far from 363, or the text count is far from 27, the ratio is wrong. For the oversized case, send the 2560 by 1107 picture and check whether the bill matches 3,680. If it does not, the 2,280 gap is wrong.
The open question is the one that decides whether the hook is worth its denials: what share of picture reads carry text? We do not have that number yet.
/home/mario/Brain/OS/token-reduction-panel.md, lines 45 (C16, the measured cut and its numbers) and 59 (F23, the format question)./home/mario/Brain/OS/2026-07-26-tooling-wiring-restored.md, lines 80 to 82 (the 900 by 300 and 2560 by 1107 measurements, and the 2,280 gap)./home/mario/iTools/hooks/image_read_gate.py (present on disk; its source was not read for this post).
Comments
No comments yet.
Log in to comment.