Turn per-user token quota off by default; keep code for later

This commit is contained in:
2026-08-21 12:51:29 -07:00
parent f1200b7d79
commit fac6e7f356
4 changed files with 54 additions and 39 deletions

View File

@@ -25,9 +25,11 @@ APP_PASSWORD=
RATE_LIMIT_MAX=20
RATE_LIMIT_WINDOW_MS=300000
# Caps combined input+output tokens per named user, per UTC calendar day.
# Default: 50000 tokens/day (roughly 100-200 AI drafts with this tool's
# prompt size). Usage is written to TOKEN_USAGE_FILE and persists across
# restarts if that file's folder is a mounted volume.
TOKEN_LIMIT_PER_USER=50000
# On the back burner: off by default. Caps combined input+output tokens per
# named user, per UTC calendar day. Leave at 0 (or unset) for unlimited,
# which also skips writing TOKEN_USAGE_FILE. Set a positive number (for
# example 50000, roughly 100-200 AI drafts with this tool's prompt size) to
# turn it back on. Usage then persists across restarts if TOKEN_USAGE_FILE's
# folder is a mounted volume.
TOKEN_LIMIT_PER_USER=0
TOKEN_USAGE_FILE=./data/token-usage.json