# Reasoning tokens vs visible tokens: how to measure the split

> Source: <https://dev.to/aiapikey/reasoning-tokens-vs-visible-tokens-how-to-measure-the-split-52ek>
> Published: 2026-11-29 20:02:35+00:00

**Recommendation:** Re-prompt the same model with each visible response and read `prompt_tokens` to separate hidden reasoning from written output, and log `finish_reason` beside the counts.
More in the playbook "Controlling LLM cost": <https://wpnews.pro/playbooks/llm-cost>

I spent a week measuring what an LLM request costs, and the number that broke my measurement was not a price. It was that `usage.completion_tokens` is not the length of the answer.

On a short prompt — 47 tokens, "list exactly three differences between TCP and UDP" — with `max_tokens` set to 600, one model reported **1,837 completion tokens**. The visible answer was **137 tokens**.

The other **1,700 tokens were billed and never shown to me.**

If you treat `completion_tokens` as output length, three things go wrong at once:

**Cost estimates are wrong in the direction that hurts.** You budget from a number that understates, and the gap is not a percentage. In my sample it was an order of magnitude.

**Benchmarks plot the wrong x-axis.** A test-time-compute curve is usually drawn against tokens spent. If the tokens include invisible reasoning, the curve mixes "how much the model thought" with "how much it wrote", and those have very different slopes.

**"Output length variance" measures the wrong thing.** I published a post last week claiming output length is unstable with a 4.7x spread between models. That claim survives, but the interpretation was wrong: the visible answers were nearly identical across runs. **The variance was in the thinking, not the writing.**

Some providers expose reasoning tokens in a separate field. Most do not. When they do not, there is a trick that works everywhere:

**Feed the visible response back in as a prompt to the same model and read `prompt_tokens`.** That is the token count of what was actually written, in the same tokenizer. The difference against `completion_tokens` is the hidden part.

```
r = call(model, prompt)
visible = r["choices"][0]["message"]["content"]
billed = r["usage"]["completion_tokens"]

# Same model, same tokenizer: this counts the text we can see.
r2 = call(model, visible, max_tokens=1, temperature=0)
visible_tokens = r2["usage"]["prompt_tokens"]

print(billed, visible_tokens, billed - visible_tokens)
```

It costs one extra request per measurement and needs no provider support.

**doubao-seed-2.1-turbo**, `max_tokens 600`, one short prompt, three runs:

| run | billed `completion_tokens` | visible text | hidden | 
|---|---|---|---|
| 1 | 1,837 | 137 | 1,700 | 
| 2 | 2,640 | 125 | 2,515 | 
| 3 | 1,861 | 153 | 1,708 | 

The visible answer never came close to the cap. **The cap bounded what I could see and did not bound what I was billed for.** If you budget from `max_tokens`, the number you are budgeting against is not the number you are charged.

**deepseek-v4-flash**, same setup, five runs:

| run | billed | visible text | 
|---|---|---|
| 1 | 268 | 73 | 
| 2 | 271 | 85 | 
| 3 | 116 | 74 | 
| 4 | 139 | 76 | 
| 5 | 184 | 72 | 

Billed tokens spanned 2.3x. **Visible tokens spanned 1.2x.** The answer was stable; the thinking was not.

Once you separate the two, a call stops being "ok / not ok" and becomes four states:

`finish_reason: stop`, content present, count sane.` finish_reason: length`. The fourth is the one that costs debugging time. It passes every "did the call succeed" check, parses as far as most parsers care, and returns an answer that stops before the part that mattered.

**Log `finish_reason` next to the token counts, not instead of them.** Then one boolean does not have to carry four meanings.

I have not separated *why* some models reason before answering and others do not. I tested one endpoint on two days. The split may differ by provider, by time of day, and by routing.

And the split is not a bug. Reasoning is the feature. The problem is only that the number on the invoice does not say which half it is paying for.

`completion_tokens` is not output length.`finish_reason` beside the counts.
The number on your invoice is honest. It is your label for it that was wrong.
