1.9 KiB
name, description, metadata
| name | description | metadata | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| reasoning-tokens-vs-completion-tokens | Reasoning tokens come out of max_tokens, and providers disagree about whether they count as completion tokens |
|
Two facts that together produce an empty HTTP 200 that looks like a model saying nothing:
-
Reasoning tokens come out of
max_tokens. A cap set anywhere near the size of the expected answer is spent entirely on thinking, and the request returns no content. Already documented in~/config/litellm/config.yaml's OpenAI block ("seen at max_tokens 16 and again at 500 on gpt-5.1-codex-max, which then worked unchanged at 4000"). -
Providers disagree about whether reasoning counts as completion.
gpt-ossvia llama.cpp folds reasoning INTOcompletion_tokens;glm/glm-5.3reportscompletion_tokens: 0besidecompletion_tokens_details.reasoning_tokens: 1023for the same behaviour. Reading onlycompletion_tokensshows a model that generated nothing.
finish_reason == "length" is the authoritative signal — check it before any
token arithmetic. Add reasoning_tokens to completion_tokens whenever
computing a rate or testing a budget; a decode figure divided by completion
tokens alone reports a model that emitted 1,023 reasoning tokens and 12 of
content as running at the rate of the 12.
Do not cap max_tokens to a budget in a benchmark. The cap silently
becomes the thing being measured, and an empty 200 grades as "found nothing" —
which on a code-review suite's defect-free control arm scores perfectly.
Use a ceiling far above observed spend, record it in the result row, and treat
an attempt that hits it as unusable rather than as an answer.
Related: litellm-extra-body-reasoning for turning the reasoning down.