SkateSpots/ai-proxy
SkateSpots ec06a63b01 feat(ai-proxy): run the AI proxy on the CVM host, ready to switch over
Same proxy as netlify/functions/ai.mjs, rebuilt as a standalone Bun service on
the CVM host so AI calls stop spending Netlify compute/bandwidth credits and
the sats-paid Routstr key lives on our box.

- ai-proxy/server.ts: Bun.serve on 127.0.0.1:8787 — NIP-98 + Pro gate, model
  allowlist, per-IP throttle, /api/ai + /api/ai/status. Own tsconfig
  (typecheck:ai in npm test); eslint-ignored like cvm-server.
- ai-proxy/{package.json,.env.example,skatespots-ai.service,Caddyfile,DEPLOY.md}.
- scripts/deploy-ai-proxy.sh (npm run deploy:ai): scp + bun install + unit +
  restart, mirroring deploy-cvm.sh.
- Client: one place decides the AI base, src/lib/sasquatchAi.ts (also the NIP-98
  u tag). Defaults unchanged (/api/ai on Netlify); set VITE_SASQUATCH_AI_BASE to
  move it. Fully reversible.

Deployed and verified on the host: /api/ai/status returns the live Routstr
balance. Public TLS (DNS + Caddy) is the remaining step before switching the app
over, so no client behaviour changes yet.
2026-09-28 13:32:05 +07:00
..
.env.example feat(ai-proxy): run the AI proxy on the CVM host, ready to switch over 2026-09-28 13:32:05 +07:00
Caddyfile feat(ai-proxy): run the AI proxy on the CVM host, ready to switch over 2026-09-28 13:32:05 +07:00
DEPLOY.md feat(ai-proxy): run the AI proxy on the CVM host, ready to switch over 2026-09-28 13:32:05 +07:00
package.json feat(ai-proxy): run the AI proxy on the CVM host, ready to switch over 2026-09-28 13:32:05 +07:00
server.ts feat(ai-proxy): run the AI proxy on the CVM host, ready to switch over 2026-09-28 13:32:05 +07:00
skatespots-ai.service feat(ai-proxy): run the AI proxy on the CVM host, ready to switch over 2026-09-28 13:32:05 +07:00
tsconfig.json feat(ai-proxy): run the AI proxy on the CVM host, ready to switch over 2026-09-28 13:32:05 +07:00