caelum0x bd38aba7a0 fix: Trial Matcher fits serverless limit — Haiku eligibility + tighter output
After fixing the CT.gov search, the trial matcher actually ran its per-trial eligibility
fan-out and hit a 504 at the 60s Vercel limit (5 parallel Sonnet calls + profile extraction).
Eligibility is a fast per-criterion classification, so:
- callClaudeForJson gains an optional per-call model override (default unchanged); the
  accuracy-critical verify path is untouched.
- Per-trial eligibility now runs on Haiku (claude-haiku-4-5-20251001, override via
  TRIAL_MATCHER_MODEL) and assesses the leading 10 criteria/type at a 2560-token budget.

Full example run dropped from 56s to 34.5s (profile 9.9s) with 4 real matches, degraded=null
— comfortable margin under the 60s limit.
2026-07-12 00:36:04 +03:00
..