Skip to content

Cost ledger

Every AI request in WeftKit is priced before it is sent and recorded permanently after. Deterministic replays are free — and appear in the ledger as explicit $0.00 entries so the record is complete.

The price registry

A model’s price card is resolved in strict order:

  • Your override — set custom input/output/cached rates for any model in Settings → Models. Overrides always win.
  • Bundled default — WeftKit ships per-model rates for well-known models, each tied to the provider’s published pricing page.
  • Fallback card — anything unknown is priced at $3 per 1M input tokens and $15 per 1M output tokens ($0.30 per 1M cached input). This applies to local runtime models and CLI agents too: nothing is ever “free” by omission.
The resolved card is snapshotted when a run starts and stamped into every transaction from that run. Changing a price later never rewrites history.

The ledger

The ledger is durable and append-only. A request’s entry is written and flushed to disk before the request is transmitted — if the entry cannot be persisted, the request is blocked. Each entry records the provider, model, token usage, the exact price card used, and where that price came from (default, override, or fallback).

  • USD is the immutable base currency; amounts are exact decimal strings.
  • Entries are never repriced, edited, or deleted.
  • Fallback-priced entries are labeled, so estimated pricing is always visible.
  • CLI agents that report their own cost (like Claude Code) have it recorded as an informational field alongside the metered amount.

Hard budgets

Budgets in WeftKit block; they do not warn. Before a run starts, its AI limit is reserved atomically against the monthly budget. Before each request, WeftKit computes a worst-case cost from the price card — request size plus the maximum allowed output at the card’s rates. If the ceiling doesn’t fit within the remaining budget, the request never leaves your machine.

  • Per-run hard limit, set in the run preflight.
  • Monthly hard cap across all projects and providers.
  • If a request’s outcome is unknown (say, a network drop mid-response), the full ceiling stays debited rather than assuming the best.
The WeftKit AI cost ledger showing zero-call share, AI burn, request and token counters, spend by project, and the model price registry.
The ledger. A run that never called a provider still appears — at zero cost, by design.
The WeftKit model price registry listing per-provider models with input, output and cached rates and their price source.
Rates are snapshotted into each transaction at request time, so history never reprices itself.