Skip to content

feat: 0.5.0 production hardening pass - #4

Merged
EvanPaules merged 1 commit into
mainfrom
feat/0.3.0
May 14, 2026
Merged

feat: 0.5.0 production hardening pass#4
EvanPaules merged 1 commit into
mainfrom
feat/0.3.0

Conversation

@EvanPaules

Copy link
Copy Markdown
Owner

Closes the four real production gaps called out before this release: multi-modal content loss in adapters, no error recovery in summarizer, unbounded embedding cache, silent fallback in meta. Plus doc polish.

  • New passthrough ContentBlock type. The OpenAI, Anthropic, and Vercel AI SDK adapters now wrap unrecognized blocks (images, files, audio, documents) verbatim instead of dropping them. Token counter respects passthrough.estimatedTokens with sane provider-specific defaults.
  • summarizer.onError config option: 'fall-back' (default), 'throw', or a custom handler function. When llmCall fails, the optimizer no longer kills the user's request.
  • LRU-capped embedding cache via maxCacheSize on createEmbeddingScorer. Defaults to 1000 entries. Fixes the unbounded-memory bug for long-running processes.
  • meta.fellBackTo surfaces when the requested strategy couldn't run cleanly. Summarizer reports 'sliding-window' for no-compressible or llmCall errors. Hybrid reports its final fallback.
  • README: new "Status: pre-1.0" section explaining breaking-change policy and browser bundle-size caveat. Config / meta tables updated with the new options.
  • playground/README: concrete vercel, netlify, and gh-pages deploy instructions.

Tests: 21 -> 89 -> 101. Typecheck clean. Build clean. 14 test files.

Summary

Type of change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation
  • Refactor / chore

Test plan

  • npm run typecheck passes
  • npm test passes
  • npm run build succeeds
  • Added or updated tests
  • Updated CHANGELOG.md (for user-facing changes)

Closes the four real production gaps called out before this release:
multi-modal content loss in adapters, no error recovery in summarizer,
unbounded embedding cache, silent fallback in meta. Plus doc polish.

- New passthrough ContentBlock type. The OpenAI, Anthropic, and Vercel
  AI SDK adapters now wrap unrecognized blocks (images, files, audio,
  documents) verbatim instead of dropping them. Token counter respects
  passthrough.estimatedTokens with sane provider-specific defaults.
- summarizer.onError config option: 'fall-back' (default), 'throw', or
  a custom handler function. When llmCall fails, the optimizer no
  longer kills the user's request.
- LRU-capped embedding cache via maxCacheSize on createEmbeddingScorer.
  Defaults to 1000 entries. Fixes the unbounded-memory bug for
  long-running processes.
- meta.fellBackTo surfaces when the requested strategy couldn't run
  cleanly. Summarizer reports 'sliding-window' for no-compressible or
  llmCall errors. Hybrid reports its final fallback.
- README: new "Status: pre-1.0" section explaining breaking-change
  policy and browser bundle-size caveat. Config / meta tables updated
  with the new options.
- playground/README: concrete vercel, netlify, and gh-pages deploy
  instructions.

Tests: 21 -> 89 -> 101. Typecheck clean. Build clean. 14 test files.
@EvanPaules
EvanPaules merged commit bc36b7f into main May 14, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant