#0826
Exec
The route handler moved; the key stopped existing
Your React app already streams answers with the Vercel AI SDK. The route handler behind it is twelve lines, an import, and a key in an environment variable you rotate twice a year.
On exec the same twelve lines are the whole file. streamText and model are injected: no import, no key. // @ai-model deepseek/deepseek-v4-pro picks the model; // @cors https://app.example.com names the one origin the browser may read it from. res.stream('text/event-stream'), then res.write each chunk from textStream, then res.end. The frontend doesn't change.
Tokens go through the Hoody AI Gateway at provider cost plus 5%, drawn from your AI Balance. The server is flat-rate and the endpoint adds nothing to it. Two balances, one invoice, firewalled.
The route handler moved; the key stopped existing.