iconsulting/packages
hailin fa835e4f56 fix(agents): preserve image content blocks in context injection — fixes 209K token overflow
injectIntoMessages() was JSON.stringify-ing array content (with image blocks),
turning base64 data into text tokens (~170K) instead of image tokens (~1,600).
Fix: append context as a new text block in the array, preserving image block format.

Also fixes token estimation to count images at ~1,600 tokens instead of base64 char length,
and adds debug logging for API call token composition.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-07 08:51:24 -08:00
..
admin-client refactor(knowledge): separate file upload into independent entry point 2026-02-06 23:29:37 -08:00
services fix(agents): preserve image content blocks in context injection — fixes 209K token overflow 2026-02-07 08:51:24 -08:00
shared feat(agents): implement multi-agent collaboration architecture 2026-02-06 04:26:39 -08:00
web-client fix(web): load historical messages when opening a conversation 2026-02-07 08:00:26 -08:00