Running it through the Vercel AI Gateway

Parlour reaches Jev through the Vercel AI Gateway with one server-side key, and reads live per-token prices from the Gateway's model catalogue, so the cost counter on screen is a real number and not a constant.

Secrets
one: AI_GATEWAY_API_KEY, server-side only
Model
PARLOUR_MODEL, default typesafe-ai/jev
Price source
the Gateway model catalogue, cached one hour
No key
the house brain, and the UI says so

One key, no client surface

There is exactly one secret and it never reaches the browser. Every call is made on the server inside the simulation loop, so there is no NEXT_PUBLIC_* anything and nothing to inline into a bundle. A watcher's browser talks to a stream of simulation frames and to nothing else.

Live prices, not a hardcoded rate

lib/sim/pricing.ts pulls per-token prices from the Gateway catalogue, caches them for an hour, and falls back to a deliberately conservative constant if the catalogue is unreachable. An over-stated meter beats a crashed room. The counter on the party UI then reads like a buy-in that ticks up while you watch.

Because model ids and prices come from the Gateway and not from the code, changing model is PARLOUR_MODEL and nothing else. Anything that is not an evaluation model will simply not answer the question pack.

Failure modes

No key, a failed call, and an exhausted hourly budget all land in the same place: the room drops to the house brain, keeps playing, and says which brain it is on. There is no state in which this site shows you an error instead of a party.

Read next

More on the model