feat(core): show warning for oversized image (#564)

---------

Co-authored-by: zhouxiao.shaw <zhouxiao.shaw@bytedance.com>
This commit is contained in:
yuyutaotao 2025-04-17 10:51:58 +08:00 committed by GitHub
parent c777c139e4
commit 445381efef
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -199,6 +199,11 @@ export function warnGPT4oSizeLimit(size: Size) {
console.warn(warningMsg);
warned = true;
}
} else if (size.width > 1800 || size.height > 1800) {
console.warn(
`The image size seems too large (${size.width}x${size.height}). It may lead to more token usage, slower response, and inaccurate result.`,
);
warned = true;
}
}