{"record":{"id":"dff9df7343c8ab3b","repo":"deepseek-ai/deepseek-harness","slug":"unsupported-content-dff9df","errorCode":"UNSUPPORTED_CONTENT","errorMessage":"pi-ai chat history cannot represent structured assistant image output","messagePattern":"pi-ai chat history cannot represent structured assistant image output","errorType":"exception","errorClass":"LlmError","httpStatus":null,"severity":"error","filePath":"packages/llm/llm-pi-ai/src/replay.ts","lineNumber":158,"sourceCode":"  }\n}\n\n/** Convert provider-neutral blocks without trusting them as same-model replay. */\nfunction foreignAssistant(message: Message): AssistantMessage {\n  const source = message.source.kind === 'model' ? message.source : undefined\n  const content: AssistantMessage['content'] = []\n  for (const block of message.content) {\n    switch (block.type) {\n      case 'text': content.push({ type: 'text', text: block.text }); break\n      case 'reasoning': content.push({ type: 'thinking', thinking: block.text }); break\n      case 'tool-call': content.push({\n        type: 'toolCall',\n        id: block.id,\n        name: block.name,\n        arguments: parseArguments(block.arguments),\n      }); break\n      case 'image':\n        throw new LlmError('pi-ai chat history cannot represent structured assistant image output', 'UNSUPPORTED_CONTENT')\n      default:\n        // plugin-added block types are not representable in pi-ai.\n        break\n    }\n  }\n  return {\n    role: 'assistant',\n    content,\n    // Deliberately never equals a catalog API: absent replay state is foreign\n    // even if source names the same provider/model as this request.\n    api: 'dsh-foreign',\n    provider: source?.provider ?? 'dsh-foreign',\n    model: source?.model ?? 'dsh-foreign',\n    usage: emptyPiUsage(),\n    stopReason: content.some(piece => piece.type === 'toolCall') ? 'toolUse' : 'stop',\n    timestamp: 0,\n  }\n}","sourceCodeStart":140,"sourceCodeEnd":176,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/llm/llm-pi-ai/src/replay.ts#L140-L176","documentation":"Error \"pi-ai chat history cannot represent structured assistant image output\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/llm/llm-pi-ai/src/replay.ts:158 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Remove structured assistant image output from the chat history before replay."],"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"}