Skip to main content
The handler takes a standard Request and returns a standard Response. It runs on any Web-standard runtime, not just Node. A CI gate bundles the server entry for a Worker target and boots it under real workerd on every change, so the wiring below stays supported.

What init writes

Run npx vendo init --framework custom. Detection lands here on its own when the host is neither Next.js nor Express. It generates vendo/server.ts: a lazy composition that takes Request in and returns Response, with the environment passed per call.
vendo/server.ts
Every Cloud seam is named in the composition. Nothing is inferred from the environment at this layer, because on a Worker there is no ambient environment to infer from.

Route your runtime through it

Cloudflare Workers
Bun · Deno · Hono
The client side does not change. Mount <VendoProvider> with the theme and your base path, and put <VendoOverlay /> inside it.

The three rules

1

Construct lazily.

createVendo() performs no I/O and starts no timers at construction, but the generated lazy-singleton shape is still the contract.Workers forbids async work in module scope, and environment variables only exist per request there.
2

Pass the adapters.

The model ladder and the local store engines need Node. On a Worker they refuse with guidance instead of half working.The generated wiring above names every one of them, which is why it runs unchanged.
3

Set VENDO_BASE_URL.

Point it at the deployed app’s full public URL, path prefix included.Present-credential forwarding fails closed without it.
The model rule has an exact shape. On an edge runtime the Cloud gateway is the stock Anthropic provider pointed at the console:
Call vendoModel() on a Worker and it throws that same sentence back at you on first use, rather than pretending. The screen toolchain in @vendoai/apps/edge type-checks against vendored lib bytes, so install the exact typescript its EDGE_TYPESCRIPT_VERSION names — the peer range is wide and will not nudge you there.

Mounting the handler yourself

If you skip the generated adapter and mount vendo.handler under a base path by hand, your adapter has to do five things. vendo doctor judges an unknown-framework host by its wiring, never by another framework’s file layout. A missing server half reports E-WIRE-007 and a missing client half E-WIRE-008.

What Vendo calls your runtime

Telemetry and error reports name the runtime from the globals it advertises: workerd, edge-light, bun, deno, node, or unknown. A crash on the edge is never read as a crash on Node.

Where to go next

Model credentials

The gateway your edge composition points at, and how to pin a model.VENDO_MODEL

Vendo Cloud

The key every adapter above takes, and where to mint one.vendo login

Deploying

The eight checks that have to pass before your users arrive.npx vendo doctor