Problem
/ai max: "lots" flows through Math.max(NaN, 32) / Math.min(NaN, 220) and forwards max_tokens: NaN to Groq.
Where
src/index.ts (outputMax computation, no finite check).
Acceptance
Add a failing test first asserting POST /ai {prompt, max: "lots"} clamps to a finite 32..220 value instead of forwarding NaN. Then fix.
Problem
/aimax: "lots"flows throughMath.max(NaN, 32)/Math.min(NaN, 220)and forwardsmax_tokens: NaNto Groq.Where
src/index.ts(outputMax computation, no finite check).Acceptance
Add a failing test first asserting
POST /ai {prompt, max: "lots"}clamps to a finite 32..220 value instead of forwarding NaN. Then fix.