{"record":{"id":"36072d810771944f","repo":"deepseek-ai/deepseek-harness","slug":"invalid","errorCode":"invalid","errorMessage":"image mimeType must be image/png, image/jpeg, image/webp, or image/gif","messagePattern":"image mimeType must be image/png, image/jpeg, image/webp, or image/gif","errorType":"exception","errorClass":"AcpContentError","httpStatus":null,"severity":"error","filePath":"packages/acp/acp/src/content.ts","lineNumber":50,"sourceCode":"   * @param options - optional causal chain for diagnostics.\n   */\n  constructor(message: string, kind: AcpContentFailureKind, options?: ErrorOptions) {\n    super(message, options)\n    this.name = 'AcpContentError'\n    this.kind = kind\n  }\n}\n\n/** Narrow a wire MIME string to the durable raster vocabulary. */\nfunction imageMediaType(value: string): ImageMediaType | undefined {\n  return IMAGE_MEDIA_TYPES.includes(value as ImageMediaType) ? value as ImageMediaType : undefined\n}\n\n/** Strictly decode one ACP inline image without accepting base64 aliases. */\nfunction decodeImage(block: Extract<AcpContentBlock, { type: 'image' }>): SaveImageAttachment {\n  const mediaType = imageMediaType(block.mimeType)\n  if (mediaType === undefined) {\n    throw new AcpContentError('image mimeType must be image/png, image/jpeg, image/webp, or image/gif', 'invalid')\n  }\n  if (!CANONICAL_BASE64.test(block.data)) {\n    throw new AcpContentError('image data must be canonical base64', 'invalid')\n  }\n  const data = Buffer.from(block.data, 'base64')\n  if (data.toString('base64') !== block.data) {\n    throw new AcpContentError('image data must be canonical base64', 'invalid')\n  }\n  return { data, mediaType }\n}\n\n/** Resolve the exact current route and require explicit image input support. */\nasync function assertImageRoute(ctx: Context, agent: Agent, signal: AbortSignal): Promise<void> {\n  const routed = agent.session.requestHeader()?.config\n  const provider = routed?.provider ?? agent.options.provider\n  const model = routed?.model ?? agent.options.model\n  const llm = ctx.get('llm')\n  if (provider === undefined || model === undefined || llm === undefined) {","sourceCodeStart":32,"sourceCodeEnd":68,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/acp/acp/src/content.ts#L32-L68","documentation":"Error \"image mimeType must be image/png, image/jpeg, image/webp, or image/gif\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/acp/acp/src/content.ts:50 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Send only image/png, image/jpeg, image/webp, or image/gif attachments; convert other formats to one of these before attaching."],"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"}