This directory contains an implementation of the Braintrust AI Proxy that runs on Vercel Edge Functions. Because of their global network, you get the benefit of low latency and can scale up to millions of users.
Vercel is tightly integrated with Git, so the best way to deploy is to fork this repository. Then, create a new Vercel project and
- Connect your forked repository to the project
- Create a KV storage instance and connect it to the project
From this directory, link your project and pull down the KV configuration by running:
npx vercel link
npx vercel env pull
You should now have a file named .env.local
with a bunch of KV_
variables.
To build the proxy, you'll need to install pnpm, and then from the repository's root, run:
pnpm install
pnpm build
Then, back in this directory, you can run the proxy locally with
pnpm dev
If you've integrated the proxy into Vercel via Git, then it will automatically deploy on every push.