{"record":{"id":"1581ab0dd227a2c0","repo":"deepseek-ai/deepseek-harness","slug":"invalid-request","errorCode":"INVALID_REQUEST","errorMessage":"DeepSeek chat image exceeds the 32 MiB per-image limit.","messagePattern":"DeepSeek chat image exceeds the 32 MiB per-image limit\\.","errorType":"exception","errorClass":"LlmError","httpStatus":null,"severity":"error","filePath":"packages/llm/llm-deepseek/src/file-store.ts","lineNumber":185,"sourceCode":"    }, (error: unknown) => {\n      shared.settled = true\n      throw uploadFailure(error)\n    })\n    this.inflight.set(key, shared)\n    void shared.promise.finally(() => {\n      if (this.inflight.get(key) === shared) this.inflight.delete(key)\n    }).catch(() => {})\n    return waitForUpload(shared, signal)\n  }\n\n  private async ensureUploadedOnce(\n    version: RequestImageAttachment,\n    connection: DeepSeekFileConnection,\n    policy: DeepSeekFilePolicy,\n    signal: AbortSignal,\n  ): Promise<DeepSeekFileReference> {\n    if (version.bytes > MAX_CHAT_IMAGE_BYTES) {\n      throw new LlmError('DeepSeek chat image exceeds the 32 MiB per-image limit.', 'INVALID_REQUEST')\n    }\n    const scope = deepSeekFileScope(connection.baseURL, connection.apiKey)\n    const now = this.now()\n    const marginMs = policy.refreshMarginSeconds * 1_000\n    const cached = await this.index.get(scope, version.variantId, now, marginMs)\n    if (cached !== undefined) return { record: cached, uploaded: false }\n\n    const client = this.client(connection)\n    const upload = async (): Promise<DeepSeekUploadRecord> => {\n      const remote = await client.upload({\n        data: version.data,\n        mediaType: version.mediaType,\n        filename: filename(version),\n        expiresAfterSeconds: policy.expiresAfterSeconds,\n        signal,\n      })\n      if (remote.bytes !== version.data.byteLength) {\n        throw new LlmError('DeepSeek Files API upload response does not match the submitted image.', 'INVALID_RESPONSE')","sourceCodeStart":167,"sourceCodeEnd":203,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/llm/llm-deepseek/src/file-store.ts#L167-L203","documentation":"Error \"DeepSeek chat image exceeds the 32 MiB per-image limit.\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/llm/llm-deepseek/src/file-store.ts:185 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Resize or compress the image below 32 MiB before attaching it."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"b150a551b8d465e31e418e1b2eaf5e79bbb7d28e","analyzedAt":"2026-08-24T18:12:29.105Z","schemaVersion":2},"datasetVersion":"2026-08-24T22:17:12.610Z"}