haiku.rag/docs
Yiorgis Gozadinos 522959d9b4
Check the code timeout before each document read
The VFS bridge suspends the Monty worker for the length of a read. Monty checks
its duration budget between interpreter steps, so it cannot check while a read
is in flight. Code that reads in a loop overran a 60s budget by minutes. A read
takes about 20ms on a 2789-document corpus, so a full scan spends about 55s in
reads alone.

Check the deadline before each read. Raising from inside the callback answers the
worker's suspension, which keeps the session usable.

Monty also spends max_duration_secs across the session rather than per call, and
the sandbox reuses the session so that variables persist. Budget it for
code_timeout * max_executions. At the old per-call value the first slow call
starved every later one.

Do not wrap feed_run in asyncio.wait_for. Cancelling during pure compute is
clean, but cancelling while a read waits for an answer wedges the session with a
protocol RuntimeError that escapes execute(). A call that computes without
reading stays bounded by the session budget alone.
2026-07-28 19:11:19 +03:00
..
capabilities Document vision flag in create_capability 2026-07-24 16:37:39 +03:00
configuration Check the code timeout before each document read 2026-07-28 19:11:19 +03:00
img Add ingester screenshot 2026-05-27 15:53:01 +03:00
stylesheets Landing page hero with TUI screen recording 2026-05-20 16:56:25 +03:00
apps.md Bind app example backend to loopback and document its lack of auth 2026-07-08 11:37:03 +03:00
benchmarks.md replace haiku.skills with native Pydantic AI capabilities 2026-07-24 15:26:17 +03:00
changelog.md Improve documentation 2025-11-28 13:10:03 +02:00
chat.md Add image attachment to the chat TUI 2026-07-25 10:58:08 +03:00
cli.md Accept images on CLI ask/analyze and MCP tools 2026-07-25 10:35:25 +03:00
custom-pipelines.md Always use the Store-owned embedder 2026-05-29 11:36:53 +03:00
development.md Docs 2026-04-24 14:42:52 +03:00
index.md Landing page hero with TUI screen recording 2026-05-20 16:56:25 +03:00
ingester.md Add Logfire debugging skills and worker-breaker event 2026-07-10 13:23:17 +03:00
installation.md Fix packaging and settings facts in the docs 2026-07-28 18:22:05 +03:00
mcp.md Accept images on CLI ask/analyze and MCP tools 2026-07-25 10:35:25 +03:00
overview.md fix capability execution limits and chat loading 2026-07-24 15:26:17 +03:00
python.md Accept images on ask/analyze 2026-07-25 10:23:55 +03:00
remote-processing.md Store docling-serve chunk bodies via raw_text 2026-06-23 16:35:21 +03:00
tools.md replace haiku.skills with native Pydantic AI capabilities 2026-07-24 15:26:17 +03:00
tuning.md Fix packaging and settings facts in the docs 2026-07-28 18:22:05 +03:00
tutorial.md replace haiku.skills with native Pydantic AI capabilities 2026-07-24 15:26:17 +03:00