{"record":{"id":"0720c2cfa4bd6425","repo":"deepseek-ai/deepseek-harness","slug":"invalid-request-0720c2","errorCode":"INVALID_REQUEST","errorMessage":"DeepSeek request image ${block.attachment.attachmentId} was not prepared.","messagePattern":"DeepSeek request image (.+?) was not prepared\\.","errorType":"exception","errorClass":"LlmError","httpStatus":null,"severity":"error","filePath":"packages/llm/llm-deepseek/src/serialize.ts","lineNumber":146,"sourceCode":"  version: RequestImageAttachment,\n  precededByContent: boolean,\n): WireTextContentPart {\n  return {\n    type: 'text',\n    text: `${precededByContent ? '\\n' : ''}${requestImageHandleText(version)}`,\n  }\n}\n\n/** Resolve one durable image into its descriptor and transient DeepSeek image part. */\nasync function imageParts(\n  block: Extract<ContentBlock, { type: 'image' }>,\n  images: ImageSerializationOptions,\n  location: ImageWireLocation,\n  precededByContent: boolean,\n): Promise<[WireTextContentPart, WireImageContentPart]> {\n  const version = images.requestImages.get(block.attachment.attachmentId)\n  if (version === undefined) {\n    throw new LlmError(\n      `DeepSeek request image ${block.attachment.attachmentId} was not prepared.`,\n      'INVALID_REQUEST',\n    )\n  }\n  const image: WireImageContentPart = images.representation.kind === 'file'\n    ? { type: 'file', file_id: await images.representation.resolveFileId(version, block, location) }\n    : {\n      type: 'image_url',\n      image_url: { url: `data:${version.mediaType};base64,${Buffer.from(version.data).toString('base64')}` },\n    }\n  return [imageHandle(version, precededByContent), image]\n}\n\n/** Convert user or nested tool-result blocks into ordered wire parts. */\nasync function contentParts(\n  blocks: readonly ContentBlock[],\n  images: ImageSerializationOptions,\n  message: number,","sourceCodeStart":128,"sourceCodeEnd":164,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/llm/llm-deepseek/src/serialize.ts#L128-L164","documentation":"Error \"DeepSeek request image ${block.attachment.attachmentId} was not prepared.\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/llm/llm-deepseek/src/serialize.ts:146 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Let attachment preparation finish before sending the request; retry if the image was dropped."],"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"}