The hedging layer for enterprise AI.
Your AI bill is a commodity position.
Point it at your gateway logs. It returns your AI spend as a dollar position, split into price and usage, then reports how much of it each instrument actually tracks.
One run, against an export you already have
$ hedge ingest --format weave --input decisions.ndjson
read 12,904 requests, stored 0 prompts and 0 identities
$ hedge report
spend $18,420 / month
volume 1.24B tokens across 6 models, 3 providers
concentration 81% of spend in 2 models
$ hedge basis --index h100-spot
0.62 of this cost line tracks the index (reported, not assumed)
- Runs
- Self-hosted, inside your own infrastructure
- Reads
- Gateway metadata only, behind an allowlist
- Needs
- Node 20 or newer, no runtime dependencies
- Sits
- Outside your request path; it serves no traffic
- License
- MIT
Compute is a commodity. Your budget treats it like a subscription.
Companies shipping AI have taken on a commodity position nobody priced. Four things are true at the same time, and they push the same direction.
- GPU-hours have a spot price
- Rented accelerator capacity reprices week to week and public indices already quote it. If you buy on demand, you hold that price risk with no cap and no forward.
- Token prices are a floating rate
- Providers cut list prices, raise them, deprecate models, and move your mix underneath you. A rate card is the price you pay this quarter, not a fixed cost.
- Usage grows with the product
- Every agent you ship raises consumption. Volume growth and price moves compound, and the usual remedy is to make the product worse.
- Nobody holds the position in dollars
- Finance sees one invoice a month. Engineering sees tokens per request. Neither is an exposure, and you cannot bound what nobody has written down as a dollar position.
The first deliverable is the position, not a trade. Most teams cannot answer how many dollars of next quarter’s AI spend are price and how many are volume. That number is computable from telemetry they are already emitting.
From gateway telemetry to a bounded cost line
Hedgerouter is not a model router. Keep whatever gateway chooses and serves your models; Hedgerouter reads its output and prices the exposure underneath it.
-
Ingest
NDJSON exports, JSON access logs, OTLP spans, Claude Code transcripts. Nothing new to instrument, and replaying the same export twice is idempotent.
-
Normalize
Model, provider, token counts, realized cost, latency, status, failover. The boundary is an allowlist, so prompts, paths, tool arguments and identities are never read in.
-
Position
A daily ledger in dollars and tokens by model, provider and route, with the price component separated from the volume component.
-
Price
Public compute indices and listed contracts, quoted at prices you could have transacted at, with fees included. No midpoints nobody could have traded.
-
Size
A hedge is sized against a stated budget with a per-event cap, and never larger than the exposure it covers. Sizing runs before anything is placed, not after.
-
Report basis
What fraction of your actual cost line the instrument tracks, as a number in every run. When the fit is poor, the output says so.
Where this risk is becoming tradeable
A hedge is only as good as the instrument under it, so the question is never “is there a contract” but “what does it settle on”.
| Instrument | Settles on | Fit to your cost line | Available |
|---|---|---|---|
| Compute-price index | A published spot index for rented accelerator capacity | Direct, if you buy capacity on demand | Listed |
| Compute spot and forward markets | The traded price of capacity itself | Direct, and the first thing here to offer a forward curve | Forming |
| Provider list-price contract | A provider’s own published price page | Direct, if you pay list; the settlement variable is your cost | Listed, annual tenor |
| Compute perpetual | A continuously-funded compute price rather than a dated threshold | Potentially the closest fit yet: a cost line is continuous, and a dated binary is not | Anticipated, not yet listed |
| Blended $/token index | A volume-weighted blend of published prices across labs | Weak. Most of its variance is the market’s model mix changing, not price | Listed |
Compute-price indices are the arm we instrument first, because for a team renting capacity they are the exposure itself rather than a proxy for it. A hedge on the wrong variable costs premium and leaves the risk in place, so basis is a reported number in every run rather than an assumption in a pitch.
What runs today, and what doesn’t
Being specific here is cheaper than being caught out later. The measurement half is real and you can run it this afternoon. The order path is built and held shut: what authorises a live order is a research gate that has not opened, and on current data the demand signal is slightly worse than simply carrying the last index price forward.
| Capability | State |
|---|---|
| Ingest from Weave Router exports, JSON access logs, OTLP spans, Claude Code transcripts | Runs today |
| Metadata-only normalization behind an allowlist boundary | Runs today |
| Daily exposure ledger in dollars and tokens, by model, provider and route | Runs today |
| Basis reported against public compute-price indices | Runs today |
| Hedge sizing against a stated budget and per-event cap | Runs today, paper |
| Order path to the venue: signed requests, idempotent order ids, hard notional caps, kill switch | Built, never armed |
| Any live order, ever | Zero placed; gate is shut |
| Forward pricing as compute venues list capacity | In progress |
| Compute perpetuals, if and when a venue lists them | Not instrumented |
| Model routing, or anything that sits in your request path | Not built |
| Storage of prompts, completions or any content | Not built, by design |
The order path arms only when all five interlocks agree: a passing out-of-sample gate, an
arming phrase in the environment, a trade-scoped venue key, no halt file, and an explicit
flag. Anything missing is a dry run that prints the order it would have sent and names the
interlock that stopped it. hedge live-status prints that list, and today
it prints would_arm: false.
Your telemetry never has to leave your infrastructure
Normalization is an allowlist, not a log archive. The fields below are not filtered after the fact; they are never read into the ledger in the first place.
| Field | What Hedgerouter does with it |
|---|---|
| Prompts and completions | Never read |
| Code, paths and filenames | Never read |
| Tool arguments and tool output | Never read |
| Credentials and API keys | Never read |
| Email addresses and gateway user IDs | Never read |
| Session IDs | Pseudonymized with a rotating local salt |
| Telemetry upload | Off by default |
| Everything the ledger does hold | Removable with delete-data --confirm DELETE |
Measure the exposure first. Then decide what can be capped.
One command against an export you already have. Nothing leaves your machine.