Problem
Only emptiness is checked: a 10k-message history is forwarded straight to Groq with no size/count cap.
Where
src/worker/index.ts (POST /api/chat validation).
Acceptance
Add a failing test first posting an oversized history, expecting 413 (or 400) instead of forwarding. Then fix.
Problem
Only emptiness is checked: a 10k-message history is forwarded straight to Groq with no size/count cap.
Where
src/worker/index.ts(POST /api/chatvalidation).Acceptance
Add a failing test first posting an oversized history, expecting 413 (or 400) instead of forwarding. Then fix.