FinOps
Put a clear owner on every governed call. Trinitite records the model cost, then groups it by scope, team, project, or cost center.
Status: Beta Companion docs: Models and routing · Scopes and assets · SDK observability Source of truth: Analytics API · Proxy API.
Label the work once
Put the cost label on a scope. Every governed call from a bound asset carries it:
refunds = tr.scope(
"refund-flow",
goal="Resolve valid refunds without exposing customer data.",
cost_center="cs-dept-829",
tags={
"team": "support",
"project": "q3-refunds",
"env": "prod",
},
)
Read cost on the result
response = refunds.client("openai").chat.completions.create(
model="gpt-4o",
messages=messages,
)
result = tr.result(response)
print(result.cost_center)
print(result.cost_usd)
print(result.routed_model)
cost_usd can be absent when the provider does not return enough usage data. Check it before doing per-call calculations.
See spend for one scope
summary = tr.finops.spend(
scope="refund-flow",
since="30d",
)
print(summary.total_spend_usd)
print(summary.call_count)
print(summary.estimated)
The summary separates input, output, and reasoning cost when those fields are available.
Build a chargeback report
report = tr.finops.chargeback(
group_by="cost_center",
from_="2026-08-01",
to_="2026-08-31",
)
for row in report.rows:
print(row.key, row.total_spend_usd, row.call_count)
Group by cost_center, scope, tag, nhi, model, or provider.
Drill into one cost center by model:
breakdown = tr.finops.breakdown(
by="model",
cost_center="cs-dept-829",
)
Keep labels and limits separate
A cost center answers who owns the spend. A spend limit stops an agent identity from running past a budget.
support_agent = tr.agent(
"support-bot",
goal="Resolve support requests.",
spend_limit_usd=500,
)
status = tr.finops.breaker_status(nhi=support_agent.identity.id)
print(status.current_spend_usd)
print(status.spend_limit_usd)
print(status.breaker_tripped)
Use both when the team needs chargeback and a hard stop.
Lower cost with an explicit route policy
refunds = tr.scope(
"refund-flow",
goal="Resolve valid refunds.",
cost_center="cs-dept-829",
route="auto",
cost_ceiling_usd_per_call=0.25,
)
The router records the selected model and its reason on the result, so savings stay explainable.
Where to go next
- Models and routing chooses within cost, quality, latency, and risk limits.
- Scopes and assets puts labels on the goal that owns the work.
- SDK observability exports the matching governed records.