feat: credit enforcement on chat, workflow export/import

↗ view on GitHub · Dshamir · 2026-05-23 · e889c1dd

- Wire up monthly credit checking and incrementing for both chat
  streaming routes. Credits checked before LLM call (429 if exceeded),
  incremented after successful response. Auto-resets when past reset
  date. Limit via MONTHLY_CREDIT_LIMIT env var (PR #157).
- Add GET /workflows/:id/export (.mikeworkflow.json download) and
  POST /workflows/import endpoints for portable workflow transfer
  between environments (PR #59).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Repository Dshamir/AI-Legal
Author Dshamir <dshamir@blucap.ca>
Authored
Parents eb70e06a
Stats 4 files changed , +390 , -241
Part of Credit enforcement and workflow export/import

Capture this commit into my fork

Download a Markdown prompt that tells Claude how to port this exact commit into your working tree. Run it via claude -p < capture-commit-e889c1dd.md from inside the repo you want the change in.

⬇ Download capture-commit-e889c1dd.md