Token usage and context pressure

Every call in a DataMind Oda chat is measured: Oda keeps running counts of the tokens the model read and wrote, and of how full the model's reading space is. This page explains what those figures mean and why they are a reference rather than a bill. The chat around them is covered in Chat with Oda.

Where the figures appear

The four token figures

Each call records the same four figures:

FigureWhat it counts
Uncached inputThe part of the request the model read fresh.
Cached inputThe part the model served from its own cache.
Cache writeThe part stored in the model's cache for later calls to reuse.
OutputWhat the model produced; the reasoning part is named inside it.

How the counts build up

Where the numbers come from

The context figure

A reference, not a bill

Questions, answered

What do the four token figures mean?

Uncached input is the part of the request the model read fresh, Cached input the part it read from its own cache, Cache write the part stored in that cache for later calls, and Output what the model produced, with the reasoning part named inside it. Cache hit is the cached share of the input.

Why does Cache hit sometimes disappear?

It needs input to measure. When nothing on the input side was read for what the figure covers, there is no share to show, so Cache hit is left out rather than shown as a zero.

Why does Cache hit show 99.96% instead of 100%?

A share reads 100% only when every input token came from the cache. A near miss keeps the extra digits it needs, such as 99.96%, so a partial hit is never rounded up into a full one.

Are these figures what the model service will bill?

No. They are Oda's kept record for the chat, a reference rather than a bill. The bill for the calls comes from the model service; where a figure is an estimate, the two can differ. Chat logging covers the record of requests your company keeps.

Why is a figure sometimes an estimate?

Not every call reports what it used. When the report is missing, Oda sizes the request's text itself, at about four characters to a token, and marks the figure with a ~. Dense material, such as data files or text that writes with wide characters, can come out low this way.

Why did the figures change while the reply was still running?

While a call streams, the figure fills from the first partial numbers. When the call settles, its final figure replaces the provisional one, so the count can move as a reply finishes; the call still counts once.

Do retried calls count too?

Yes. A retry is another call to the model, so it counts like any other. A retry that ran counts; one that was cancelled before it ran does not. Failures and recovery covers the retry row, and Model calls and failures covers which failures are retried.

Why didn't the chat's total shrink when an older part was compacted?

Compacting changes what the next call carries, not what already ran, so the chat's record of its calls keeps its figures. The context figure falls at once instead. What the marker records is on System prompt, context and compaction.

Why does the context figure hold still while the reply streams?

It measures the prompt that was sent, not the reply being produced, so it stays where it is while the answer streams. It moves again with a newer request.

Why does the ring disagree with the chat's token total?

They measure different things. The total adds up every call the chat has made; the ring shows how full the reading space is for the newest request. A long chat can carry a large total and still leave most of its window free, because the window holds one request at a time.