Skip to Content
Rius

How does Rius price reasoning tokens?

Rius counts reasoning tokens as part of a call’s output tokens and prices them at the model’s output rate, so they add to the call’s cost without a separate line. The reasoning count is stored on the span for the model call as gen_ai.usage.reasoning.output_tokens, a subset of the output count. Rius computes the cost from that span, and you never send a price. Cost across all your calls is covered in Track LLM and agent cost.

How it works

  • Where reasoning tokens sit. The span for each model call carries gen_ai.usage.output_tokens, which includes reasoning tokens, and gen_ai.usage.reasoning.output_tokens, which says how many of those output tokens were reasoning. The reasoning count is a subset of the output count, not an addition to it.
  • How they count toward cost. Rius looks up the requested model (gen_ai.request.model) in its price table and multiplies each token count by its own rate:
cost = uncached input tokens × input price + cache read tokens × cache read price + cache write tokens × cache write price + output tokens × output price

There is no separate reasoning term. Reasoning tokens are already inside the output tokens, so they are priced once, at the output price, and never double counted.

  • Other spellings are mapped for you. Rius moves pydantic-ai’s gen_ai.usage.details.reasoning_tokens, thinking_tokens and thoughts_tokens onto the reasoning key at ingest. OpenInference reasoning details are mapped the same way. The full list of keys is in attribute interoperability.
  • Prices are list-price estimates. They come from LiteLLM’s public model-price catalog, in US dollars. Rius applies each model’s standard rates, so long-context tiers, batch, flex, priority pricing and negotiated discounts are not reflected.
  • Cost is fixed when the span is written. A later price change does not rewrite past calls.
  • Missing prices stay empty. If the model is not in the catalog, or the span reports no token usage, the cost is empty, not zero.

Set it up

  1. Send traces from your agent. With the Python SDK, this is the shared setup:
import rius client = rius.init( api_key="ri_...", service_name="my-agent", )
  1. Make sure each model call span carries gen_ai.request.model. A span that has only gen_ai.response.model is not priced.
  2. If you emit spans yourself, set gen_ai.usage.output_tokens to the completion tokens including the reasoning ones. Set gen_ai.usage.reasoning.output_tokens to the reasoning share of that count. A span needs the request model and at least one token count, and any count you leave out is read as 0.
  3. Do not send a cost attribute. Rius computes cost on the server, and a cost you send is ignored.
  4. Open the call in the trace and check its cost. An empty cost means the model is not in the price catalog or the span had no token counts.

What you get

  • A cost on each model call that already includes its reasoning tokens, shown in the span detail next to the model and token counts.
  • The same cost rolled up per trace, per agent, per end user and per workspace, so a reasoning-heavy run shows up in cost per trace.
  • Alerts on cost per trace, and custom alert rules on reasoning tokens as their own metric, so you can catch a prompt or model change that makes the model think much longer.
  • A cost that stays empty rather than showing $0 when Rius cannot price a call, so a missing price is never mistaken for a free call.

When something else fits

If you need the exact amount on your invoice, Rius is not the source: it gives list-price estimates and does not model negotiated, batch, flex, priority or long-context pricing. Rius also does not accept custom model prices, so use your provider’s billing for the authoritative figure and Rius for per-call and per-trace trends.

Still stuck? Get help

Last updated on