deepseek-ai/deepseek-harness · error · AttachmentError
IMAGE_TOO_LARGE
IMAGE_TOO_LARGE
Error message
Image exceeds the configured byte limit.
What it means
Error "Image exceeds the configured byte limit." thrown in deepseek-ai/deepseek-harness.
Source
Thrown at packages/attachment/attachment-local/src/store.ts:98
data: Uint8Array
/** Durable reference describing {@link data}. */
ref: ImageAttachmentRef
}
/**
* Decode, normalize, and verify one submitted image without touching storage.
* @param input - submitted encoded bytes and declared media type.
* @param limits - source admission policy.
* @param policy - independent normalization policy.
* @returns immutable reference facts beside bytes ready for atomic publication.
*/
export async function prepareImageFile(
input: SaveImageAttachment,
limits: ImageAttachmentLimits,
policy: NormalizationPolicy,
): Promise<PreparedImageFile> {
if (input.data.byteLength > limits.maxImageBytes) {
throw new AttachmentError('Image exceeds the configured byte limit.', 'IMAGE_TOO_LARGE')
}
const detected = await inspectMetadata(input.data, input.mediaType, limits)
const normalized = await normalizeImage(input.data, detected, policy)
const sha256 = digest(normalized.data)
const name = displayName(input.name)
const downscaled = detected.width !== normalized.width || detected.height !== normalized.height
return {
data: normalized.data,
ref: {
attachmentId: AttachmentId(`sha256:${sha256}`),
mediaType: normalized.mediaType,
width: normalized.width,
height: normalized.height,
bytes: normalized.data.byteLength,
...(name !== undefined ? { name } : {}),
...downscaled ? { originalDimensions: { width: detected.width, height: detected.height } } : {},
},
}View on GitHub (pinned to b150a551b8)
Solutions
- Shrink the image or raise the configured byte limit.
When it happens
Trigger: Thrown at packages/attachment/attachment-local/src/store.ts:98 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/9e8147da86f3c473.
Report an issue: GitHub.