summaryrefslogtreecommitdiff
path: root/libpanto/src/public.zig
diff options
context:
space:
mode:
authort <t@tjp.lol>2026-06-15 22:11:53 -0600
committert <t@tjp.lol>2026-06-16 11:17:14 -0600
commitf8c6d45755acb5abf9ac68931268b7945da0fae0 (patch)
treea88ed7edd4aa3e5acced9ff99ac61b7f36b267a6 /libpanto/src/public.zig
parent8206642d3a1736aaf928a5b9a732e747f5294228 (diff)
display fixes: markdown rendering, tool-specific components
Diffstat (limited to 'libpanto/src/public.zig')
-rw-r--r--libpanto/src/public.zig11
1 files changed, 11 insertions, 0 deletions
diff --git a/libpanto/src/public.zig b/libpanto/src/public.zig
index 8a55e47..d547af3 100644
--- a/libpanto/src/public.zig
+++ b/libpanto/src/public.zig
@@ -218,6 +218,17 @@ pub const Agent = agent_mod.Agent;
pub const Pricing = pricing_mod.Pricing;
pub const PricingRegistry = pricing_mod.Registry;
+/// Compute the cost of a single turn's `Usage` under the given `Pricing`,
+/// in micro-cents (1/1,000,000 of a cent per token). Returns null when any
+/// priced component of any nonzero category is null (the poison rule —
+/// don't pretend a turn with unknown cache pricing is free). Aliased
+/// through `libpanto` because the embedder accumulates session totals
+/// across potentially-switched models.
+pub const costMicroCents = pricing_mod.costMicroCents;
+/// Add a turn's micro-cents cost to a running session total. Either
+/// side null => result null. The single accumulation point for the
+/// per-turn session cost (see `pricing.zig` for why).
+pub const addCost = pricing_mod.addCost;
// ===========================================================================
// Sessions