fix: reduce default image dimension from 2000px to 1200px
Large images (2000px) consume excessive context tokens when sent to LLMs. 1200px provides sufficient detail for most use cases while significantly reducing token usage. The 5MB byte limit remains unchanged as JPEG compression at 1200px naturally produces smaller files. (cherry picked from commit 40182123dd2673b4b65e6846fa066380f10b781f)
This commit is contained in:
committed by
Peter Steinberger
parent
5b3ecadec3
commit
5ee79f80eb
@@ -13,7 +13,7 @@ type TextContentBlock = Extract<ToolContentBlock, { type: "text" }>;
|
||||
//
|
||||
// To keep sessions resilient (and avoid "silent" WhatsApp non-replies), we auto-downscale
|
||||
// and recompress base64 image blocks when they exceed these limits.
|
||||
const MAX_IMAGE_DIMENSION_PX = 2000;
|
||||
const MAX_IMAGE_DIMENSION_PX = 1200;
|
||||
const MAX_IMAGE_BYTES = 5 * 1024 * 1024;
|
||||
const log = createSubsystemLogger("agents/tool-images");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user