A model call has two sides. There is what you send: the prompt, with the files and context it carries. There is what comes back: the answer. Some providers also keep a cache of recent prompts, and Nika's price catalog carries a separate cache-read rate for them. So two calls that look the same from the outside can cost different amounts.
Until v0.119.0, the card a Nika run printed showed only one of those sides. The 0.119.0 notes give the case that made the gap visible: "The totals row said · 1 tok for a 5015-token prompt answered in one token". The answer was one token. The five thousand tokens of prompt, and the fact that almost all of them came from the cache, appeared nowhere on the screen. A cold run and a warm one looked the same.
v0.119.0, published on GitHub on 13 September 2026, records each side of the bill separately: in the trace, on the run's closing card, and in the OpenTelemetry export.
The trace records the split #
By default, nika run writes a trace: a local file with one event per line, from the start of the run to its end. Two of those events close a task, task_completed and task_failed. From 0.119.0, on a task that called a model, they carry these fields beside the tokens count they always had:
tokens_in, the input tokens;tokens_out, the output tokens;tokens_cache_readandtokens_cache_write, the tokens read from and written to the provider's prompt cache;tokens_reasoning, the part of the output the provider counted as reasoning;model_servedandresponse_id, which the notes list without a gloss. The engine's runtime crate document givesmodel_serveda "response-attested meaning (gen_ai.response.model)", the model named in the provider's response. In the export, the notes pairgen_ai.response.modelandgen_ai.response.id, present "when the provider reported them".
The old tokens field keeps its meaning. The notes say it is still "the completion count", so a tool that read it before reads the same number now.
The split is what makes cost checkable. The notes: "A reader can recompute cost_usd from the split × the pricing table the run pinned at boot, so a warm-cache call at $0.000378 and a cold one at $0.00075285 are no longer the same sight". The pricing table is fixed when the run starts, so the recomputation uses the prices that run actually used.
The card names the prompt side #
At the end of a run, Nika prints a card with a totals row. The notes describe the change there: the row "now prints · 5015 in · 4992 cached beside the historical tok segment when the frame carries the split, and renders byte-identically to before when it does not."
For the example call, the row now says that 5,015 tokens went in and 4,992 of them came from the cache, next to the one token that came out. That is the line that tells you whether the cache worked.
The same split in OpenTelemetry #
OpenTelemetry is an open standard for traces and metrics. Its GenAI semantic conventions name the attributes that describe a model call, so any compatible viewer can read them without translation. nika trace export projects a Nika trace to OpenTelemetry spans, written in a local file as OTLP JSON lines (OTLP is the protocol OpenTelemetry tools exchange data with). The observability guide in the documentation shows the commands:
nika trace ls
nika trace export <path>
# default sidecar: same stem, `.otlp.jsonl` beside the journal
nika trace export <path> -o run.otlp.jsonlFrom 0.119.0 the export carries the usage counters. The notes list them: "gen_ai.usage.input_tokens · gen_ai.usage.output_tokens · gen_ai.usage.cache_read.input_tokens · gen_ai.usage.cache_write.input_tokens · gen_ai.usage.reasoning.output_tokens (semantic-conventions v1.37.0) with nika.tokens.* mirrors, plus gen_ai.response.model and gen_ai.response.id when the provider reported them."
The same release tightened what the export leaves out. Without --include-content, the export carries the structure of the run, not its payloads. In 0.119.0 a failed span's status "keeps the error code alone", where it used to keep the error's detail message as well, and a success warning no longer rides along. The export also checks a trace before reading it: a file past the writer's 256 MiB journal bound, or a path that is not a regular file, is refused instead of being read whole into memory.
A meter nobody read stays empty #
One rule runs through the trace, the card and the export. The notes put it this way: "an unreported meter stays absent, never a fabricated zero."
Zero is a claim. A cache-read count of zero says the cache was not used. If the provider did not report cache reads at all, writing zero would turn missing information into a false fact, and a cost recomputed from it would be wrong in a way that looks right. An absent field says what is true: nobody measured it.
The same release fixed a place where the split was being lost. Nika's reader for streamed responses from OpenAI-compatible providers dropped prompt_tokens_details.cached_tokens and completion_tokens_details.reasoning_tokens, "so a streamed cached prompt would have priced at the full input rate". Streamed and non-streamed responses now share one parse. DeepSeek reports its cache hits in a top-level prompt_cache_hit_tokens field, and that count now lands in the cached split, so "a cached DeepSeek prompt prices at the catalog's cache-read rate instead of the input rate."
The rule was not new to the run's total: since v0.118.6, the closing card prints unmetered or unpriced (N calls) instead of $0.00. The project kept the same line in later work. The 0.124.4 notes, about routes the catalog cannot price, say that "a call whose cost is unknown is never recorded as zero".
Why it matters #
A cost line that shows only the output hides the input side of the bill. Long context, retrieved documents and repeated instructions all sit on that side. A prompt cache can lower its price, or miss, and before 0.119.0 the run could not tell you which happened.
With the split in the trace, the question has an answer you can check after the fact, on your own machine, from a file you keep. With the split in the OpenTelemetry export, the same answer reaches whatever viewer you already use.
What this change does not do #
- It records what the provider reports. A meter the provider does not report stays absent, and when a frame carries no split at all, the card prints exactly what it printed before.
- A cost recomputed from the split is an estimate from Nika's price catalog. The engine README, as it reads today, says: "Your provider meters and bills these calls; Nika's cost figures are catalog estimates, not invoices."
- The two prices in the notes,
$0.000378and$0.00075285, describe one call. They illustrate the difference; they are not a saving rate. - The card shows the input and cached counts. The other meters live in the trace and in the export.
- The old
tokensfield still counts completions only. A dashboard that summed it still sums outputs, not the whole bill. - The export writes a local file. Payloads stay out of it unless you pass
--include-content, and sending it to a collector is your own step.
Read the v0.119.0 release, or continue with The cost line, on the ceiling Nika computes before a run, and The run keeps its receipt, on what else a trace can do.