deepseek-ai/deepseek-harness · error · LlmError
INVALID_REQUEST
INVALID_REQUEST
Error message
DeepSeek chat image exceeds the 32 MiB per-image limit.
What it means
Error "DeepSeek chat image exceeds the 32 MiB per-image limit." thrown in deepseek-ai/deepseek-harness.
Source
Thrown at packages/llm/llm-deepseek/src/file-store.ts:185
}, (error: unknown) => {
shared.settled = true
throw uploadFailure(error)
})
this.inflight.set(key, shared)
void shared.promise.finally(() => {
if (this.inflight.get(key) === shared) this.inflight.delete(key)
}).catch(() => {})
return waitForUpload(shared, signal)
}
private async ensureUploadedOnce(
version: RequestImageAttachment,
connection: DeepSeekFileConnection,
policy: DeepSeekFilePolicy,
signal: AbortSignal,
): Promise<DeepSeekFileReference> {
if (version.bytes > MAX_CHAT_IMAGE_BYTES) {
throw new LlmError('DeepSeek chat image exceeds the 32 MiB per-image limit.', 'INVALID_REQUEST')
}
const scope = deepSeekFileScope(connection.baseURL, connection.apiKey)
const now = this.now()
const marginMs = policy.refreshMarginSeconds * 1_000
const cached = await this.index.get(scope, version.variantId, now, marginMs)
if (cached !== undefined) return { record: cached, uploaded: false }
const client = this.client(connection)
const upload = async (): Promise<DeepSeekUploadRecord> => {
const remote = await client.upload({
data: version.data,
mediaType: version.mediaType,
filename: filename(version),
expiresAfterSeconds: policy.expiresAfterSeconds,
signal,
})
if (remote.bytes !== version.data.byteLength) {
throw new LlmError('DeepSeek Files API upload response does not match the submitted image.', 'INVALID_RESPONSE')View on GitHub (pinned to b150a551b8)
Solutions
- Resize or compress the image below 32 MiB before attaching it.
When it happens
Trigger: Thrown at packages/llm/llm-deepseek/src/file-store.ts:185 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/1581ab0dd227a2c0.
Report an issue: GitHub.