5 Commits

Author SHA1 Message Date
Bingxi Zhao (Frank)
895c41999c Merge dev into PR #1665 and preserve integrated behavior 2026-10-04 14:47:52 +08:00
ZyPulse
1c07ef4e44 perf(parsing): cache image descriptions per workspace 2026-09-30 00:15:20 +08:00
ZyPulse
cbb742a141 feat(parsing): select an independent image description model 2026-09-30 00:01:29 +08:00
Bingxi Zhao (Frank)
1829ae23f0 Fix PDF image mapping, caption refresh, and Grok detection 2026-09-23 10:48:36 +08:00
flower-moon
8c718530b2 feat(reading): caption embedded figures at ingest
A figure only reaches the model while its page is the open one: the viewport
injection carries at most four images, and read_material returns text. That
leaves a question spanning several pages of a deck (or several decks)
answered without ever seeing the figures it is about.

Ingest can now describe each stored figure once, with the active vision model,
and write the description back into media.json next to the image it belongs
to. captions.py mirrors the RAG image-description pipeline: it is gated on
supports_multimodal_images(), runs at image_description_limits() concurrency
with a per-image timeout, tolerates individual failures, and returns the
number of rows it wrote. The work is best-effort by design: the upload path
schedules it as a background task that can only log, never fail an ingest.

Off by default (document_parsing.json -> image_caption, surfaced through the
document-parsing settings API), so nothing changes until the switch is on.

store.refresh_document() lands alongside it: re-extraction of an already
ingested document that keeps annotations/positions/bookmarks/assets in place,
rewrites units/media/manifest in one atomic swap, refuses to touch anything
when the raw bytes are gone or the unit count would change, and carries
existing captions over by image name so a refresh never silently discards
descriptions the API already paid for.
2026-09-17 18:46:28 +08:00