2026-04-04-import-chunking-image-processing

Sat Apr 04 2026 07:00:00 GMT+0700 (Western Indonesia Time)type/changelog

2026-04-04 — Bulk import: chunking + image processing + LLM cache

Commits 9feacd3, 38a20e0.

What

  • Chunked JSON import normalization (chunkedNormalizeJson.ts) so large statement dumps don't blow context windows or rate limits.
  • Image downscale before sending receipts to the model (importImageDownscale.ts) — keeps token cost predictable.
  • LLM response cache keyed on input hash (importNormalizeLlmCache.ts) — re-running the same import is free and instant.
  • Income support and richer category management in bulk-import path (ecf3bf2 shortly after).

Why

Naive single-shot normalization broke on real-world bank exports (months of data, large attachments). Chunking + caching + downscale turn the import flow from "fragile and expensive" into "boring and cheap."

Touches

  • src/lib/imports/chunkedNormalizeJson.ts, importImageDownscale.ts, importNormalizeLlmCache.ts, importJsonChunkPlanner.ts (+ matching .test.ts files)