Track LLM Reasoning Token Costs

Read billed reasoning from provider usage, avoid counting it twice and compare two reasoning settings at the same task acceptance standard.

Track reasoning token cost from provider-reported usage. When the provider reports reasoning as a subset of output, use the output total in the rate calculation and keep the reasoning subset as a diagnostic. Then compare the cost per accepted task across model and effort settings. Counting visible words will miss internal reasoning.

Preserve the provider's accounting contract

Record the provider and model or deployment, the request's reasoning setting, billed output, documented reasoning breakdown when present, and whether usage was estimated. Save the provider field names or the version of the mapping used to normalize them. OpenAI documents reasoning tokens as billed output tokens even though the reasoning text itself is not exposed. Anthropic documents a thinking-token breakdown for supported responses and says that the breakdown appears on the final message delta in a stream. Check the guide for your API and model before assuming a breakdown is available. OpenAI reasoning models and Anthropic extended thinking

Suppose a hypothetical response reports 1,200 output tokens and a nested count of 900 reasoning tokens. At a fictional output rate of $5 per million tokens, the output cost is $0.006. The reasoning subset represents $0.0045 at that rate. Summing 1,200 and 900 before applying the rate would report $0.0105. Keep the input charge separate and add any request fees that your provider reports in other units.

Track interrupted and completed requests

A browser disconnect can stop your application from receiving the terminal usage event. Mark that attempt as missing detailed usage and keep the request identifier for reconciliation. Avoid inferring zero reasoning from an absent field. If you have an estimate, preserve separate fields for estimated cost and the source of the estimate. Use provider billing totals at the available granularity to expose how much usage your online records missed.

For a SaaS product with one account serving many customer tenants, link each attempt to customer and feature identifiers under application control. A provider bill can establish total spend without identifying the product feature. Separate model traffic outside the instrumented route so it does not distort an estimate of the reasoning setting's cost.

Compare comparable tasks

Run the same permitted evaluation set against a low-effort and a higher-effort route. Record all attempts, including incomplete responses and repairs. Keep the task acceptance rule fixed and break down results by the workflow's difficulty. In this hypothetical run, the evaluation uses 100 tasks for each configuration.

Measure Lower effort Higher effort
Accepted tasks 70 90
Total model cost $2.10 $2.52
Cost per accepted task $0.030 $0.028

The lower-effort route costs less in total and more per accepted task. Before changing a production setting, examine the failures. If hard tasks fail while routine tasks complete, decide whether the application can route those groups independently. Check time to usable result and the cost of application retries. Increasing a reasoning budget can also raise latency or reduce the output capacity available to an answer, depending on the model's limits and the response cap.

Include the same cost view in a production rollout. Group the metrics by task class and model revision, then inspect whether the allocation between input and output changes. A release that adds more prompt context can shift the total cost even when the reasoning share stays stable.

For one high-volume feature, combine provider usage with the accepted-task cost method. Alectura settles request usage from provider usage when it is available and flags an estimate when it is absent. Use Alectura limits to review request-level controls. Use your provider's documented reasoning breakdown for the diagnostic.

This catch-up edition for 28 November was released on 30 November 2026.

Source documents (2)

Trace a request through Alectura.

Bring a sample prompt and a customer policy. See what reaches the model and which decisions appear in the request record.

Try the quickstart

Keep reading

Track realtime voice AI costs by customer ↗Isolate semantic LLM caches by tenant ↗Track LLM web search costs by customer ↗