Apache 2.0 · zero runtime dependencies
The arithmetic is open. Verify it without asking us.
A product whose value is that its numbers can be defended cannot ask you to take the numbers on faith. The engine that produces every figure in the dashboard is the engine you can read, run and disagree with. It is on GitHub now; the npm release follows once the release pipeline is signed off.
What it returns
A range and a tier, never a bare number.
The type system will not let you get a scalar out of this library. Every quantity carries its low and high bound, its evidence tier and the list of factors it was derived from, so a figure that reaches a disclosure can be traced back to a source with a version and a retrieval date.
Zero runtime dependencies is a deliberate constraint. Every transitive package is something a reviewer would also have to trust, and something that can break the reproducibility of a number that has already been filed.
import { computeTrace, formatQuantity } from "@kumokodo/tetrameter-core";
const footprint = computeTrace({
traceId: "report-8f21",
outcome: "recognition report",
calls: [
{ model: "anthropic/claude-haiku-4-5", inputTokens: 1_240, outputTokens: 380 },
{ model: "openai/gpt-4o-mini", inputTokens: 1_240, outputTokens: 412 },
],
});
formatQuantity(footprint.carbon); // "0.162 – 18 gCO2e"
footprint.carbon.tier; // 1 = class average, not our confidence
footprint.carbon.sources; // [model.class.small, overhead.host, overhead.pue, grid.US]What is in the repository
Including the parts that are inconvenient for us.
Factors with provenance
Model energy from the ML.ENERGY Benchmark, grid intensity from Ember, pricing from the LiteLLM catalogue. Each carries a source, a version and the date it was retrieved.
The restatement log
Every coefficient change since the first release, with its materiality estimate. Including the one from this month where we had overstated a model threefold.
Tests that pin bad news
That renewable grids use more land per kilowatt-hour is asserted in a test, so that nobody can quietly “fix” the result that makes the green answer look worse.
A reconciliation test
The engine reproduces Google’s own published median energy figure for a Gemini prompt. If a change breaks that agreement, the build fails.
The honest boundary
What the free library does not do.
It has no ingest, no storage, no dashboard and no account. It turns call metadata into four quantities and their provenance, and stops. If you want per-customer attribution, waste profiling across a fleet, an evidence pack an auditor will accept, or somebody to sit in the room when they ask questions: that is the product, and it is paid.
The library is not a trial that expires into a sales call. It is the thing we would want to exist if we were the ones being asked to justify a number.