Go to file
Henrik Jess Nielsen f374088211 fix(offers): DE→DA translation returned nothing — disable thinking, batch big
Prod showed 0 of 467 headings translated while AI matching worked. Cause:
Haiku 5.5 defaults thinking on, which consumed the 4000-token budget on the
40-item translation batches and truncated the JSON, so every batch fell back
to German. Matching (one small response) slipped through.

- Disable thinking on both Claude calls (mechanical JSON tasks), via a shared
  _claude_json helper that retries without the flag if a model rejects it
- Raise max_tokens (16000 translate / 8000 match) so output fits even if
  thinking stays on
- Batch ~all headings in 1-2 calls (250) instead of 40, so the preamble isn't
  repeated per batch and we don't hammer the rate limit (cheaper, as suggested)
2026-10-30 11:19:40 +01:00
2026-06-06 00:55:31 +02:00
2026-06-06 00:55:31 +02:00
2026-06-06 00:28:17 +02:00
Description
No description provided
Readme 596 KiB
Languages
HTML 70.4%
Python 24.4%
JavaScript 3.2%
HCL 1.5%
Dockerfile 0.4%
Other 0.1%