What's New
Per-Key Quota (Budget Control)
- Set daily/weekly/monthly request limits per API key
- HTTP 429 with structured error when exceeded
PATCH /api/keys/:id/quota— partial updateGET /api/keys/:id/quota— view limits + usage- Only successful requests count; admin/anonymous exempt
Response Cache
- Opt-in via
CLAUDE_CACHE_TTLenv var (default 0 = disabled) - SHA-256 hash of model + messages + temperature/max_tokens/top_p
- Streaming and non-streaming support
- Multi-turn sessions never cached
GET /cache/stats+DELETE /cacheadmin endpoints- Runtime-tunable via
PATCH /settings - Auto-cleanup every 10 minutes
Bug Fix
- SQLite datetime format mismatch with JS
.toISOString()— same-day comparisons were broken
Code Quality
- Route conflict fix for DELETE /api/keys/:id vs /quota
- Quota check: single SQL query instead of 3 separate COUNTs
findKey()encapsulation replaces rawgetDb()in server.mjs- 24-test integration suite (test-features.mjs)
Full Changelog: v3.7.0...v3.8.0