Flagship

Inventory per tenant

Same model. Same gateway. Separate tips — so agent runs do not collide on main.

Create AccountQuickstart
Shared main vs named trees
  • Red = collides on one tip
  • Silver = Promote into main
  • Hatch = main
One tip for everyoneA tree per streammain tipeveryone writes hereCI suiteagent Aagent BPR-991noisy neighborpr-842suite onlyagent-afleet onlymainpromote inPromote

Isolation is a tip problem, not a second gateway problem.

The problem

Teams often put every agent, CI job, and PR on one tip — usually main. The gateway is shared for the right reason (one BYOK path, one bill). The tip is shared for the wrong reason.

When two agents land different prompts on the same tip, the second write collides. Retries look like flaky LLM output. Engineers add a second gateway “for tenant B,” and now you have two keys, two meters, and still no tip discipline.

That is the noisy-neighbor pattern. Isolation is a tip problem, not a second-gateway problem.

What Metrecept does

Metrecept keeps one OpenAI-compatible gateway and one Stripe bill. Isolation is a cache tip — a named tip in the Redis exact-replay inventory, addressed as X-Ohm-Cache-Tree.

Shared (good)Separated (also good)
Gateway URLCache tip per agent / PR / suite
BYOK path to the modelExact-replay inventory on that tip
Seat + meter on StripePromote when the suite earns main

Same model. Same gateway. Separate tips.

Promote is the only crossing
  • Dashed = preview tip
  • Hatch = main
  • Silver = Promote only
pr-842ephemeral tipPromotemaindurable inventory

Until Promote, main does not absorb the tip. After Promote, the next job on main can hit exact replay for those entries.

Promote is the only crossing

Work stays on the PR tip until the suite is green. Then Promote copies that tip onto durable main. Silver in the diagram is that crossing — not a second product.

Until Promote, main does not absorb the agent’s inventory. After Promote, the next job on main can hit exact replay for those entries.

Compose with a database preview (optional)

If the PR also needs a database preview, compose it in CI. Neon (or any preview DB) is a peer for database state. Metrecept is the peer for exact-replay inventory. Same job. Two headers. One bill for the model path.

# Example compose — DB preview env + Metrecept tip on the same suite
export DATABASE_URL="$NEON_PREVIEW_URL"   # from your DB branch provider
export OHM_TIP="pr-${PR_NUMBER}"

curl -sS https://api.withohm.dev/v1/chat/completions \
  -H "Authorization: Bearer $OHM_KEY" \
  -H "Content-Type: application/json" \
  -H "X-Ohm-Cache-Tree: $OHM_TIP" \
  -d @prompt.json
Metrecept — middleware governance
  • Dashed = PR-scoped peer, ephemeral for this job
CI job · PR 842Metreceptexact-replay inventoryX-Ohm-Cache-Tree: pr-842Neon previewDB + AI Gateway betapreview branch · PR 842Same slug. Compose peers. Promote on merge.

Neon branches state (and, in beta, the model path). Metrecept branches exact-replay inventory — middleware governance on mechanical repeats.

On green:

# Promote the tip onto main (API shape — see docs for auth)
curl -sS -X POST "https://api.withohm.dev/v1/cache/trees/${OHM_TIP}/promote" \
  -H "Authorization: Bearer $OHM_KEY" \
  -H "Content-Type: application/json" \
  -d '{"target":"main"}'

Inventory is queryable, not just a metaphor

List the tips, then list what is actually cached on one — digest, model, TTL remaining, token count, byte size. Metadata only; never message content.

curl -sS https://api.withohm.dev/v1/cache/trees \
  -H "Authorization: Bearer $OHM_KEY"

curl -sS "https://api.withohm.dev/v1/cache/trees/${OHM_TIP}/entries?limit=25" \
  -H "Authorization: Bearer $OHM_KEY"

Every clean-ledger event (GET /v1/ledger) now carries the request_digest it produced, so a spend line and a live inventory entry are one lookup apart.

Who this is for

  • Multi-agent or multi-suite CI that shares one model path
  • Teams that already use preview databases and want matching inventory hygiene
  • Anyone who hit collisions on main and almost bought a second gateway

Related

All solutions