Skip to content

v0.9.0 — token optimization

Choose a tag to compare

@CocoRoF CocoRoF released this 07 Jul 09:20
· 20 commits to main since this release
e7fc96b

Fixes the token-leak audit's top findings. Backward compatible; defaults unchanged.

  • Edit-retry cache reuse — a plan-missing retry reads the cached user prefix (~0.1×) instead of re-paying the whole ~19k-token prompt (retry input ~10% of before).
  • Executor spec_lock cached once — moved into a shared cached system suffix, read on every page instead of re-sent per page; the fan-out warms the cache before parallelizing (~2.1× → ~1×).
  • Input caps — strategist source cap (EDIT2DOCS_STRATEGIST_SOURCE_CHAR_CAP) and edit_doc outline windowing (400 paras: ~85% cut), preserving para N addresses.
  • Retry-severity tiering — cosmetic layout violations no longer drive full-page re-generations.
  • Per-role model tiering (EDIT2DOCS_MODEL_{PLANNER,WRITER,STRATEGIST,EXECUTOR}), auto-streaming for large outputs, honest cache accounting, per-stage cost visibility.

842 tests. Requires Python >=3.12, contextifier>=0.4.0.