deepseek-ai/deepseek-harness · error · Error
cannot read "${target.displayPath}": the image cannot be sto
Error message
cannot read "${target.displayPath}": the image cannot be stored within the deployment's byte limits; downscale the image and read the smaller copy What it means
Error "cannot read "${target.displayPath}": the image cannot be stored within the deployment's byte limits; downscale the image and read the smaller copy" thrown in deepseek-ai/deepseek-harness.
Source
Thrown at packages/fs/tool-fs/src/read-image.ts:239
} catch (error: unknown) {
if (!(error instanceof AttachmentError)) throw error
// Dimension refusals stay recoverable tool errors: an oversized image
// must never enter durable history, where it would ride every later
// model request past provider-side dimension rejections.
if (error.code === 'IMAGE_DIMENSION_TOO_LARGE') {
throw new Error(
`cannot read "${target.displayPath}": at least one image side exceeds the ${attachments.imageLimits.maxImageDimension}px limit; downscale the image and read the smaller copy`,
{ cause: error },
)
}
if (error.code === 'IMAGE_TOO_MANY_PIXELS') {
throw new Error(
`cannot read "${target.displayPath}": the image exceeds the ${attachments.imageLimits.maxImagePixels}-pixel decoded-size limit; downscale the image and read the smaller copy`,
{ cause: error },
)
}
if (error.code === 'IMAGE_TOO_LARGE') {
throw new Error(
`cannot read "${target.displayPath}": the image cannot be stored within the deployment's byte limits; downscale the image and read the smaller copy`,
{ cause: error },
)
}
if (error.code === 'ATTACHMENT_WRITE_FAILED' && /16-bit PNG/iu.test(error.message)) {
throw new Error(
`cannot read "${target.displayPath}": the 16-bit PNG could not be converted to the normalized 8-bit sRGB form; convert it to an 8-bit PNG/JPEG/WebP and retry`,
{ cause: error },
)
}
if (error.code !== 'IMAGE_TYPE_MISMATCH') throw error
const extension = extname(target.displayPath).toLowerCase()
throw new Error(
`cannot read "${target.displayPath}": the ${extension} extension declares ${mediaType}, but the bytes use a different image format; rename the file to match its actual format if it is PNG/JPEG/WebP/GIF, or convert it to one of those formats`,
{ cause: error },
)
}
ctx.emit('fs/observed', target, { kind: 'present', version: info.version }, exec)View on GitHub (pinned to b150a551b8)
When it happens
Trigger: Thrown at packages/fs/tool-fs/src/read-image.ts:239 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of deepseek-ai/deepseek-harness@b150a551b8 (2026-08-24).
Data as JSON: /api/errors/a21b95a77640a8ab.
Report an issue: GitHub.