How do I alert on LLM cost per release?
Rius custom alerts cannot filter cost by release, so you alert on cost per service or agent and read cost per release on the Agents page. The alert filters are service, agent, step, model, span kind, operation, session and instance. Tag your runs with a version and Rius shows cost per trace for each version side by side, with a cost-per-trace chart over time.
How it works
A custom alert has optional filters, one or more rules combined with AND, and one rolling window of 5 minutes to 24 hours. Filters pick the spans that feed the rules before any aggregation. The release or version is not one of the filter fields, so a rule cannot be limited to the runs of one release.
Cost is a metric you can alert on. It is measured per trace, so p95(Cost) is the 95th percentile of cost per trace in the window, not the workspace total. Rius computes cost from the model and token counts, in US dollars, as a list-price estimate. See Track LLM and agent cost for how a call is priced.
For release-level cost, the Agents page is the place to look:
- Versions lists the versions that ran in the window. It reads them from
RIUS_MAIN_AGENT_VERSION(the agent definition: prompt, tools, policy) orRIUS_SERVICE_VERSION(the build or deploy). - Compare puts a base version next to another. It shows traces, failed rate, cost per trace, latency, time to first token (p50) and tokens per trace, with the change.
- Drift charts cost per trace over time, so you see a change from the day a release shipped.
See Agents for the full page.
Set it up
- Tag each release so Rius can tell versions apart. Set these in the environment of the process that runs your agent:
RIUS_MAIN_AGENT_VERSION=prompt-v12 # the agent definition: prompt, tools, policy
RIUS_SERVICE_VERSION=2026.09.29-a41f3c # the build or deploy-
Open Agents, pick the agent, and go to Versions. With two or more versions, Compare shows cost per trace for each. Rius warns when either side has fewer than 20 traces, because the difference can be noise.
-
Create a custom alert that watches cost for the whole service or agent. Add one filter and one rule, and set the window. The shape of the rule is:
FILTERS Service = checkout-agent
RULES p95(Cost) > $2.00
WINDOW 1 hour-
Pick a threshold from what Compare shows for your current release. If the new release raises cost per trace past that line, the alert fires for the service, whatever version produced the runs.
-
Attach a channel (webhook, email or Slack) so the firing reaches you. You can also ask an MCP client to compare two versions with
compare_agent_versions, or to list versions withagent_versions.
What you get
- A cost alert that catches runs that got expensive, such as a prompt that grew or an agent stuck retrying, scoped to a service, agent, model or any other listed filter.
- A per-release view of cost per trace, failed rate, latency and tokens in Compare, and a cost-per-trace chart in Drift, so you see what a release changed.
- Firings that show the share of the window that was priced. A model with no known price has an empty cost, not zero, so you can tell a high reading from a partly priced one.
A cost rule over mostly unpriced models can stay quiet without firing. Check which models are priced in cost by model on Usage and cost before you rely on the alert.
When something else fits
- If you need a hard stop on cost for one specific release, the alert cannot do it. Use Compare and Drift on the Agents page, or ask over MCP, to review each release after it ships.
- If you want a budget threshold on total workspace spend, that is not an alert metric today. Watch it on the Usage and cost page.
- If you want to alert on cost for one model, step or session, a custom alert does that directly with the matching filter.