Your AI bill has bugs.

Retensity finds the spend your LLM stack wastes — broken prompt caches, resent context, unbounded histories — and delivers the fix as a pull request your team reviews and merges. You pay a share of what you stop spending. No savings, no fee.

Every claim on this site links to a public pull request.

RETENSITY

savings receipt · no. 001

repoposthog/posthog
pull request#132240

static prompt resent~84,000 tok
  on every planner step× full price
  cause: timestamp ahead
  of static prefixcache miss

the fix56 lines
cached input price10–50% of full

saved / month$ ———
our cuta share of it
MEASURED ON MERGE
fig. 1

PostHog was paying full price for the same 84,000 tokens, every step

PostHog's AI insight generation sends an ~84,000-token static prompt to the model on every planner step. Prompt caching should make the repeat sends nearly free — but a timestamp accurate to the second sat ahead of the static prefix, so no two requests ever matched, and every call paid full input price.

The fix pins that timestamp to the start of the conversation. The prefix becomes stable, the cache starts hitting, and cached input is billed at a steep discount — between 50% and 90% off, depending on the provider. Nothing changes for users.

fix size+56 −4 lines
user impactnone — output unchanged
statusPR open — savings measured on merge
ee/hogai/…/schema_generator/nodes.py simplified
  prompt = construct_messages(-     utc_now=timezone.now(),+     utc_now=timezone.now(),+     conversation_start_dt=state.start_dt,  )
The line that broke the cache. Without a pinned start time, the rendered prompt changed every second — and every planner step paid for all 84,000 tokens again.
the same request, before and after the fix illustration
Every planner step resends the same ~84,000-token prefix. Before the fix, each send misses the cache and bills at full input price; after it, repeat sends bill at the provider's cached rate — 50 to 90% cheaper.
fig. 2

How it works

  1. Audit

    We look at how your product talks to its models and come back with an itemized receipt of what it over-spends — each line a concrete finding, not a benchmark. Days, not weeks.

  2. Fix

    Every finding worth fixing ships as a pull request with tests. Your team reviews it; nothing merges without you. The deliverable is a diff, not a slide deck.

  3. Settle

    After merge, savings are measured against your own provider billing over an agreed window. We invoice a share of what you actually stop spending — for a fixed term, not forever. No savings, no fee.

fig. 3

What we find

The waste is rarely one big mistake. It's a handful of small ones, multiplied by every request you serve.

Cache-busting prefixes
A timestamp, UUID or user name ahead of your static prompt. The cache never hits; every call pays full input price.
Resent context
The same documents, schemas or instructions attached to every message in a thread instead of once per conversation.
Unbounded histories
Conversations that grow until the context window — and the bill — hit their ceiling, with no summarization or truncation.
Over-modeled tasks
Frontier models classifying, extracting or routing where a small model produces the same output for a fraction of the price.
Silent retries
Failed or timed-out calls retried with full context, each attempt billed — invisible unless someone goes looking.
fig. 4

Fair questions

What do you need from us?

For an open-source codebase: nothing — the pull request simply arrives, like PostHog's did. For a private one: a conversation, an NDA, and read-only access scoped to the paths that touch your model calls.

How are savings measured?

Against your own provider billing, before and after the merge, over a window we agree on up front. You see the same numbers we do — there is no Retensity dashboard to trust, only your invoice getting smaller.

What if you find nothing?

Then you pay nothing, and you've learned your stack is tight. That result is rarer than you'd hope.

Who writes the fix?

We do. Your team reviews and merges it like any other contribution. If it doesn't meet your bar, it doesn't merge, and you owe nothing.

Find out what your stack is wasting.

Tell us what you're running and we'll tell you if an audit is worth either of our time. If we take it on and find nothing, you pay nothing.

Request an audit