Run Model Router locally.
Use your own prompts with your own TypeSafe key. The Node server runs on your computer and sends the prompt and key to TypeSafe over HTTPS.
1. Get the project
Install Node.js 24 or newer and Git. These commands select the same source revision as this demo. The repository includes a mise configuration for Node.
git clone https://gitlab.com/samwiskow/model-router.git
cd model-router
git checkout 777abacc9d837ebc8f6ea5374f8162094c05901a
npm ci
cp .env.example .env.local
2. Add your key
Get a key from TypeSafe. Edit .env.local and set TYPESAFE_API_KEY. This file is excluded from Git. Keep it on your computer.
3. Start the router
npm startOpen http://127.0.0.1:3000. The server binds to localhost by default. Each analysis uses your TypeSafe account and can incur API charges.
See the README for model settings, tests, and private evaluation reports.