mirror of
https://github.com/openclaw/openclaw.git
synced 2026-03-30 02:20:38 +00:00
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.
This commit is contained in:
@@ -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