EuroInference logo

Transparency

Cost & Caching Methodology

Last reviewed: 2026-08-24

This page documents every calculation behind the prices shown on EuroInference: how list prices are normalized, how the workload cost column is computed, and exactly how prompt-caching assumptions enter the math. It is generated from METHODOLOGY.md by scripts/build_methodology.js; the formulas themselves live as named constants in app.js so UI text and implementation cannot drift apart.

List price normalization

Workload cost ("Cost" column)

For each offer (a model at one provider):

The workload total is computed per offer using that offer's own input, cache and output rates together, then the cheapest complete offer wins:

```text total = (p_eff × inputTokens + out × outputTokens) / 1,000,000 ```

Input and output token counts come from the workload panel (defaults: 10K in / 1K out). The "Lowest Input/Output Price" columns and the price-range sliders always show plain list prices; only the Cost column and the Lowest-Price Provider ranking apply caching assumptions.

Prompt-caching model

Cache writes happen once per unique context; reads repeat on every subsequent request. Instead of simulating sessions, write premiums are amortized over the assumed number of times each cached context is re-read:

```text p_eff = base·(1−s) + (s/R)·[w + (R−1)·r] ```

Fallback rules (deliberately conservative):

With s = 0% or the "prompt caching" toggle unchecked, p_eff = base and the column reduces to plain listed prices.

Caching support states

Per offer, one of four states is derived and shown in the detail modal:

Provider data mapping

Invalid or non-positive cache values are dropped during data generation (scripts/update_data.js), so no fabricated rates can reach the site.

Default assumptions and calibration

Shipped defaults: Agentic preset (s = 80%), R = 4, caching math enabled.

Calibration against published real-world measurements (2026):

Sanity check of the formula under these ratios (w = 1.25·base, r = 0.1·base):

Limitations