- Red = collides on one tip
- Silver = Promote into main
- Hatch = main
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 URL | Cache tip per agent / PR / suite |
| BYOK path to the model | Exact-replay inventory on that tip |
| Seat + meter on Stripe | Promote when the suite earns main |
Same model. Same gateway. Separate tips.
- Dashed = preview tip
- Hatch = main
- Silver = Promote only
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
- Dashed = PR-scoped peer, ephemeral for this job
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
mainand almost bought a second gateway
Related
- Product — Architecture — tips, Promote, compose
- Docs — Compose with Neon — peer headers in CI
- Docs — Cache trees — tip semantics
- Pricing — seats and meters on the shared gateway